Repository navigation
feat(review): add non-blaming regression provenance - #1023
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 5:05 PM ET / 21:05 UTC. ClawSweeper reviewWhat this changesThe branch adds structured non-blaming regression assessments and a runtime verifier that publishes an earlier merged PR only when exact GitHub metadata and Git blame prove it introduced the reviewed source line. Merge readinessThis PR remains necessary: it adds a bounded, fail-closed way to distinguish a generic regression signal from verified predecessor provenance. The verifier validates canonical merged-PR metadata, the exact reviewed checkout revision, a tracked path, and a one-line blame match before any predecessor link is rendered; the current-head controlled runtime proof is sufficient. Because this introduces a new public review-comment policy, it should stay open for a maintainer product-direction decision rather than close or auto-repair. Priority: P2 Review scores
Verification
How this fits togetherClawSweeper parses model-produced review decisions, enriches them with independently checked runtime facts, then persists and renders durable GitHub review reports. This change adds a narrow provenance-validation stage between decision parsing and report/comment presentation so unverified model hints cannot become public attribution. flowchart LR
A[Model review decision] --> B[Decision parser]
B --> C[Regression assessment or candidate]
C --> D[GitHub metadata and Git verifier]
D --> E{Exact merge and blame match?}
E -->|Yes| F[Verified predecessor provenance]
E -->|No| G[Generic non-blaming assessment]
F --> H[Durable report and public comment]
G --> H
Decision needed
Why: The implementation is mechanically bounded, but whether confirmed source-line provenance belongs in a public automated review comment is a maintainer communication-policy choice rather than a correctness fact. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Adopt the fail-closed verifier only after confirming that public comments should show a predecessor PR at this exact evidence threshold; retain generic assessments whenever that proof is incomplete. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds a new provenance capability rather than repairing a reported current-main defect. Its stated exact-head controlled runtime proof exercises the verifier and renderer with canonical PR metadata and a disposable full-history fixture. Is this the best way to solve the issue? Yes for the technical boundary: fixed commands, canonical metadata, recorded-revision checks, tracked-path checks, and exact blame matching are a narrow maintainable way to prevent unsupported attribution. Whether the public predecessor link should exist remains a maintainer policy decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 326104b08f93. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Summary
suspectedandprobableassessments with normalized supporting evidence, without naming a predecessor PR.Problem
Reviewers need to record useful regression context without treating temporal proximity or an adjacent change as causation. The former output had no structured, confidence-aware way to distinguish a possible regression from independently verified provenance.
Implementation
regressionAssessmentwith closed evidence kinds:reproduction,reviewed_change,failure_trace, andknown_regression_link.suspectedorprobableonly;probablerequires two evidence kinds andconfirmedis runtime-only.boundaryoutput, and stale/incorrect hypotheses. These cases retain only a generic assessment, if present; they never name a predecessor.Real Behavior Proof
Claim: review output distinguishes possible regression signals from confirmed provenance, and never names a PR without exact evidence.
Surface: the exact built
2667a5e50acbf9d928cc04d4616d018a76e1247fverifier and its durable-report comment renderer, in Linux.Scenario / fixture: canonical read-only GitHub metadata for merged #1007, plus a disposable full public Git clone of this exact PR branch. The candidate source line blamed exactly to fix(review): suppress owned activity churn #1007's merge commit; an adjacent line blamed elsewhere. The renderer was then given each outcome.
Command / environment:
gh api repos/openclaw/clawsweeper/pulls/1007and pass that canonical response to the productionfetchPulldependency.crabbox run --provider local-container --local-container-image mcr.microsoft.com/playwright:v1.60.0-noble --no-hydrate --timing-jsonon this Windows host. It mounts the exact built head read-only, clones only this published branch with complete blobs for the disposable proof fixture, then invokes the verifier's fixedrev-parse,ls-files, andblameallowlist.Observed result: provider
local-container; imagemcr.microsoft.com/playwright:v1.60.0-noble; leasecbx_02228fa2746a(stopped); exit0; head2667a5e50acbf9d928cc04d4616d018a76e1247f; GitHub metadata says fix(review): suppress owned activity churn #1007 is merged tomain. The exact verifier emitted a fix(review): suppress owned activity churn #1007 link only for the blame-to-merge match. It suppressed the adjacent incorrect candidate and the actual renderer emitted the generic possible-regression fallback without a predecessor.Artifact / trace: the durable fixtures are
test/regression-provenance.test.tsandtest/review-comment-rendering.test.ts. Redacted current-head Crabbox trace:Limits: this is a controlled read-only proof, not a live review/comment mutation and not evidence that a model will elect to propose a candidate. The verifier never hydrates history: on incomplete or shallow history it remains unknown and emits no predecessor. The separate full clone is only fixture setup to provide immutable complete history for the positive case.
Validation
pnpm run buildcbx_02228fa2746a— passed (exit 0)node --test --test-concurrency=1 test/regression-provenance.test.ts test/decision-parser.test.ts test/review-comment-rendering.test.ts— 49/49 passedpnpm exec oxfmt --checkover all 21 changed filespnpm exec oxlintover the changed TypeScript sources and testsgit diff --check origin/main...HEADCodex review closeout
codex review --uncommittedfound no local diff (the proof added no product-code change or commit).codex review --base origin/mainfinal retry reported: “No actionable correctness issues were found in the diff” against326104b08f93941c21ab7afd2cd57a60b51ff583.codex review --uncommitted— final pass reported no actionable correctness issues.codex review --base origin/main— no actionable defects against326104b08f93941c21ab7afd2cd57a60b51ff583.Risks and rollout
Current-main collision check
origin/mainat326104b08fafter merged fix(review): suppress owned activity churn #1007.Review state
Draft PR. No
@clawsweeper reviewcommand has been posted; no existing PR or active command route existed before creation.