Skip to content

refactor(sqlite): deslop sqlite stores - #164271

Merged
steipete merged 6 commits into
mainfrom
deslop/x04-sqlite-store-boilerplate-20261002
Oct 3, 2026
Merged

steipete merged 6 commits into
mainfrom
deslop/x04-sqlite-store-boilerplate-20261002

Conversation

@steipete

@steipete steipete commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

SQLite stores repeat connection-bound query-cache, schema installation, transaction admission, and forwarding code around the canonical database owners.

User Impact

No user-visible change. Table definitions, indexes, schema versions, pragmas, journal modes, synchronous transaction boundaries, retention, persisted values, and public SDK exports remain unchanged. No migration or operator action is required.

Why This Change Was Made

  • Consolidate 39 per-connection prepared-query caches across 30 modules in the canonical Kysely owner. Queries still compile lazily, bind fresh parameters, and read current rows; schema and authority caches stay with their existing owners.
  • Share worker transaction admission and prepared-workspace write plumbing while retaining each caller's commit callbacks, labels, timeouts, and settlement handling.
  • Reuse canonical Workshop, cron, and placement DDL. Share identical feature-schema installation lifecycles without changing when their committed facts become reusable.
  • Capture Workboard command payloads once and use canonical first-row reads. Remove single-use transcript-commit factories and subagent observer indirection.
  • Derive catalog row types from the typed query, share identical secret rollback predicates, and remove redundant close, cache-clear, integrity, and table-existence plumbing.

This is the final coverage-exhausted x04 batch: 451 net production source lines removed (450 net lines including the wrapper inventory correction), below the requested 1,000-line target. No tests were deleted or weakened. The coverage table includes every production file over 200 lines in the expanded SQLite pattern census; remaining differences preserve concrete storage contracts. Proxy-capture and upload-store adapters are left to #164153 under the overlap guard. The final conflict repair retains the skill-library store and state schema helper exactly as main: #164262 added transaction and commit authority admission that must remain intact.

Evidence

  • Focused store proof: 66 files, 1,163 passing tests and two existing Windows/Bun-only skips. After the final exclusions, lint corrections, and rebase, the affected eight-file selection passed all 126 tests.
  • Plugin contracts: all 1,132 tests across 48 files passed. Existing retention, rollback, current-authority, source-preservation, and prepared-query tests remain intact; no test sources changed.
  • Both import-cycle checks report zero on the final source. Core and extension production/test types, changed-source lint, formatting, unused exports, and storage/architecture guards were checked. The initial lint findings were corrected before publication; targeted final checks passed.
  • Independent review reported no actionable P0–P2 findings. Workshop and cron table definitions were compared byte-for-byte with the existing canonical schema.
  • Validation used the authorized macOS fallback at nice -n 15, with one test worker, after Testbox queueing exceeded ten minutes and the AWS broker timed out. These are local results, not Linux remote proof. The broad focused run took 2,609.58 seconds; final affected proof took 395.16 seconds.
  • The first exact-head CI run (37119520604) found an omitted runtime helper in the isolated PR wrapper inventory. The correction adds src/infra/sqlite-schema-ensure.ts to that inventory; independent review is clean. The tooling replay passed 35 tests with one platform skip. Its remaining macOS-only APFS provisioning case exceeded the existing 120-second limit at 193.4 seconds without an assertion failure; the same timeout reproduced on the unchanged PR base c38f54d7c7bf133b3eec3be88bb9b2db1afbb48a in a separate macOS checkout. No timeout, test, or assertion was changed. This is a local timing limitation, not an assertion that hosted main CI is red. Native provisioning/test work is already owned by fix(maintainer): isolate native PR worktrees #158419.
  • The corrected-wrapper CI run (37121901234) passed the wrapper shards but found a misplaced existing raw-SQL annotation on the multiline placement DDL call. Moving the same annotation immediately above that call preserves the existing exception without changing runtime code or guard policy. The Kysely guard, previous-reader/candidate-reopen schema test, and independent review passed after correction.
  • A conflict-driven rebase onto a38eefeebae5a2f1d4f048dadfccea614cd898ff preserved main authority changes by excluding skill-library consolidation and its now-unused helper parameters. Post-rebase placement-schema and secret-store proof passed 31 tests in 98.26 seconds.
  • Hosted CI on the final corrected head remains the landing gate.
Coverage log: 405 files over 200 lines, 188,934 lines read

Discovery expanded from open/pragmas/transaction patterns to canonical Kysely consumers, prepared-query caches, and native or borrowed SQLite handles. Files were read in full, largest first within each assigned batch. Sizes use the initial source base (9a8053f7ad252dbdfcd9de2cecde9d129e892b83); the newly expanded message-tool store uses its inspected fresh-main size. Recent history and open deslop PR files were checked before edits.

