Repository navigation
Conversation
7c86063 to
c2e080e
Compare
|
@rux001 @cuizz11 This is ready for review when you have a moment. If another route is considered, understood. On #32 and #37 don't depend on this PR and can be reviewed and merged in any order. |
|
I did a zero-cost check on whether this moves benchmark scores on a before/after run: I captured every prompt sent to the model on main vs this branch (d338a59) with the offline demo adapter, across k=1/2/3 with and without deliverable assets, and all 184 prompts are byte-identical (including the 24 experience prompts) once you ignore call order. So on a fresh run the model sees the exact same input on both, and the true score effect is zero. A paid before/after benchmark might just measure run-to-run noise, so I don't think it's personally worth the spend. In this context, I think the benchmark benefit is resumed runs. Scores could get more honest, since main can quietly mix tasks done under old and new prompts, which understates a prompt edit's effect by roughly the fraction already finished. Concern is resume gets pricier: a re-run at position j invalidates everything after it in that domain through library_fingerprint, so one early transient failure re-runs nearly the whole tail. On top of that, pre-PR summaries all re-run once on first resume. Worth spelling out that cascade in EXPERIMENTS.md, and maybe adding an opt-out flag for people resuming after flaky failures. One gap: the demo doesn't exercise deliverable_assets_reference_only=True, though reading the code it takes the same path as main. |
|
EDIT 20261021: fixed once the tests moved into separate files so the three now merge in any order without conflict gentle ping: #32, #36 and #37 are each mergeable against current main. Among themselves they conflict only in |
9ed2203 to
cc55f07
Compare
|
Full Update (36)
Why not avoid that one-time re-run:
On the opt-out flag I mentioned: I'd scope it to old summaries only. A summary missing these fields would be accepted, with today's digest and fingerprint written into it and one line logged per task, and checked normally from then on. I'd leave the cascade on, since turning it off keeps results built on a library that has since changed. I left the flag out so the default stays correct, and can add it if you want it. |
Resume skipped finished tasks without checking the prompt templates or the experience library they were built on. Each mode now records a digest of the selection and experience prompts and a fingerprint of the library it read; a task whose digest or fingerprint no longer matches re-runs, and later tasks follow. Tests in tests/test_resume_identity.py.
0dd18c1 to
d297fbd
Compare
|
here's an unofficial report from some local testing. for information purposes and this info has had no human review outside of myself. Merge test of the open PRs against I tried merging the open PRs together locally to see which ones combine cleanly, in case it helps when reviews start. I'm the author of #32, #36 and #37, so weigh what I say about those accordingly. Procedure
The merge order is my choice, and it decides which side of each conflict merged first. A different order would give a different set. Result: 51 of 71 PRs merged together with every test passing#37, #79, #32, #7, #127, #10, #12, #17, #24, #28, #88, #89, #110, #122, #9, #11, #23, #25, #30, #35, #58, #70, #8, #19, #21, #48, #53, #54, #76, #92, #105, #132, #134, #14, #16, #18, #20, #26, #49, #67, #131, #15, #29, #34, #47, #75, #87, #104, #119, #103, #1 Text conflicts; tests pass once swapped in (12)In most of these pairs the two PRs fix different things and touch the same lines, so a rebase should let both in.
The one real either/or is #36 and #21: both add the same library check on resume, and #36 also checks the selection/experience prompts. They differ in one case: a task resumed directly with Tests fail even after swapping (4)Each needs rework against what's already merged:
No text conflict, but a pair fails its testsConfirmed on
Other
Tests passing only shows that the PRs combine. It doesn't show each fix is correct. I'm happy to share the script or re-run it against a newer Tooling: Claude Opus 5.5 (Claude Code) ran the merges and tests. |
Summary
On
main, resuming a run skips every finished task, even if the selector/experience prompts or the experience library it read have since changed, so results made under the old inputs are kept. This PR recordsprompts_digestandlibrary_fingerprintin each task'ssummary.jsonand re-runs the task on resume when either no longer matches; unchanged tasks still skip, and finished rollouts are still reused.Resume flow, before and after:
flowchart TB subgraph B["Before (main)"] direction LR B1[resume a finished task] --> B2{adopted run, output<br/>and harness intact?} B2 -- no --> B3[re-run task] B2 -- yes --> B4[skip, reuse result] B5[prompts or library it read<br/>changed since the run] -. not checked .-> B4 end subgraph A["After (this PR)"] direction LR A1[resume a finished task] --> A2{adopted run, output<br/>and harness intact?} A2 -- no --> A3[re-run task] A2 -- yes --> A4{library entries it read<br/>unchanged?} A4 -- no --> A3 A4 -- yes --> A5{selection/experience<br/>prompts unchanged?} A5 -- no --> A3 A5 -- yes --> A6[skip, reuse result] A3 -. new library entry .-> A7[later tasks in the domain<br/>see a changed library] A7 -.-> A4 end B ~~~ AWhy
A resumed run refuses to mix models or task lists:
_check_identitysaves them, withMETHOD_VERSION, inconfig.jsonand stops on a mismatch (run_sweep.py:209-235). Prompt edits are not part of that identity unlessMETHOD_VERSIONis bumped, which invalidates the whole run directory. This PR re-runs only the tasks whose prompts or library changed, the same waymainalready re-runs a task whose adopted harness changed (schedule.py:409-411).Fix
<task>/summary.json, checked on resume. A mismatch re-runs the task; finished rollouts are still reused through their harness fingerprints.prompts_digest: a hash of the selector and experience prompts and the candidate file headers (including the transcript preamble when candidates are shown as transcripts), built by the same helpers that write them (_select_mission(),_experience_mission(),_candidate_header()), with task data replaced by placeholders. Atk = 1only the experience prompt is hashed.library_fingerprint: a fingerprint of the library entries the mode read, leaving out the task's own entry (written after it runs) andINDEX.md(rebuilt from the entries, so only its fixed wording goes unchecked).n_candidates,trivial,pool_kind,evidence, each candidate'sasset_names, andexperience_prompted(set where the experience prompt is sent).Effect on existing runs
root_for(tag=...)changes whenever that run writes to it, so its tasks re-run on resume.propose,aggregate,compose_round) are out of scope.Related
input_library_fingerprint); only one is needed. See the comparison on fix: invalidate resumed tasks when experience prefix changes #21.feedbackneeds passing through the two helpers. I'll do it if this PR merges second.harness2/core/selection.py, so the two conflict there. I'll rebase if this PR merges second.test_failed_rerun_clears_stale_selections_in_summarythen expects["partial", "skipped"]; with this PR the second task re-runs because the first task's library entry is gone, so it becomes["partial", "partial"]. Whichever merges second updates that expectation.Validation
Python 3.12 and 3.13, at d297fbd.
Tooling