Repository navigation
fix: stop storage warnings for test-support-only changes - #1314
Conversation
Recognize colocated test-support files at the shared persistence and SQLite classifier boundary while preserving production, rename, and incomplete-evidence warnings. Regress the exact 57-line fixture from openclaw/openclaw#133209; production LOC remains net zero.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 6:03 PM ET / 22:03 UTC. ClawSweeper reviewWhat this changesThe PR updates ClawSweeper’s pull-request file classifier so colocated Merge readinessKeep this PR open: current main still treats the reported Priority: P3 Review scores
Verification
How this fits togetherClawSweeper classifies pull-request paths and patches before detecting persistence or SQLite changes. Those detector results feed the review comment and its merge-gate markers for OpenClaw pull requests. flowchart LR
A[Pull-request paths and patches] --> B[File-role classifier]
B --> C[Persistence detector]
B --> D[SQLite detector]
C --> E[Review report]
D --> E
E --> F[Warnings and merge gates]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the single shared filename-classification correction after the current exact-head check completes, retaining the covered production, rename, and incomplete-evidence safeguards. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the base classifier accepts a test-support basename and passes it to the persistence detector; the checked-in fixture supplies the reported storage-like patch. This read-only review did not independently execute the failing base revision. Is this the best way to solve the issue? Yes: extending the existing bounded basename predicate fixes both consumers at their shared boundary, while the tests explicitly retain production, rename, and truncated-evidence handling. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 99fa19072766. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready verification for The latest ClawSweeper review applies to this head and unchanged PR body, reports no actionable findings, and records
The original exact fixture failed before the repair with the reported warning. The repair changes one production line (+1/-1), preserves genuine production/rename/incomplete-evidence warnings, and adds no storage schema, OpenClaw governance, or runtime-policy change. The earlier macOS full-suite failure/stall is disclosed in the PR body and remains separate from the now-green hosted exact-head full gate. Proof was controlled offline classification/rendering, not live publication or deployment. Proceeding with the user-authorized squash merge of this exact head, without a bypass. |
Related: OpenClaw test-isolation PR and false-positive review.
Additional instructions
Maintainer edits are available on this same-repository branch.
What Problem This Solves
Resolves a problem where maintainers reviewing test-only changes receive a persistent-data warning and a request for migration proof. The reported review correctly assessed production +0/-0, but independently warned that a 57-line Vitest workspace guard changed vector/embedding metadata.
The exact reported head is
5ce7518f720a2ce9af8ebde7642010b4083c8ecd; the offending file issrc/agents/embedded-agent-runner/run.workspace-ownership.test-support.ts. It only guards workspace ownership before forwarding calls to existing consumers and restoring its spies.Why This Change Was Made
The host computes stored-data facts independently of model-authored review metrics. Its shared production-path predicate recognized
.test.and.spec.but omitted.test-support.. That admitted test instrumentation into the persistence scanner, where the ordinarymetadatavariable triggered vector/embedding classification.Recognize the missing colocated test-support role in the existing bounded basename matcher. Both stored-data and SQLite detection inherit the repair. Do not suppress renderer output, trust model-authored LOC as an exemption, or weaken production persistence, rename-side, unknown-evidence, configuration, or contributor-proof gates. No OpenClaw core/governance change or stored schema change is included.
Production LOC: +1/-1 (net 0). Tests and fixture: +107/-25. Documentation/release notes explain the corrected role.
User Impact
Test-support-only changes no longer invent stored-data migration work. Genuine production vector, index, retention, serialization, browser/durable storage, and schema changes still warn and require the existing review/proof handling. Historical comments are not rewritten by this patch.
OpenClaw Bay Impact
Unaffected. No observer fields, routes, schemas, or controls change.
Documentation Impact
Updated the active implementation reference
docs/pr-review-comments.mdto identify colocated test-support files as test code. The source of truth remainssrc/clawsweeper-change-detection.ts; future changes to file-role eligibility must keep this reference aligned. Added a ClawSweeper changelog entry; OpenClaw's release-owned changelog is untouched.Evidence
node --test test/pr-surface-policy.test.tspassed 57/57.scripts/check-file-utils.tsandscripts/lib/changed-path-facts.mjsidentify.test-support.*as test-only. Direct inspection of Vitest 4.1.11's@vitest/spyimplementation confirms custom implementation forwarding and original-property restoration; no persistence behavior is introduced by this guard.pnpm run buildandgit diff --checkpassed. The earlier complete-check attempt also passed static/docs/format checks, all three builds, lint, and the 13-test changed-coverage lane.99fa19072766106fdf1586196d450b613bf2b09e, whose hosted CI passed. Exact PR-head hosted CI remains a landing gate; the local failure/stall has a separate follow-up.Real Behavior Proof
Claim and surface: execute the real compiled persistence classifiers, production input normalization, comment renderer, and automation-marker generation. The captured PR patches are inert input. Reports are controlled otherwise-clear inputs so migration-only warning/gate differences are observable independently of a new model review.
Scenario and environment: Node 24.20.0 on macOS; all 25 files captured read-only from the reported PR, plus production vector/SQLite/mixed controls. The 57-line guard was reconstructed from the patch and byte-compared with its pinned Git blob. SHA-256:
97c758d403414f36efc9bd05c4e3cf05793983d46d73d291a80b4e470cbe7238. The exact guard input is retained intest/fixtures/persistence-classifier-133209.json.Executed commands:
pnpm run build; the task-localnode /tmp/clawsweeper-stored-data-proof.mjs beforeandafterreplay; and the repeatable checked-in boundary proofnode --test test/pr-surface-policy.test.ts. In the dependency-sharing worktree, pnpm used its existingpnpm_config_verify_deps_before_run=falsecontrol to avoid reconciling the shared installation; no package or dependency changes were made.Observed trace: all ten replay cases passed after the repair (each row exercised with both full and production-normalized patches).
Before-rendered excerpt:
After, the exact guard and complete PR both return
{"change":false,"surfaces":[]}and{"change":false,"files":[]}. The renderer emits no stored-data section, and the controlled otherwise-clear report has no migration-only gate.Limits: controlled offline runtime replay, not a live publication or a new model review. No live service, existing stored decision, mutation gate, deployment, or advisory workflow was changed during the proof. This proves the changed classification/rendering path, not unrelated contributor-proof exemptions. Local before/after rendered comments and verdict JSON are retained with the task artifacts.