Repository navigation
Scorecard, attempt ratchet, final-state judging, retry candidates, figure records - #1586
Merged
Merged
Conversation
Canary 7 was the only one of fourteen runs to have every task accepted. Its quickstart commands carried trailing comments, which the executor passed to the script and to pytest as arguments (exit 2, exit 4). Nothing owned the failure and the run spent its last 21 steps repeating it. Replayed on a copy of that project, all four run-book commands now exit 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
Audit of fourteen acceptance runs: about 65 'rejected 3x' events against 30 three-in-a-row rejections by the verifier model, and about 55 failed platform runs of a task's own script, each of which was rejected without a model call and counted toward the three. A rejection decided from the filesystem now counts toward STALL_CAP (6). Three judgements still close a task, and a replayed verdict still counts, since its frequency could not be measured. Every decision is appended to <state>.ledger.jsonl with its kind, so the next audit can count what the strikes were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
Canary 12: a methods document with its citation was regenerated as a bare table by a later rerun of the analysis driver, twice in one run, and the task that wrote it was rejected for 'no citation'. In 9 of 14 recorded runs at least one output file is named as a write target by two or more scripts (heuristic, an upper bound). Each executed script's log now lists the files the run wrote and names any it took over from a different script; the verifier's evidence says which run last wrote each file it judges; the implementer prompt states that one script writes each output file. This makes an overwrite visible and attributable. It does not prevent one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
Reads each run's step trail, final task list and verification ledger and prints one row per run plus totals, so a change is judged against every recorded run rather than the latest one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
…over A pytest run whose test executes the script under test made the run log say the test 'replaces the version written by' that script and that 'one script should write the whole file'. The script was the only writer. Reliability batch 1, run 2: the note sat in the T016 retry prompt on every attempt. A test run still lists the files that changed; it neither becomes the recorded writer nor reports a takeover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
Every script run, every pytest test and every verifier decision is appended by the harness to <memory>/scorecard.jsonl as a 1/0 value for a named criterion (run:<script>, test:<node id>, files, judge). No behaviour change: this is the record the ratchet and the routing rules will read. Batch 1 rebuilt after the fact: 44 observations made a passing check fail against 64 that made one pass; the pipeline recorded neither. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
…erified The 'last written by a run of' note added to the evidence header was also hashed, so another task's run regenerating the same bytes reopened an accepted task. Batch 1: 46 of 269 re-judgements of accepted tasks had byte-identical evidence apart from the note, and 4 of them flipped. The verifier still reads the note; the verification hash ignores it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
… carry arguments and the task definition A reply may not supply the contents of a file that a script's run produced: batch 1 run 2 had a hand-written benchmark report replace the measured one while the owning tasks' tests kept passing. The refusal names the producing script and task. Scorecard: a run is keyed by its command (script and arguments), and every observation records the hash of the task definition it was made for, since a re-plan reuses task ids for different work (40 of 74 ids in batch 1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
… state An accepted task whose evidence changed is held under review while any task is still open, and judged when none is. Missing files and failed runs still reopen it at once, and new work is judged at once. Batch 1: 269 verifier calls re-judged a task accepted in its previous judgement (231 for an unchanged definition, up to 11 per definition); 28 flipped, each a strike toward re-planning the project mid-implementation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
The project's tests run before and after each research-track attempt, in the same environment. If a test that passed now fails, or a test module the attempt rewrote has fewer passing tests, every file is put back, the task is marked as a failed execution naming the test module (so the existing bounded retry accounting applies), and <task>.attempt-not-kept.log tells the next attempt which tests broke and what was undone. Attempts that change no test outcome are kept. The scorecard records kept = 1 or 0. Batch 1: none of the 13 retries that made a passing executed check fail was later accepted; 25 of the 39 accepted retries changed no executed check. Not guarded: paper tasks, projects with no passing test, test suites slower than 120 s, projects over 500 MB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
…rd of what they show Retry candidates. A research task that was already attempted gets RETRY_CANDIDATES (3) independent replies to the same prompt, requested in parallel. Each is applied under the ratchet and put back; the best by (kept, claimed complete, passing tests) is then applied for real. A first attempt still gets one reply. LLMXIVE_RETRY_CANDIDATES overrides the count. Bench on a stuck task limited by execution (r1-2 T026): accepted 4 of 7 with three candidates against 3 of 16 with one. No gain on two tasks the verifier rejects for other reasons (1 of 6 vs 1 of 16; 0 of 6 vs 0 of 8). Figures. llmxive_toolkit.save_figure writes the image and <name>.figure.json (titles, axis labels and scales, legend, every plotted series with its point count and ranges), read from the figure object. The task verifier's evidence for an image is now its measured size and blankness plus that record, in place of the image bytes decoded as text. The tasker is told to state figure requirements against the record and never to require visual inspection; one task of that kind was rejected on 9 of 9 attempts. Also: scripts/maintenance/task_replay_bench.py (single attempts at the task a finished run was stuck on, with the real implementer and verifier); ratchet.Snapshot; scorecard.suspended; pillow declared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
…ault Batch 3 (five fresh acceptance runs on 47f635b) reached research_complete once in five. Three of the endings were harness defects: - An artifact path such as `tests/../specs/x.yaml` stays inside the project, so it passed the escape check, and the directory preparation then raised and ended the run (run 4, step 12). The path is now normalised and written where it points; one that leaves the project is refused. - A failed run-book execution reopened tasks only by names found in the failure. A `pytest -q` failing in modules no task line names reopened none, the implementer was never dispatched, and run 3 spent its last 19 steps re-running the same command. Failing pytest modules are now reopen targets, and when no task is open after a failed run, one quoting the command is added. - A project task naming `.github/` or `state/` is rejected by the verifier whatever is produced (run 1: 22 verifier rounds and 39 implementer replies on one such task, then a whole re-plan). The task list is now refused where it is written (tasker, reviser, engine bridge), and the implementer stops on one, which routes the reason back to the tasker. The three implementer agents now default to gpt-oss-120b. In batch 3 glm-5.3 delivered 10 implementer replies in 42 minutes plus 72 minutes of calls that hit the deadline; gpt-oss-120b delivered 416 in 184 minutes with no failures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
…en run records, stale citation rows Found by auditing the stuck tasks of batch 3 runs 2 and 5 and the review kickback of run 3. - The mark an undone attempt leaves names the test modules it broke. They pass again once the files are restored, no reply can "rerun them successfully", and the verifier rejects a marked task without judging it: 15 such rejections, two tasks never judged again. A kept attempt now clears the marks for modules that pass. - An attempt that fails only the task's own tests (a module only this task has run records for) is kept and marked instead of undone. One task's test passed only through a branch the verifier called fabricated; six replies removing the branch were each undone. - The verifier was shown a task's newest three run records. A task with eight was rejected for "no log" of a test that had run and passed. Every command now has a record, within a shared size budget, head and tail of each. - A failed citation row blocked acceptance after the reference had been removed from the document (run 3: a placeholder repository URL from the planning-time quickstart sent a unanimous research review back to implementation). Such a row is now ignored when the file has changed since the scan and no longer contains the value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
…s, bare contract names From an audit of the 131 rejections in four stuck canary runs (batches 4 and 5) and of every plan-panel kickback in 23 runs. - A harness-run pytest session now leaves the project's files as it found them (ratchet.files_unchanged, used by both ratchet test runs and the implementer's test-module run). Project tests reran scripts with small arguments or removed the results folder: 20 of 131 rejections. The session's log names what was put back. - The reviser change-log is read from the text before the first artifact marker, with or without a closing fence. gpt-oss-120b left the fence open in 102 of 157 plan-reviser replies; the parser ran on to a fence inside the plan, nothing parsed, and all 12 plan kickbacks ended on concerns the reviewers had passed. - A contract named by its bare file name resolves to the active feature's contracts/ folder. The verifier was told two existing schemas were missing four times in one run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
Every implementation step in which any task had exhausted its reject cap spent one project-wide model tier, and the third such step re-planned the whole project. Three tasks failing once each therefore discarded a plan whose other tasks were still being accepted. In canary batches 1-4, 15 of 18 runs re-planned 7-12 steps into implementation and 2 of those 15 finished; 2 of the 3 that never re-planned did. The unverifiable store now keeps a per-task exhaustion count that survives clear() and is dropped by forget() on a re-plan. The router raises the model tier to the count of the most-exhausted task and re-plans only when one task has exhausted its cap once per free tier, which is as many tries as a task ever had. Nothing is force-accepted and MAX_REPLAN_ROUNDS is unchanged. One existing test reached a re-plan with a single exhaustion on a project already at the top tier; its setup now records the task as exhausted on every tier. Its assertions are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
Batch 5 run 5 (2026-10-12) spent 132 minutes implementing and never re-planned; 28.5 of them were model calls and about 86 were the ratchet running the whole test suite (about 92 sessions at 53-70 s). A retry tried three candidate replies, each measuring the same restored baseline and settling, then applied the winner a second time: 8 sessions. Now the baseline is measured once (ratchet.measure), and the best candidate's files are kept as they came out, with the scorecard rows it would have recorded held back and replayed, instead of producing it again. New test counts the sessions (4); it reports 8 against the previous source. Full suite: 8722 passed, 21 skipped; ruff, state_readers, prompts pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
Batch 6 run 3 (2026-10-12) had nothing left to implement for its last twelve steps and ran out of time. Every step reran the run-book before verifying; the rerun rewrote outputs that record a run time (summary.csv, summary.json, runtime.log, and the checksum file derived from them); the changed bytes withdrew eleven accepted tasks; and the six verdicts of a pass went, in file order, to accepting the same six again while five others waited under review. The preview now records a digest of what a rerun could depend on (code, tests, run-books, requirements, and which output files exist) after a clean run, and returns without running when it is unchanged. A failed run-book records nothing and is run again. Replayed on a copy of that run's project: the first preview changed six files, the second and third none. Full suite: 8724 passed, 21 skipped; ruff, state_readers, prompts pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2
The guard against a re-exporting wrapper at the project root refused every root-level `X.py` whenever `code/X.py` existed. Batch 7 (2026-10-12): run 1 had both files, its tests ran the root one, and 44 edits to it were refused while a one-line argument bug outlived three model tiers; run 2's task named the script by its bare name and nine rewrites were dropped. Both re-planned and ran out of budget; no completed run in batches 5-7 has such a refusal. A root script that already exists is edited like any other file. A whole script sent under the bare name is written to the one that exists. A file that imports or runs the existing script is still refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015yagPcsTADrhSPTJCaxFSs
ac9cd6a sent a script written under its bare name to the copy in `code/`, but chose that copy after the checks that keep a write inside the project. A `code/X.py` that was a symbolic link was then written through. The choice is now made first, so the escape, control-file and name-collision checks all see the file really written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015yagPcsTADrhSPTJCaxFSs
Brings in spec 026 (model selection through llmxive.model_selection), spec 027 (Hugging Face funded provider), spec 025 slices and CI changes. Conflicts: - task_verifier.py: receipts bind main's selection_identity(profile, overrides) and still strip the branch's "last written by" note. - graph.py: per-task exhaustion escalation kept; the log line names the tier constraint. FREE_MODEL_TIERS is gone on main, so the re-plan bound is execution_status.free_tier_count() (the ladder's free rungs). - registry.yaml / README: main's profiles kept (implementers on deep_code). The branch's gpt-oss-120b implementer default (59cd0bc) is NOT carried over: spec 026's binding US5 AC1 test requires every agent's chain to lead with the pre-migration default. Left for a maintainer decision. Semantic conflicts: - implement_cmd retry candidates asked chat_with_fallback for a model id and backends that main removed; they now ask the same profile and tier overrides as the first reply (test asserts this). - task_replay_bench.py takes --profile (default: the implementer's registry profile) instead of --model. - test_exhaustion_planner_dispatch used es.FREE_MODEL_TIERS; now the free rungs of main's ladder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DcKtypjyK1UB7PSkync3eK
…dropped provider Two findings from reliability run r3 (2026-11-24): - route_kickback: with a marker_route, the document's own unverified-claim markers no longer choose the route when a reviewer concern is also open. The route follows the worst severity reviewers raised; markers alone still go to marker_route. In r3 a requirement-level reviewer concern restating the markers inherited the marker's science severity and sent an accepted research stage back to the research planner. - Hugging Face backend: HTTP 400 with code model_not_supported (the pinned provider stopped serving the model after the catalog snapshot) is now HFRouteUnavailable, so the chain advances instead of aborting the panel. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DcKtypjyK1UB7PSkync3eK
…ain) Adds llmxive-reliability-run.yml: a dispatch-only job that runs tests/real_call/test_pipeline_acceptance.py alone and uploads its evidence. It holds contents:write for the funded ledger and, like the other write jobs, runs only on a dispatch from main (enforced by tests/unit/test_workflow_hf_env.py). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DcKtypjyK1UB7PSkync3eK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #1585 (its commits are included). Not to be merged until a fresh reliability batch on this head is in.
What changes
speckit/scorecard.py): the harness appends one 1/0 value per criterion per attempt to<memory>/scorecard.jsonl— each command with its arguments, each pytest test, required files, the verifier's verdict, whether an attempt was kept, how many candidates were tried. Every row carries the hash of the task definition it was measured for.[~]while any task is open and judged once none is. Missing files and failed runs still reopen it at once.speckit/ratchet.py): the project's tests run before and after each research-track attempt; if a passing test breaks, all files are restored, the task is marked as a failed execution naming the test module, and<task>.attempt-not-kept.logsays what broke.llmxive_toolkit.save_figurewrites<name>.figure.jsonfrom the figure object; the verifier's evidence for an image is its measured size and blankness plus that record. Tasker and implementer prompts say so.scripts/maintenance/task_replay_bench.py: single attempts at the task a finished run was stuck on, with the real implementer and verifier.Evidence so far
Not covered
Paper-track attempts are not guarded by the ratchet or given candidates. Test suites slower than 120 s and projects over 500 MB are not guarded.
🤖 Generated with Claude Code
https://claude.ai/code/session_01V7QkYvK7jaE1QVY1ZMfAt2