Repository navigation
chore(db): reclassify worker-only and boot-only inventory sites with evidence (T1 1,508 → 1,354) - #163754
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. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: blocked before merge. Reviewed October 2, 2026, 4:23 PM ET / 20:23 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR classifies database calls by their enclosing operation, refreshes the migration inventory, and adds coverage that preserves conservative classification of unrelated runtime calls. Merge readiness⛔ Blocked before merge - 1 item remains The PR remains useful and has no supported blocking findings. The earlier upgrade-proof blocker does not apply: the introduced changes classify source text and generate inventory metadata without changing database schemas, stored state, or runtime execution. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw's database-worker inventory reads source files and identifies synchronous database calls for migration planning. Its classifications also feed a CI ratchet that rejects growth in candidate main-thread calls. flowchart TD
A[Current source files] --> C[Source parser]
B[Base source snapshot] --> C
C --> D[Operation classification]
D --> E[Migration inventory]
D --> F[Compare runtime call totals]
F --> G[CI pass or rejection]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +48, Docs +62, Other +371. Total +481 across 4 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep one source-based classifier for inventory generation and both ratchet snapshots, with caller-backed operation exceptions and conservative defaults. Do we have a high-confidence way to reproduce the issue? Not applicable to a product bug: this is inventory cleanup. Source inspection establishes the previous file-only classification, and the supplied regression exercises the affected tooling boundary. Is this the best way to solve the issue? Yes. Extending the existing classifier with named operation paths avoids fragile line-based exceptions while retaining conservative defaults and one ratchet owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b4d1a0efc8a9. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* commit '79be075e5aa46be9e42dbd53ed6e30e81469210a': (33 commits) fix(ui): keep selected-text comment input readable while scrolling (#163772) test(memory): open corpus database explicitly fix: bound Doctor migration capture to plugin data (#163780) fix(ui): gate system information at the shared reader (#160982) chore(db): reclassify worker inventory sites with caller evidence (#163754) refactor(channels): deslop Slack and Matrix (#163740) fix(agents): reject empty sessions_search queries in the tool schema (#129120) perf(nodes): load only what a worker turn needs (#160442) test(cli): assert concise Gateway failure copy in CLI process tests (#163649) refactor(discord): deslop discord (#163728) fix(workboard): make Sessions boards work on multi-agent Gateways (#163761) test(gateway): add sustained heap retention diagnostics (#163764) test(ui): disambiguate session filter controls refactor(plugins): deslop imessage, mattermost, and voice-call (#163767) fix(qa): run Telegram plugin source in --source-gateway userbot runs (#163718) feat(macos): add a --no-activate launch flag for background automation (#163758) fix(agents): preserve host authority across module reloads (#163725) perf(gateway): serve the listener before multi-gigabyte store validation and honor clean-close receipts at startup (#163690) fix: keep video widgets scrollable and preload initial frames (#163762) feat(memory): add a provider-neutral memory provider runtime (#162175) ...
* commit '1fda703fb4d3630e4633461967b2a2186e8f15fd': (33 commits) fix(ui): keep selected-text comment input readable while scrolling (openclaw#163772) test(memory): open corpus database explicitly fix: bound Doctor migration capture to plugin data (openclaw#163780) fix(ui): gate system information at the shared reader (openclaw#160982) chore(db): reclassify worker inventory sites with caller evidence (openclaw#163754) refactor(channels): deslop Slack and Matrix (openclaw#163740) fix(agents): reject empty sessions_search queries in the tool schema (openclaw#129120) perf(nodes): load only what a worker turn needs (openclaw#160442) test(cli): assert concise Gateway failure copy in CLI process tests (openclaw#163649) refactor(discord): deslop discord (openclaw#163728) fix(workboard): make Sessions boards work on multi-agent Gateways (openclaw#163761) test(gateway): add sustained heap retention diagnostics (openclaw#163764) test(ui): disambiguate session filter controls refactor(plugins): deslop imessage, mattermost, and voice-call (openclaw#163767) fix(qa): run Telegram plugin source in --source-gateway userbot runs (openclaw#163718) feat(macos): add a --no-activate launch flag for background automation (openclaw#163758) fix(agents): preserve host authority across module reloads (openclaw#163725) perf(gateway): serve the listener before multi-gigabyte store validation and honor clean-close receipts at startup (openclaw#163690) fix: keep video widgets scrollable and preload initial frames (openclaw#163762) feat(memory): add a provider-neutral memory provider runtime (openclaw#162175) ...
What Problem This Solves
The database-worker migration inventory labels already-worker and maintenance SQL as T1 because it classifies entire mixed files. Its checked-in report also contains stale source locations and pairing debt claims.
Why This Change Was Made
Classify verified mixed-module operations by lexical function/factory path, retain conservative defaults for other operations, and correct the existing reviewed device-pairing and quarantine overrides. Regenerate the inventory and document the scope in worker-access.md. The same classifier is applied to both ratchet snapshots, so reclassification cannot pay for unrelated new T1 calls.
Caller evidence was rechecked against origin/main at 59c4f37. The branch merge base is a458fa7; the relevant target modules and caller chains are unchanged between these pins.
The survey needed two corrections: canonical-repair reads at 68/80 remain T1 because Gateway agents.create reaches legacy-main detection (agents.ts:436 → agent-create.ts:238 → legacy-main-session-migration.ts:441 → legacy-main-session-key-scan.ts:123 → legacy-main-session-migration-claims.ts:101). Its other 17 repair sites become T2. Cron store now has one counted Doctor transaction, rather than the surveyed two.
User Impact
Released SDK surface check: compared the changed paths against the latest release tag,
v2026.9.7. No changed function or export is reachable fromsrc/plugin-sdk/**,api.runtime.*, or documented SDK subpaths; the only callable changes are internal inventory tooling. No compatibility record or SDK type test is needed.No user-visible or production behavior change. Production LOC: +0 / −0 / net 0; no new OPENCLAW_* names. T1: 1,508 → 1,354 (−154). All 2,559 calls across 598 unique files remain counted. Mixed-file tier counts may overlap; calls do not.
Claw provenance raw Gateway reads remain outside the five-primitive census. Native incognito category reads, approval SDK compatibility, Cron current-authority/generation reads, and other mixed helpers remain T1. No schema, transaction, permission, retention, durability, or update change.
Overlap: #162548 independently replaces source discovery with Git for CI portability and touches the scanner, generated report, and ratchet test. This change retains source discovery and adds a separate operation-scoping regression; no classification work is duplicated. Other current filename-search candidates did not touch these files.
Evidence
Hosted CI passed on
051b6b383860388341df43ba40fcb510b10fa2d4: CI run 37058146174, including the enforced CI gate and security/dependency reviews. No failing product checks or reruns. The original PR-context failure was a missing required section heading, corrected in this body.ClawSweeper compatibility follow-up: the scanner reads source text through the TypeScript parser and emits Markdown/JSON inventory metadata; it neither imports runtime database owners nor opens or migrates a database. Its
schema/migrationstrings classify source paths. The four-file PR delta changes no persistent data model, so upgrade/migration compatibility proof is not applicable.Landing refresh: merged main
ba59afb5c2eee03d5c583f7340c740a24db97c7awithout conflicts and regenerated the inventory. All 54 source files linked in the exact-site evidence below are byte-identical to the previously audited snapshot. Three unrelated generated first-call locations moved; source inspection confirmedreleaseClawRemoveRowsat lifecycle-delete-support.ts:515,persistWorkspaceFileat workspace.ts:154, and worker-ownedinsertCardat workboard/sqlite-store-write.ts:65. Counts and classification remain unchanged.node scripts/database-worker-inventory.mjs --checkpassed: 598 unique files, 2,559 calls.pnpm check:database-worker-ratchet --base a458fa7ee4dd7306acc14b6f445c133c9791b142passed; reclassification applies equally to both snapshots and does not offset unrelated T1 growth.node scripts/run-vitest.mjs test/scripts/check-database-worker-ratchet.test.ts --maxWorkers=1passed both tests, 12.71 s command wall, 2.876 s test time; new regression 0.809 s.pnpm test test/scripts/check-database-worker-ratchet.test.ts --maxWorkers=1: 2 passed, 25.09 s command wall, 11.42 s test time; the new regression took 3.19 s. It protects lexical isolation, line shifts, and unrelated T1 growth. The original scanner reproduces the defect by assigning all four synthetic calls to T1. Hosted changed-test jobs passed on the landing head: 121 s for checks-node-changed and 117 s for checks-node-changed-boundary (whole-job elapsed time including setup, not per-test cost).git diff --checkand docs discovery passed.Local validation is scoped to this tooling/metadata contract. Exact-site production caller traces below are the classification evidence; no runtime paths moved, so SQL boundary tests are not applicable. The full product gate belongs to hosted PR CI. An earlier broad local check was interrupted waiting on build preparation under host load; it is not claimed as passing.
Verified reclassification by file and exact current sites
src/agents/workspace-state-store.kernel.ts· W: 359, 383, 390src/agents/workspace-state-store.ts· T2: 313src/claws/provenance.ts· T3: 221, 250, 310, 319, 331, 339, 392, 393, 480, 516, 539, 570src/config/sessions/session-accessor.sqlite-canonical-repair.ts· T2: 175, 193, 234, 270, 307, 327, 342, 354, 363, 384, 391, 400, 409, 426, 447, 476, 490src/cron/store.ts· T3: 169src/cron/store/quarantine.kernel.ts· T3: 81, 95src/cron/store/row-codec.ts· T3: 285, 378, 408, 434, 462, 538, 629, 636, 647; W: 330, 678src/cron/store/run-receipt-read.ts· W: 146src/cron/store/run-receipt-store.ts· W: 144, 145, 274, 293, 370, 411, 512, 601, 621src/cron/store/runtime-authority-store.ts· T3: 99, 149, 247, 268src/gateway/operator-approval-store.transitions.ts· T2: 288, 291, 317, 448, 452src/gateway/session-group-catalog.kernel.ts· W: 44, 46, 74, 93, 96, 143, 150, 169, 182, 198src/gateway/worker-environments/local-workspace-store.ts· W: 20src/gateway/worker-environments/placement-row-codec.ts· W: 173src/gateway/worker-environments/placement-session-tool-operations.kernel.ts· W: 92, 131, 155, 178, 195, 225, 232, 257, 288src/gateway/worker-environments/placement-turn-claims.ts· T2: 371, 378; W: 208, 487, 504, 549src/gateway/worker-environments/placement-workspace-journal.ts· W: 57, 118, 138, 180, 208, 242, 284src/gateway/worker-environments/placement-workspace-result.ts· W: 355, 370src/gateway/worker-environments/prepared-environment-store.ts· W: 160, 265, 284, 354src/infra/device-pairing-store.ts· T2: 108, 350, 364, 390, 418, 453, 456, 460, 463, 491, 492, 509, 517, 520, 523, 552, 558, 592, 607, 618, 647, 650, 663, 684, 687, 706, 709, 713src/secrets/store/secret-store.ts· T3: 390, 394src/sessions/session-state-events.kernel.ts· W: 105, 121src/sessions/session-state-events.ts· T2: 363, 370, 372src/skills/library/selection-read.kernel.ts· W: 52src/state/agent-deletion-journal.ts· T2: 152src/state/user-channel-identities.ts· T3: 120, 167, 185, 200, 241, 273, 284, 310, 321, 350, 397