Lines Production file Outcome
3854 scripts/install.sh READ: Retained: another active PR owns this file.
2516 scripts/install.ps1 READ: Retained: another active PR owns this file.
2388 src/infra/update-managed-service-handoff.ts READ: Retained: transaction or authority boundary.
2091 src/commands/doctor-auth-flat-profiles.ts READ: Retained: distinct schema or migration lifecycle.
2036 scripts/crabbox-staging.mts READ: Retained: transaction or authority boundary.
1784 src/agents/auth-profiles/store.ts READ: Retained: transaction or authority boundary.
1590 scripts/install-cli.sh READ: Retained: another active PR owns this file.
1168 src/media/web-media.ts READ: Canonical helpers already used; remaining code is domain logic.
1061 src/snapshot/local-repository.ts READ: Retained: transaction or authority boundary.
912 scripts/database-worker-inventory.mjs READ: Canonical helpers already used; remaining code is domain logic.
834 apps/shared/OpenClawKit/Sources/OpenClawChatUI/ClientDatabases.swift READ: Retained: distinct schema or migration lifecycle.
808 apps/shared/OpenClawKit/Sources/OpenClawNativeState/OpenClawNativeStateSQLite.swift READ: Retained: distinct schema or migration lifecycle.
805 src/fleet/backup.runtime.ts READ: Retained: distinct resource or cleanup ownership.
796 scripts/lib/code-mode-matrix-usage.ts READ: Retained: distinct schema or migration lifecycle.
782 src/state/openclaw-state-db-cache.ts READ: Retained: distinct resource or cleanup ownership.
775 apps/android/app/src/main/java/ai/openclaw/app/chat/ClientDatabases.kt READ: Retained: distinct schema or migration lifecycle.
764 src/cron/store/row-codec.ts READ: Canonical helpers already used; remaining code is domain logic.
763 src/agents/auth-profiles/runtime-snapshots.ts READ: Canonical helpers already used; remaining code is domain logic.
757 extensions/workboard/src/sqlite-store-kernel.ts READ: Applied canonical owner or removed redundant scaffolding.
757 src/config/sessions/session-accessor.sqlite-pending-inputs.ts READ: Retained: transaction or authority boundary.
751 src/state/openclaw-agent-db-lease.ts READ: Retained: transaction or authority boundary.
748 src/config/sessions/session-transcript-reconcile.ts READ: Retained: distinct resource or cleanup ownership.
743 src/node-host/node-worker-launch-store.kernel.ts READ: Canonical helpers already used; remaining code is domain logic.
743 src/state/user-profile-list.ts READ: Retained: transaction or authority boundary.
739 src/infra/update-candidate-state.ts READ: Canonical helpers already used; remaining code is domain logic.
737 src/gateway/worker-environments/bootstrap.ts READ: Canonical helpers already used; remaining code is domain logic.
735 src/infra/deferred-plugin-session-sources.ts READ: Canonical helpers already used; remaining code is domain logic.
731 src/config/sessions/session-accessor.sqlite-reset-window.ts READ: Retained: transaction or authority boundary.
729 src/state/openclaw-agent-db.ts READ: Retained: transaction or authority boundary.
729 src/transcripts/store-read.ts READ: Retained: transaction or authority boundary.
728 src/infra/sqlite-worker-broker.ts READ: Retained: transaction or authority boundary.
726 src/gateway/mention-inbox.ts READ: Retained: another active PR owns this file.
724 src/infra/device-pairing-store.ts READ: Retained: transaction or authority boundary.
720 src/infra/state-migrations.meeting-transcripts-files.ts READ: Retained: distinct schema or migration lifecycle.
719 src/state/openclaw-state-worker-owner.ts READ: Retained: distinct resource or cleanup ownership.
716 src/agents/harness/context-engine-turn-outbox.ts READ: Retained: distinct schema or migration lifecycle.
716 src/state/openclaw-agent-db-lifecycle.ts READ: Retained: distinct resource or cleanup ownership.
715 src/agents/plugin-model-catalog.ts READ: Retained: transaction or authority boundary.
715 src/state/openclaw-agent-execution-native.ts READ: Retained: transaction or authority boundary.
714 src/infra/sqlite-readonly-location.ts READ: Retained: transaction or authority boundary.
713 src/infra/update-managed-service-handoff-lease.ts READ: Retained: transaction or authority boundary.
712 extensions/logbook/src/store.worker.ts READ: Retained: transaction or authority boundary.
710 src/config/sessions/session-cold-storage-worker.ts READ: Retained: transaction or authority boundary.
709 src/commands/backup-verify.ts READ: Retained: distinct schema or migration lifecycle.
709 src/infra/sqlite-snapshot.ts READ: Retained: transaction or authority boundary.
708 src/config/sessions/session-accessor.sqlite-transcript-write.ts READ: Retained: transaction or authority boundary.
703 src/infra/state-migrations.meeting-transcripts.ts READ: Retained: distinct schema or migration lifecycle.
701 src/channels/message/ingress-queue.kernel.ts READ: Canonical helpers already used; remaining code is domain logic.
697 src/agents/sessions/session-manager-persistence.ts READ: Canonical helpers already used; remaining code is domain logic.
694 src/state/openclaw-database-preflight.ts READ: Retained: distinct resource or cleanup ownership.
690 src/audit/execution-identity-context.ts READ: Retained: distinct schema or migration lifecycle.
688 src/snapshot/git-backup-codec.ts READ: Applied canonical owner or removed redundant scaffolding.
685 src/audit/audit-event-store.ts READ: Retained: transaction or authority boundary.
684 extensions/team-reports/src/store.worker.ts READ: Retained: distinct schema or migration lifecycle.
684 src/gateway/operator-approval-store.receipts.ts READ: Retained: another active PR owns this file.
682 src/gateway/worker-environments/workspace-quiescence-scripts.ts READ: Retained: transaction or authority boundary.
676 extensions/workboard/src/store.ts READ: Canonical helpers already used; remaining code is domain logic.
673 extensions/memory-core/src/migration/doctor-memory-sidecar.ts READ: Retained: distinct schema or migration lifecycle.
669 src/commands/doctor-update-schema-guard.ts READ: Retained: transaction or authority boundary.
668 src/gateway/worker-environments/placement-turn-authority.ts READ: Retained: transaction or authority boundary.
667 src/config/sessions/session-accessor.sqlite-archive-read.ts READ: Retained: transaction or authority boundary.
661 src/infra/state-migrations.runtime-state.ts READ: Retained: transaction or authority boundary.
659 src/state/user-model-accounts.ts READ: Canonical helpers already used; remaining code is domain logic.
658 src/config/sessions/legacy-main-session-migration.ts READ: Retained: distinct schema or migration lifecycle.
658 src/state/openclaw-state-db-maintenance.ts READ: Retained: distinct schema or migration lifecycle.
653 src/infra/session-sqlite-migration-readers.ts READ: Retained: distinct resource or cleanup ownership.
648 src/infra/outbound/current-conversation-bindings.ts READ: Retained: transaction or authority boundary.
644 src/state/openclaw-state-lease.ts READ: Retained: distinct resource or cleanup ownership.
643 extensions/memory-core/src/memory/manager-search.ts READ: Retained: transaction or authority boundary.
642 src/infra/sqlite-schema-contract.ts READ: Retained: distinct schema or migration lifecycle.
638 apps/shared/OpenClawKit/Sources/OpenClawKit/DeviceIdentitySQLiteStore.swift READ: Retained: transaction or authority boundary.
634 src/claws/provenance.ts READ: Retained: transaction or authority boundary.
633 src/gateway/github-publication.ts READ: Retained: distinct schema or migration lifecycle.
629 src/cron/store/run-receipt-store.ts READ: Applied canonical owner or removed redundant scaffolding.
625 src/config/sessions/session-transcript-projection-rebuild.ts READ: Canonical helpers already used; remaining code is domain logic.
622 scripts/verify-mac-runtime.mjs READ: Retained: distinct resource or cleanup ownership.
617 extensions/memory-core/src/memory/manager-database-context.ts READ: Retained: transaction or authority boundary.
615 src/gateway/worker-environments/placement-turn-claim-events.ts READ: Retained: transaction or authority boundary.
609 src/config/sessions/session-accessor.sqlite-archive.worker.ts READ: Retained: distinct resource or cleanup ownership.
609 src/state/openclaw-agent-db-schema.ts READ: Retained: distinct schema or migration lifecycle.
606 src/infra/state-migrations.media-persistence.ts READ: Applied canonical owner or removed redundant scaffolding.
604 src/commands/doctor-auth.ts READ: Retained: distinct schema or migration lifecycle.
600 src/config/sessions/session-canonical-key.ts READ: Applied canonical owner or removed redundant scaffolding.
599 src/config/sessions/session-transcript-index.ts READ: Retained: transaction or authority boundary.
598 src/agents/worktrees/registry.ts READ: Retained: distinct schema or migration lifecycle.
598 src/commands/doctor-heartbeat-task-migration.ts READ: Retained: transaction or authority boundary.
592 src/commands/doctor-session-canonical-keys.ts READ: Canonical helpers already used; remaining code is domain logic.
592 src/state/openclaw-state-read.types.ts READ: Retained: transaction or authority boundary.
589 src/gateway/github-publication-store.ts READ: Canonical helpers already used; remaining code is domain logic.
584 src/infra/push-web-store.kernel.ts READ: Retained: distinct schema or migration lifecycle.
581 src/commands/doctor/cron/legacy-repair.ts READ: Retained: distinct schema or migration lifecycle.
581 src/gateway/worker-environments/placement-move-intent.ts READ: Applied canonical owner or removed redundant scaffolding.
581 src/infra/state-migrations.workspace-setup-store.ts READ: Retained: distinct schema or migration lifecycle.
580 src/state/openclaw-state-db.ts READ: Retained: distinct schema or migration lifecycle.
579 src/state/openclaw-quarantine-store.ts READ: Retained: distinct resource or cleanup ownership.
578 src/gateway/session-artifact-read.ts READ: Canonical helpers already used; remaining code is domain logic.
577 src/state/user-profile-github-identity.ts READ: Retained: distinct schema or migration lifecycle.
575 src/cli/command-catalog.ts READ: Canonical helpers already used; remaining code is domain logic.
574 src/plugin-state/plugin-blob-store.sqlite.ts READ: Retained: distinct resource or cleanup ownership.
573 src/state/agent-deletion-journal.ts READ: Retained: transaction or authority boundary.
571 src/infra/state-migrations.shared-auth-store.ts READ: Retained: distinct schema or migration lifecycle.
566 src/infra/package-update-activation-journal.ts READ: Retained: transaction or authority boundary.
565 src/acp/event-ledger.ts READ: Applied canonical owner or removed redundant scaffolding.
563 src/claws/lifecycle-delete-support.ts READ: Retained: transaction or authority boundary.
562 src/commands/doctor-session-transcripts.ts READ: Retained: distinct schema or migration lifecycle.
556 src/infra/state-migrations.legacy-sessions.ts READ: Retained: distinct schema or migration lifecycle.
555 src/infra/sqlite-wal.ts READ: Canonical helpers already used; remaining code is domain logic.
554 src/agents/sessions/session-manager-metadata.worker.ts READ: Retained: transaction or authority boundary.
554 src/infra/state-migrations.transcript-directives-archives.ts READ: Retained: transaction or authority boundary.
554 src/state/openclaw-agent-db-registry-listing.ts READ: Canonical helpers already used; remaining code is domain logic.
552 src/infra/update-failure-report-receipt-store.ts READ: Retained: distinct resource or cleanup ownership.
552 src/proxy-capture/store.kernel.ts READ: Retained: transaction or authority boundary.
547 src/audit/execution-decision-facts.ts READ: Retained: distinct schema or migration lifecycle.
547 src/config/sessions/session-accessor.sqlite-transcript-reports.ts READ: Retained: distinct resource or cleanup ownership.
541 src/config/sessions/session-accessor.sqlite-entry-read.ts READ: Applied canonical owner or removed redundant scaffolding.
540 src/state/user-profiles-internal.ts READ: Applied canonical owner or removed redundant scaffolding.
539 src/state/openclaw-agent-execution.worker.ts READ: Retained: transaction or authority boundary.
537 src/infra/update-candidate-plugins.ts READ: Retained: distinct resource or cleanup ownership.
534 src/infra/deferred-plugin-migrations.ts READ: Retained: distinct schema or migration lifecycle.
533 src/gateway/github-repository-publication-store.ts READ: Retained: transaction or authority boundary.
533 src/infra/state-migrations.debug-proxy.ts READ: Retained: distinct schema or migration lifecycle.
531 src/infra/state-migrations.managed-outgoing-images.ts READ: Retained: distinct schema or migration lifecycle.
530 src/agents/subagents/registry/subagent-registry.store.sqlite.ts READ: Applied canonical owner or removed redundant scaffolding.
530 src/commands/doctor-sqlite-nocow.ts READ: Canonical helpers already used; remaining code is domain logic.
530 src/state/openclaw-agent-execution-incognito.ts READ: Retained: distinct resource or cleanup ownership.
528 scripts/check-kysely-guardrails.mts READ: Canonical helpers already used; remaining code is domain logic.
528 src/config/sessions/session-accessor.sqlite-canonical-repair.ts READ: Canonical helpers already used; remaining code is domain logic.
528 src/config/sessions/session-entry-read.worker.ts READ: Retained: transaction or authority boundary.
528 src/infra/restart-intent.ts READ: Retained: distinct schema or migration lifecycle.
528 src/infra/update-run-ledger.ts READ: Retained: distinct schema or migration lifecycle.
527 src/infra/sqlite-transaction.ts READ: Applied canonical owner or removed redundant scaffolding.
526 src/plugins/installed-plugin-index-store-write.ts READ: Retained: transaction or authority boundary.
525 src/gateway/worker-environments/placement-turn-claims.ts READ: Retained: transaction or authority boundary.
523 src/infra/device-bootstrap.worker-kernel.ts READ: Canonical helpers already used; remaining code is domain logic.
516 src/config/sessions/session-accessor.sqlite-node-artifacts.ts READ: Retained: distinct schema or migration lifecycle.
515 apps/shared/OpenClawKit/Sources/OpenClawKit/ExecApprovalsSQLiteStore.swift READ: Retained: distinct schema or migration lifecycle.
513 src/boards/sqlite-board-store.kernel.ts READ: Retained: distinct schema or migration lifecycle.
513 src/commands/doctor-sandbox.ts READ: Retained: distinct schema or migration lifecycle.
513 src/state/openclaw-agent-db-admission.ts READ: Retained: transaction or authority boundary.
507 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-state-files.ts READ: Retained: distinct resource or cleanup ownership.
507 src/commands/doctor-auth-migration-receipts.ts READ: Canonical helpers already used; remaining code is domain logic.
505 src/agents/workspace-state-store.kernel.ts READ: Retained: distinct schema or migration lifecycle.
503 src/gateway/operator-approval-store.rows.ts READ: Retained: another active PR owns this file.
503 src/sessions/session-state-events.kernel.ts READ: Retained: distinct schema or migration lifecycle.
498 src/commands/doctor-update-rehearsal-inventory.ts READ: Retained: transaction or authority boundary.
498 src/infra/state-migrations.device-identity.ts READ: Retained: distinct schema or migration lifecycle.
493 src/commands/doctor-session-sqlite-retirement.ts READ: Canonical helpers already used; remaining code is domain logic.
491 src/config/sessions/session-accessor.sqlite-mutation-worker.runtime.ts READ: Retained: transaction or authority boundary.
490 src/infra/state-migrations.transcript-directives.ts READ: Retained: transaction or authority boundary.
488 src/infra/delivery-queue.worker.ts READ: Retained: transaction or authority boundary.
488 src/plugin-state/plugin-state-store.sqlite.ts READ: Applied canonical owner or removed redundant scaffolding.
485 src/infra/sqlite-integrity.ts READ: Retained: distinct resource or cleanup ownership.
484 src/gateway/operator-approval-standing-grants.ts READ: Retained: distinct schema or migration lifecycle.
483 extensions/matrix/src/matrix/client/storage.ts READ: Canonical helpers already used; remaining code is domain logic.
483 src/config/sessions/session-accessor.sqlite-reclamation.ts READ: Retained: transaction or authority boundary.
483 src/state/openclaw-state-read-worker.ts READ: Retained: distinct resource or cleanup ownership.
481 src/commands/doctor-skill-workshop-sqlite.ts READ: Retained: distinct schema or migration lifecycle.
480 packages/memory-host-sdk/src/host/memory-schema-storage-migration.ts READ: Retained: distinct schema or migration lifecycle.
479 src/state/openclaw-state-db-read-connection.ts READ: Retained: distinct resource or cleanup ownership.
477 src/state/openclaw-agent-db-session-migrations.ts READ: Retained: distinct schema or migration lifecycle.
476 src/audit/message-delivery-progress-store.ts READ: Retained: distinct schema or migration lifecycle.
472 src/infra/push-apns-store.ts READ: Retained: transaction or authority boundary.
472 src/infra/sqlite-store.worker.ts READ: Retained: distinct resource or cleanup ownership.
470 src/claws/cron.ts READ: Canonical helpers already used; remaining code is domain logic.
470 src/infra/restart-sentinel-store.ts READ: Canonical helpers already used; remaining code is domain logic.
468 src/infra/update-managed-service-handoff-database.ts READ: Applied canonical owner or removed redundant scaffolding.
466 src/cron/store/run-admission.worker.ts READ: Retained: transaction or authority boundary.
466 src/secrets/store/secret-store.ts READ: Applied canonical owner or removed redundant scaffolding.
464 src/gateway/worker-environments/prepared-environment-store.ts READ: Canonical helpers already used; remaining code is domain logic.
463 src/config/sessions/session-accessor.sqlite-entry-cache.ts READ: Retained: transaction or authority boundary.
463 src/skills/library/service.ts READ: Retained: transaction or authority boundary.
462 src/audit/execution-decision-receipts.ts READ: Canonical helpers already used; remaining code is domain logic.
462 src/gateway/operator-approval-store.transitions.ts READ: Retained: transaction or authority boundary.
461 src/infra/sqlite-worker-operation-admission.ts READ: Retained: distinct schema or migration lifecycle.
460 src/infra/device-identity-store.ts READ: Canonical helpers already used; remaining code is domain logic.
460 src/infra/restart-handoff.ts READ: Canonical helpers already used; remaining code is domain logic.
458 src/state/openclaw-agent-worker-store.ts READ: Retained: transaction or authority boundary.
456 extensions/memory-core/src/migration/doctor-memory-sidecar-import.ts READ: Retained: transaction or authority boundary.
455 src/plugin-sdk/qa-runtime.ts READ: Canonical helpers already used; remaining code is domain logic.
454 src/claws/workspace.ts READ: Canonical helpers already used; remaining code is domain logic.
452 src/infra/delivery-queue-sqlite.kernel.ts READ: Retained: distinct resource or cleanup ownership.
449 src/infra/state-migrations.snapshot.worker.ts READ: Retained: distinct resource or cleanup ownership.
449 src/plugin-state/plugin-state-store.kernel.ts READ: Applied canonical owner or removed redundant scaffolding.
447 src/state/openclaw-state-db-legacy-backfills.ts READ: Canonical helpers already used; remaining code is domain logic.
444 src/infra/state-migrations.apns.ts READ: Retained: distinct schema or migration lifecycle.
442 src/state/user-channel-identities.ts READ: Retained: distinct schema or migration lifecycle.
438 extensions/workboard/src/sqlite-store-records.ts READ: Canonical helpers already used; remaining code is domain logic.
435 extensions/workboard/src/gateway.ts READ: Canonical helpers already used; remaining code is domain logic.
434 src/boards/sqlite-board-store.ts READ: Retained: distinct resource or cleanup ownership.
432 src/commands/backup-resource-inventory.ts READ: Canonical helpers already used; remaining code is domain logic.
432 src/infra/state-migrations.node-host.ts READ: Retained: transaction or authority boundary.
429 src/claws/mcp.ts READ: Retained: transaction or authority boundary.
428 src/config/sessions/session-accessor.sqlite-projection-read.ts READ: Applied canonical owner or removed redundant scaffolding.
425 src/config/sessions/transcript-payload.ts READ: Applied canonical owner or removed redundant scaffolding.
423 src/commands/doctor-model-catalog-credentials.ts READ: Retained: distinct schema or migration lifecycle.
420 packages/memory-host-sdk/src/host/memory-schema.ts READ: Retained: distinct schema or migration lifecycle.
415 src/infra/state-migrations.web-push.ts READ: Retained: distinct schema or migration lifecycle.
415 src/trajectory/runtime-store.sqlite.ts READ: Retained: distinct resource or cleanup ownership.
411 src/infra/sqlite-schema-facts.ts READ: Retained: distinct schema or migration lifecycle.
411 src/proxy-capture/store.sqlite.ts READ: Retained: another active PR owns this file.
410 src/commands/doctor-session-sqlite-recover-report.ts READ: Retained: transaction or authority boundary.
410 src/config/sessions/session-accessor.sqlite-transcript-state.ts READ: Applied canonical owner or removed redundant scaffolding.
409 src/config/sessions/session-accessor.sqlite-history-projection.ts READ: Applied canonical owner or removed redundant scaffolding.
407 src/config/sessions/session-accessor.sqlite-archive-selection.ts READ: Canonical helpers already used; remaining code is domain logic.
403 src/infra/state-migrations.acp-replay.ts READ: Retained: distinct schema or migration lifecycle.
403 src/state/openclaw-agent-db-session-nodes-migration.ts READ: Retained: distinct schema or migration lifecycle.
399 src/gateway/worker-environments/placement-workspace-result.ts READ: Canonical helpers already used; remaining code is domain logic.
398 src/state/openclaw-agent-db-validation-cache.ts READ: Canonical helpers already used; remaining code is domain logic.
395 src/infra/sqlite-strict.ts READ: Retained: distinct schema or migration lifecycle.
392 src/state/openclaw-state-db-schema-repair.ts READ: Retained: distinct schema or migration lifecycle.
391 extensions/voice-call/src/manager/store.ts READ: Canonical helpers already used; remaining code is domain logic.
391 src/infra/bun-sqlite-library.ts READ: Retained: distinct resource or cleanup ownership.
390 extensions/memory-core/src/memory/manager-publication.worker.ts READ: Retained: transaction or authority boundary.
389 src/gateway/operator-approval-store.kernel.ts READ: Retained: another active PR owns this file.
388 src/config/sessions/session-accessor.sqlite-import-stage.ts READ: Retained: distinct schema or migration lifecycle.
386 extensions/matrix/src/matrix/monitor/inbound-dedupe-migration.ts READ: Retained: distinct schema or migration lifecycle.
386 src/state/openclaw-state-db-table-retirements.ts READ: Retained: distinct schema or migration lifecycle.
385 src/gateway/worker-environments/placement-row-codec.ts READ: Retained: transaction or authority boundary.
383 src/infra/gateway-boot-lifecycle.ts READ: Canonical helpers already used; remaining code is domain logic.
381 src/state/user-profile-events.ts READ: Retained: transaction or authority boundary.
377 extensions/codex/src/app-server/transcript-mirror-write.ts READ: Retained: distinct resource or cleanup ownership.
375 src/infra/backup-scratch.ts READ: Retained: distinct resource or cleanup ownership.
375 src/skills/library/store.ts READ: Retained current main after #164262 added transaction and commit authority admission; the shared installer cannot replace that boundary.
374 src/infra/state-migrations.workspace-setup-receipts.ts READ: Retained: distinct schema or migration lifecycle.
373 src/claws/doctor.ts READ: Applied canonical owner or removed redundant scaffolding.
372 src/infra/state-migrations.plugin-doctor-context.ts READ: Retained: transaction or authority boundary.
368 src/cron/store.ts READ: Retained: transaction or authority boundary.
366 extensions/workboard/src/sqlite-store-schema.ts READ: Retained: distinct schema or migration lifecycle.
366 src/commands/doctor-skill-workshop-sidecars.ts READ: Canonical helpers already used; remaining code is domain logic.
366 src/infra/delivery-queue-sqlite-bound.ts READ: Applied canonical owner or removed redundant scaffolding.
364 extensions/codex/src/migration/native-task-assignments.ts READ: Retained: distinct schema or migration lifecycle.
364 src/agents/workspace-state-store.ts READ: Retained: distinct schema or migration lifecycle.
364 src/claws/provenance-runtime-read.ts READ: Canonical helpers already used; remaining code is domain logic.
364 src/infra/outbound/current-conversation-bindings.kernel.ts READ: Applied canonical owner or removed redundant scaffolding.
360 src/state/user-profile-identity.read.ts READ: Retained: distinct schema or migration lifecycle.
358 src/agents/sandbox/registry.ts READ: Retained: transaction or authority boundary.
357 src/gateway/worker-environments/store-transitions.ts READ: Retained: transaction or authority boundary.
353 src/cron/store/run-history.kernel.ts READ: Retained: transaction or authority boundary.
351 src/gateway/worker-environments/inference-store.kernel.ts READ: Canonical helpers already used; remaining code is domain logic.
351 src/state/openclaw-agent-db-schema-helpers.ts READ: Retained: distinct schema or migration lifecycle.
349 src/infra/sqlite-readonly-location.worker.ts READ: Retained: distinct resource or cleanup ownership.
349 src/transcripts/store-sqlite-read.ts READ: Applied canonical owner or removed redundant scaffolding.
347 src/state/openclaw-state-db-repair.ts READ: Retained: distinct schema or migration lifecycle.
346 src/state/user-profiles.ts READ: Retained: transaction or authority boundary.
344 src/proxy-capture/store-readonly.ts READ: Canonical helpers already used; remaining code is domain logic.
341 src/agents/agent-lifecycle-registry.ts READ: Retained: transaction or authority boundary.
341 src/config/sessions/goals-operations.ts READ: Retained: transaction or authority boundary.
340 src/audit/message-delivery-audit-store.ts READ: Canonical helpers already used; remaining code is domain logic.
339 src/commands/doctor-session-incognito-key-repair.ts READ: Retained: transaction or authority boundary.
338 src/agents/mcp-oauth-store.kernel.ts READ: Retained: transaction or authority boundary.
337 extensions/browser/src/browser/system-profiles.ts READ: Canonical helpers already used; remaining code is domain logic.
337 src/agents/model-runtime-aliases.ts READ: Canonical helpers already used; remaining code is domain logic.
336 src/agents/workspace-alias-rebind.ts READ: Canonical helpers already used; remaining code is domain logic.
336 src/commands/doctor-telegram-general-topic-conversations.ts READ: Retained: distinct schema or migration lifecycle.
336 src/state/user-github-connections.ts READ: Retained: transaction or authority boundary.
334 src/commands/doctor-session-transcript-headers.ts READ: Retained: transaction or authority boundary.
333 packages/memory-host-sdk/src/host/memory-schema-fts.ts READ: Retained: distinct schema or migration lifecycle.
333 src/secrets/store/secret-store-hidden-github.ts READ: Retained: distinct schema or migration lifecycle.
332 src/infra/device-pairing-node.worker.ts READ: Retained: transaction or authority boundary.
328 src/gateway/worker-environments/placement-test-fixtures.ts READ: Canonical helpers already used; remaining code is domain logic.
326 src/config/sessions/session-accessor.sqlite-maintenance-age.ts READ: Canonical helpers already used; remaining code is domain logic.
325 src/gateway/github-personal-publication-store.ts READ: Retained: transaction or authority boundary.
325 src/gateway/worker-environments/transcript-commit-store.worker.ts READ: Applied canonical owner or removed redundant scaffolding.
325 src/state/openclaw-state.worker.ts READ: Retained: distinct schema or migration lifecycle.
324 src/agents/sandbox/registry.kernel.ts READ: Canonical helpers already used; remaining code is domain logic.
322 src/infra/sqlite-wal-checkpoint.ts READ: Canonical helpers already used; remaining code is domain logic.
322 src/state/openclaw-agent-db-readonly-scope.ts READ: Retained: transaction or authority boundary.
321 src/infra/exec-approvals-sqlite.ts READ: Retained: distinct resource or cleanup ownership.
317 src/infra/sqlite-snapshot-source.ts READ: Retained: distinct resource or cleanup ownership.
316 src/gateway/worker-environments/transcript-commit.runtime.ts READ: Retained: distinct resource or cleanup ownership.
314 src/gateway/managed-image-record-store.kernel.ts READ: Retained: transaction or authority boundary.
314 src/gateway/operator-approval-placement-grants.ts READ: Retained: transaction or authority boundary.
314 src/infra/sqlite-index-schema.ts READ: Retained: transaction or authority boundary.
312 src/gateway/worker-environments/placement-workspace-journal.ts READ: Retained: transaction or authority boundary.
311 extensions/workboard/src/sqlite-store-write.ts READ: Canonical helpers already used; remaining code is domain logic.
307 src/skills/lifecycle/upload-store.kernel.ts READ: Retained: distinct schema or migration lifecycle.
302 extensions/memory-core/src/memory-entry-origins.ts READ: Retained: transaction or authority boundary.
302 src/gateway/worker-environments/store.kernel.ts READ: Canonical helpers already used; remaining code is domain logic.
301 src/state/openclaw-state-db-schema-additive.ts READ: Canonical helpers already used; remaining code is domain logic.
298 extensions/browser/src/browser/system-chrome-cookies.ts READ: Retained: distinct resource or cleanup ownership.
298 src/gateway/worker-environments/placement-session-tool-operations.kernel.ts READ: Retained: transaction or authority boundary.
297 src/state/openclaw-state-ownership.ts READ: Retained: transaction or authority boundary.
296 src/secrets/store/secret-store-write.ts READ: Applied canonical owner or removed redundant scaffolding.
295 src/commands/doctor-skill-workshop-workspaces.ts READ: Retained: distinct schema or migration lifecycle.
295 src/infra/update-run-reader.ts READ: Retained: transaction or authority boundary.
295 src/state/openclaw-state-db-existing-write.ts READ: Retained: distinct schema or migration lifecycle.
294 src/config/sessions/session-sharing-store.async.ts READ: Retained: transaction or authority boundary.
294 src/transcripts/store-sqlite.ts READ: Canonical helpers already used; remaining code is domain logic.
291 src/config/sessions/session-accessor.transcript-range.ts READ: Retained: transaction or authority boundary.
291 src/config/sessions/session-incognito-compute.worker.ts READ: Retained: transaction or authority boundary.
290 extensions/memory-core/src/memory/manager-embedding-cache.ts READ: Canonical helpers already used; remaining code is domain logic.
290 src/config/sessions/session-canonical-validation.ts READ: Applied canonical owner or removed redundant scaffolding.
290 src/infra/state-migrations.media-persistence-database.ts READ: Canonical helpers already used; remaining code is domain logic.
289 src/infra/startup-migration-checkpoint.ts READ: Retained: transaction or authority boundary.
288 src/node-host/config.ts READ: Retained: transaction or authority boundary.
288 src/state/openclaw-state-db-startup-checkpoint.ts READ: Retained: distinct schema or migration lifecycle.
286 src/gateway/github-publication-shared-read.kernel.ts READ: Retained: another active PR owns this file.
286 src/infra/sqlite-worker-store.ts READ: Retained: transaction or authority boundary.
285 extensions/memory-core/src/standing-intents-kernel.ts READ: Retained: transaction or authority boundary.
285 src/commands/doctor-session-incognito-key-repair-state.ts READ: Retained: distinct schema or migration lifecycle.
285 src/infra/update-managed-service-handoff-reclamation.ts READ: Retained: transaction or authority boundary.
285 src/state/openclaw-state-db-borrow.ts READ: Retained: distinct resource or cleanup ownership.
284 src/commands/doctor-session-transcript-labels.ts READ: Retained: transaction or authority boundary.
284 src/config/sessions/session-suggestion-store.kernel.ts READ: Retained: transaction or authority boundary.
282 extensions/workboard/src/sqlite-store.ts READ: Applied canonical owner or removed redundant scaffolding.
282 src/commands/doctor-migration-backup.ts READ: Retained: distinct schema or migration lifecycle.
282 src/config/sessions/conversation-delivery-store.kernel.ts READ: Applied canonical owner or removed redundant scaffolding.
282 src/infra/kysely-sync.ts READ: Applied canonical owner or removed redundant scaffolding.
281 src/config/sessions/session-accessor.sqlite-maintenance-transaction.ts READ: Retained: transaction or authority boundary.
281 src/infra/state-migrations.tui-last-session.ts READ: Retained: distinct schema or migration lifecycle.
281 src/state/openclaw-state-db-audit-migration.ts READ: Retained: distinct schema or migration lifecycle.
279 apps/shared/OpenClawKit/Sources/OpenClawKit/WatchChatDeliveryStore.swift READ: Retained: distinct schema or migration lifecycle.
278 src/infra/sqlite-reader-lifecycle.ts READ: Retained: distinct resource or cleanup ownership.
278 src/node-host/node-worker-turn-store.kernel.ts READ: Applied canonical owner or removed redundant scaffolding.
277 src/infra/delivery-queue-sqlite-namespace.kernel.ts READ: Retained: transaction or authority boundary.
276 packages/memory-host-sdk/src/host/memory-recall-metadata.ts READ: Canonical helpers already used; remaining code is domain logic.
276 src/cron/store/runtime-authority-store.ts READ: Applied canonical owner or removed redundant scaffolding.
276 src/plugin-state/plugin-state-store.retention.ts READ: Applied canonical owner or removed redundant scaffolding.
276 src/state/openclaw-state-db-schema-v13-widerow.ts READ: Retained: distinct schema or migration lifecycle.
275 src/infra/session-delivery-queue.worker.ts READ: Retained: transaction or authority boundary.
274 src/agents/embedded-agent-runner/openrouter-model-capabilities.ts READ: Canonical helpers already used; remaining code is domain logic.
274 src/infra/heartbeat-outcome-store.ts READ: Retained: transaction or authority boundary.
274 src/infra/sqlite-audit-record.kernel.ts READ: Applied canonical owner or removed redundant scaffolding.
273 src/infra/runtime-guard.ts READ: Canonical helpers already used; remaining code is domain logic.
271 extensions/memory-core/src/memory/manager-db.ts READ: Retained: distinct schema or migration lifecycle.
270 src/audit/execution-owner-lifecycle-receipts.ts READ: Retained: distinct schema or migration lifecycle.
269 src/acp/runtime/session-meta-keys.ts READ: Canonical helpers already used; remaining code is domain logic.
268 src/gateway/worker-environments/store-row-codec.ts READ: Retained: distinct schema or migration lifecycle.
267 src/infra/update-run-write.ts READ: Retained: distinct schema or migration lifecycle.
264 src/config/sessions/session-transcript-search.ts READ: Retained: transaction or authority boundary.
262 src/infra/state-migrations.meeting-transcripts-detection.ts READ: Canonical helpers already used; remaining code is domain logic.
261 src/state/agent-deletion-journal.read.ts READ: Retained: transaction or authority boundary.
260 src/agents/auth-profiles/sqlite-json.ts READ: Retained: distinct schema or migration lifecycle.
260 src/infra/update-managed-service-handoff-cancellation.ts READ: Retained: transaction or authority boundary.
259 src/infra/state-migrations.types.ts READ: Retained: distinct schema or migration lifecycle.
255 src/config/sessions/session-accessor.sqlite-transcript-reports.worker.ts READ: Retained: transaction or authority boundary.
254 src/channels/message/ingress-queue.migration.ts READ: Retained: distinct schema or migration lifecycle.
254 src/fleet/registry.kernel.ts READ: Canonical helpers already used; remaining code is domain logic.
253 src/skills/workshop/store-sqlite-event.ts READ: Canonical helpers already used; remaining code is domain logic.
253 src/state/openclaw-state-db-task-delivery-recovery.ts READ: Retained: distinct resource or cleanup ownership.
253 src/state/openclaw-state-lease-worker.ts READ: Retained: transaction or authority boundary.
252 src/config/sessions/session-accessor.sqlite-archive-store-kernel.ts READ: Retained: distinct schema or migration lifecycle.
251 src/state/openclaw-agent-db-resources.ts READ: Retained: transaction or authority boundary.
250 src/acp/runtime/session-meta-write.native.ts READ: Retained: transaction or authority boundary.
250 src/infra/session-cost-usage-cache.kernel.ts READ: Canonical helpers already used; remaining code is domain logic.
249 src/commands/doctor/cron/store-repair.ts READ: Retained: transaction or authority boundary.
249 src/node-host/node-worker-prepared-workspace-store.kernel.ts READ: Applied canonical owner or removed redundant scaffolding.
247 src/agents/auth-profiles/inline-usage.ts READ: Retained: distinct resource or cleanup ownership.
245 src/agents/auth-profiles/shared-store-bootstrap.ts READ: Canonical helpers already used; remaining code is domain logic.
245 src/gateway/worker-environments/session-attachment-store.ts READ: Retained: distinct schema or migration lifecycle.
241 src/infra/device-auth-store.ts READ: Retained: transaction or authority boundary.
241 src/skills/lifecycle/upload-store.sqlite.ts READ: Retained: another active PR owns this file.
240 src/cron/store/guarded-mutation.worker.ts READ: Retained: transaction or authority boundary.
240 src/plugins/official-external-plugin-catalog-snapshot-store.kernel.ts READ: Applied canonical owner or removed redundant scaffolding.
239 src/config/sessions/session-accessor.sqlite-raw-delta-read.ts READ: Canonical helpers already used; remaining code is domain logic.
239 src/state/openclaw-state-db-current-reader.ts READ: Retained: distinct schema or migration lifecycle.
238 src/commands/doctor-agent-memory-schema.ts READ: Retained: distinct schema or migration lifecycle.
235 src/config/sessions/session-accessor.sqlite-conversation-read.ts READ: Canonical helpers already used; remaining code is domain logic.
235 src/cron/store/save.kernel.ts READ: Retained: transaction or authority boundary.
235 src/state/openclaw-agent-execution-domain.ts READ: Retained: distinct resource or cleanup ownership.
234 src/state/session-repository-workspaces.kernel.ts READ: Retained: distinct schema or migration lifecycle.
233 src/infra/kysely-sync-cache-state.ts READ: Retained: transaction or authority boundary.
230 extensions/logbook/src/store.ts READ: Retained: distinct resource or cleanup ownership.
230 src/skills/workshop/store.worker.ts READ: Retained: distinct schema or migration lifecycle.
229 scripts/crabbox-source-mirror.mts READ: Retained: transaction or authority boundary.
229 src/infra/state-migrations.audit-backup.ts READ: Canonical helpers already used; remaining code is domain logic.
229 src/plugins/bundled-discovery-state.ts READ: Canonical helpers already used; remaining code is domain logic.
228 src/infra/state-migrations.cron-run-logs.ts READ: Retained: distinct schema or migration lifecycle.
226 src/commands/doctor-sqlite-reclamation.ts READ: Retained: transaction or authority boundary.
226 src/state/openclaw-state-db-open.ts READ: Retained: transaction or authority boundary.
224 src/gateway/session-group-catalog.kernel.ts READ: Retained: distinct schema or migration lifecycle.
223 src/config/sessions/session-accessor.sqlite-entry-list.read.ts READ: Retained: transaction or authority boundary.
223 src/config/sessions/session-transcript-read-fence.ts READ: Retained: transaction or authority boundary.
223 src/node-host/auto-update-compatibility.ts READ: Retained: distinct schema or migration lifecycle.
222 src/infra/sqlite-worker-contract.ts READ: Retained: transaction or authority boundary.
221 src/sessions/session-upstream-links.ts READ: Canonical helpers already used; remaining code is domain logic.
220 src/agents/harness/native-hook-relay-store.kernel.ts READ: Retained: transaction or authority boundary.
220 src/infra/sqlite-schema-sql.ts READ: Canonical helpers already used; remaining code is domain logic.
219 src/config/sessions/session-canonical-validation-readiness.ts READ: Retained: transaction or authority boundary.
219 src/infra/state-migrations.receipts.ts READ: Retained: transaction or authority boundary.
218 extensions/migrate-hermes/apply.ts READ: Retained: distinct schema or migration lifecycle.
217 src/config/sessions/session-entry-current-admission.worker.ts READ: Retained: distinct schema or migration lifecycle.
217 src/session-cards/progress-card-store.ts READ: Applied canonical owner or removed redundant scaffolding.
217 src/state/user-preferences.store.ts READ: Retained: distinct schema or migration lifecycle.
214 src/agents/worktrees/registry-read.kernel.ts READ: Retained: distinct resource or cleanup ownership.
213 src/config/sessions/session-accessor.sqlite-compaction.ts READ: Retained: transaction or authority boundary.
212 src/infra/device-auth-store.kernel.ts READ: Canonical helpers already used; remaining code is domain logic.
211 src/infra/update-managed-service-handoff-rows.ts READ: Applied canonical owner or removed redundant scaffolding.
211 src/state/github-personal-publication-lifecycle.ts READ: Retained: transaction or authority boundary.
209 src/infra/message-tool-run-outcome-store.ts READ: Retained: transaction or authority boundary.
208 src/transcripts/store-sqlite-write.ts READ: Canonical helpers already used; remaining code is domain logic.
207 src/gateway/worker-environments/store.worker.ts READ: Retained: transaction or authority boundary.
207 src/projects/project-registry.kernel.ts READ: Retained: distinct schema or migration lifecycle.
206 src/config/sessions/session-accessor.sqlite-transcript-stats.ts READ: Applied canonical owner or removed redundant scaffolding.
205 src/config/sessions/session-accessor.sqlite-participant-projection.ts READ: Applied canonical owner or removed redundant scaffolding.
205 src/state/openclaw-state-db-schema-v12-foldin.ts READ: Canonical helpers already used; remaining code is domain logic.
204 src/commands/doctor-update-run.ts READ: Retained: transaction or authority boundary.
204 src/config/sessions/session-sharing-store.worker.ts READ: Applied canonical owner or removed redundant scaffolding.
204 src/pairing/pairing-store-sqlite.ts READ: Canonical helpers already used; remaining code is domain logic.
204 src/talk/client-voice-session-store.ts READ: Canonical helpers already used; remaining code is domain logic.
203 src/commands/doctor-usage-cost-cache.ts READ: Canonical helpers already used; remaining code is domain logic.
203 src/infra/state-migrations.restart-sentinel-receipts.ts READ: Retained: distinct schema or migration lifecycle.
202 src/agents/auth-profiles/path-resolve.ts READ: Retained: transaction or authority boundary.
202 src/config/sessions/session-accessor.sqlite-entry-cache.types.ts READ: Retained: distinct resource or cleanup ownership.
202 src/gateway/worker-environments/store-mutations.ts READ: Canonical helpers already used; remaining code is domain logic.

