Skip to content

fix(review): preserve dependency links and avoid diagnostic storage warnings - #1341

Merged
steipete merged 2 commits into
mainfrom
fix/review-evidence-identity-diagnostics
Sep 1, 2026
Merged

steipete merged 2 commits into
mainfrom
fix/review-evidence-identity-diagnostics

Conversation

@steipete

@steipete steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where reviewers following dependency evidence links were sent to the reviewed repository instead of the dependency repository. The same review could also label diagnostic-only changes as a persistent vector/embedding data-model change and ask for migration proof that did not apply.

Concrete reproduction: the docs-i18n review on OpenClaw PR 134934, with the maintainer clarification. That PR and OpenClaw product code are not changed here.

Why This Change Was Made

Repository identity was absent from structured evidence, and saved-report parsing discarded URL destinations and full commit identifiers before reconstructing links. The repair carries an explicit repository through the decision, report, and close/keep-open rendering pipeline. It preserves commit-pinned dependency URLs, keeps the target's docs and latest-VISION conventions target-only, and leaves conflicting or unresolved locations unlinked rather than guessing.

The persistence classifier previously treated generic words such as chunkID and metadata as vector-storage evidence anywhere in changed code, including logging. Generic identifiers now require the existing owner-path or same-hunk storage evidence; explicit vector contracts and real storage/schema/migration signals retain their warnings. Go *_test.go classification is shared with the file-role owner, including PR surface statistics.

User Impact

Evidence links lead to the correct source repository and revision. Diagnostic-only Go changes no longer produce a false migration-proof request. Real persistence changes, renamed production storage, and missing/truncated known-storage evidence remain review-gated.

Historical Markdown reports remain readable. Correct explicit destinations retain their identity and full SHA; already-wrong historical destinations cannot have lost ownership inferred automatically. This does not edit the existing public review or change close/repair/merge policy.

OpenClaw Bay Impact

None. Per-evidence source locations and this existing classifier projection do not change Bay's observer API, lifecycle schema, routes, or controls.

Documentation Impact

Updates the active implementation reference docs/pr-review-comments.md with repository identity, unknown-location behavior, Go test roles, and the persistence evidence boundary. The review prompt now requires per-entry repository ownership and separate entries or explicit links for mixed-repository evidence. The reproducible script under docs/proof/review-evidence-identity/ is historical proof, not operator policy.

Evidence

  • Captured the exact original PR patches and reproduced both false vector/embedding alerts before the repair; full and production-normalized replays pass afterward.
  • Proved dependency source/commit links, full SHA preservation, historical report decoding, unresolved/conflicting paths, target docs behavior, and dependency VISION pinning through the real report/comment code.
  • The focused integrated suite now passes 268 tests, including the exact-destination counterexample; final landing validation is recorded below.
  • Existing positive controls retain SQL, vector field, serialization, browser/durable storage, rename, and incomplete-evidence warnings and human-review gating.
  • No translation/provider canary, Full/Incremental translation dispatch, model/toolchain update, or OpenClaw product edit is part of this PR.

Local validation on Node 24.20.0 / repository-pinned pnpm 11.10.0 passed: pnpm run build:all, the nine focused suites (268 tests), pnpm run check:static, pnpm run lint, proof-script lint/syntax checks, and git diff --check.

Precommit Codex autoreviews are scoped-clean at the default P0 threshold. A separate committed-branch review is required and checked before landing.

Known pre-existing local validation gap: the full macOS run had 4,294 passes, nine platform skips, and three failures. The Knip deadline and Git history-fixture failures passed isolated reruns. The unchanged label-proof harness still encounters a two-second process-identity deadline because Apple's system Python launcher performs xcrun cache work before entering Python; traced startup exceeded eight seconds. An incomplete bytecode-only mitigation was removed. This PR does not change that host prerequisite, interpreter, identity safety, or deadline. The same baseline's hosted full CI is green; green exact-head CI is required before merging this PR.

CodeQL Review Disposition

The two GitHub Advanced Security annotations (first assertion, second assertion) point to URL substring assertions in test/review-comment-rendering.test.ts, originally lines 177 and 180. Their inputs are synthetic renderer fixtures, and their result is a Node test assertion; neither is a production URL sanitizer or authorization decision.

The test oracle is now stronger: it parses actual Markdown link destinations with the existing MarkdownIt dependency and compares exact hrefs rather than searching the whole output text. A counterexample inside a details block proves that visible URL prose or labels paired with a lookalike href cannot satisfy the expected destination. The related source, commit, docs, VISION, and unresolved-location checks use the same exact-destination boundary.

This addresses the ClawSweeper rank-up action by tracing both alerts and improving the regression coverage. No suppression, alert dismissal, new dependency, production URL-handling change, or security exception was added. The production replay remains passing; fresh exact-head CodeQL results are required before merge.

Real Behavior Proof

Claim and surface: the actual compiled public-review renderer preserves dependency identity, and the actual persistence classifier does not gate the captured diagnostic-only diff while retaining a genuine stored-data control.

