Repository navigation
fix(review): avoid migration blockers for transient diagnostics - #1457
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 3:51 PM ET / 19:51 UTC. ClawSweeper reviewWhat this changesRefines 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 Review scores
Verification
How this fits togetherClawSweeper 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
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
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.
683cd7c to
4744722
Compare
What Problem This Solves
Fixes false stored-data and migration-compatibility blockers on behavior-neutral transient JSON diagnostics, reproduced from OpenClaw PR 138520 at
e87dc59f30bfb77dad91d8f9229839a350fad3f7and 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 underdocs/proof/persisted-model-diagnostics/, and recorded the user-visible fix in the Unreleased changelog.Evidence
pnpm run checkbefore 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 macOSTMPDIRto avoid the/var→/private/varalias. This was not a clean full local run; the PR's native full CI gate must also pass before merge.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.jsonis 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:
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.