@clawsweeper

clawsweeper Bot commented Oct 3, 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.

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 789a7c03a7c898de2a204f9580c300910adda3e4
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/auth-profiles/inline-usage.worker.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/store/secret-store-write.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/store/secret-store.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling plugin: workboard size: XL labels Oct 3, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Oct 3, 2026
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 3, 2026, 8:35 AM ET / 12:35 UTC (Revision 4).

ClawSweeper review

What this changes

The PR consolidates repeated SQLite query caching, schema installation, and worker transaction plumbing while preserving existing storage behavior.

Warning

SQLite table change

This PR modifies persisted SQLite tables in extensions/workboard/src/sqlite-store.ts, src/cron/store/run-receipt-store.ts, src/cron/store/runtime-authority-store.ts, src/gateway/worker-environments/placement-move-intent.ts, and 4 more. Prefer a design that avoids changing persisted SQLite tables. If the change is necessary, verify migration and upgrade compatibility against an existing database before merge.

Merge readiness

⛔ Blocked before merge - 1 item remains

The work remains distinct from merged adjacent cleanups, and the verified test merge resolves the previous conflict blocker. No blocking introduced defect was found.

Priority: P3
Reviewed head: 789a7c03a7c898de2a204f9580c300910adda3e4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent behavior-preserving refactor with reported focused validation and no blocking source finding.
Proof confidence 🌊 off-meta tidepool Not applicable: Verified repository-admin authorship exempts this internal refactor from ordinary external-contributor proof. Reported store checks are supplemental; source inspection establishes no material authority or stored-data contract change, so no additional authority or migration proof gate applies.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Verified repository-admin authorship exempts this internal refactor from ordinary external-contributor proof. Reported store checks are supplemental; source inspection establishes no material authority or stored-data contract change, so no additional authority or migration proof gate applies.
Evidence reviewed 10 items Pinned introduction inspected: Reviewed the complete introduced diff from the pinned merge base to the original PR head, including query-cache replacements, worker admission extraction, schema reuse, secret rollback, and wrapper inventory.
Previous conflict blocker resolved: The raw test-merge commit records the pinned base as its first parent and exact PR head as its second parent. Its comparison against that base contains no skill-library or state-schema-helper changes, preserving the authority work merged through #164262.
Fresh queries and native lifecycle retained: The new cache retains compiled functions per native connection. Each invocation still binds fresh parameters and executes through the existing executor; authorizer transitions, deserialization, and close retain their native-statement invalidation owner.
Findings None None.
Security None None.

