Skip to content

fix(review): admit exact reviewed plugin fixtures in patches - #1602

Merged
Patrick-Erichsen merged 3 commits into
mainfrom
codex/claw-860-reviewed-plugin-fixtures
Sep 17, 2026
Merged

Patrick-Erichsen merged 3 commits into
mainfrom
codex/claw-860-reviewed-plugin-fixtures

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The plugin settings reviews in OpenClaw #149330 and #150234 stop on synthetic URL-redaction fixtures.

User Impact

Reviewed synthetic fixtures can pass source scanning when their exact committed bytes qualify. Hosted review must still complete its normal input and review gates. No OpenClaw installation or user configuration changes are required.

Why This Change Was Made

Qualify four observed URI tuples by exact detector, decoder, value digests, ordered whole-line digests, source path and regular-file mode. Extend the existing patch parser so exact reviewed fixtures can bind to added or removed committed lines, including new and deleted files.

Changed lines still pass the existing recursive fixture classifier. A new/deleted file also needs one matching host-captured raw Git record proving its absent endpoint, a rehashed present blob, and a complete matching hunk. Every retained source reference must qualify. Legacy value/path-only rows remain context-only. The complete original patch and blobs, native verification, completion checks and detector-58 supplemental scan stay unchanged.

The parser now removes the split terminator before counting source lines: a malformed hunk could otherwise consume a nonexistent trailing blank line. A separate one-line test correction passes the fixture clock to telemetry inventory lookup; its September 2 records had started expiring under the real clock. Runtime retention and all existing assertions are unchanged.

Real Behavior Proof

Candidate a7bfde77d197b698a17e43cee3fc6d6280be21ff has the exact six source files used by the final recorded proof. The final parser SHA-256 is a1bd5b0504259464aa8bcf35cc171b63cb89366f6cc64e1b3eb9e026bea3e3ae; the scanner classifier is unchanged from the original candidate. Pinned native TruffleHog 3.97.4, macOS arm64, Node 24.19.0, pnpm 12.4.1, canonical verification enabled, complete committed ranges and a controlled prompt:

