Repository navigation
refactor: compact database-first legacy store analyzer - #117347
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 6:58 AM ET / 10:58 UTC. ClawSweeper reviewWhat this changesThis PR replaces the database-first legacy-store analyzer’s duplicate wrapper-only interpreter with its canonical lexical fact evaluator and adds regression coverage for computed properties, argument forwarding, bounded facts, and parameter defaults. Merge readinessNo concrete patch defect was found in this focused guard refactor, and its supplied terminal/Testbox evidence is appropriate for static-analysis behavior. Keep this PR open for human merge handling: it carries the protected Priority: P3 Review scores
Verification
How this fits togetherThe database-first legacy-store analyzer is a static repository guard that scans OpenClaw runtime source for forbidden legacy file-store behavior. It turns lexical and wrapper-call facts into diagnostics consumed by repository checks that enforce SQLite-first state ownership. flowchart LR
A[Runtime source files] --> B[Legacy-store analyzer]
B --> C[Lexical and branch facts]
C --> D[Wrapper call evaluation]
D --> E[Diagnostics]
E --> F[Repository guard checks]
Decision needed
Why: The Before merge
Agent review detailsSecurityNone. PR surfaceTests +412, Other -3063. Total -2651 across 2 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one canonical lexical evaluator, verify the failed compact CI result on the clean merge result, then merge if that check passes or is confirmed unrelated to this refactor. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the focused guard suite and the PR’s stated whole-corpus diagnostic differential give a direct verification path, although this read-only review did not execute them. Is this the best way to solve the issue? Yes, provisionally: eliminating the duplicate wrapper-only interpreter in favor of the existing lexical evaluator is the narrower maintainable ownership boundary, and the new cases cover the added propagation rules. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4e47c4cabf8f. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
What Problem This Solves
The database-first legacy-store guard had grown two overlapping abstract interpreters for the same wrapper, scope, and path-flow rules. That duplication made security-sensitive cleanup difficult to reason about and kept more than 3,000 lines of parallel policy alive.
Why This Change Was Made
This consolidates wrapper execution into the guard's canonical lexical/branch fact engine and removes the duplicate wrapper-only interpreter. The unified evaluator preserves captured lexical environments, parameter/default/destructuring behavior, computed properties, callable/object facts, branch effects, and statically resolvable spread/transparent argument forwarding. Bounded candidate sets widen conservatively instead of discarding dangerous facts.
Architectural owner:
scripts/check-database-first-legacy-stores.mjs. Removed path: the duplicate wrapper summary/interpreter stack. No config, schema, runtime storage, protocol, dependency, or public API changes.User Impact
No runtime user-visible behavior changes. Maintainers get one smaller canonical guard implementation with stronger adversarial coverage and the same diagnostics across the current runtime corpus.
Production LOC: +797/-3860, net -3063. Tests: +412.
Evidence
16cbea99dc0c06f3433bf1874c7d5031622ac49e.tbx_01kyyc4q57ze19adphjtk4yvfv, run).tbx_01kyyc7zc5xs1tn8nyzrf9b369, run); includes formatting, test-root typecheck, script lint, declaration contracts, and tooling guards.gpt-5.6-solxhigh autoreview over the 218,960-byte local patch: clean, no accepted/actionable findings.git diff --checkandnode --check scripts/check-database-first-legacy-stores.mjs: passed.Current Main Integration
The touched-path intersection between this branch and current
mainis empty for both changed files. Per repository policy, moving-main drift without touched-path overlap is advisory rather than a reason to rewrite a conflict-free reviewed head. A refresh was therefore intentionally skipped: it would invalidate the exact reviewed SHA without changing this patch. Ready-state hosted CI validates the GitHub merge result against currentmain; the focused suite and 12,790-file diagnostic differential above remain attached to the exact reviewed head.