Scenario: the cited Codex source at commit 78c290807ce710180111df227df3b7a4fe845452, the captured diagnostic patches from OpenClaw PR 134934, and synthetic complete review metadata. No live GitHub mutation or model inference is involved in the offline replay.

Command:

node docs/proof/review-evidence-identity/run-proof.mjs

Observed result and artifacts: the same script exits 1 against a separately compiled 48bd2b42f1dd0504c9afc8643c9781290604b3b2 baseline and exits 0 against this candidate. The sanitized replay summary records all assertion failures and storage controls; the reproducible recipe emits all eight evidence cases.

Observation Baseline Candidate
Dependency source/commit owner openclaw/openclaw (incorrect) openai/codex
Dependency commit identity Short display SHA Full source SHA
Captured diagnostic patch Two false vector/embedding alerts; migration gate No stored-data alert or migration gate
Real SQL and vector controls Warning and human-review gate Warning and human-review gate retained
Complete close/keep-open evidence cases Identity assertions fail All eight pass

The source URL in openai/codex returned HTTP 200 while the incorrect openclaw/openclaw destination returned HTTP 404. The pinned sibling source blob was inspected directly and its SHA-256 is recorded in the summary.

Limits: this is controlled offline execution of the changed production boundary, not a new model/translation canary or live comment publication. Unit tests and CI are supporting checks rather than claims of live translation behavior.

Scope and size

Production code and schema/prompt contract: +206/-57 (net +149). Tests and proof support: +823/-8, including the durable replay recipe and sanitized result. Active documentation: +28/-8. Production growth carries repository identity through the existing owner pipeline; the classifier repair itself is net +4 lines.

No new dependencies, configuration options, storage backend, or protocol version. Implementation-close evidence ownership is a separate follow-up, not an expansion of this renderer repair.

Maintainer edits

The branch is in the owner repository and remains editable by maintainers.

Carry repository identity and full source SHAs through structured evidence,
report serialization, parsing, and both public comment paths. Keep dependency
docs and VISION references on their own repository and revision; do not guess
links for unresolved or conflicting locations.

Do not treat generic diagnostic identifiers as vector persistence evidence.
Recognize Go test files through the shared role owner while retaining real
storage, migration, rename, and incomplete-evidence warnings.

Include before/after regressions and a reproducible offline production-boundary
proof with sanitized observations. No OpenClaw product or translation changes.

Reproduction: openclaw/openclaw#134934 (comment)
Clarification: openclaw/openclaw#134934 (comment)
@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review September 1, 2026 19:42
@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. 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. labels Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 5:41 PM ET / 21:41 UTC.

ClawSweeper review

What this changes

The branch preserves the source repository and full revision for evidence links, while excluding diagnostic Go test files and generic identifiers from persistence-change warnings.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

This PR remains necessary: its verified introduced delta repairs review-link identity and false stored-data gating that are not present in the fetched base. The current-head implementation and supplied before/after proof show no actionable defect.

Priority: P2
Reviewed head: a9455acae0abc0f3025d5944e0cd1db7fc9ddd92

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused end-to-end coverage and controlled before/after proof support a well-bounded repair.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The changed production owners are the evidence normalizer, report/comment renderer, and stored-data classifier; the linked current-head artifact records a compiled offline replay where baseline identity and diagnostic cases fail, the candidate passes eight evidence cases, and genuine SQL/vector controls remain gated.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The changed production owners are the evidence normalizer, report/comment renderer, and stored-data classifier; the linked current-head artifact records a compiled offline replay where baseline identity and diagnostic cases fail, the candidate passes eight evidence cases, and genuine SQL/vector controls remain gated.
Evidence reviewed 5 items Evidence identity pipeline: The current head normalizes repository, path, revision, and line information together; conflicting or unresolved identities are intentionally left unlinked.
Persistence boundary: The classifier now treats Go test-role paths as non-production and requires explicit vector/embedding contract evidence rather than generic metadata or identifier names.
Regression coverage: The focused tests cover exact Markdown destinations, conflicting locations, legacy reports, Go test suffixes, diagnostic-only patches, and retained real storage controls.
Findings None None.
Security None None.

How this fits together

ClawSweeper converts structured review evidence into durable records and public comments, while its change classifier decides when a reviewed PR needs stored-data migration scrutiny. Repository identity and file-role classification feed those outputs and review gates.

flowchart LR
A[Structured review evidence] --> B[Evidence normalization]
B --> C[Durable review report]
C --> D[Public review comment]
E[Changed PR files] --> F[Stored-data classifier]
F --> G[Migration review gate]
D --> H[Maintainer decision]
Loading

Before merge

  • Complete next step (P2) - No concrete repair remains after this review.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Review-pipeline scope 25 files, +1057/-73 The change spans parsing, durable reports, rendering, policy, and focused proof coverage, so the end-to-end regression checks are material.

Technical review

Best possible solution:

