Repository navigation
feat(resolve): retry publication of verified local resolutions - #572
Conversation
…andidate The candidate record now exists only for a local-only resolve, so the test's partial CycleSession sets local_only as __init__ always does, and covers that a LOCAL_PREPARED report outside a local-only resolve records no candidate.
A host time sync can step the wall clock backwards between recording rows and aggregating them, leaving earlier rows after the period end. The flaky test_report_aggregates_rates_and_never_returns_task_ids counted 5 of 10 tasks under the full suite on WSL. Pre-existing; independent of #504.
|
Published the existing implementation at GitHub reported Classify the change and Skills, manifests, and Bash installer as queued on this head. |
[CCR-20261203-001] · senior_reviewer · anthropic/claude-fable-5-2→? · medium · schema:2CHANGES_REQUESTED at
Security audit ran: no confirmed vulnerability. CI is still running (1 passed, 5 pending). Findings, evidence, verification, CI and receipt[REV-001] · high · open · - · blocks:yes — Resolve guard dead-ends a work item whose candidate cannot be published
Consequences, from code inspection:
The same agent can run the resolve skill directly in that worktree, so this is a toolkit-only veto under the capability-parity rule in Not covered by tests: Suggested direction: refuse only when the latest preparation is a verified, still-matching candidate; let a new local-only resolve supersede an unverified or stale one; give the operator an explicit discard; add the audit row and the [REV-002] · medium · open · - · blocks:yes — Journal redaction alters the recorded branch, so publication cannot match it
The verified preparation and the
It fails closed, so nothing is published wrongly. Evidence is code inspection; an execution probe was refused by the stage policy (see below). SecurityRequired by the runtime plan ( No confirmed vulnerability. Reviewed: consent scope and reuse, argv construction (no shell, validated repository, branch, PR number and SHAs), the Potential risk, informational, not a finding: the guard chains to the checkout's existing Verification (run by this review, Linux, head
|
| Check | Command | Result |
|---|---|---|
configured-test |
python3 -m unittest discover -s tests |
exit 0, 2910 tests, 1 skipped, 686 s (exceeded the 10-minute foreground limit and finished in the host's background task) |
| package | python3 scripts/validate-package.py |
exit 0, VALID: 16 skills |
| bare unittest | python3 -m unittest |
exit 0, 0 tests |
| types | basedpyright |
exit 0, 0 errors |
Not verified by execution: REV-001 and REV-002 reproductions. The stage policy refused a probe script in $TMPDIR and multi-word git grep reads; both findings rest on the cited code.
Acceptance criteria: AC-1 to AC-8 are linked to configured-test. AC-8 (missing or corrupt state names the unresolved condition; repeated resumes stay usable) is not met for the states in REV-001 and REV-002.
CI (parallel policy, read once)
Classify the change: pass. Pending: Skills, manifests, and Bash installer, Windows test shard (windows-1) to (windows-4).
Documentation
The owning pages are updated and the PR lists its documentation review. The gap is the undocumented resolve refusal, tracked in REV-001.
Residual risk
Sandboxed upload against GitHub is untested end to end. Windows behaviour of the POSIX pre-push guard depends on pending shards.
[CCT-20261203-001] · deep_coder · openai/gpt-6.2-sol→? · high · triaged:aab664bf33160c405de13d8d0f20204169f4d592 · schema:2RESOLVED at
Discovery reported 2,911 tests with one skip. All 29 publication tests passed. The required security audit found no confirmed vulnerability. GitHub reported two checks in progress on the pushed head. Review history, verification and receipt[CCR-20261203-001] · senior_reviewer · anthropic/claude-fable-5-2→? · medium · schema:2[REV-001] · high · resolved · valid · blocks:yes — Resolve guard dead-ends a work item whose candidate cannot be published
A plain resolve redirects to prepared upload only when the verified preparation matches the checkout, the frozen plan, the known base, and the PR head. A local-only rerun can retain a clean candidate at the selected checkout when the fetched PR head is its ancestor. Successful repreparation creates a new consent scope. Publication tests cover retrying after failed verification or missing attribution, and repreparing an amended commit. [REV-002] · medium · resolved · valid · blocks:yes — Journal redaction alters the recorded branch, so publication cannot match it
Candidate records bind the branch digest. Upload consent binds the digests of the branch and base, along with the exact candidate and its verification plan. Journal redaction remains active. The consent regression exercises an interrupted upload, a branch and base containing token-like text, rejection after either ref changes, and idempotent retry. Fix delta and securityThe trusted review head Verification (agent-reported)The committed tree matches the tested tree on Linux. The configured discovery and publication boundary checks cover AC-1 through AC-8.
The first discovery run caught a missing handler inventory row. The focused check and final discovery rerun passed after the inventory was updated. Provider checksOn DocumentationUpdated the review lifecycle, runtime workflows, configuration, worktree policy, instrumentation, capability parity audit, and resolver skill. Reviewed the execution plan page, documentation index, README, CONTRIBUTING, AGENTS, SECURITY, and GitHub templates for affected guidance. The existing links and contribution instructions cover this change. |
[CCR-20261203-002] · senior_reviewer · anthropic/claude-fable-5-2→? · medium · schema:2APPROVED at
Security audit ran: no confirmed vulnerability. CI: all 7 checks passed on this head. Merging stays manual. History, findings, verification, CI and receipt[CCR-20261203-001] · senior_reviewer · anthropic/claude-fable-5-2→? · medium · schema:2[CCT-20261203-001] · deep_coder · openai/gpt-6.2-sol→? · high · triaged:aab664bf33160c405de13d8d0f20204169f4d592 · schema:2Previous reviewed head: [REV-001] · high · resolved · valid · blocks:yes — Resolve guard dead-ends a work item whose candidate cannot be published
Corrected and verified by execution. Reproduction: [REV-002] · medium · resolved · valid · blocks:yes — Journal redaction alters the recorded branch, so publication cannot match it
Corrected and verified by execution. The preparation, the runtime row and the consent scope store [REV-003] · low · open · - · blocks:no — A candidate pushed directly still makes a plain resolve report that it awaits publication
The guard stops a plain resolve when the PR head is the candidate's recorded base or the candidate itself ( Evidence is code inspection; no execution probe was run. Suggested direction: when the PR head already equals the candidate, record the reconciliation or let resolve proceed, or word the message for that case. SecurityRequired by the runtime plan ( No confirmed vulnerability. Reviewed in the fix delta: the consent key is the event ID of one verified preparation and its scope binds operation, candidate SHA, old head, plan digest and the branch and base digests; a superseding preparation cannot reuse earlier consent; the local-only rerun keeps a foreign commit only on the recorded branch and worktree, with a clean checkout and fast-forward ancestry from the fetched PR head, and still passes the verification barrier; upload arguments stay an argv list with validated repository, branch, PR number and SHAs; the Potential risk, informational, unchanged: the guard chains to the checkout's existing Not reviewed: the real Verification (run by this rereview, Linux, head
|
| Check | Command | Result |
|---|---|---|
configured-test |
python3 -m unittest discover -s tests |
exit 0, 2911 tests, 1 skipped, 1166 s (exceeded the 10-minute foreground limit and finished in the host's background task) |
ref-8ccc5e44… |
python3 scripts/validate-package.py |
exit 0, VALID: 16 skills |
ref-a1d5411a… |
python3 -m unittest |
exit 0, 0 tests |
verify:basedpyright |
basedpyright |
exit 0, 0 errors |
prepared-publication-boundary |
python3 -m unittest tests.test_publication tests.test_run_cycle.PublicationCompletionTests |
exit 0, 29 tests |
audit-handler-inventory |
python3 -m unittest tests.test_precheck_causes.PrecheckCauseTests.test_every_broad_handler_has_an_inventory_row |
exit 0, 1 test |
Acceptance criteria AC-1 to AC-8 are linked to configured-test and prepared-publication-boundary.
CI (parallel policy, read once)
All 7 checks of d1deee8 passed: Classify the change, Skills, manifests, and Bash installer, Windows test shard (windows-1) to (windows-4), PowerShell installer. None failed or pending.
Documentation
The owning pages (docs/review-cycle.md, docs/workflows.md, docs/configuration.md, docs/role-workspace-policy.md, docs/instrumentation.md, docs/execution-plan.md, docs/capability-parity-audit.md) and the resolver skill are updated, and the PR lists its documentation review. The verification table in the PR description still names head aab664b; the resolve comment carries the current one.
Residual risk
The sandboxed upload against GitHub is untested end to end. REV-003 stays open as a non-blocking follow-up.
Summary
Complete #504 by adding a standalone upload for the verified resolution candidate introduced in #567. The first upload records authorization for the inspected commit and branch. A retry reuses that authorization and reconciles the branch and pull request heads before sending a push. Confirmed retries leave the remote untouched.
Diagnosis
This is a feature request for the remaining publication path. The earlier resolver could prepare a local candidate, but it had no independent upload action that could reuse the candidate's verified plan and the operator's authorization. The standalone command uses the existing journal, verification plan and in-sandbox GitHub publication helper. A verified result applies to one exact candidate, and upload uses a normal fast-forward update. Related work reviewed includes #284, #446, #491, #503 and #567.
Work units
tests/test_publication.py,tests/test_run_cycle.pytests/test_stats.pyDocumentation review
The branch updates
docs/review-cycle.md,docs/role-workspace-policy.md,docs/execution-plan.md,docs/workflows.md,docs/configuration.md,docs/instrumentation.md,docs/capability-parity-audit.mdandskills/cc-resolve-comments/SKILL.md. These cover the CLI action, candidate and consent records, transport behavior, and post-publication review. The documentation index, README, CONTRIBUTING, AGENTS, SECURITY and GitHub template inventory were checked. The existing links and contribution instructions already cover the affected workflow.Security review
Reviewed the authorization scope, journal and plan validation, sandboxed subprocess arguments, Git destination and refspec, receipt reconciliation and error redaction. No confirmed security issue was found in the diff. The focused run exercises Git's receive boundary against a disposable repository and uses a GitHub CLI fixture. Subsequent rereview and provider CI remain part of the merge workflow.
Verification (agent-reported)
Head
aab664bf33160c405de13d8d0f20204169f4d592.configured-testpython3 -m unittest discover -s testsref-8ccc5e4478464d6ddcde25c59b2c6e895e5e6f1ea520b62dd0f6b48a0bd44048python3 scripts/validate-package.pyref-a1d5411ab9a121395d20bf8de37920799e10ef82ba8a27d00ee498c5bc89f21bpython3 -m unittestverify:basedpyrightbasedpyrightprepared-publication-boundarypython3 -m unittest tests.test_publication tests.test_run_cycle.PublicationCompletionTestsThe configured discovery suite reported one skip. Bare unittest exited successfully with zero tests. The configured discovery and focused publication checks are linked to AC-1 through AC-8. Local checks ran on Linux, and the focused fixture uses real local Git processes with a disposable remote. Provider CI runs separately on the pushed head.