How this fits together

OpenClaw’s SQLite stores persist sessions, plugin state, credentials, and worker journals. Application commands enter their database owners, which validate writes and publish committed results to callers.

flowchart TD
  A[Application commands] --> B[Database store owners]
  B --> C[Connection query cache]
  C --> D[Fresh parameter bindings]
  D --> E[SQLite reads and writes]
  B --> F[Transaction and commit admission]
  F --> E
  E --> G[Committed state and caller results]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source -451, Other +1. Total -450 across 63 files.

View PR surface stats
Area Files Added Removed Net
Source 62 1024 1475 -451
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 63 1025 1475 -450

Review metrics

None.

Stored data model

Persistent data-model change detected: database schema: src/cron/store/run-receipt-store.ts, database schema: src/cron/store/runtime-authority-store.ts, database schema: src/gateway/worker-environments/placement-move-intent.ts, database schema: src/skills/workshop/store-sqlite-schema.ts, database schema: src/state/openclaw-agent-context-engine-turn-outbox-schema.ts, database schema: src/state/openclaw-agent-session-transcript-archive-schema.ts, and 6 more. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Use the canonical query and transaction helpers while retaining domain-owned authority checks, schema lifecycles, and native connection cleanup.

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

Not applicable: this PR proposes behavior-preserving cleanup rather than a reported product defect; no blocking regression was established by source review.

