Enforce repair contract at every checkpoint#341
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 20, 2026, 9:13 PM ET / 01:13 UTC. Summary Reproducibility: not applicable. this is an implementation PR for a new repair artifact contract. The contributor supplied terminal dry-run proof for the executor allow/block paths rather than a bug reproduction. Review metrics: 2 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the canonical checkpoint contract only after maintainers accept the every-checkpoint artifact semantics and CI validates the current head; otherwise narrow when the contract is emitted or scoped. Do we have a high-confidence way to reproduce the issue? Not applicable; this is an implementation PR for a new repair artifact contract. The contributor supplied terminal dry-run proof for the executor allow/block paths rather than a bug reproduction. Is this the best way to solve the issue? Yes for the submitted direction, with maintainer approval. Moving the checkpoint invariant into AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1566ad6a0a5b. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
05484c7 to
da96bec
Compare
|
Updated this PR after the maintainer deep review on #340. Changes now address the two blockers called out there: Validation run locally: All passed. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
v3 update pushedI updated this PR to address the maintainer blockers from #340 instead of reopening or duplicating that closed PR. What changed: Validation run locally: Result: Local dry-run executor proof with canonical |
|
@clawsweeper re-review Please review the current head |
|
Small implementation-shape note for review: if maintainers prefer a narrower contract activation policy, I can make that adjustment in this PR without changing the overall design. The intentionally small knobs are: One extra architectural motivation for this shape: keeping That keeps the core provider-neutral: ClawSweeper owns schema, validation, git/checkpoint safety, and PR mechanics, while any external worker that can emit the canonical artifact can interoperate through the same contract. This should make the repair lane easier to extend safely without growing backend-specific logic in the core. Those would be narrow follow-ups on the current head, not a new PR and not a redesign of the checkpoint gate. |
Summary
Update the repair checkpoint contract after maintainer review on #340.
This revision moves the contract from manually injected unsupported fields into the canonical fix artifact contract:
The checkpoint gate now activates only when
fix_artifact.repair_contractis present. It continues to bypass uncertain/incompletelikely_filesso stale planning hints do not fail-close otherwise valid repairs.What changed from the closed #340 approach
This directly addresses the two maintainer blockers from #340:
Scope
Semantics
Validation
Observed result:
Local repair-worker dry-run proof
I ran the real
dist/repair/execute-fix-artifact.jsexecutor locally in--dry-runmode withCODEX_BINset to a deterministic fake Codex binary. This exercises the executor, subprocess boundary, git checkout, checkpoint helper and dry-run report path without pushing or opening PRs.The fixture uses the canonical field now accepted by the schema:
{ "repair_contract": { "must_touch": ["docs/repair-contract-proof.md"], "match": "any", "scope": "every_checkpoint" } }1. Allowed checkpoint when
repair_contract.must_touchis changedSetup:
Observed result:
2. Rejected checkpoint when only an off-contract file is changed
Setup:
Observed result:
Error:
Relation to closed PRs
Jhacarreiro/clawsweeper#2was closed as local hygiene; the useful parser idea is represented here through porcelain v1 z parsing.