Repository navigation
refactor(transcripts): extract connection-bound mutation kernels - #147375
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 13, 2026, 4:26 PM ET / 20:26 UTC. ClawSweeper reviewWhat this changesExtracts meeting transcript writes into helpers that use an existing database connection, centralizes errors, and validates export bookkeeping JSON. Merge readiness✅ Ready for maintainer review Keep open as a useful prerequisite for the ongoing SQLite worker work. No blocking introduced defect was found, and this protected maintainer PR is not a cleanup candidate. Priority: P3 Review scores
Verification
How this fits togetherMeeting transcript storage receives captured speech, session metadata, and generated notes and persists them in OpenClaw’s shared SQLite database. Explicit export operations turn that stored content into files. flowchart TD
A[Meeting capture and notes] --> B[Transcript store]
B --> C[Write admission and caller checks]
C --> D[Connection-bound writes]
D --> E[Shared SQLite database]
E --> F[Export ownership validation]
F --> G[Transcript and summary files]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +122, Tests +1, Other -1. Total +122 across 11 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep one transcript store responsible for admission and lifecycle, with synchronous connection-bound mutations ready for a separately proven worker conversion. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR prepares an internal storage boundary rather than reporting a runtime defect; review found no introduced failing path. Is this the best way to solve the issue? Yes: extracting the existing mutations while preserving their transaction owner follows the documented storage pattern without adding a parallel implementation or public API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6f58faf3eb0d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…#146547) Related: #144592 Related: #147375 Related: #147246 Dependency: #151816 ## What Problem This Solves Stored transcript detail and note lookups return promises but still execute SQLite on the Gateway event loop. ## User Impact Transcript identity, descriptor, note, summary, and utterance lookups execute in the shared SQLite worker. Existing selectors, content, ordering, limits, and error responses are preserved. No schema migration or configuration change is required. Chronological list queries and streaming/export snapshots retain their current owners. Capture appends are a separate stacked change in #151760. ## Why This Change Was Made Eleven typed commands call the existing read kernels through the canonical shared-state worker. Compound enumeration, matching, and library reads keep one deferred snapshot. First-use schema creation finishes before those reads, canonical close drains accepted work, and existing-only task inspection stays non-creating. Meeting fixtures stop producers before asynchronous database cleanup, and canonical test routing keeps worker consumers in their owning processes. The composition preserves Doctor's device-token dispatch alongside all eleven transcript commands, shared transaction-settlement checks, plugin-reload ownership, and current test-routing changes. Chronological reads preserve their parent-timezone date function; exports preserve their snapshot lifetime. Qualified dependency history from #151816 is incorporated through normal merge ancestry. It pins the deprecated message facade at its published exports, aligns three global surface limits with the resulting smaller counts, and carries the canonical catalog-materialization prerequisite with its strict 18-read assertion. The per-entry SDK compatibility limit remains unchanged. This does not claim that dependency PR #151816 has merged. ## Evidence The current catalog carry passed a fresh normal production build in 319.083 seconds and all five real transcript/Doctor SQLite worker controls in 21.595 seconds. Fresh independent P2 review found no actionable issues. These checks cover the changed Gateway and shared-worker import closures. All 58 non-doc meeting feature files, including the combined Doctor/transcript dispatcher, remain byte-identical to `6b3c5acb8634`; storage docs only gain the qualified upstream task paragraph. The SDK owner's strict catalog control and 25 archived-list/backfill controls are reused for matching owner inputs. The strict assertion retains three binding-authority checks and zero plugin-state worker operations while accounting for 18 SQLite reads after canonical materialization changes. The shared worker composition is separately covered by the five fresh controls above. Retained compiled child CLI/Gateway proof belongs to the earlier captured-main `6c6dc44250d` composition: the test body passed in 21.539 seconds under its unchanged 180-second bound, with 404.282 seconds for the supported wrapper and private-QA build. It checks canonical SQLite state, delegated missing-session cleanup while the isolated Gateway stays alive, transcript list/show/path commands, and exported bytes. This compiled scenario was not rerun on the latest catalog carry. The preceding combined 62-file gate passed in 966.651 seconds, including production/test types, SDK/storage boundaries, formatting, lint, and three unused-export scans with zero findings. Six SDK facade tests and independent P2 review passed. The subsequent exact three SDK ratchet decreases passed all ten existing reporter tests, the canonical surface check, the changed-script gate, and fresh P2 review. Earlier reload and routing controls remain attributed to their qualified inputs. CI at `6b3c5acb8634` completed with 140 successful jobs, 14 skipped, and one substantive failure plus its aggregate gate: the shared catalog benchmark expected 20 reads but the CI main composition performed 18. That matched the SDK owner's independently reproduced prerequisite issue. This carry includes its qualified canonical prerequisite and strict assertion correction; strict equality, authority-count, and zero-I/O checks remain intact, with unchanged deadlines. The new head requires its own hosted CI before landing.
…openclaw#146547) Related: openclaw#144592 Related: openclaw#147375 Related: openclaw#147246 Dependency: openclaw#151816 ## What Problem This Solves Stored transcript detail and note lookups return promises but still execute SQLite on the Gateway event loop. ## User Impact Transcript identity, descriptor, note, summary, and utterance lookups execute in the shared SQLite worker. Existing selectors, content, ordering, limits, and error responses are preserved. No schema migration or configuration change is required. Chronological list queries and streaming/export snapshots retain their current owners. Capture appends are a separate stacked change in openclaw#151760. ## Why This Change Was Made Eleven typed commands call the existing read kernels through the canonical shared-state worker. Compound enumeration, matching, and library reads keep one deferred snapshot. First-use schema creation finishes before those reads, canonical close drains accepted work, and existing-only task inspection stays non-creating. Meeting fixtures stop producers before asynchronous database cleanup, and canonical test routing keeps worker consumers in their owning processes. The composition preserves Doctor's device-token dispatch alongside all eleven transcript commands, shared transaction-settlement checks, plugin-reload ownership, and current test-routing changes. Chronological reads preserve their parent-timezone date function; exports preserve their snapshot lifetime. Qualified dependency history from openclaw#151816 is incorporated through normal merge ancestry. It pins the deprecated message facade at its published exports, aligns three global surface limits with the resulting smaller counts, and carries the canonical catalog-materialization prerequisite with its strict 18-read assertion. The per-entry SDK compatibility limit remains unchanged. This does not claim that dependency PR openclaw#151816 has merged. ## Evidence The current catalog carry passed a fresh normal production build in 319.083 seconds and all five real transcript/Doctor SQLite worker controls in 21.595 seconds. Fresh independent P2 review found no actionable issues. These checks cover the changed Gateway and shared-worker import closures. All 58 non-doc meeting feature files, including the combined Doctor/transcript dispatcher, remain byte-identical to `6b3c5acb8634`; storage docs only gain the qualified upstream task paragraph. The SDK owner's strict catalog control and 25 archived-list/backfill controls are reused for matching owner inputs. The strict assertion retains three binding-authority checks and zero plugin-state worker operations while accounting for 18 SQLite reads after canonical materialization changes. The shared worker composition is separately covered by the five fresh controls above. Retained compiled child CLI/Gateway proof belongs to the earlier captured-main `a16c8616eac` composition: the test body passed in 21.539 seconds under its unchanged 180-second bound, with 404.282 seconds for the supported wrapper and private-QA build. It checks canonical SQLite state, delegated missing-session cleanup while the isolated Gateway stays alive, transcript list/show/path commands, and exported bytes. This compiled scenario was not rerun on the latest catalog carry. The preceding combined 62-file gate passed in 966.651 seconds, including production/test types, SDK/storage boundaries, formatting, lint, and three unused-export scans with zero findings. Six SDK facade tests and independent P2 review passed. The subsequent exact three SDK ratchet decreases passed all ten existing reporter tests, the canonical surface check, the changed-script gate, and fresh P2 review. Earlier reload and routing controls remain attributed to their qualified inputs. CI at `6b3c5acb8634` completed with 140 successful jobs, 14 skipped, and one substantive failure plus its aggregate gate: the shared catalog benchmark expected 20 reads but the CI main composition performed 18. That matched the SDK owner's independently reproduced prerequisite issue. This carry includes its qualified canonical prerequisite and strict assertion correction; strict equality, authority-count, and zero-I/O checks remain intact, with unchanged deadlines. The new head requires its own hosted CI before landing.
Related: #144592
Related: #146547
What Problem This Solves
Meeting transcript persistence needs connection-bound operations before its writes can move into the shared SQLite worker.
User Impact
Normal transcript capture, summaries, and exports retain their existing behavior. Unsupported export metadata containing valid JSON with the wrong shape now throws TypeError instead of flowing through casts and potentially being rewritten. JSON syntax errors still propagate unchanged. No data repair, coercion, schema, retention, or Doctor detection behavior changes.
Why This Change Was Made
Session, summary, and export bookkeeping mutations now use connection-bound kernels, with one shared owner for domain errors and typed export-state decoding. The store still owns connection acquisition, schema ensuring, transaction admission, and caller checks. Session ID origin, selector conflicts, utterance deduplication, and revision checks remain intact.
This is preparation for worker execution; native SQLite still runs through the existing facade. The read-worker work in #146547 remains separate.
Evidence
Four existing isolated SQLite cases passed, covering session/utterance persistence, ordered tails, empty nullable text, and summary/export/reopen (29.35 seconds total wrapper time). A pure decoder check confirmed valid-data equivalence, wrong-shape TypeError rejection, and unchanged SyntaxError propagation.
The full changed-file gate passed, including core production/test types, all three unused-export scans with zero entries, typed lint, and repository guards. Fresh review found no actionable issues. Existing assertion allowances only shrink to match removed casts.