Skip to content

fix(review): avoid migration blockers for transient diagnostics - #1457

Merged
steipete merged 1 commit into
mainfrom
steipete/reverent-rubin-674c8a
Sep 5, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/reverent-rubin-674c8a

Conversation

@steipete

@steipete steipete commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes false stored-data and migration-compatibility blockers on behavior-neutral transient JSON diagnostics, reproduced from OpenClaw PR 138520 at e87dc59f30bfb77dad91d8f9229839a350fad3f7 and its published review.

The exact GitHub API patch is 2,090 characters. Production context hydration keeps 2,000 characters and appends a truncation marker. Bare JSON conversion established “serialized state”; the generic sqlite- filename plus truncation independently established an unknown data-model change and a categorical SQLite-table warning. These host-produced flags contradicted the review's behavior-neutral assessment.

Why This Change Was Made

Correct the owning detector rather than suppressing publisher warnings. JSON conversion needs an explicit persistence owner or a same-hunk durable boundary; generic SQLite diagnostic/helper filenames no longer establish schema ownership. Compound SQLite store/schema owners, stored-row codecs, user-version compatibility owners, actual SQL, synchronous/asynchronous file IO, browser/durable storage, incomplete owner patches, and production rename sides remain covered. Changed stored fields beneath unchanged JSON conversion remain gated.

No publisher, approval/proof gate, patch-size limit, report schema, migration, database schema, or existing stored record is changed. This does not classify every read-only edit to a disk-backed receipt as transient. The separate cross-hunk SQL-context fix landed in PR 1456 and is now in this PR's base; it is not duplicated in this delta.

User Impact

Transient stdout/IPC JSON formatting no longer fabricates a persisted SQLite-table change or asks for an inapplicable migration. Actual persistence-owner and stored-shape changes still require compatibility proof through the existing gate. Existing published reviews are not retroactively rewritten by this patch.

OpenClaw Bay Impact

No Bay change is needed. The producer emits the same report fields with corrected classification values; observer APIs, lifecycle/telemetry contracts, and mutation boundaries are unchanged.

Documentation Impact

Updated the active stored-data guidance in docs/pr-review-comments.md, added a bounded historical proof package under docs/proof/persisted-model-diagnostics/, and recorded the user-visible fix in the Unreleased changelog.

Evidence

  • Fresh focused detector, review-state, and review-prompt suites after rebasing onto PR 1456: 249 passed, zero failed/skipped, exercising both fixes together.
  • The exact public API fixture is tested both full and through production normalization, then through production report assembly and comment/readiness rendering.
  • Positive regressions cover true SQL and persistence changes, stored fields under unchanged serializers, compound SQLite owner paths, incomplete patches and renames, and mixed transient/durable edits. Existing affirmative and negative compatibility-proof tests remain enabled.
  • Full macOS pnpm run check before that rebase: static/docs checks, clean builds, lint, and focused coverage passed. The full test run finished with 5,015 passed, 13 skipped, 7 failed. The seven failures were in untouched input-scan, dashboard timing, label-identity, comment-router and fast-rebase fixtures. All seven passed isolated reruns without code changes; the final two used canonical macOS TMPDIR to avoid the /var → /private/var alias. This was not a clean full local run; the PR's native full CI gate must also pass before merge.
  • Fresh isolated Codex reviews of both the uncommitted candidate and committed branch returned scoped-clean at the configured P0 threshold, with no accepted/actionable findings.

Real Behavior Proof

Claim: the exact diagnostic-only input must not generate persisted-data flags, a SQLite-table warning, or a migration blocker; real persistence controls must still block without compatibility proof.

Surface and input: the checked-in test/fixtures/persistence-classifier-138520.json is the exact public GitHub pull-files API patch, cross-checked against the pinned OpenClaw commit. The standalone recipe executes the actual production patch normalizer, both detector APIs, and the comment/readiness/compatibility renderers. Report readiness and compatibility sentences are deliberately synthetic inputs, not live review attestations. No upstream OpenClaw code is executed.

Environment: Node v24.20.0, macOS arm64, pinned pnpm 11.10.0; local process, no container/image/remote lease.

Run after a fresh build:

pnpm run build
node docs/proof/persisted-model-diagnostics/run-proof.mjs --baseline
node docs/proof/persisted-model-diagnostics/run-proof.mjs

Observed: baseline exits 1 with exactly four expected negative-case failures. The normalized exact input reproduces serialized state, unknown-data-model-change, the SQLite warning, and the compatibility blocker. Candidate exits 0 with all 24 scenarios passing. Both modes preserve all 20 persistence controls: each blocks without compatibility proof and accepts an affirmative synthetic statement in an otherwise-valid report. The full untruncated baseline input produces the stored-data blocker but not the SQLite-table flag; normalization is the additional trigger for that flag.

Artifacts and provenance: the proof explanation, executable recipe, baseline receipt, and candidate receipt include exact fixture/patch, source, compiled-owner, recipe and rendered-output hashes. Recorded receipts identify the tested pre-commit source tree via base revision plus working-source diff and content hashes. The recipe was independently rerun after commit at exact head 474472284ebc3e43b1b3030d52853ed4ada08bf5: all 24 scenarios passed, and every result plus source/compiled owner hash matched the recorded candidate receipt. Only Git HEAD/working-diff provenance differs from the pre-commit receipt.

Limits: the historical baseline substitutes only the original detector from 66af14ef3f725f5ecb1c0ab8f6b085cc40b3d642; hydration/role classification/emitter dependencies remain current and shared. This is not a complete historical application, live model review, GitHub publication, actual database migration, or retrospective review repair. No real schema change or migration is introduced by this PR.

@clawsweeper

clawsweeper Bot commented Sep 5, 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 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 3:51 PM ET / 19:51 UTC.

ClawSweeper review

What this changes

Refines stored-data detection so transient JSON diagnostics avoid migration blockers while explicit persistence owners retain compatibility checks, with regression coverage and recorded proof.

Merge readiness

✅ Ready for maintainer review

Still needed: current main retains the transient-JSON and SQLite-filename false positives. The rebase resolves the previous conflict blocker, and the reviewed patch has no actionable correctness findings.

Priority: P2
Reviewed head: 474472284ebc3e43b1b3030d52853ed4ada08bf5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable repair with strong recorded production-path proof and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Inspected macOS local-node receipts exercise production normalization, persistence detection, and readiness rendering: all 24 candidate scenarios pass, including 20 retained compatibility controls. Source and recipe hashes match this head; synthetic readiness inputs and no live publication are explicit limits.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): Inspected macOS local-node receipts exercise production normalization, persistence detection, and readiness rendering: all 24 candidate scenarios pass, including 20 retained compatibility controls. Source and recipe hashes match this head; synthetic readiness inputs and no live publication are explicit limits.
Evidence reviewed 7 items Policy and checkout verified: Read the complete root AGENTS.md and CONTRIBUTING.md. No nested AGENTS.md or maintainer-notes directory was found. Applied the focused-proof, review-continuity, and Bay-impact guidance; the recorded proof ran on macOS, so the Windows-host container instruction does not apply.
Current main still needs this repair: The pinned main source still treats bare JSON conversion as serialization and generic sqlite-prefixed filenames as likely schema owners. The introduced delta narrows those signals while preserving explicit storage boundaries, compound owner filenames, and rename-side evidence.
Production output boundary: Report assembly consumes both detector results and persists the existing classification fields; the unchanged compatibility gate requires upgrade proof only when stored-data classification is present. No report schema, stored-record format, or Bay observer contract changes.
Findings None None.
Security None None.

How this fits together

ClawSweeper classifies incoming OpenClaw PR patches before generating review reports. These classifications determine stored-data warnings and whether compatibility proof blocks review readiness.

flowchart TD
 A[PR filenames and patches] --> B[Context normalization]
 B --> C[Persistence detector]
 C --> D{Storage evidence present?}
 D -->|Yes| E[Compatibility proof gate]
 D -->|No| F[Ordinary review readiness]
 E --> G[Review warnings and verdict]
 F --> G
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production versus test growth Production +49/-11; tests and fixture +256/-2 The production growth is confined to the owning detector and justified by distinguishing transient JSON from persistence evidence.
Recorded behavior controls 24 scenarios: 4 diagnostic negatives, 20 persistence positives The receipts cover both removing false blockers and retaining compatibility gates.