Is this the best way to solve the issue?

Yes: the inspected extraction reuses existing owners and preserves fresh reads, admission order, schema definitions, and rollback predicates.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is internal cleanup with no intended user-visible behavior, configuration, or stored-format change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Verified repository-admin authorship exempts this internal refactor from ordinary external-contributor proof. Reported store checks are supplemental; source inspection establishes no material authority or stored-data contract change, so no additional authority or migration proof gate applies.

Evidence

What I checked:

  • Pinned introduction inspected: Reviewed the complete introduced diff from the pinned merge base to the original PR head, including query-cache replacements, worker admission extraction, schema reuse, secret rollback, and wrapper inventory. (789a7c03a7c8)
  • Previous conflict blocker resolved: The raw test-merge commit records the pinned base as its first parent and exact PR head as its second parent. Its comparison against that base contains no skill-library or state-schema-helper changes, preserving the authority work merged through refactor(skills): run skill library import and mutations in workers (skilllib B) #164262. (78c5418fc08e)
  • Fresh queries and native lifecycle retained: The new cache retains compiled functions per native connection. Each invocation still binds fresh parameters and executes through the existing executor; authorizer transitions, deserialization, and close retain their native-statement invalidation owner. (src/infra/kysely-sync.ts:177, 789a7c03a7c8)
  • Admission ordering preserved: The extracted worker helper checks transaction admission before the operation and commit admission before the caller’s existing commit callback. Inspected sharing, inline-auth, and outbox consumers retain their destination checks, settlement handling, and post-commit schema recording. This extraction does not materially change authority. (src/infra/sqlite-transaction.ts:467, 789a7c03a7c8)
  • Persistent schema equivalence: A read-only textual comparison found all four extracted Workshop table definitions and the cron runtime-authority definition byte-for-byte equal to their prior inline definitions. Placement extraction preserves the existing end marker and nullable-column repairs; the retained previous-reader/candidate-reopen test checks stored intent and unchanged version metadata. (src/skills/workshop/store-sqlite-schema.ts:38, 789a7c03a7c8)
  • Security-sensitive predicates preserved: Secret rollback retains the exact scope, name, expected writer, and nondeleted-row predicates for both branches. GitHub setup handoff consumption retains freshness, kind, and host-policy restrictions and returns the value only after the transaction succeeds. The removed backup foreign-key probe is already performed by assertSqliteIntegrity. (src/secrets/store/secret-store-write.ts:205, 789a7c03a7c8)

