Repository navigation
feat: durable recovery checkpoints and quota handoff for writing stages (#503) - #554
Conversation
Add scripts/recovery_checkpoints.py. A checkpoint records the exact staged, unstaged and eligible untracked state of a worktree as Git objects behind a private refs/code-cycle/recovery/<id> ref, built through private index files so the real index, worktree and branch are never touched. Metadata extends the telemetry store, bound to repository, task, change request, cycle, stage, attempt, workspace, branch, HEAD, secret-rule digest and parent checkpoint. Intent is persisted before any object and a checkpoint completes only after its ref; reconcile_pending finishes or fails what a crash left, and the same logical capture is never recorded twice. Verification reports corrupt metadata, missing refs or objects, wrong scope, a changed HEAD and later edits without modifying anything; restore refuses a dirty worktree. Secret paths (versioned defaults plus code_cycle.recovery.secret_paths), credential content (the journal's existing detector, now exposed as contains_credential) and ignored files are never captured and fail closed; excluded or unsupported content makes a checkpoint incomplete. Retention is lifecycle-based with explicit, idempotent prune and --dry-run. A writer lock excludes other toolkit writers only. Operators can inspect, restore, adopt (operator_adopted, single use), discard, prune and unlock.
…point (#503, #525) An implement or resolve stage in a Git worktree now takes a baseline checkpoint when its dispatch attempt opens, and another when it is interrupted or runs out of quota. A quota stop hands the same worktree to the configured fallback once, in the same stage, when the checkpoint is complete, the process exited, the starting state was known, HEAD only moved forward and no remote or publication changed. Local commits no longer stop it with dirty_workspace or workspace_changed. The worktree is re-verified against the checkpoint just before the fallback starts, and the fallback is told the checkpoint, original executor and local commit count, and that the handoff is not functional verification. When the fallback is exhausted as well the stop names every reset time and the driver ends BLOCKED. Telemetry records reroute_reason checkpoint_handoff or checkpoint_incomplete and a recovery/quota_handoff journal event with the checkpoint, executors, heads, local commits, fingerprint and reset time. A toolkit writer lock refuses a second toolkit writer before dispatch. A dirty --from resume also accepts an explicit operator adoption of the exact worktree, consumed once. Completed stages consume their checkpoints and a closed cycle marks them terminal for explicit pruning. Docs: routing (automatic handoff), review-cycle, instrumentation, telemetry, configuration and the capability-parity audit (PA-53, PA-54, new handlers).
Also guard is_ancestor against a missing recovery root for basedpyright; checkpoint and root are always set together, so behaviour is unchanged.
Implementation summary (#503, absorbs #525)
Run: |
[CCR-20261130-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2REVIEW_PASSED_AWAITING_CI for
Local checks on this head pass: full suite 2856 tests, Review details, findings, verification, CI and receiptScope. [REV-001] · low · open · - · blocks:no — Stale-lock reclaim can evict a live writer's lock
[REV-002] · low · open · - · blocks:no — Adoption
|
| Check | Command | Result |
|---|---|---|
configured-test |
python3 -m unittest discover -s tests |
pass: exit 0, 2856 tests, 1 skipped, 637 s (the harness moved it to the background after 600 s; its exit was read) |
verify:python3 scripts/validate-package.py |
python3 scripts/validate-package.py |
pass: VALID: 16 skills |
verify:basedpyright |
basedpyright |
pass: 0 errors, 0 warnings |
verify:python3 -m unittest |
python3 -m unittest |
exit 0 but 0 tests discovered: no evidence, configured-test covers the suite |
| extra | python3 -m unittest discover -s tests -p test_recovery_checkpoints.py |
pass: 26 tests |
| extra | ... -p test_quota_handoff.py |
pass: 12 tests |
| extra | ... -p test_quota_resume.py |
pass: 25 tests |
| extra | ... -p test_fast_path.py |
pass: 42 tests |
Not verified: Windows behaviour (lock liveness probe, POSIX modes), and the REV-001 race by execution.
CI (head be91c43, policy parallel, read once). Passed: Classify the change, Skills/manifests/Bash installer, Windows test shard (windows-1, windows-2, windows-3). Failed: Windows test shard (windows-4), PowerShell installer. windows-4 is the shard that now lists test_quota_handoff and test_recovery_checkpoints; the failure log was not readable from this stage, so its cause is unknown. The latest Validate package runs on main passed. This is a CI state, not a finding.
Security triage. The deterministic rule did not fire: no CI workflow, .env/key file, agent or toolkit configuration, or sensitive label is changed. Reviewer reading: the change handles secrets only by excluding them, adds a local operator CLI and a local lock, and exposes no remote input or authorization boundary. Not a sensitive change: the security audit was skipped after triage. The secret-exclusion logic was read within the correctness pass; its limits are the documented ones (published credential formats and listed paths only).
Documentation. Owning pages updated (recovery-checkpoints.md, routing.md, review-cycle.md, telemetry.md, instrumentation.md, configuration.md, capability-parity-audit.md, docs/README.md, CHANGELOG.md); README.md correctly unchanged; the PR description lists the documentation reviewed. #450: the automatic path alone stops, and PA-53/PA-54 record no toolkit veto.
Residual risks. A pending row left by an abrupt kill is reconciled only by inspect; a reconciled row has no fingerprint, so it can never match a worktree (it fails safe). Locks cannot attribute external edits (disclosed). Credential content detection covers published token formats and private keys only.
|
BLOCKED before triage: review finding IDs collide. PR head remains Provider-authenticated comments by Collision evidence, proposed mapping, verification and receiptRecovery evidenceRead the complete PR comments in chronological order through
These are different root causes, not merely title or severity edits. The first comment also assigns REV-004 to retention documentation and REV-005 to stale-lock reclaim. Omitting those IDs in later comments does not remove them. Proposed mapping, awaiting explicit authorizationPreserve the earliest assignment of each ID and consolidate duplicate reports by root cause:
This table is a proposal only. No finding was triaged, renumbered, resolved, or declared not applicable in this attempt. The source findings retain their original headers in the linked comments. No triage run line is emitted because triage did not complete. Verification and remaining obligationsNo functional verification ran; configured-test remains required and unverified. All AC-1 through AC-13 remain open in this attempt, with no executed check linked to them. Prior tests and CI are historical evidence only. No post-change review or security audit ran; no source change was made. The runtime plan has security_required=false. Existing CI failures remain undiagnosed and require investigation after recovery. No pushed-head checks are claimed. Skill stop rule: “Return BLOCKED when two non-empty titles identify different findings with one ID, whether they appear in one trusted comment or across the trusted history.” Source: |
… failure An implement resume journals a failed adoption lookup and continues with its --continue behaviour; a writer-lock release failure is journaled instead of masking the stage outcome. The racing reclaim test marks the killed holder dead portably for Windows, and the BLOCKED wiring test passes an empty Reported. (#503)
A resume outside a Git worktree keeps its previous journal unchanged. The broad-handler inventory lists _release_writer and the second _match_handoff handler. (#503)
[CCT-20261201-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:be91c436bd2259e2fecd676169180d5de305e67a · schema:2RESOLVED at
Fix-delta review follow-ups: a failed adoption lookup or lock release is journaled and never vetoes (#450). Checks: Triage, verification, history and receipt[CCR-20261130-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[REV-001] · low · resolved · valid · blocks:no — Stale-lock reclaim can evict a live writer's lock
[REV-002] · low · resolved · valid · blocks:no — Adoption
|
| Check | Command | Result |
|---|---|---|
configured-test |
python3 -m unittest discover -s tests |
pass: exit 0, 2864 tests, 1 skipped, 686 s (the harness moved it to background at 600 s; exit read) |
verify:basedpyright |
basedpyright |
pass: 0 errors |
verify:python3 scripts/validate-package.py |
python3 scripts/validate-package.py |
pass: VALID: 16 skills |
verify:python3 -m unittest |
python3 -m unittest |
exit 0, 0 tests: no evidence |
| targeted | recovery, quota and precheck modules | pass: 88 tests |
Environment: the local run shares Python, Git and POSIX with the Ubuntu CI. Windows behaviour (msvcrt guard, process liveness) was not run locally; the windows-4 shard covers it.
CI (head 1289117, policy parallel, read once): no checks were registered yet. Earlier be91c43 failures (windows-4, PowerShell installer) remain undiagnosed here; the CI gate decides.
Security: the deterministic rule did not fire (no CI, key or agent-config paths). The change is a local lock and lookup only, so the audit was skipped.
Documentation reviewed: docs/recovery-checkpoints.md was updated (guard, journal statuses, adoption precedence). docs/capability-parity-audit.md was updated (PA-53, inventory rows). docs/routing.md and docs/configuration.md were updated (guard file). README.md and AGENTS.md needed no change.
Run: resolve · profile deep_coder · requested anthropic/claude-opus-5-5 · effort high · resolved ?
…kpoints # Conflicts: # docs/capability-parity-audit.md
[CCT-20261201-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:1289117dbebe84aa2474f30e2f930a9e2a4f984b · schema:2RESOLVED at This round: the PR was
Checks: Triage, verification, history and receipt[CCT-20261201-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:be91c436bd2259e2fecd676169180d5de305e67a · schema:2[CCR-20261130-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[REV-001] · low · resolved · valid · blocks:no — Stale-lock reclaim can evict a live writer's lockNo change this round. Fixed in [REV-002] · low · resolved · valid · blocks:no — Adoption
|
| Check | Command | Result |
|---|---|---|
configured-test |
python3 -m unittest discover -s tests |
pass: exit 0, 2880 tests, 1 skipped, 762 s (the harness moved it to the background at 600 s; its exit was read) |
verify:basedpyright |
basedpyright |
pass: 0 errors, 0 warnings |
verify:python3 scripts/validate-package.py |
python3 scripts/validate-package.py |
pass: VALID: 16 skills |
| targeted | python3 -m unittest tests.test_capability_parity_audit tests.test_precheck_causes tests.test_claude_stage_refusals tests.test_recovery_checkpoints tests.test_quota_handoff |
pass: 82 tests |
| targeted | python3 -m unittest tests.test_validate_package tests.test_read_parity |
pass: 97 tests |
Environment: the local run shares Python, Git and POSIX with the Ubuntu CI. Windows behaviour was not run locally.
Security: the deterministic rule did not fire on this round's change (documentation only); no audit.
Documentation reviewed: docs/capability-parity-audit.md was updated (renumbering). The PR description and earlier comments still name the writer lock and quota handoff PA-53 and PA-54; they now read PA-54 and PA-55 in the repository. README.md, AGENTS.md and the other owning pages needed no change.
Run: resolve · profile deep_coder · requested anthropic/claude-opus-5-5 · effort high · resolved ?
[CCR-20261201-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2REVIEW_PASSED_AWAITING_CI for
Rereview details, findings, verification, CI and receipt[CCR-20261130-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[REV-001] · low · resolved · valid · blocks:no — Stale-lock reclaim can evict a live writer's lock
[REV-002] · low · resolved · valid · blocks:no — Adoption
|
| Check | Command | Result |
|---|---|---|
configured-test |
python3 -m unittest discover -s tests |
pass: exit 0, 2880 tests, 1 skipped, 903 s (the harness moved it to the background after 600 s; its exit was read) |
verify:basedpyright |
basedpyright |
pass: exit 0, 0 errors, 0 warnings, 0 notes |
ref-8ccc5e4478464d6ddcde25c59b2c6e895e5e6f1ea520b62dd0f6b48a0bd44048 |
python3 scripts/validate-package.py |
pass: VALID: 16 skills |
recovery-quota-modules |
python3 -m unittest tests.test_capability_parity_audit tests.test_precheck_causes tests.test_claude_stage_refusals tests.test_recovery_checkpoints tests.test_quota_handoff |
pass: exit 0, 82 tests (AC-1 to AC-6, AC-8 to AC-13) |
quota-resume-contract |
python3 -m unittest discover -s tests -p test_quota_resume.py |
pass: exit 0, 25 tests (AC-7) |
package-read-parity (optional) |
python3 -m unittest tests.test_validate_package tests.test_read_parity |
pass: exit 0, 97 tests |
Not verified locally: Windows behavior (the msvcrt guard branch and process liveness). python3 -m unittest was not run: discovery from the root finds no tests, and configured-test covers the suite.
CI (head c078143, policy parallel, read once). Passed: Classify the change, Skills/manifests/Bash installer, Windows test shards 1 to 3. Failed: Windows test shard (windows-4), PowerShell installer. The same two failed on be91c43. Their logs are not readable from this stage (gh run view is outside its command table), so the cause is unknown. This is a CI state, not a finding.
Security. The deterministic rule did not fire: no CI workflow, key or env file, or agent/toolkit configuration path changed. The delta is a local lock and a local lookup. Not a sensitive change: the security audit was skipped after triage.
Documentation. docs/recovery-checkpoints.md, docs/routing.md, docs/configuration.md and docs/capability-parity-audit.md cover the delta; nothing stale found. The PR description still says PA-53/PA-54 for the writer lock and handoff; the repository now says PA-54/PA-55 (noted by the resolver).
… defaults The windows-4 shard failed two restore tests: restore reported matches false. A checkpoint stored what Git's clean side produced and a restore took what its smudge side wrote back, so core.autocrlf=true turned LF into CRLF and core.symlinks=false checked a link out as a file. Capture now stores changed regular files unfiltered, and restore writes those bytes back after the checkout and recreates a link Git wrote as a file. Both cases are reproduced on any platform by setting the two options in the fixture repository. Refs #503
…d states Fix-delta review of the exact-restore change: a fully staged worktree skipped the unfiltered store while restore still rewrote its files, and unfiltered storage bypassed clean filters such as Git LFS or an encrypting driver. The unfiltered store now runs for staged-only files too and leaves any path with a filter attribute on its cleaned blob. The checkpoint commit declares unfiltered blobs and names the paths kept filtered; restore rewrites only what was declared, and a file it cannot rewrite keeps Git's checkout instead of raising. Refs #503
A staged deletion, link or gitlink was listed as filtered, so a large staged removal could outgrow the commit-message argument and leave the capture pending. Only a staged-only regular file that kept its cleaned blob is listed now, the checkpoint message goes to commit-tree on standard input, and a bare filter attribute, which names no driver, no longer keeps a path filtered. Refs #503
[CCT-20261201-003] · deep_coder · openai/gpt-6.2-sol→? · high · triaged:95416a26732cea9d5372e4e652706fb2b158a8fd · schema:2BLOCKED at
REV-001 through REV-003 were resolved in the prior round and their regression tests passed here. GitHub reported 6 pending checks at the new head. Triage history, verification and stage receipt[CCT-20261201-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:1289117dbebe84aa2474f30e2f930a9e2a4f984b · schema:2[CCT-20261201-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:be91c436bd2259e2fecd676169180d5de305e67a · schema:2[CCR-20261130-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20261201-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[REV-001] · low · resolved · valid · blocks:no — Stale-lock reclaim can evict a live writer's lockThe interprocess and same-process writer-lock tests passed at [REV-002] · low · resolved · valid · blocks:no — Adoption
|
| Check | Command | Acceptance criteria | Result |
|---|---|---|---|
configured-test |
python3 -m unittest discover -s tests |
— | Unverified after 10 minutes. Interrupted before the suite reported a result. |
verify:basedpyright |
basedpyright |
— | Pass · 0 errors, 0 warnings |
ref-8ccc5e4478464d6ddcde25c59b2c6e895e5e6f1ea520b62dd0f6b48a0bd44048 |
python3 scripts/validate-package.py |
— | Pass · 16 skills validated |
recovery-quota-modules |
python3 -m unittest tests.test_capability_parity_audit tests.test_precheck_causes tests.test_claude_stage_refusals tests.test_recovery_checkpoints tests.test_quota_handoff |
AC-1, AC-2, AC-3, AC-4, AC-5, AC-6, AC-8, AC-9, AC-10, AC-11, AC-12, AC-13 | Pass · 93 tests |
quota-resume-contract |
python3 -m unittest discover -s tests -p test_quota_resume.py |
AC-7 | Pass · 25 tests |
package-read-parity |
python3 -m unittest tests.test_validate_package tests.test_read_parity |
— | Pass · 97 tests |
recovery-cli-and-git |
python3 -m unittest tests.test_recovery_checkpoints.AdoptionTests.test_cli_adopt_inspect_discard_and_help tests.test_recovery_checkpoints.CaptureAndRestoreTests.test_file_and_directory_replacements_are_captured_as_deletions_and_additions tests.test_recovery_checkpoints.CaptureAndRestoreTests.test_only_the_scanned_bytes_reach_git_when_a_file_changes |
— | Pass · 3 tests |
publication-single-read |
python3 -m unittest tests.test_publication_reread.ResolveKeepsItsSingleReadTests.test_a_resolve_publication_is_not_waited_for |
— | Pass · 1 tests |
The superseded full run failed the single-read publication fixture during edits to the worktree. That fixture passed when rerun on both the clean final checkout and the trusted review base. Native Windows behavior is covered by the GitHub checks. Local fixtures exercised Git's Windows checkout settings.
GitHub snapshot. The new head had 0 passed, 0 failed and 6 registered pending checks when read once.
- Classify the change · pending
- Skills, manifests, and Bash installer · pending
- Windows test shard (windows-1) · pending
- Windows test shard (windows-2) · pending
- Windows test shard (windows-3) · pending
- Windows test shard (windows-4) · pending
- PowerShell installer · check run had yet to register while prerequisite shards were queued.
Security audit. Reviewed checkpoint scan-to-storage behavior, Git filter selection, symlink reads and writes, and the private Git refs. The synthetic credential exclusion and concurrent file replacement tests passed. Checkpoint locks coordinate toolkit writers. Credential detection covers the formats documented on the owning page.
Documentation reviewed. Updated docs/recovery-checkpoints.md for filter handling, staged byte fingerprints and symlink representation. The docs index, routing and capability-parity pages, readme, contributing and security policies, and GitHub templates and skill entry points still describe their respective workflows.
|
Owner review feedback to fix in this pull request before merge. These four findings were reported on medium · open · - · blocks:no — Permission rerun after a quota handoff is verified against the stale quota checkpoint Path: low · open · - · blocks:no — Checkpoint settled by Path: low · open · - · blocks:no — Retention doc and code disagree on interrupted checkpoints Path: Documentation: Security triage: the deterministic rule did not fire (no CI, secret-file, agent-config path or label changed; the runtime plan has Acceptance criteria ( Checks run:
CI (parallel policy, state only): pass: Residual risk: REV-001 is unexecuted. The two failing Windows jobs are new on this head and need the CI gate. A lock cannot attribute edits made outside the toolkit, as the doc discloses. ORCHESTRATION_RESULT (JSON)ORCHESTRATION_RESULT low · open · - · blocks:no — Same-process lock re-entry Path: Acceptance criteria (AC-1 to AC-13)Each has a check in the executed tests below (63 targeted, then the full suite).
Security triageThe deterministic rule did not fire (no CI, secret, key, agent-configuration path or label matched). The reviewer's reading found the change handles secret exclusion, but the audit was skipped as no sensitive surface (authentication, authorization, public API, dependency) changed. The secret-exclusion code was read inline. It fails closed on path, content, size and read errors. Residual: a file rewritten between the scan and Verification (executed in this stage, head
|
| Check | Command | Result |
|---|---|---|
recovery-tests |
python3 -m unittest tests.test_recovery_checkpoints tests.test_quota_handoff tests.test_quota_resume |
pass: 63 tests, 12 s |
validate-package |
python3 scripts/validate-package.py |
pass: VALID: 16 skills |
basedpyright |
basedpyright |
pass: 0 errors, 0 warnings |
unittest-default |
python3 -m unittest |
exit 0, 0 tests run (discovery finds none; no evidence) |
configured-test |
python3 -m unittest discover -s tests |
pass: exit 0, 2856 tests, 1 skipped, 751 s. It passed the 600 s foreground limit, was moved to the background by the harness and its exit was read afterwards. |
Windows behaviour (the lock's dead-process path, POSIX modes) was not executed here.
CI (read once, parallel policy; not findings)
gh pr checks 554: pass: Classify the change, Skills, manifests, and Bash installer, Windows test shard windows-1, windows-2, windows-3. fail: Windows test shard (windows-4) after 17m20s (it holds test_recovery_checkpoints and test_quota_handoff), PowerShell installer after 3 s. The failure logs are not readable in this stage (gh run view is not in the review command table), so the cause is unknown. The CI gate waits for and decides on these checks.
Documentation
docs/recovery-checkpoints.md (new), routing.md, review-cycle.md, telemetry.md, instrumentation.md, configuration.md, capability-parity-audit.md (PA-53, PA-54), README.md index and CHANGELOG.md are updated. The PR description lists the documentation reviewed. No missing page found. Capability parity (#450): the new stops cover the automatic path only; the operator can still inspect, restore, adopt or run any operation directly.
Residual risks
Locks exclude toolkit writers only (disclosed). Secret detection reduces exposure and cannot guarantee it. Windows has no process-group exit proof, so a quota stop there still stops.
The 2026-11-29 21:16 review also reported the stale-quota-checkpoint rerun (its REV-002) and the retention doc/code mismatch (its REV-004), the same issues as the first and third items above.
[CCT-20261201-004] · deep_coder · openai/gpt-6.2-sol→? · high · triaged:e01802fe80373321ff6f6a03209a5addd8ed555d · schema:2BLOCKED at
Three previously resolved findings retain their status. Triage history, verification and stage receipt[CCT-20261201-003] · deep_coder · openai/gpt-6.2-sol→? · high · triaged:95416a26732cea9d5372e4e652706fb2b158a8fd · schema:2[CCR-20261201-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCT-20261201-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:1289117dbebe84aa2474f30e2f930a9e2a4f984b · schema:2[CCT-20261201-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:be91c436bd2259e2fecd676169180d5de305e67a · schema:2[CCR-20261130-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[REV-001] · low · resolved · valid · blocks:no — Stale-lock reclaim can evict a live writer's lock[REV-002] · low · resolved · valid · blocks:no — Adoption
|
| Check | Command | Acceptance criteria | Result |
|---|---|---|---|
configured-test |
python3 -m unittest discover -s tests |
— | Unverified · 600-second timeout |
verify:basedpyright |
basedpyright |
— | Pass · 0 errors, 0 warnings, 0 notes |
ref-8ccc5e4478464d6ddcde25c59b2c6e895e5e6f1ea520b62dd0f6b48a0bd44048 |
python3 scripts/validate-package.py |
— | Pass · 16 skills validated |
recovery-quota-modules |
python3 -m unittest tests.test_capability_parity_audit tests.test_precheck_causes tests.test_claude_stage_refusals tests.test_recovery_checkpoints tests.test_quota_handoff |
AC-1, AC-2, AC-3, AC-4, AC-5, AC-6, AC-8, AC-9, AC-10, AC-11, AC-12, AC-13 | Pass · 96 tests |
quota-resume-contract |
python3 -m unittest discover -s tests -p test_quota_resume.py |
AC-7 | Pass · 25 tests |
package-read-parity |
python3 -m unittest tests.test_validate_package tests.test_read_parity |
— | Pass · 97 tests |
recovery-cli-and-git |
python3 -m unittest tests.test_recovery_checkpoints.AdoptionTests.test_cli_adopt_inspect_discard_and_help tests.test_recovery_checkpoints.CaptureAndRestoreTests.test_file_and_directory_replacements_are_captured_as_deletions_and_additions tests.test_recovery_checkpoints.CaptureAndRestoreTests.test_only_the_scanned_bytes_reach_git_when_a_file_changes |
— | Pass · 3 tests |
publication-single-read |
python3 -m unittest tests.test_publication_reread.ResolveKeepsItsSingleReadTests.test_a_resolve_publication_is_not_waited_for |
— | Pass · 1 test |
GitHub snapshot. One read confirmed 4861b1fc2593826d0b6edfa1855b4fb5757eb859. GitHub had registered 0 passed, 0 failed and 0 pending checks. The workflow's classification, skill and installer validation, four Windows shards, and PowerShell installer jobs were not yet registered. The cycle's parallel CI gate handles their results.
Documentation reviewed. Updated the recovery checkpoint and routing pages. The docs index, capability-parity audit, README, contributing and security policies, and GitHub issue template and skill entry points still describe the affected workflow.
Security triage. No configured trigger matched. The new checkpoint field contains the existing fingerprint digest, and the change to lock scope leaves the permission reconciliation in force. security_audit_ran=false.
The capture resolves its worktree root, so on a Windows runner whose temp directory is a short 8.3 name the scanned path never equalled the fixture's path and the file was never rewritten during the capture. Compare with os.path.samefile instead. Refs #503
[CCT-20261201-005] · deep_coder · anthropic/claude-fable-5-2→? · medium · triaged:4861b1fc2593826d0b6edfa1855b4fb5757eb859 · schema:2RESOLVED at
3 findings unchanged (REV-001 to REV-003, resolved). Checks: Triage history, verification and stage receipt[CCT-20261201-004] · deep_coder · openai/gpt-6.2-sol→? · high · triaged:e01802fe80373321ff6f6a03209a5addd8ed555d · schema:2[CCT-20261201-003] · deep_coder · openai/gpt-6.2-sol→? · high · triaged:95416a26732cea9d5372e4e652706fb2b158a8fd · schema:2[CCR-20261201-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCT-20261201-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:1289117dbebe84aa2474f30e2f930a9e2a4f984b · schema:2[CCT-20261201-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:be91c436bd2259e2fecd676169180d5de305e67a · schema:2[CCR-20261130-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[REV-001] · low · resolved · valid · blocks:no — Stale-lock reclaim can evict a live writer's lockNo change this round. [REV-002] · low · resolved · valid · blocks:no — Adoption
|
| Check | Command | Acceptance criteria | Result |
|---|---|---|---|
configured-test |
python3 -m unittest discover -s tests |
— | Pass · exit 0, 2894 tests, 1 skipped. The harness moved the run to the background at 600 s and its exit was read. |
verify:basedpyright |
basedpyright |
— | Pass · 0 errors, 0 warnings, 0 notes |
ref-8ccc5e4478464d6ddcde25c59b2c6e895e5e6f1ea520b62dd0f6b48a0bd44048 |
python3 scripts/validate-package.py |
— | Pass · 16 skills validated |
recovery-quota-modules |
python3 -m unittest tests.test_capability_parity_audit tests.test_precheck_causes tests.test_claude_stage_refusals tests.test_recovery_checkpoints tests.test_quota_handoff |
AC-1, AC-2, AC-3, AC-4, AC-5, AC-6, AC-8, AC-9, AC-10, AC-11, AC-12, AC-13 | Pass · 96 tests |
quota-resume-contract |
python3 -m unittest discover -s tests -p test_quota_resume.py |
AC-7 | Pass · 25 tests |
package-read-parity |
python3 -m unittest tests.test_validate_package tests.test_read_parity |
— | Pass · 97 tests |
recovery-cli-and-git |
python3 -m unittest tests.test_recovery_checkpoints.AdoptionTests.test_cli_adopt_inspect_discard_and_help tests.test_recovery_checkpoints.CaptureAndRestoreTests.test_file_and_directory_replacements_are_captured_as_deletions_and_additions tests.test_recovery_checkpoints.CaptureAndRestoreTests.test_only_the_scanned_bytes_reach_git_when_a_file_changes |
— | Pass · 3 tests |
publication-single-read |
python3 -m unittest tests.test_publication_reread.ResolveKeepsItsSingleReadTests.test_a_resolve_publication_is_not_waited_for |
— | Pass · 1 test |
The full suite also passed on 4861b1f before the test change (2894 tests, 1 skipped, 748 s). Environment: the local run shares Python, Git and POSIX with the Ubuntu job. The Windows path spelling that failed in CI cannot be reproduced locally; the windows-4 shard of 984fab7 is its evidence.
GitHub snapshot (head 984fab75b8c2fac37596883fb7c0fc36d7a437ea, policy parallel, read once): 3 passed, 0 failed, 3 pending.
- Classify the change · pass
- Windows test shard (windows-1) · pass
- Windows test shard (windows-2) · pass
- Windows test shard (windows-3) · pending
- Windows test shard (windows-4) · pending
- Skills, manifests, and Bash installer · pending
- PowerShell installer · not registered yet; it waits for the shards.
Security triage. The deterministic rule did not fire: no CI workflow, key or env file, or agent or toolkit configuration path changed. This round changed one test line. security_audit_ran=false.
Documentation reviewed. docs/recovery-checkpoints.md and docs/routing.md already describe the behaviour fixed in 4861b1f. A test-only change needs no page. docs/README.md, README.md, CONTRIBUTING.md, AGENTS.md, SECURITY.md, the templates and the skill entry points needed no change.
Run: resolve · profile deep_coder · requested anthropic/claude-fable-5-2 · effort medium · resolved ?
[CCR-20261201-002] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2APPROVED for
Security audit: skipped after triage, no change. Rereview details, findings, verification, CI and receipt[CCR-20261201-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20261130-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[REV-001] · low · resolved · valid · blocks:no — Stale-lock reclaim can evict a live writer's lockNo change this round. [REV-002] · low · resolved · valid · blocks:no — Adoption
|
| Check | Command | Criteria | Result |
|---|---|---|---|
configured-test |
python3 -m unittest discover -s tests |
— | pass: exit 0, 2894 tests, 1 skipped, 700 s (the harness moved it to the background after 600 s; its exit was read) |
verify:basedpyright |
basedpyright |
— | pass: exit 0, 0 errors, 0 warnings, 0 notes |
ref-8ccc5e4478464d6ddcde25c59b2c6e895e5e6f1ea520b62dd0f6b48a0bd44048 |
python3 scripts/validate-package.py |
— | pass: exit 0, VALID: 16 skills |
recovery-quota-modules |
python3 -m unittest tests.test_capability_parity_audit tests.test_precheck_causes tests.test_claude_stage_refusals tests.test_recovery_checkpoints tests.test_quota_handoff |
AC-1 to AC-6, AC-8 to AC-13 | pass: exit 0, 96 tests |
quota-resume-contract |
python3 -m unittest discover -s tests -p test_quota_resume.py |
AC-7 | pass: exit 0, 25 tests |
package-read-parity (optional) |
python3 -m unittest tests.test_validate_package tests.test_read_parity |
— | pass: exit 0, 97 tests |
recovery-cli-and-git |
python3 -m unittest tests.test_recovery_checkpoints.AdoptionTests.test_cli_adopt_inspect_discard_and_help tests.test_recovery_checkpoints.CaptureAndRestoreTests.test_file_and_directory_replacements_are_captured_as_deletions_and_additions tests.test_recovery_checkpoints.CaptureAndRestoreTests.test_only_the_scanned_bytes_reach_git_when_a_file_changes |
— | pass: exit 0, 3 tests |
publication-single-read (optional) |
python3 -m unittest tests.test_publication_reread.ResolveKeepsItsSingleReadTests.test_a_resolve_publication_is_not_waited_for |
— | pass: exit 0, 1 test |
Not verified locally: Windows behaviour (the msvcrt guard, process liveness, core.symlinks=false and autocrlf fixtures); the windows-1 to windows-4 shards cover it. python3 -m unittest was not run: discovery from the root finds no tests, and configured-test covers the suite.
CI (head 984fab7, policy parallel, read once). Passed: Classify the change, Skills/manifests/Bash installer, Windows test shard (windows-1, windows-2, windows-3, windows-4), PowerShell installer. 7 passed, 0 failed, 0 pending. The windows-4 and PowerShell installer failures of earlier heads are gone.
Security. The deterministic rule did not fire: no CI workflow, key or env file, or agent/toolkit configuration path changed. Reviewer reading of the delta: bytes are read once with O_NOFOLLOW, scanned, and the same bytes are hashed; a clean-filter path never stores raw bytes; restore writes only into regular files it opened without following links. Not a sensitive change: the security audit was skipped after triage.
Documentation. docs/recovery-checkpoints.md (filter handling, staged-byte fingerprint, retention) and docs/routing.md (permission rerun) cover the delta; nothing stale found. The PR description still names the capability-parity rows PA-53/PA-54; the repository now says PA-54/PA-55.
Closes #503
Closes #525
Absorbs #525 (its AC-1 to AC-5 are #503's AC-9 to AC-13).
Work item: #503
Summary
An interrupted
implementorresolvestage now keeps its exact worktree in a durable, scoped recovery checkpoint, and a quota stop hands that same worktree to the configured fallback once, in the same stage, instead of stopping withdirty_workspaceorworkspace_changed.scripts/recovery_checkpoints.py(new, in the runtime manifest): Git objects behind privaterefs/code-cycle/recovery/<id>refs, metadata in the telemetry store next to the attempt history. The intent row is written before any object, the ref after every object, andcompleteafter the ref. Crash reconciliation and duplicate captures are idempotent. Verification, restore (clean worktree only), secret exclusion that fails closed, lifecycle retention with explicitprune --dry-run, a toolkit writer lock, and explicit single-useoperator_adoptedadoption.scripts/cycle.py: a baseline checkpoint when an attempt opens; a checkpoint on interruption and on quota; the#525checkpoint gate in the reroute decision; re-verification of the worktree just before the fallback starts; the writer lock around each writing attempt; adoption as the second provenance a dirty--fromresume accepts; and consumption and terminal marking for retention.scripts/cycle_dispatch.py: a stage whose executors all ran out of quota endsBLOCKEDand names every reset time.Diagnosis
dirty_workspaceorworkspace_changed(Quota exhaustion in a writing stage stops the cycle with dirty_workspace instead of handing the worktree to the fallback #525) instead of continuing on the fallback.CycleRecorder._match_handoffandHandoffs.matchonly cover Route around recorded quota exhaustion and hand partial work to the fallback on resume #389's quota-only, same-HEAD case, and dispatch-attempt records preserve no recoverable content. Confirmed by reading the code:_record_quota_exhaustionrecords ownership only when HEAD is unchanged._reroute_gate→reroute.reconcilestops on any dirty tree, and nothing stores the worktree's content.tests/test_quota_resume.py::GitHandoffTests.exhaustasserts thedirty_workspacestop of a quota-exhausted resolve with edits and an available fallback, as part ofmain's suite; I did not run it on the base in this stage. After this change the same scenario hands over, so that fixture now makes its fallback unavailable to keep covering the Route around recorded quota exhaustion and hand partial work to the fallback on resume #389 resume path. With a local commit, the base's_record_quota_exhaustionrequires an unchanged HEAD, so no ownership is recorded and the stage stops; I traced this in the code but did not execute it on the base.Work units
WU-1scripts/recovery_checkpoints.py,scripts/cycle_journal.py,scripts/runtime.manifest,scripts/run_cycle.py,docs/recovery-checkpoints.md,docs/README.md,docs/configuration.md,docs/telemetry.mdtests/test_recovery_checkpoints.py(26),tests/test_run_cycle.py(KnownKeyTests)9a3b6be)WU-2BLOCKEDwhen every executor is exhaustedscripts/cycle.py,scripts/cycle_dispatch.py,scripts/telemetry.py,docs/routing.md,docs/review-cycle.md,docs/instrumentation.md,docs/capability-parity-audit.md,CHANGELOG.mdtests/test_quota_handoff.py(12),tests/test_quota_resume.py(25, fixture adjusted)WU-1(revert together, orWU-2first); commitsfbaa6ad,be91c43Private refs that existing checkpoints created stay in local repositories after a revert, and nothing reads them.
git for-each-ref refs/code-cycle/recovery/ --format='delete %(refname)' | git update-ref --stdinremoves them.Verification (agent-reported)
Head under test:
be91c436bd2259e2fecd676169180d5de305e67a. Checks were frozen against AC-1 to AC-13 before they ran. Results are agent-reported (tests.version: 2).configured-testpython3 -m unittest discover -s testsvalidate-packagepython3 scripts/validate-package.pyVALID: 16 skillsbasedpyrightbasedpyrightunittest-defaultpython3 -m unittestconfigured-testcovers the suiterecovery-checkpointspython3 -m unittest tests.test_recovery_checkpointsquota-handoffpython3 -m unittest discover -s tests -p test_quota_handoff.pyquota-resumepython3 -m unittest discover -s tests -p test_quota_resume.pyfbaa6adhad 1 failure and 1 error. Both came from the new modules missing fromscripts/windows-test-shards.json; this was fixed inbe91c43.tests.test_validate_workflowandtests.test_fast_pathwere then rerun (53 tests, OK), and so was the full suite above.commit.gpgsign=false, with no global Git identity or credentials. Not shared: Windows behaviour (the lock's dead-process path and POSIX modes are skipped there) is left to the Windows CI shards.Documentation reviewed
docs/routing.md(new Quota handoff in a writing stage section; dirty--fromresumes accept an operator adoption),docs/recovery-checkpoints.md(new owning page),docs/README.md(index),docs/review-cycle.md(interrupted writing stages; no approval, no skipped checks),docs/telemetry.md(recovery tables),docs/instrumentation.md(newreroute_reasontokens),docs/configuration.md(recovery.secret_paths, the refs and the lock as local files),docs/capability-parity-audit.md(PA-53 writer lock, PA-54 automatic-handoff stop, new broad handlers),CHANGELOG.md.README.md(no skill or entry point added or removed; the operator CLI is documented on its owning page, likequota_state.py),CONTRIBUTING.md,AGENTS.md,SECURITY.md, issue and PR templates, skillSKILL.mdfiles (no stage contract changed).Residual risk and limits
incomplete, which stops the automatic handoff, so it fails safe.cwdto be a Git worktree. Without one, the earlier reconciliation is unchanged, and the characterization fixture is identical.