Repository navigation
Description
Overview
The gradient searches' resampling statistics (Resurrections, the NaN lane-step counts and rates, Constrained Lane-Steps) are currently emitted in the middle of search.summary, between the sample counts and the timing lines. The user asked for them to live at the bottom of the file instead: a blank line after the 'Visualization Time' line, then a Resampling Info subheader followed by the six resampling lines. This makes the file read as "what the search found, how long it took, then the resampling diagnostics" rather than interleaving diagnostics with headline numbers.
Plan
- Extract the resampling block out of
search_summary_from_samplesinto its own helper, preserving every existing emit-nothing guard (no keys → no lines; no constrained key → no constrained line; zero lane-steps → no rates). - Append the block at the end of
search_summary_to_file, after the timing/visualization lines, separated by exactly one blank line and introduced by aResampling Infosubheader. - Update the resampling tests to assert the section sits at the end of the written file, and add a Witness-shaped ordering test; the Clipper/Scaler lines and all other summary content are untouched.
Detailed implementation plan
Affected Repositories
- PyAutoFit (primary, only)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoFit | main (e6ff1e6) | clean |
Suggested branch: feature/resampling-info-summary-section
Implementation Steps
autofit/text/text_util.py— add_resampling_summary_from(samples_info) -> [str]holding the block currently at the middle ofsearch_summary_from_samples(guarded onn_value_nan_lane_steps;Constrained Lane-Stepsonly whenn_constrained_lane_stepsexists; rates only whenn_starts * total_steps > 0), and remove the block fromsearch_summary_from_samples. The Clipper/Scaler lines stay where they are.autofit/text/text_util.py— insearch_summary_to_file, after the Visualization Time append (and equally whenvisualization_timeis None), append the section when the helper returns lines: exactly one blank line, thenResampling Info\n, then the six lines. The 'Visualization Time' line has no trailing newline while the other tail lines do, so the separator normalises to end the previous line and leave one empty line either way.test_autofit/text/test_text_util.py— repoint the resampling-content tests (nan_lane_step_counters,nan_rates_omitted_when_no_lane_steps_taken,constrained_lane_steps_reported,constrained_absent_when_never_written) atsearch_summary_to_fileviatmp_path, keep the absent-for-other-searches invariants (noResampling Infoheader in a Nautilus summary), and add a Witness test: withvisualization_timegiven, the file ends withVisualization Time … \n\nResampling Info\n+ the six lines in order.
Key Files
autofit/text/text_util.py—search_summary_from_samples,search_summary_to_filetest_autofit/text/test_text_util.py— resampling/summary testsautofit/non_linear/paths/abstract.py—save_summary(sole production caller; unchanged)
Original Prompt
Click to expand starting prompt
Add Resampling Info section to the bottom of search.summary
Type: bug
Target: PyAutoFit
Difficulty: small
Autonomy: safe
Priority: normal
Status: formalised
Consequence: glance
Witness: a completed search's search.summary file ends with a blank line after the 'Visualization time' line, then a 'Resampling Info' subheader followed by the six resampling lines (Resurrections, Value-NaN Lane-Steps, Gradient-NaN Lane-Steps, Constrained Lane-Steps, Value-NaN Lane-Step Rate, Gradient-NaN Lane-Step Rate).
Review-minutes: 3
Unattended: ready
Add Resampling Info section to the bottom of search.summary
Original request (verbatim): these should be at bottom of search.summary, with a space after the 'Visualization time' line, and a subheader saying 'Resampling Info': Resurrections = 0
Value-NaN Lane-Steps = 5540
Gradient-NaN Lane-Steps = 36
Constrained Lane-Steps = 0
Value-NaN Lane-Step Rate = 0.6520715630885122
Gradient-NaN Lane-Step Rate = 0.00423728813559322
Witness: a completed search's search.summary file ends with a blank line after the 'Visualization time' line, then a 'Resampling Info' subheader followed by the six resampling lines (Resurrections, Value-NaN Lane-Steps, Gradient-NaN Lane-Steps, Constrained Lane-Steps, Value-NaN Lane-Step Rate, Gradient-NaN Lane-Step Rate).
Activity
Jammy2211 commentedon Aug 31, 2026
Library PR created: #1554 (
feature/resampling-info-summary-section, one commit, +145/−52 acrossautofit/text/text_util.pyand its tests).Workspace impact — recommendation (iii): no workspace work needed. API Changes are "None — internal output-format change": no symbols removed, renamed, or re-signatured, and no script or tool in the organism parses
search.summary(grepped the library and workspace checkouts; the only mentions are prose). The autofit_workspace curated smoke subset was run against the branch in-container: 8/8 PASS, and a real MultiStartAdam smoke run'ssearch.summaryshows the Witness exactly — blank line afterVisualization Time,Resampling Infosubheader, the six resampling lines closing the file. The remaining five workspaces could not be smoked in this container (no lens-stack checkouts); the batch record's expected-effects line for this member already anticipates smoke-output-pin staleness from the format change.All five autonomous-ship gate legs are recorded on the PR (tests 2328/0 fail, smoke 8/8, review CLEAN with claim dispositions, Heart STALE 35 within the shift's heart-ack, independent adversary CLEAN). Per the batch contract the run ends at PR-open — merge is the human's act at review, serially before the other two PyAutoFit members this shift.
Generated by Claude Code