Land the focused identity and classifier repair with its exact-destination and persistence-control coverage intact.

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

Yes: the supplied current-head replay records the prior failing renderer/classifier cases and the candidate’s observed passing results, with retained persistence controls.

Is this the best way to solve the issue?

Yes: carrying verified repository identity through the existing report pipeline and narrowing detection to storage evidence is the smallest maintainable repair.

AGENTS.md: found and applied where relevant.

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

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: This repair prevents misleading evidence links and unnecessary migration-proof gates without affecting runtime availability or user data.
  • 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 (linked_artifact): The changed production owners are the evidence normalizer, report/comment renderer, and stored-data classifier; the linked current-head artifact records a compiled offline replay where baseline identity and diagnostic cases fail, the candidate passes eight evidence cases, and genuine SQL/vector controls remain gated.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed production owners are the evidence normalizer, report/comment renderer, and stored-data classifier; the linked current-head artifact records a compiled offline replay where baseline identity and diagnostic cases fail, the candidate passes eight evidence cases, and genuine SQL/vector controls remain gated.

Evidence

What I checked:

  • Evidence identity pipeline: The current head normalizes repository, path, revision, and line information together; conflicting or unresolved identities are intentionally left unlinked. (src/clawsweeper-links.ts:100, a9455acae0ab)
  • Persistence boundary: The classifier now treats Go test-role paths as non-production and requires explicit vector/embedding contract evidence rather than generic metadata or identifier names. (src/clawsweeper-change-detection.ts:216, a9455acae0ab)
  • Regression coverage: The focused tests cover exact Markdown destinations, conflicting locations, legacy reports, Go test suffixes, diagnostic-only patches, and retained real storage controls. (test/review-comment-rendering.test.ts:134, a9455acae0ab)
  • Controlled behavior proof: The checked-in replay records failing baseline identity and diagnostic classifications, then eight passing evidence cases with SQL and vector positive controls retained on the candidate. (docs/proof/review-evidence-identity/result.json:1, a9455acae0ab)
  • No dependency addition: The strengthened Markdown-destination assertions use the repository's existing markdown-it dependency. (package.json:127, a9455acae0ab)

Likely related people:

  • RoboClaw: 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-01T19:47:01.729Z sha 2946300 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T21:36:20.102Z sha a9455ac :: needs maintainer review before merge. :: none

Replace substring URL assertions with parsed href membership. Prose and
lookalike link destinations can no longer satisfy the evidence-link oracle.

Add a counterexample covering details blocks, visible URL text, and a
lookalike href. This addresses the two test-only CodeQL annotations without
suppressions or changes to production URL handling.
@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 1, 2026
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Addressed the CodeQL disposition and rank-up action on a9455acae0ab. Both annotations were in test/review-comment-rendering.test.ts: substring assertions over synthetic rendered output, not a production URL sanitizer or authorization path. The tests now parse Markdown hrefs and compare exact destinations. A counterexample proves that URL prose or labels with a lookalike href cannot satisfy the oracle. No suppression, alert dismissal, dependency change, or production-code change was added.

The current CodeQL result gate is successful. The two outdated annotation threads are resolved, and the main PR body now contains their exact locations, data-flow disposition, and updated proof.

Validation on this head:

node --test test/review-comment-rendering.test.ts test/decision-parser.test.ts

70 tests passed; the broader nine-suite set passed 268 tests. Fresh precommit and committed-branch Codex autoreviews are scoped-clean at the default P0 threshold.

node docs/proof/review-evidence-identity/run-proof.mjs

Passed on this exact head: eight evidence cases and three storage cases. The recorded baseline failures and positive storage controls remain in the linked proof artifact. The Windows launcher and sparse-build checks are successful; the full pnpm check job in CI run 33561412301 has also completed successfully.

The documented pre-existing local macOS launcher prerequisite gap is unchanged. OpenClaw PR 134934, translation/provider canaries, model/toolchain settings, and translation dispatches remain outside this work.

@clawsweeper

clawsweeper Bot commented Sep 1, 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: 🦞 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 Sep 1, 2026
@steipete
steipete merged commit 8f3a7ab into main Sep 1, 2026
25 checks passed
@steipete
steipete deleted the fix/review-evidence-identity-diagnostics branch September 1, 2026 21:57
steipete added a commit that referenced this pull request Sep 2, 2026
Routing prose was being inferred as actionable merge work, creating a bogus checkbox and remaining-item count on otherwise clean reviews.

Carry producer-owned typed next-step intent through the canonical report into the checklist renderer. Explicit non-actions suppress only the derived next-step item; absent, malformed, or ambiguous intent retains conservative legacy compatibility. Genuine required actions and independent blockers remain visible, with scores and repair/automerge markers unchanged.

Validation: 200 focused tests, 10 paired compiled-renderer replay cases, and the producer/report round-trip passed. Full pnpm check CI, CodeQL, Windows launcher, and sparse build passed on the reviewed head.

Related reproduction: #1341 (comment)
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: 🦞 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.

2 participants