OpenClaw source range ClawSweeper main f48f1cee58c5 Candidate
3a4f9db62ee4..598dc5aebd5a (#149330) Refused: unreviewed fixture findings Admitted, including added patch lines and new-file absence proof
1062e94262d4..cc8e264b6d14 (#150234) Refused: unreviewed fixture findings Admitted, both committed endpoints

The first range contains 42 changed paths and 74 unique blobs; the second contains 143 paths and 270 unique blobs. Observed PLAIN and HTML tuples are bound individually; no domain-based exemption or ignored input is added. The source parser and compiled output hashes were recorded before the final scans. Safe result SHA-256 values: 9d501f9998d9b64f0d8b27ed68424b66e34146d8cbaaba318aa5b4b1646a6d9f and 344bd63f3227ccd6f78e4faa45541466334391af2ccd58489d64e28b9171b568.

Reproduce through the existing canonical proof entry point after building this branch:

node docs/proof/agent-input-scan-context/run-proof.mjs \
  /path/to/trusted/openclaw \
  3a4f9db62ee46701c3e7c494d981b07c74170c8f \
  598dc5aebd5aee9488f39898b2d6041f3993cc46 \
  /path/to/plugin-fixture-admission-proof.json

Limits: this runs the actual scanner, not a model. Hosted review must still admit its own frozen prompt, schema and source inputs. Native Git A/D records, endpoint absence and blob hashes were also independently checked. References cover captured changed endpoints, not every repository alias; --no-renames can represent a logical rename as separate D/A records.

Evidence

  • Real Git-generated public-classifier cases cover add/remove/new/delete with and without a final newline, plus malformed raw records, endpoints, hunks, bytes, modes, references and findings. Existing legacy changed-line refusal remains.
  • The invented trailing blank-line regression fails before the parser correction and passes after. The independent owner probe likewise changes from accepted to refused.
  • Telemetry file: original 11/12, corrected 12/12; the lookup now uses the same fixed clock as its records and summary.
  • pnpm run check: 6,248 passed, 36 skipped, 0 failed; build, formatting, types and coverage checks passed. Candidate native self-scan admitted in 5,764 ms with zero findings and no source-binding drift. The two target scans admitted in 3,095 and 3,839 ms.
  • The committed-branch and hosted reviews identified a P2 zero-count coordinate gap. The canonical parser now normalizes insertion boundaries, bounds both ranges, rejects reordered/overlapping hunks, and checks omitted gap/suffix lengths. Existing A/D checks use the same owner. Three regression cases fail before and all 12 focused cases pass after; the omitted-final-hunk regression separately fails before its fix. An independent replay accepts all 99 real Git cases and rejects all five malformed variants. This addresses the current finding, security concern and Rank-up move without claiming arbitrary secret disclosure or byte equality of every omitted gap.
  • Fresh pre-commit and final committed-branch Codex P0–P3 reviews are clean. The latter reviewed exact a7bfde77d197 against f48f1cee58c5 with zero findings; all six source hashes match the final full-suite and native-scan proof.

Production: +129/−35, net +94. The final repair adds 7 production lines by absorbing the old A/D-only checks into canonical hunk bounds. This capability requires explicit absent-endpoint and changed-line source proof; it extends one parser and reuses the existing classifier. Tests: +377/−8; docs: +61/−23. No configuration, workflow, dependency, persistent schema or permission change. OpenClaw Bay is unaffected: no dashboard API or public action surface changes.

OpenClaw Bay Impact

Bay is unaffected: no dashboard API, lifecycle state or public action surface changes.

Documentation Impact

Updated the active canonical scan contract in README.md and the existing proof recipe in docs/proof/agent-input-scan-context/README.md for exact changed-line admission and raw Git absence proof. The scan/parser owners remain the source of truth; detector, capture or admission changes require those descriptions and the executable proof to be refreshed.

@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added 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 Sep 16, 2026
@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 8:02 PM ET / September 17, 2026, 00:02 UTC (Revision 3).

ClawSweeper review

What this changes

Extends secret-scan admission to exact approved plugin fixtures in committed additions and removals, strengthens patch validation, and corrects a telemetry test’s clock.

Merge readiness

✅ Ready for maintainer review

The prior coordinate finding and rank-up request are addressed. No remaining actionable defect was found; current main does not provide the changed-line admission this PR adds.

Priority: P2
Reviewed head: a7bfde77d197b698a17e43cee3fc6d6280be21ff

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with current native proof and the previous blocker resolved.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The captured body records current-candidate production scanner runs over two complete OpenClaw ranges, with native verification enabled and observed refusal-to-admission results. The parser hash matches locally, and the prior malformed-coordinate rejection is documented. This proves scanner admission, not completion of a hosted model review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured body records current-candidate production scanner runs over two complete OpenClaw ranges, with native verification enabled and observed refusal-to-admission results. The parser hash matches locally, and the prior malformed-coordinate rejection is documented. This proves scanner admission, not completion of a hosted model review.
Evidence reviewed 7 items Current-head finding disposition: The final commit normalizes zero-count insertion boundaries, bounds both endpoint ranges, rejects overlapping or reordered hunks, and checks gap and suffix lengths. GitHub’s commit patch confirms these changes follow the previously reviewed head.
Admission remains source-bound: Changed-line witnesses require exact attribution candidates and recursively pass the existing full-blob classifier. That classifier checks detector metadata, ordered complete-line digests, every retained source reference, and unverified status; new/deleted files additionally require a matching captured raw Git record.
Current native behavior proof: The captured PR body reports production scanAgentInput runs using native TruffleHog 3.97.4 with verification enabled on macOS arm64 and Node 24.19.0. Both complete target ranges changed from refusal on main to admission on the candidate, in 3,095 and 3,839 ms. The locally computed parser SHA-256 matches the supplied final-proof identity a1bd5b0504259464aa8bcf35cc171b63cb89366f6cc64e1b3eb9e026bea3e3ae. The body also records 99 accepted real Git cases and five rejected malformed variants. These are contributor observations, not executions performed during this review.
Findings None None.
Security None None.

How this fits together

ClawSweeper scans prompts, Git patches, and source blobs before sending review inputs to an agent. Its fixture classifier permits narrowly approved synthetic credentials while refusing findings that lack matching source evidence.

flowchart TD
  A[Prompt and committed source] --> B[Native secret scanner]
  B --> C[Fixture classifier]
  D[Approved fixture identities] --> C
  E[Git blobs and raw diff records] --> C
  C --> F[Admit review inputs]
  C --> G[Refuse unqualified findings]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test LOC Production +129/−35; tests +377/−8 Production growth extends the existing parser with committed changed-line and absent-endpoint evidence; the PR states that justification explicitly.

Technical review

Best possible solution:

Keep one source-bound admission parser that accepts explicitly reviewed synthetic fixtures while preserving complete native scanning and refusal of unqualified findings.

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

Not applicable as a new admission capability; main’s context-only restriction is source-confirmed, and the supplied native before/after runs demonstrate the motivating refusals.

Is this the best way to solve the issue?

Yes. Extending the existing parser and reusing exact full-blob classification is a narrow solution, and the prior coordinate defect is repaired.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f48f1cee58c5.

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 (live_output): The captured body records current-candidate production scanner runs over two complete OpenClaw ranges, with native verification enabled and observed refusal-to-admission results. The parser hash matches locally, and the prior malformed-coordinate rejection is documented. This proves scanner admission, not completion of a hosted model review.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.
  • remove merge-risk: 🚨 security-boundary: Current PR review selected no merge-risk labels.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This bounded scanner improvement unblocks reviews containing approved synthetic fixtures without changing user installations.
  • 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 (live_output): The captured body records current-candidate production scanner runs over two complete OpenClaw ranges, with native verification enabled and observed refusal-to-admission results. The parser hash matches locally, and the prior malformed-coordinate rejection is documented. This proves scanner admission, not completion of a hosted model review.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body records current-candidate production scanner runs over two complete OpenClaw ranges, with native verification enabled and observed refusal-to-admission results. The parser hash matches locally, and the prior malformed-coordinate rejection is documented. This proves scanner admission, not completion of a hosted model review.

Evidence

What I checked:

  • Current-head finding disposition: The final commit normalizes zero-count insertion boundaries, bounds both endpoint ranges, rejects overlapping or reordered hunks, and checks gap and suffix lengths. GitHub’s commit patch confirms these changes follow the previously reviewed head. (src/agent-input-scan-patch.ts:142, a7bfde77d197)
  • Admission remains source-bound: Changed-line witnesses require exact attribution candidates and recursively pass the existing full-blob classifier. That classifier checks detector metadata, ordered complete-line digests, every retained source reference, and unverified status; new/deleted files additionally require a matching captured raw Git record. (src/agent-input-scan-fixtures.ts:731, a7bfde77d197)
  • Current native behavior proof: The captured PR body reports production scanAgentInput runs using native TruffleHog 3.97.4 with verification enabled on macOS arm64 and Node 24.19.0. Both complete target ranges changed from refusal on main to admission on the candidate, in 3,095 and 3,839 ms. The locally computed parser SHA-256 matches the supplied final-proof identity a1bd5b0504259464aa8bcf35cc171b63cb89366f6cc64e1b3eb9e026bea3e3ae. The body also records 99 accepted real Git cases and five rejected malformed variants. These are contributor observations, not executions performed during this review. (src/agent-input-scan-patch.ts, a7bfde77d197)
  • Pinned fixture source: The PR’s exact-attribution rows and proof recipe explicitly depend on these OpenClaw fixture bytes. Reading both pinned files through GitHub confirmed the ordered session-store line hashes at lines 119 and 122 and the e2e fixture hash at line 68 match the proposed policy. This establishes fixture identity, not a dependency on OpenClaw browser runtime behavior. (ui/src/pages/custodian/custodian-session-store.test.ts:119, 598dc5aebd5a)
  • Still necessary on main: The inspected main parser explicitly refuses literal occurrences on added or removed lines. The GitHub-verified merged fix(scanner): allow reviewed fixtures in unchanged patch context #1595 supplies unchanged-context admission only, so it does not supersede this PR. The latest release endpoint still identifies v0.3.0, published June 15, 2026; no shipped implementation of this extension was established. (src/agent-input-scan-patch.ts, f48f1cee58c5)
  • Regression coverage and scope: The complete introduced diff includes real Git-generated add/remove/new/delete fixtures, forged empty-side coordinates, reordered and overlapping hunks, omitted size-changing final hunks, newline markers, and invalid source evidence. The telemetry change supplies the existing fixed clock to listSync, whose production implementation otherwise uses Date.now(). The diff whitespace check passed; tests were not executed during this read-only review. (test/agent-input-scan.test.ts:3268, a7bfde77d197)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (2 earlier review cycles)
  • reviewed 2026-09-16T23:29:56.383Z sha 8b5aa16 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-16T23:36:48.353Z sha 8b5aa16 :: blocked before merge. :: [P2] Validate zero-count coordinates for modified files

@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. 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 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 Sep 16, 2026
Punchcard-Session: crisp-timber-valley-1q
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The zero-count coordinate finding and its Rank-up move are addressed at a7bfde77d197b698a17e43cee3fc6d6280be21ff. Both hunk boundaries, ordering and gap/suffix lengths are validated by the canonical parser. The main PR body now contains the failing-before/passing-after evidence, final native target/self scans, 6,248 passing tests, 99 valid Git cases and five rejected malformed variants, plus clean pre-commit and committed-branch P0–P3 reviews. Please review the current head and body.

@clawsweeper

clawsweeper Bot commented Sep 16, 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 exact_review_queue).
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. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 17, 2026
@Patrick-Erichsen
Patrick-Erichsen merged commit 2e4fb29 into main Sep 17, 2026
26 of 28 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the codex/claw-860-reviewed-plugin-fixtures branch September 17, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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