Technical review

Best possible solution:

Keep persistence classification tied to explicit storage evidence and retain the existing compatibility gate for genuine stored-shape changes.

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

Yes: pinned main source and the full/normalized diagnostic fixture establish the false-positive path, supported by recorded baseline failures. This read-only review did not execute target code.

Is this the best way to solve the issue?

Yes: correcting the owning detector is narrower than suppressing downstream warnings, and the positive controls preserve real persistence checks.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: Repairs bounded review-classification errors that impose unnecessary migration-proof work on contributors.
  • 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): Inspected macOS local-node receipts exercise production normalization, persistence detection, and readiness rendering: all 24 candidate scenarios pass, including 20 retained compatibility controls. Source and recipe hashes match this head; synthetic readiness inputs and no live publication are explicit limits.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected macOS local-node receipts exercise production normalization, persistence detection, and readiness rendering: all 24 candidate scenarios pass, including 20 retained compatibility controls. Source and recipe hashes match this head; synthetic readiness inputs and no live publication are explicit limits.

Evidence

What I checked:

  • Policy and checkout verified: Read the complete root AGENTS.md and CONTRIBUTING.md. No nested AGENTS.md or maintainer-notes directory was found. Applied the focused-proof, review-continuity, and Bay-impact guidance; the recorded proof ran on macOS, so the Windows-host container instruction does not apply. (AGENTS.md:74, 474472284ebc)
  • Current main still needs this repair: The pinned main source still treats bare JSON conversion as serialization and generic sqlite-prefixed filenames as likely schema owners. The introduced delta narrows those signals while preserving explicit storage boundaries, compound owner filenames, and rename-side evidence. (src/clawsweeper-change-detection.ts:229, 0c05db6804c7)
  • Production output boundary: Report assembly consumes both detector results and persists the existing classification fields; the unchanged compatibility gate requires upgrade proof only when stored-data classification is present. No report schema, stored-record format, or Bay observer contract changes. (src/clawsweeper-report-document.ts:558, 474472284ebc)
  • Recorded production-path proof: Read the complete proof recipe and inspected both receipts. The macOS Node v24.20.0 run exercises production normalization, detectors, and comment/readiness rendering: four diagnostic negatives pass after the fix, and all twenty persistence controls retain the compatibility blocker without proof and accept affirmative proof. Synthetic report inputs and the absence of live publication are explicitly disclosed. (docs/proof/persisted-model-diagnostics/run-proof.mjs:145, 474472284ebc)
  • Proof identity matches reviewed source: All twelve recorded source-owner hashes match the checkout; recipe and fixture hashes also match. Baseline and candidate receipts share the same source and compiled-owner hashes. The captured PR body additionally reports an exact-head rerun with identical results. Hash verification establishes identity; the recipe and outcomes were inspected separately. (docs/proof/persisted-model-diagnostics/candidate.json:1, 474472284ebc)
  • Previous blocker resolved; related fix is distinct: The supplied verified original-head parent and test-merge parents place this patch directly on merged fix: avoid SQLite schema warnings for unrelated runtime edits #1456. That PR addresses cross-hunk SQL context, explicitly excluding serialization and filename ownership. The current body records refreshed focused validation and proof after rebasing; the prior conflict warning no longer applies. (474472284ebc)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Martin Cleary: 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 (1 earlier review cycle)
  • reviewed 2026-09-05T19:35:46.370Z sha 683cd7c :: blocked before merge. :: none

Require a persistence owner or same-hunk durable boundary before treating JSON conversion as stored state. Distinguish SQLite diagnostic helpers from real schema, store, codec, and compatibility owners without changing approval or migration-proof gates.

Reproduce the exact full and normalized patch from openclaw/openclaw#138520 and preserve twenty real-persistence controls in the offline detector-to-render proof.
@steipete
steipete force-pushed the steipete/reverent-rubin-674c8a branch from 683cd7c to 4744722 Compare September 5, 2026 19:47
@steipete
steipete merged commit 349190f into main Sep 5, 2026
14 of 16 checks passed
@steipete
steipete deleted the steipete/reverent-rubin-674c8a branch September 5, 2026 20:00
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