Skip to content

feat(review): clarify regression provenance output - #1027

Merged
brokemac79 merged 2 commits into
mainfrom
codex/provenance-clarity
Aug 10, 2026
Merged

brokemac79 merged 2 commits into
mainfrom
codex/provenance-clarity

Conversation

@brokemac79

@brokemac79 brokemac79 commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • show regression provenance status, source commit, source author, and a canonical or conservatively related pull request together
  • distinguish verified blame-to-merge provenance from cautious, non-causal suspected predecessor evidence
  • resolve rewritten-history relationships only when canonical metadata, mainline history, subject association, and a location/context-preserving patch comparison agree
  • retain exact verified commit/PR attribution when an unsafe author value must be omitted

Problem

The exact review added by #1023 could identify a rewritten-history source commit and author without visibly connecting it to the associated PR. That made otherwise useful provenance incomplete for maintainers. This follow-up preserves the strict verified contract while making cautious evidence explicit and useful.

Implementation

  • verified output includes normalized source commit, canonical PR, source author when safe, and verified status
  • suspected output requires an independent regression assessment and includes source commit, safe author, cautious status, and either a conservatively resolved related PR or no PR verified
  • rewrite equivalence requires canonical merged metadata, a single-parent source commit, a (#PR) subject association, mainline ancestry, and exact normalized patch equality preserving paths, hunk locations, and surrounding context; ambiguity fails closed
  • exact blame-to-merge verification remains authoritative when an unsafe author must be redacted; the commit/author pair is omitted together while the verified canonical PR remains
  • durable report persistence and all public rendering paths preserve suspected/verified provenance and independent regression confidence
  • public author validation rejects Unicode direction/format controls and email-shaped values; rendering neutralizes GitHub mentions
  • legacy verified reports remain readable without inventing missing authors
  • provider-schema compatibility, exact review admission, parser validation, and the public status data contract are unchanged

Maintainer policy decision

Martin explicitly chose the public-attribution behavior implemented here: when evidence exists, show the source commit, linked PR when safely resolved, source author, and clear suspected versus verified status together. Suspected output is non-blaming and must not claim causality. Rewritten-history association remains conservative and fails closed to no PR verified. If an author is unsafe to publish, verified canonical attribution is retained while the author/source pair is omitted.

Validation

Current head: 62fc8a6cb4ba169697e6bb61561ef7fde76eec84
Current base and merge-base: 463edfe33f39954bc2483a4d9b2ae382cd5ffa10

  • TypeScript builds: tsc -p tsconfig.json, tsc -p tsconfig.repair.json, tsc -p tsconfig.dashboard.json — passed
  • node --test test/regression-provenance.test.ts test/review-comment-rendering.test.ts test/decision-parser.test.ts test/codex-review-runner.test.ts — 92 passed, 0 failed
  • git diff --check origin/main...HEAD — passed
  • dirty-patch codex.exe review --uncommitted for the unsafe-author repair — clean; no actionable findings
  • committed codex.exe review --base origin/main on the exact current head/base — clean; no actionable correctness defect (conservative validation, safe rendering/persistence, focused coverage)
  • mutation-free local ClawSweeper range review from an exact clean checkout — keep_open, high confidence, action=kept_open, no failure; artifact local-range-1786356010815-25756

Real Behavior Proof

Crabbox source sync failed before command execution across both the required local-container lane and configured AWS fallback with zero-byte rsync protocol error 12. Martin explicitly authorized direct local Docker as a bounded exception for this PR. No Crabbox run is claimed as successful.

Focused direct-Docker proof

This first receipt predates the final rebase and established the focused deterministic contract at head 2953c076bd81e245041137c4ba560d3fb2d00d76; the same focused suite was rerun locally at the current head with 92/92 passing.

  • Claim: the implementation builds and its focused provenance, rendering, parser, and Codex-runner suite passes unchanged on Linux/Node 24
  • Environment: Docker Desktop 29.5.2; mcr.microsoft.com/playwright:v1.60.0-noble; image digest sha256:9bd26ad900bb5e0f4dee75839e957a89ae89c2b7ab1e76050e559790e946b948; Node 24.15.0; pnpm 11.10.0
  • Script integrity: unchanged script SHA-256 02094ad489913a1f78ac9a27b12685cd5643a1cb24da23a34753dce1de705397
  • Container: csw116-pr1027-proof-20260810a / 774b7942f99cc3aa91e48eaf3f29aeebcc007eedb277d8f2c0bc084f0cda9936
  • Observed: frozen install and all three builds passed; 91 tests passed, 0 failed; exit 0; 21.720s
  • Cleanup: Docker emitted die exitCode=0 then destroy; no matching container remained
  • Limits: focused deterministic receipt on the earlier rebased head; source Git metadata was not present inside this first container; no live GitHub, queue, workflow, deployment, publication, or production mutation

Current-head end-to-end provenance trace

  • Claim: on the exact current head/base, the real verifier, durable front-matter serialization/parser, and final public comment renderer preserve conservative suspected/verified provenance and safely redact an unsafe author without dropping verified canonical attribution
  • Environment: direct local Docker; same pinned image/digest; Node 24.15.0; pnpm 11.10.0
  • Identity: head 62fc8a6cb4ba169697e6bb61561ef7fde76eec84; base/merge-base 463edfe33f39954bc2483a4d9b2ae382cd5ffa10; harness SHA-256 82eb36be2d703c8eb195e79661c3d949a804071db270a6ac5966adc46d8133de
  • Container: csw116-pr1027-e2e-finalbase-20260810a / 7d6d7d471beeee643c32c2af86129385ad963aa3d5c16f4d904ec3904856e474
  • Isolation: source worktree and common .git mounted read-only; source copied to container-only storage; exact head, merge-base, and harness hash verified in-container
  • Canonical evidence: immutable feat(review): add non-blaming regression provenance #1023 canonical metadata/head diff plus current rewritten blame at src/clawsweeper-policy.ts:759, commit bb69d1fc582d46298df0f26f9192f721f976e9f4 by Martin Cleary
  • Observed scenarios:
    • rewrite-equivalent history rendered the rewritten source commit/author as a suspected predecessor and safely related PR feat(review): add non-blaming regression provenance #1023
    • missing canonical diff retained source-only evidence and omitted an unverified PR
    • exact canonical blame rendered verified commit/author/canonical PR
    • a legacy verified report remained readable without inventing an author
    • an unsafe verified author was omitted while the canonical PR remained
    • metadata verification failure returned null and rendered no predecessor attribution
  • Result: frozen install passed with the 72-entry supply-chain policy check; build:all passed; 6 end-to-end tests passed, 0 failed; container exit 0; 18.700s
  • Cleanup: Docker recorded create/start/die exitCode=0/destroy; no residual container
  • Artifact: captured terminal trace plus image/container/Docker event identities; no persistent artifact file
  • Limits: real local immutable Git metadata and deterministic canonical fixtures; no live GitHub API call, comment, queue, workflow, deployment, publication, or production mutation; direct Docker exception, not a Crabbox lease/run/timing receipt

Crabbox limitation

Crabbox 0.40.0 provisioned local-container and AWS leases, but every valid attempt failed before the proof script with rsync protocol error 12 and zero bytes transferred, including a local --debug --full-resync recovery. All owned leases were released. The direct-Docker proofs above exercise the changed behavior but do not repair or validate Crabbox transport.

Risks / Rollout

  • rewritten-history PR association is intentionally conservative and may omit a valid relationship when any required signal is unavailable or ambiguous
  • source authors resembling private email data or containing unsafe formatting controls are omitted; verified canonical attribution remains available without inventing or exposing an author
  • this changes review/report provenance presentation only; it does not touch Bay intake, queues, retry policy, publication, schedules, workflows, or the public status data contract, so OpenClaw Bay behavior is unaffected
  • normal CI and the fresh exact-head/current-body ClawSweeper review must be terminal clear before merge

Related

Release-note context: ClawSweeper regression provenance now presents commit, author, status, and a verified or safely related PR together without overstating causality.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 4, 2026
@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 6:13 AM ET / 10:13 UTC.

ClawSweeper review

What this changes

Adds conservative rewritten-history regression provenance, durable report fields, and public rendering that distinguishes suspected related PRs from exact verified attribution.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for normal maintainer landing review: current main still supports only exact blame-to-merge provenance, while this branch adds the requested cautious rewritten-history path and resolves the prior unsafe-author blocker.

Priority: P2
Reviewed head: 62fc8a6cb4ba169697e6bb61561ef7fde76eec84

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The branch has strong current-head behavior proof, focused regression coverage, and no actionable correctness finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR body supplies a current-head Docker trace exercising verification, durable serialization, and final comment rendering, with the approved Crabbox exception and limits recorded.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body supplies a current-head Docker trace exercising verification, durable serialization, and final comment rendering, with the approved Crabbox exception and limits recorded.
Evidence reviewed 5 items Current-main gap: Current main only publishes provenance when the blamed source SHA exactly equals the candidate merge SHA; it has no rewritten-history output.
Conservative verifier: The branch requires a tracked source line, non-boundary blame, mainline ancestry, and then limits PR association to an exact normalized patch comparison.
Durable compatibility path: The report writer persists both legacy verified fields and the additional source/related-PR fields, while the status reader validates either public provenance form.
Findings None None.
Security None None.

How this fits together

ClawSweeper converts review decisions into durable reports and GitHub comments. This provenance layer validates a model-supplied source-line candidate against Git and pull-request metadata before report and comment rendering.

flowchart LR
  A[Review decision] --> B[Provenance candidate]
  B --> C[Git and pull metadata verifier]
  C --> D{Verified or cautious evidence}
  D --> E[Durable review report]
  E --> F[Public review comment]
Loading

Before merge

  • Resolve merge risk (P1) - Merging changes durable report fields and public provenance wording; downstream readers that assume verified-only provenance need the existing legacy-compatible parsing path to remain intact.
  • Complete next step (P2) - No discrete repair is needed; this PR is ready for ordinary maintainer landing review once required checks settle.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Patch scope 12 files, +886/-55 lines The branch changes the verifier, persistence, runtime fetch boundary, and all public renderers.
Production versus tests production +340/-49, tests +546/-6 The feature adds substantial focused coverage for verifier and rendering behavior.

Merge-risk options

Maintainer options:

  1. Land with the compatibility boundary (recommended)
    Accept the bounded report-format risk because the branch preserves legacy verified records and fails closed when a cautious association cannot be established.

Technical review

Best possible solution:

Retain the conservative verification boundary and land the report/parser/rendering change with its legacy and unsafe-author coverage intact.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR adds internal review-reporting behavior rather than addressing a user-reported runtime failure.

Is this the best way to solve the issue?

Yes: the verifier keeps exact attribution authoritative and limits rewritten-history output to a clearly labeled, fail-closed relation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 463edfe33f39.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body supplies a current-head Docker trace exercising verification, durable serialization, and final comment rendering, with the approved Crabbox exception and limits recorded.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded review-reporting improvement without evidence of an active production outage.
  • merge-risk: 🚨 compatibility: The branch changes durable provenance fields and public rendering while preserving legacy report support.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body supplies a current-head Docker trace exercising verification, durable serialization, and final comment rendering, with the approved Crabbox exception and limits recorded.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies a current-head Docker trace exercising verification, durable serialization, and final comment rendering, with the approved Crabbox exception and limits recorded.

Evidence

What I checked:

Likely related people:

  • brokemac79: Authored the merged regression-provenance feature that this branch explicitly extends. (role: introduced behavior; confidence: high; commits: 37283ccdc739; files: src/clawsweeper-regression-provenance.ts, test/regression-provenance.test.ts)
  • Martin Cleary: The PR’s current-main provenance evidence identifies Martin’s adjacent policy work as the source surface exercised by the rewrite scenario. (role: adjacent owner; confidence: medium; commits: bb69d1fc582d; files: src/clawsweeper-policy.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (53 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-09T19:11:52.327Z sha 8a4b4a6 :: needs real behavior proof before merge. :: [P2] Preserve verified provenance when author output is unsafe
  • reviewed 2026-08-09T19:57:31.706Z sha 8a4b4a6 :: needs real behavior proof before merge. :: [P2] Preserve verified provenance when author output is unsafe
  • reviewed 2026-08-09T21:04:26.085Z sha 8a4b4a6 :: needs real behavior proof before merge. :: [P2] Preserve verified provenance when author output is unsafe
  • reviewed 2026-08-09T22:47:39.268Z sha 8a4b4a6 :: needs real behavior proof before merge. :: [P2] Retain verified provenance when author output is unsafe
  • reviewed 2026-08-10T09:34:25.170Z sha 8a4b4a6 :: needs real behavior proof before merge. :: [P2] Retain verified provenance when author output is unsafe
  • reviewed 2026-08-10T09:40:00.404Z sha 2953c07 :: needs real behavior proof before merge. :: [P2] Retain verified provenance when author output is unsafe
  • reviewed 2026-08-10T09:53:16.013Z sha 2953c07 :: needs changes before merge. :: [P2] Preserve verified provenance when author output is unsafe
  • reviewed 2026-08-10T09:57:18.492Z sha 2953c07 :: needs changes before merge. :: [P2] Preserve verified provenance when author output is unsafe

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Aug 4, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 9, 2026
@brokemac79
brokemac79 force-pushed the codex/provenance-clarity branch from 8a4b4a6 to 2953c07 Compare August 10, 2026 09:36
@brokemac79
brokemac79 marked this pull request as ready for review August 10, 2026 09:48
@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 10, 2026
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. label Aug 10, 2026
@brokemac79
brokemac79 force-pushed the codex/provenance-clarity branch from 2953c07 to 62fc8a6 Compare August 10, 2026 10:07

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 10, 2026
@brokemac79
brokemac79 merged commit dde38ec into main Aug 10, 2026
19 checks passed
@brokemac79
brokemac79 deleted the codex/provenance-clarity branch August 10, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant