Skip to content

feat(review): evaluate authority delivery chains - #1223

Merged
joshavant merged 2 commits into
mainfrom
feature/authority-chain-evaluation
Aug 21, 2026
Merged

joshavant merged 2 commits into
mainfrom
feature/authority-chain-evaluation

Conversation

@joshavant

@joshavant joshavant commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add a narrowly triggered authority-chain/invariant-inversion pass to the existing review outputs
  • require authority final-effect proof for trusted authors only when a material plausible authority violation remains unresolved
  • preserve ordinary proof exemptions for OWNER, MEMBER, COLLABORATOR, and bot PRs, while external contributors continue to satisfy ordinary proof plus any applicable authority proof

No new review section or schema is introduced. The earlier Worker hydration, predecessor-assessment ingestion, semantic-cache, prior-risk carry-forward, and unrelated runtime-budget changes have been removed from the final diff.

Real-behavior proof contract

Claim: Ordinary trusted-author proof exemptions continue to pass. When the narrowed authority condition applies and the review emits Authority-chain proof required:, missing authority final-effect evidence blocks OWNER, MEMBER, COLLABORATOR, and bot-authored PRs. Authority-only sufficient evidence satisfies that scoped gate, and proof: override remains effective. External-contributor proof behavior is unchanged except that applicable authority evidence must also be satisfied.

Exercised surface: generated review prompt, report proof parsing, and final automation-marker gate.

Scenario/fixture: deterministic report fixtures cover ordinary and authority-marked OWNER, MEMBER, COLLABORATOR, and bot reports; sufficient authority-only evidence; proof: override; and an external contributor with missing ordinary proof. Prompt assertions cover the material-authority trigger and explicit non-trigger language for ordinary identifiers, routes, defaults, retries, fallbacks, recovery, and refactors.

Command/environment: macOS, Node 26.5.0 (repository requirement is Node 24+), head 97403595b78568b8f1becb4aee884e80bf8d7213:

pnpm run build
node .artifacts/authority-chain-proof.mjs

Observed result:

{
  "promptContract": "narrow authority trigger with authority-only trusted-author exception",
  "trustedOrdinaryProof": "exempt",
  "trustedAuthorityProofMissing": "needs-human",
  "trustedAuthorityProofSufficient": "pass",
  "proofOverride": "pass",
  "externalOrdinaryProofMissing": "needs-human"
}

Artifact/trace: terminal trace from the command above. The local harness is ignored at .artifacts/authority-chain-proof.mjs and exercises the built production parser/gate.

Limits: controlled local proof with deterministic report fixtures; it does not claim model compliance for every future diff, a live GitHub Actions runner, or a merge mutation. Prompt calibration remains model-evaluated, while the emitted marker and final gate are deterministic.

Validation

  • focused prompt and proof automation matrix: 64 passed
  • controlled real-behavior proof: passed
  • pnpm run build
  • pnpm run build:all
  • pnpm run format
  • pnpm run codex:local:check
  • git diff --check origin/main
  • uncommitted Codex review completed; its runtime-budget rethrow finding is not applicable to the final PR diff because that rethrow was introduced only by the over-scoped first commit and removed here, leaving origin/main behavior unchanged
  • committed ClawSweeper range review against origin/main: no review findings, security cleared, proof sufficient, A/A/A

pnpm run check completed static checks, formatting, builds, lint, and the changed-surface tests successfully. Its full-suite run had one host-only live-proof environment failure: local tmux lost window 0 before capture-pane; this test and surface are unchanged by the six-file PR diff. Repository CI remains authoritative for that environment-sensitive test.

Rank-up moves

  • Final-effect proof for trusted authors — applied. The controlled trace proves ordinary exemptions pass, missing scoped authority proof blocks every trusted-author class, sufficient authority-only proof passes, and proof: override passes.
  • Avoid broad proof expansion — applied. The prompt says the marker activates only the authority exception to trusted-author exemptions and must not turn unrelated proof categories into requirements.
  • Avoid broad triggering — applied. The pass requires a material authority-bearing value plus a trust-boundary, authorization-lifetime/bypass, or final-principal effect; ordinary plumbing changes do not trigger merely by existing.

OpenClaw Bay

No Bay change is needed. The final diff changes review evaluation and an existing proof gate only; it does not alter Bay's observer-only data contract, links, status projection, or mutation boundary.

@joshavant
joshavant requested a review from a team as a code owner August 21, 2026 21:50
@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. 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. labels Aug 21, 2026
@clawsweeper

clawsweeper Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 21, 2026, 7:04 PM ET / 23:04 UTC.

ClawSweeper review

What this changes

This PR adds a narrowly triggered authority-chain review pass and enforces its scoped final-effect proof requirement for trusted-author pull requests.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

The current head consistently carries the scoped authority marker through parsing and merge gating, with focused coverage for trusted-author exemptions, authority proof, and overrides. Landing changes merge-policy behavior for trusted authors, so it needs an explicit maintainer policy decision.

Priority: P2
Reviewed head: 97403595b78568b8f1becb4aee884e80bf8d7213
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The focused implementation, explicit limits, controlled terminal trace, and targeted coverage provide strong review evidence.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR body records current-head terminal output from a controlled harness exercising the built production parser and readiness gate across ordinary, authority-marked, and override cases.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body records current-head terminal output from a controlled harness exercising the built production parser and readiness gate across ordinary, authority-marked, and override cases.
Evidence reviewed 5 items Scoped gate implementation: The readiness gate recognizes the authority marker and requires passing proof for a trusted-author PR only when that marker is present; ordinary trusted-author exemptions remain unchanged.
Parser preserves the scoped requirement: The parser detects the marker at the beginning of the proof summary before applying the maintainer/bot proof exemption.
Focused coverage: The changed matrix covers MEMBER, OWNER, COLLABORATOR, and bot reports with missing authority proof, authority-only sufficient proof, and proof override.
Findings None None.
Security None None.

Live Verification

Command: pnpm run build && node --test test/pr-proof-automation.test.ts

Result: PASS (completed)

pnpm run build && node --test test/pr-proof-automation.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-1223-A4iGgI/target$ pnpm run build && node --test test/pr-proof-automation.test.ts
$ tsc -p tsconfig.json
pnpm run build && node --test test/pr-proof-automation.test.ts
✔ media proof receives a shiny proof rating boost (11.406487ms)
✔ docs-only external PRs do not require real behavior proof (7.601801ms)
✔ renamed source paths remain part of docs-only proof checks (0.585982ms)
✔ mixed docs and source external PRs still require real behavior proof (2.431922ms)
✔ maintainer and bot proof exemptions keep readiness, ratings, and security consistent (20.875419ms)
✔ production-owner HTTP fault-boundary proof unblocks shared channel reliability PRs (3.229941ms)
✔ screenshot-only browser runtime proof blocks pass markers (1.579191ms)
✔ missing real behavior proof blocks pass and repair markers (1.276771ms)
✔ mock-only real behavior proof blocks repair markers (0.374618ms)
✔ OpenClaw contributor changelog-entry findings are normalized (3.210681ms)
✔ OpenClaw maintainer changelog-entry findings stay actionable (0.411242ms)
✔ OpenClaw changelog normalization keeps real findings actionable (0.356681ms)
✔ OpenClaw changelog normalization keeps changelog tooling findings actionable (0.296551ms)
✔ pull request automerge pass is not blocked by generic protected labels (1.346916ms)
✔ pull request autofix review comments can emit pass verdicts without merge copy (0.840652ms)
✔ pull request automerge review comments with findings require repair (1.580454ms)
✔ pull request automerge findings trigger repair without work candidate frontmatter (0.24883ms)
✔ a bare forged proof section in model summary cannot raise the proof verdict (1.471562ms)
✔ a fenced forged proof section in model summary cannot raise the proof verdict (1.121129ms)
✔ a details forged proof section in model summary cannot raise the proof verdict (1.077294ms)
✔ a HTML comment forged proof section in model summary cannot raise the proof verdict (1.052588ms)
✔ report body lines cannot impersonate proof or rating front matter (1.227107ms)
✔ duplicate proof and rating front matter injected by a legacy scalar fails closed (1.113689ms)
✔ an early front matter terminator injected by a legacy scalar fails closed (0.787363ms)
ℹ tests 24
ℹ suites 0
ℹ pass 24
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 501.283496
runner@runnervm76f27:/tmp/clawsweeper-live-proof-1223-A4iGgI/target$ pnpm run build && node --test test/pr-proof-automation.test.ts
$ tsc -p tsconfig.json













Assertions:

  • PASS expect_output: maintainer and bot proof exemptions keep readiness, ratings, and security consistent

How this fits together

ClawSweeper converts Codex review output into report sections, labels, and merge-readiness markers. The change carries an authority-sensitive proof signal from the review prompt through report parsing into the final readiness gate.

flowchart LR
A[Pull request diff] --> B[Review prompt]
B --> C[Structured review report]
C --> D[Proof parser]
D --> E[Readiness gate]
E --> F[Labels and merge markers]
Loading

Decision needed

Question Recommendation
Should trusted-author pull requests with a material, unresolved authority-chain concern lose their ordinary proof exemption until they provide final-effect evidence or receive a proof override? Adopt the scoped authority gate: Accept the narrowly triggered marker and require authority final-effect proof for affected trusted-author PRs while preserving ordinary exemptions and proof overrides.

Why: This is a deliberate merge-policy change, not a mechanical correctness repair; maintainers must choose the acceptable false-positive and review-latency tradeoff.

Before merge

  • Resolve merge risk (P1) - Merging intentionally removes the ordinary proof exemption for trusted-author PRs when an authority marker is emitted, so an overly broad marker could hold otherwise-ready internal work for human review.
  • Complete next step (P2) - A maintainer must choose whether the new exception to trusted-author proof exemptions is the intended review policy before this feature lands.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Policy and test scope 72 policy/code lines added, 127 test lines added, 7 lines removed The small implementation is paired with focused coverage of every trusted-author class and override behavior.

Merge-risk options

Maintainer options:

  1. Adopt the scoped readiness policy (recommended)
    Accept that authority-marked trusted-author PRs may require final-effect evidence before readiness markers are emitted.
  2. Pause for policy revision
    Keep the existing trusted-author exemption if the new authority exception is not an intended review-policy boundary.

Technical review

Best possible solution:

Adopt the scoped authority-proof rule only if maintainers want this additional guardrail, retaining the exact marker, proof override, and narrow trigger to avoid expanding ordinary proof requirements.

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

Not applicable: this is a review-automation feature, and the PR supplies a current-head terminal trace for its controlled parser and gate scenarios.

Is this the best way to solve the issue?

Yes, conditionally: the marker-based parser and existing proof gate are the narrowest implementation path, but adopting the trusted-author exception requires maintainer policy approval.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: The PR changes a bounded but consequential review-readiness policy.
  • merge-risk: 🚨 automation: The changed parser and readiness gate determine whether pull requests receive human-review or pass markers.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body records current-head terminal output from a controlled harness exercising the built production parser and readiness gate across ordinary, authority-marked, and override cases.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body records current-head terminal output from a controlled harness exercising the built production parser and readiness gate across ordinary, authority-marked, and override cases.

Evidence

What I checked:

  • Scoped gate implementation: The readiness gate recognizes the authority marker and requires passing proof for a trusted-author PR only when that marker is present; ordinary trusted-author exemptions remain unchanged. (src/clawsweeper-orchestration-foundation.ts:433, 97403595b785)
  • Parser preserves the scoped requirement: The parser detects the marker at the beginning of the proof summary before applying the maintainer/bot proof exemption. (src/clawsweeper-report-parser.ts:607, 97403595b785)
  • Focused coverage: The changed matrix covers MEMBER, OWNER, COLLABORATOR, and bot reports with missing authority proof, authority-only sufficient proof, and proof override. (test/pr-proof-automation.test.ts:409, 97403595b785)
  • Area provenance: Recent main history shows Peter Steinberger introduced and extended the live-proof/report-parser surface that this PR modifies. (src/clawsweeper-report-parser.ts:529, 055ffba223f0)
  • Current-main and release check: The proposed head has a non-empty diff from current main and is not contained by a release tag, so the new policy is neither implemented on main nor shipped. (97403595b785)

Likely related people:

  • steipete: Introduced the current live-proof and report-parser behavior that the new scoped gate extends. (role: recent proof-automation owner; confidence: high; commits: 055ffba223f0, 03c1f452ec49; files: prompts/review-item.md, src/clawsweeper-report-parser.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 (1 earlier review cycle)
  • reviewed 2026-08-21T21:53:39.810Z sha e34fce5 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 21, 2026
@joshavant
joshavant merged commit 9a09faa into main Aug 21, 2026
14 of 15 checks passed
@joshavant
joshavant deleted the feature/authority-chain-evaluation branch August 21, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor 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