Likely related people:

  • steipete: 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 (3 earlier review cycles)
  • reviewed 2026-10-03T11:27:21.204Z sha 88e3f64378d23cf54c6c208f2820a8c04c0d3ee6 :: blocked before merge. :: none
  • reviewed 2026-10-03T12:14:37.351Z sha f524f2d729f7a892b22db538ea6f8df1b06769d5 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-03T12:26:51.403Z sha 0b657ecb06e8e390645361f22321e40cce1c4d62 :: blocked before merge. :: none

@steipete
steipete enabled auto-merge (squash) October 3, 2026 11:29
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Oct 3, 2026
@steipete
steipete disabled auto-merge October 3, 2026 12:17
@steipete
steipete force-pushed the deslop/x04-sqlite-store-boilerplate-20261002 branch from 0b657ec to 789a7c0 Compare October 3, 2026 12:28
@steipete
steipete enabled auto-merge (squash) October 3, 2026 12:29
@steipete
steipete merged commit e6ec522 into main Oct 3, 2026
188 checks passed
@steipete
steipete deleted the deslop/x04-sqlite-store-boilerplate-20261002 branch October 3, 2026 12:44
vincentkoc added a commit that referenced this pull request Oct 3, 2026
* origin/main:
  fix(test): restore fixture state and await async completion (#164222)
  refactor(sessions): stage and settle pending inputs in workers (#164284)
  fix: speech-only replies fail when models include reasoning (#164285)
  fix(nextcloud-talk): avoid webhook migration for unconfigured channels
  fix: guide background skill reviews through Workshop proposals (#164292)
  test(build): reject AI dependencies in retained config repairs
  refactor(channels): require canonical private-network settings (#163535)
  fix(memory): migrate embedding cache in bounded batches and record oversized rows (#164303)
  feat(state): incognito actor memory and Codex history routing (P5c, inactive) (#164224)
  refactor(synology-chat): remove unused route account ID (#164280)
  test(ui): await web push preference publications (#164295)
  perf(scripts): avoid compiler projects for runtime import parsing (#164243)
  fix(worktrees): create workspaces from nested Windows repositories (#164249)
  test(agents,channels,cli): remove low-value tests (batch d173) (#164302)
  perf(workboard): serve cards per board revision and push changes instead of polling (#164301)
  refactor(sqlite): deslop sqlite stores (#164271)
  chore(ui): refresh control ui locales (#164299)
  refactor(events): deslop listener and disposal plumbing (#164221)
  fix: canonicalize fresh worker reasoning signatures (#164287)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
Consolidate connection-bound query caches, worker transaction admission, and schema installation through the existing SQLite owners. Preserve schemas, pragmas, transaction boundaries, current-authority checks, retention, persisted values, and SDK exports.

Remove 451 net production source lines after excluding adapters owned by openclaw#164153. The coverage log records 405 fully read production and operational files over 200 lines.

Validated with focused store tests, plugin contracts, typechecks, lint, formatting, and both import-cycle checks. Hosted CI remains the merge gate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: workboard rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts security-sensitive-changed size: XL 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