Skip to content

refactor(sessions): move conversation reads into workers - #163208

Merged
steipete merged 7 commits into
mainfrom
dbasync/s14
Oct 2, 2026
Merged

steipete merged 7 commits into
mainfrom
dbasync/s14

Conversation

@steipete

@steipete steipete commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Landed

Merged as 745421393a55e5617e2c4d5f5e0dc085560228c2 on October 2, 2026. The final reviewed head was 016947ff4574d4050819ce73afd0d0638347dd4b.

Final CI run 36986417642 succeeded on its first attempt: all 77 jobs were terminal with no failures. Exact-head ClawSweeper review completed at 08:57 UTC with no findings. Native review, GitHub-pending preparation, merge admission, and the exact-head merge receipt completed successfully. No admin exception or CI rerun was needed for the final head.

The earlier failures, their bounded investigations, main-owned repairs, scoped proof and source identities are retained below as historical landing evidence.

Updated landing head

Current head: 016947ff4574d4050819ce73afd0d0638347dd4b. This merge incorporates main 18ad182a8e6f, including 0a188c4f038f (include required normalization exports in declaration fixtures). The sole merge conflict was in the history-worker types; both main's inventory interfaces and S14's conversation operation remain present. No rebase or admin merge was used.

The prior-head CI run 36983182194 failed test/scripts/write-unified-entry-dts.test.ts, case “reuses unaffected canonical groups while rebuilding runtime after input edits,” because the synthetic normalization package omitted ./record-coerce. This was independently reproduced on its exact main parent 0fc181d08277a2d1034235a85ca6a181a4de605f in a separate worktree, with the same Node 24.21.0 subprocess error. The sole test failure caused five fail-fast cancellations and the aggregate-gate failure. Main's correction landed before exception submission, so it was integrated instead.

On the new composition, 23 tests across the worker boundary, registry, and worker-reader suites passed in 244.68 seconds wall. The exact formerly failing declaration case passed in 70.99 seconds wall (the other ten file cases were intentionally excluded by the name filter). Production types and whitespace checks passed, and fresh isolated Codex autoreview against the incorporated main was scoped-clean through P2. The earlier 76-case S14/category proof below retains its stated source context. The S14 diff remains 23 files, +478/-111.

A fresh CI run and exact-head ClawSweeper review are required for this published head. All earlier landing candidates and CI failures below are historical evidence.

Current landing candidate

Head 24a9f58fcf52d0e1e87e406af5f008996b7f1b5e integrates main through 0f470aecdc12 via merge commits, without rebasing. It includes dbb580aed3e7, which repairs the unrelated WAL tick fixture by controlling GatewayScheduler timeouts without changing the SQL observer. It also includes main's d81a2d8b7294 correction for an inherited duplicate logger trace property found by local typechecking.

All 76 tests in six focused suites passed: conversation worker-boundary, send, turn, delivery-store, registry, and category projection. Command: node scripts/run-vitest.mjs src/gateway/conversation-list.worker-read.test.ts src/gateway/conversation-send.test.ts src/gateway/conversation-turn.test.ts src/config/sessions/conversation-delivery-store.test.ts src/config/sessions/conversation-registry.test.ts src/gateway/session-row-projection.category.test.ts --maxWorkers=1; wall 531.30 seconds on the loaded macOS host. The formerly failing category case passed in 35.145 seconds, beyond the WAL tick interval.

Production typechecking, the database-worker ratchet, and whitespace checks passed after integrating the main-owned type correction. Fresh isolated Codex autoreview against the incorporated WAL-fix main was scoped-clean through P2. The subsequent nine incoming files were inspected (one-line harness correction and disjoint type-only custody refactoring); the entire S14 diff against main is byte-identical before and after that integration, so the scoped review and behavioral proof remain applicable. S14 remains 23 changed files, +478/-111; its production change is unchanged.

This new head starts a fresh CI run. Prior-head failures and their investigations below remain historical evidence. The coordinator authorizes one REST job rerun per known Bun UI GC, Windows skills-watcher, or Windows ACP-initialization flake, with its cause/known uncertainty recorded. Main's WAL-fixture repair supersedes the prior identical-repeat stop.

What Problem This Solves

Maintainer-requested S14 database-worker cutover. Conversation listing, standalone send/turn lookups, and manual-compaction primary-address reads execute SQLite on the Gateway thread. Resolving custom/shared store ownership also performs synchronous reads before the address query.

User Impact

This is an internal database-access change with no intentional user-visible behavior change. Conversation ordering, routing and binding contracts are preserved.

Why This Change Was Made

Solution: Use the existing session history worker for list, exact-address, and primary-binding selections, preserving the connection-bound query kernel. Async callers prepare physical store ownership through the existing worker discovery path, retain the logical agent and captured physical source, and recheck authority after awaited work. The Gateway list filters using current route configuration after the read; send and compaction recheck cancellation.

Impact

Only independent reads move in this slice. Address registration, delivery writes, and transaction-local authority remain with their current owners. Incognito databases retain their process-held native reader.

The migrated durable reads execute in the existing history worker; the calling thread awaits records. The real Gateway list/primary/exact-read boundary test observes zero caller-thread SQLite calls.

Owner file Tier Before After
conversation-registry.ts T1 1 1
session-accessor.sqlite-conversation-read.ts T1 1 1
session-accessor.sqlite-conversation.ts (registration, unchanged) T1 8 8
session-transcript.worker.ts W 10 11

The two shared T1 read sites remain for the explicitly retained SDK/authority paths. No inventory classifications changed. Production delta: +190 / -64 / net +126 LOC across 12 production files, plus 10 test files. The two synchronous list/primary signatures are replaced by awaited reads; the shared SQL kernel is reused. ConversationRecord moves from the SQL module to a leaf type module and remains exported by the registry.

Original pinned base: 786a6b56e8c8b7f2b9b0bf154db179c3e833efd2. Main was merged without conflicts at d4b98b3a5101349febc02ae14b828f689f7b8538; none of the lane's paths overlapped incoming main changes. LOC is measured both on the original lane commit against the pinned base and on the final lane diff against merged main, excluding incoming main work.

Evidence

110 tests across all 10 changed test files pass on the merged head. Each row ran OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=1800000 pnpm test <file> --maxWorkers=1 with the exact path below; Testbox also set CI=1.

Test file Passed Wall seconds Test-body seconds Environment
src/gateway/conversation-list.worker-read.test.ts 6 411.40 9.71 macOS, loaded host
src/config/sessions/conversation-registry.test.ts 14 255.78 46.24 macOS, loaded host
src/gateway/conversation-send.test.ts 21 150.13 17.17 macOS, loaded host
src/gateway/conversation-turn.test.ts 20 155.15 20.55 macOS, loaded host
src/gateway/conversation-list.admission.test.ts 5 175.59 15.63 macOS, loaded host
src/gateway/conversation-list.account-removal.test.ts 2 32.13 0.52 Linux Testbox
src/commands/doctor-telegram-general-topic-conversations.test.ts 2 23.26 3.53 Linux Testbox
src/infra/outbound/outbound-session.integration.test.ts 11 21.13 1.02 Linux Testbox
src/auto-reply/reply/session.conversation-kind.test.ts 6 24.93 0.86 Linux Testbox
src/config/sessions/session-accessor.sqlite-reclamation-reuse.test.ts 23 39.97 17.61 Linux Testbox

Wall times include CLI, compilation and fixture setup. The new boundary file exercises real worker routing and source retirement. Existing registry/reclamation files exercise durable store, generation and FIFO contracts that a mock cannot prove; this change awaits the new read port in their existing cases. The registry file's test-body time exceeds 30 seconds on the loaded Mac. Normal PR CI timings are not yet available.

The real Gateway boundary proof covers shared logical/physical owners, list/exact/primary results, missing stores, delayed route revocation, rejection without a native fallback, source replacement during both discovery and row reads, and native incognito ownership. Caller suites retain reset/rollover/peer-context and admission ordering coverage.

Additional pre-merge sibling proof passed in the focused pnpm test ... --maxWorkers=1 batches: src/gateway/conversation-list.test.ts (7 cases) and src/gateway/server.sessions.compaction.test.ts (20 RPC cases). No incoming main paths overlapped this lane.

Post-merge gates:

  • node scripts/check-changed.mjs — exit 0; formatting, production types, all 27 test type graphs, lint, dead-export scans and all selected guards passed.
  • pnpm check:database-worker-ratchet --base 786a6b56e8c8b7f2b9b0bf154db179c3e833efd2 — passed, no T1 growth.
  • pnpm check:madge-import-cycles — passed, 0 cycles.
  • node scripts/database-worker-inventory.mjs --json — filtered measurements in Impact; run on the original base and final head.
  • git diff --numstat d4b98b3a5101349febc02ae14b828f689f7b8538...HEAD — production +190/-64/net +126; git diff --check passed.
  • Deslop completed. Isolated Codex autoreview in local mode against the pinned base and branch mode against merged main both returned scoped-clean through P2, with no accepted/actionable findings.

Testbox evidence: provider blacksmith-testbox, lease tbx_01m3x913nw927qc36tszdmx4bp, workflow run. Native command exit 0. The runner verified source a243035125e8692f8283106d82e81258f625da12 and tree 84011796072f7b3ce472e77eac963e89f77afc59; its synthetic carrier had that same tree. The lease was stopped after proof, so lifecycle cancellation of the workflow is separate from the successful test command.

Observed validation limitations: on the loaded Mac, the account-removal suite exceeded its existing 180-second beforeAll deadline while importing bundled plugins; neither test ran. The same tree passed on Testbox, with no timeout or assertion changes. The first Testbox lease expired after waiting over ten minutes for a runner (setup failure); no source tests ran there, and the expired lease is stopped. An initial unrelated compatibility-expiration gate was resolved by merging main's #163127. No loaded-host timeout fix is claimed.

Compatibility retained / S10 dependency

  • resolveCurrentConversationSession remains synchronous for the public getConversationSession contract in openclaw/plugin-sdk/session-store-runtime, documented in docs/plugins/sdk-runtime/agent.md.
  • resolveConversation remains synchronous for current-authority checks, including conversation-turn's assertCommitAllowed callback. The callback reaches applySessionEntryPatchInDatabase and must see its executing transaction's rows. Moving that check requires a typed, worker-local conversation precondition in S10's entry-patch contract/kernel; an earlier read snapshot is insufficient.
  • registerConversationAddresses and runConversationDatabaseWrite retain the existing address-persistence and delivery-write FIFO. resolveConversationRegistryScope remains with native inbound reply capture. These write-side paths are outside the coordinator-authorized independent read cut; durable read failures propagate.

Update behavior

No schema, state format, configuration, permission, retention, durability, or migration changes. Doctor behavior is unchanged; its tests await the same conversation-read semantics.

Overlapping open PRs

Landing repair and focused proof

Exact-head CI run 36959894630 (attempt 1) exposed one missed async caller in test/gateway-account-history.e2e.test.ts: both compaction cases called .find() on the Promise returned by listConversations. This is caused by this PR, not a pre-existing or flaky failure. The fixture now awaits the read; its assertions and timeouts are unchanged. No extra test was added.

The repaired source passed both existing client and server-endpoint compaction cases on Blacksmith Testbox lease tbx_01m3xarbfxxdpz5anmdt6jbt1c, run 36960665529. pnpm test test/gateway-account-history.e2e.test.ts --maxWorkers=1 took 697.73 seconds wall including isolated build preparation; test bodies took 50.63 seconds. The complete selected changed-file checks passed, including all four root-test type graphs, formatting, lint, guards, and dead-export scans. The wrapper verified repaired tree f2daeccf21f71e99a6375fad6d4054386eb38f8b, returned exit 0, and stopped the lease. Fresh isolated Codex autoreview of the repair was scoped-clean through P2.

The local attempt stopped before tests at the managed-Gateway artifact isolation fence; no runtime artifacts were rebuilt there. The original CI run cancelled sibling jobs after the real failure, so those cancellations are unrun coverage rather than passing checks.

Main conflict resolution

GitHub reported a real conflict after main landed the conversation-delivery worker cutover. Merge commit 327854fbf2a52efaafd0705f4f9564ff8da526a7 merges main 1edb1f76d221640f338a882b44ea7bccf8c488c0 without rebasing. The five conflicts retain both conversation-row and conversation-delivery worker request variants and handlers, main's exported physical-store pinning helper, and S14's awaited read callers. Main's removed delivery write wrappers stay removed. The S14 production diff against the incorporated main is unchanged.

Composed proof on this merge candidate passed 72 tests across five files: conversation worker-boundary, send, turn, delivery-store, and registry suites. Command: node scripts/run-vitest.mjs src/gateway/conversation-list.worker-read.test.ts src/gateway/conversation-send.test.ts src/gateway/conversation-turn.test.ts src/config/sessions/conversation-delivery-store.test.ts src/config/sessions/conversation-registry.test.ts --maxWorkers=1; wall time 185.34 seconds. Production types, targeted lint of the five conflict files, database-worker ratchet, import-cycle analysis (zero cycles), and git diff --check passed. Fresh isolated Codex autoreview of the full candidate against the incorporated main was scoped-clean through P2.

Unrelated CI flake (cause identified)

The Windows failure in run 36963211906, job 110701453851 is a fixture race in src/skills/runtime/refresh.missing-root.integration.test.ts, case “replans a directory replaced between source planning and the first scan.” The watcher concurrently plans a source root and its skills companion (refresh-watch-targets.ts). The fixture replaces the source directory with a junction as soon as that root's plan resolves, without joining the companion's in-flight prefix enumeration. fs-safe correctly rejects the stale directory observation; the test's ready() helper directly awaits the rejected planning promise, ahead of the runtime's guarded recovery.

A bounded local controlled-schedule probe used the real skillsObservationScope, fs-safe 0.22.0 Roots, directory streams, and filesystem replacement. Holding the companion's already-open stream across the fixture replacement reproduced FsSafeError: directory changed during operation; joining the companion plan before replacement completed without error. This is macOS mechanism proof, not a replay of the historical Windows scheduler. An initial 30-round unforced macOS probe did not reproduce the race.

Independent corroboration: the workflow-only PR #163177 failed the exact Windows test with the same path-mismatch error and stack through observationPrefixKind and skillsObservationScope in run 36956693232, job 110681408510. Its test, refresh owner, target planner, scope planner, and filesystem probe blobs are byte-identical to this PR; both use fs-safe 0.22.0. S14 changes none of these files or dependency inputs. The fixture predates S14 (introduced by #159226); the recent polling-policy change does not change scope planning. Three scheduled main Windows shards passed, consistent with timing-dependent failure rather than independently demonstrated red main.

Under explicit maintainer direction, rerun only the failed Windows job via the REST job-rerun endpoint. No fixture assertions, timeouts, dependency versions, or production behavior are changed. The earlier unclassified status is superseded by this investigation; no main-failure admin exception is claimed.

The authorized single-job rerun completed successfully: Windows job 110705315899, run 36963211906 attempt 2, unchanged head 327854fbf2a52efaafd0705f4f9564ff8da526a7. The dependent CI gate 110708345932 remains red solely because 22 selected sibling jobs were cancelled by the first attempt's fail-fast. Its log identifies incomplete UI, Node, types, lint, architecture and other Windows lanes; it reports no new test failure. Cancelled coverage remains unrun. No cancelled-job rerun or admin bypass was requested.

Resumed cancelled coverage: attempt 3

The coordinator explicitly authorized resuming the failed/cancelled jobs of run 36963211906 via REST. Attempt 3 is complete with 77 terminal jobs and no remaining running jobs. The original Windows watcher job stays passed. Two previously cancelled jobs failed, and the aggregate CI gate failed downstream:

  • Node compact-small-20, job 110711496702: src/gateway/session-row-projection.category.test.ts, “reconciles more category rows than exact admission permits and survives archive eviction.” The zero-host-SQL observer captured exactly two periodic WAL-maintenance sequences (busy_timeout, wal_checkpoint(PASSIVE), timeout restoration), not conversation row queries. The fixture freezes only setInterval/clearInterval, while the unchanged WAL owner uses GatewayScheduler and setTimeout for its 10-second checkpoint ticks. This is an unrelated timer-control fixture failure with an identified cause. S14 changes none of the fixture, SQL observer, WAL owner or scheduler; the scheduler migration is main commit 70ca83470faae (fix(storage): join WAL maintenance before database retirement #162166). No assertion, timeout or fixture was changed here.
  • Windows job 1, job 110711494925: extensions/acpx/src/runtime-argv.process.test.ts, “preserves ACP argv through real processes and reconnect (leased=true, command=path).” The real ACP fixture missed its configured 5,000 ms initialization deadline; acpx 0.19.1 raised ACP_SESSION_INIT_FAILED from startRuntimeClient. An unrelated earlier report in ci: bound hourly iOS proof and accept coalesced jobs #158413 records the same fixture timeout but explicitly leaves its cause unresolved. S14 does not modify this fixture, lease wrapper or ACPX runtime. The available log does not establish why the handshake exceeded the deadline, so this is not claimed as a known flake with an identified cause.

Landing stopped under the coordinator's explicit unclassified-failure rule. No new rerun, timeout increase, speculative fix, admin exception, or merge request followed attempt 3. The separate task retains ownership of the earlier Windows skills-watcher race fix.

Explicit single-job retry: identical repeat

The coordinator accepted the recorded classifications and authorized one rerun of each of the two failed jobs, with an explicit stop if either repeated identically. The job reruns were serialized. REST rerun of compact-small-20 job 110711496702 produced job 110718797509, attempt 4, which failed the same session-row-projection.category.test.ts case with the same 12-statement WAL-checkpoint/busy-timeout assertion payload. The retained logs were compared directly and the payloads match exactly.

Stopped at that condition: the Windows ACP job's newly authorized rerun was not submitted, no third Node execution was requested, and no merge request followed. The coordinator's separate task owns the WAL timer-fixture fix on main; the recorded Windows uncertainty is accepted under the repository's test-failure policy and is not the reason for this stop. The PR head remains 327854fbf2a52efaafd0705f4f9564ff8da526a7.

Read conversation lists, standalone send/turn addresses, and manual-compaction
primary bindings through the existing history worker. Retain source custody
through discovery and cleanup, current route checks, and native incognito reads.

Keep getConversationSession synchronous for the public plugin SDK. Transaction
and delivery authority guards remain native pending the S10 entry-patch cutover.
No schema, stored data, migration, retention, or permission changes.
@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime commands Command implementations size: L labels Oct 2, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 4:57 AM ET / 08:57 UTC (Revision 9).

ClawSweeper review

What this changes

Moves conversation listing, address lookup, and manual-compaction binding reads into the existing session history worker so SQLite work yields off the Gateway thread.

Merge readiness

✅ Ready for maintainer review

This PR remains necessary: current main still performs these conversation reads synchronously. The pinned diff preserves the query kernel, SDK compatibility, and delivery authority checks; no actionable introduced defect was found.

Priority: P2
Reviewed head: 016947ff4574d4050819ce73afd0d0638347dd4b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-supported internal cutover with no actionable finding and preserved compatibility contracts.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): Recorded macOS and Testbox execution exercises the production conversation list and real history-worker/SQLite boundary, including source replacement and delayed route revocation; latest-head worker composition has fresh passing coverage. Send/turn mock adapters are supplemental. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Recorded macOS and Testbox execution exercises the production conversation list and real history-worker/SQLite boundary, including source replacement and delayed route revocation; latest-head worker composition has fresh passing coverage. Send/turn mock adapters are supplemental. No stored-data contract changes.
Evidence reviewed 9 items Pinned introduced change: Reviewed the merge-base-to-head production and test hunks. The original head and checkout are the same recorded commit; the supplied stale test merge was not used to infer removal of main behavior.
Current main still needs this cutover: The exact fetched-main registry still returns conversation lists and primary bindings through synchronous selectConversationRows. Merged transcript and delivery-worker changes cover adjacent operations rather than this remaining read cutover.
Retained read ownership: The new adapter uses the existing retained worker reader, captures source paths and admission, rejects changed physical owners, and revalidates after reading. Incognito retains its native reader; there is no durable synchronous fallback.
Findings None None.
Security None None.

How this fits together

The conversation registry maps channel addresses to current session bindings. Gateway listing, sending, turns, and compaction consume those records while channel routing and delivery owners enforce current authority.

flowchart TD
 A[Gateway conversation requests] --> B[Resolve logical and physical store]
 B --> C{Durable or incognito}
 C --> D[Session history worker]
 C --> E[Process-held incognito reader]
 D --> F[Shared conversation query]
 E --> F
 F --> G[Current source and route checks]
 G --> H[Listing delivery or compaction]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +126, Tests +241. Total +367 across 23 files.

View PR surface stats
Area Files Added Removed Net
Source 12 190 64 +126
Tests 11 288 47 +241
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 23 478 111 +367

Review metrics

Metric Value Why it matters
Production versus test growth Production +190/-64, net +126; tests +288/-47, net +241 Production growth supplies retained worker routing and leaf contracts; the new tests protect the actual thread and source-lifetime boundary.

Technical review

Best possible solution:

Keep independent durable reads on the existing history worker, with transaction-local authority checks and shipped synchronous SDK callbacks retaining their current owners.

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

Not applicable as a specific bug reproduction: current-main source establishes the synchronous reads being migrated, and recorded production-boundary execution verifies the cutover.

Is this the best way to solve the issue?

Yes. Reusing the existing worker and unchanged query kernel is a narrow solution that preserves synchronous SDK and transaction-local contracts.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded runtime responsiveness improvement with preserved conversation behavior and no demonstrated urgent regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): Recorded macOS and Testbox execution exercises the production conversation list and real history-worker/SQLite boundary, including source replacement and delayed route revocation; latest-head worker composition has fresh passing coverage. Send/turn mock adapters are supplemental. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded macOS and Testbox execution exercises the production conversation list and real history-worker/SQLite boundary, including source replacement and delayed route revocation; latest-head worker composition has fresh passing coverage. Send/turn mock adapters are supplemental. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduced change: Reviewed the merge-base-to-head production and test hunks. The original head and checkout are the same recorded commit; the supplied stale test merge was not used to infer removal of main behavior. (016947ff4574)
  • Current main still needs this cutover: The exact fetched-main registry still returns conversation lists and primary bindings through synchronous selectConversationRows. Merged transcript and delivery-worker changes cover adjacent operations rather than this remaining read cutover. (src/config/sessions/conversation-registry.ts, a9442b7a6da4)
  • Retained read ownership: The new adapter uses the existing retained worker reader, captures source paths and admission, rejects changed physical owners, and revalidates after reading. Incognito retains its native reader; there is no durable synchronous fallback. (src/config/sessions/conversation-registry.ts:80, 016947ff4574)
  • Shared SQL kernel and unchanged stored contract: The worker dispatch calls the existing connection-bound selector. Its query behavior is unchanged; the patch adds no schema, persisted format, configuration, dependency, or migration change. (src/config/sessions/session-transcript.worker.ts:457, 016947ff4574)
  • SDK and final delivery checks: The public getConversationSession wrapper continues using synchronous resolveCurrentConversationSession. Turn binding keeps its synchronous pre-commit guard, and outbound delivery invokes the current-authority callback before delivery attempts. (src/plugin-sdk/session-store-runtime.ts:177, 016947ff4574)
  • Recorded production worker boundary proof: The captured body reports successful real-worker list/exact/primary reads with zero caller-thread SQLite, delayed route revocation, missing-store noncreation, source replacement, and native incognito coverage. The latest head reports 23 passing worker/registry/reader cases in 244.68 seconds; earlier source-qualified Testbox results remain historical. The inspected boundary harness calls the production Gateway list owner and actual worker pool. (src/gateway/conversation-list.worker-read.test.ts:59, 016947ff4574)

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 (8 earlier review cycles)
  • reviewed 2026-10-02T03:26:40.054Z sha a243035 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-02T04:02:03.993Z sha cdbb2bc :: blocked before merge. :: none
  • reviewed 2026-10-02T04:12:53.072Z sha 327854f :: needs maintainer review before merge. :: none
  • reviewed 2026-10-02T04:32:11.335Z sha 327854f :: needs maintainer review before merge. :: none
  • reviewed 2026-10-02T04:48:04.784Z sha 327854f :: needs maintainer review before merge. :: none
  • reviewed 2026-10-02T05:22:53.378Z sha 327854f :: needs changes before merge. :: none
  • reviewed 2026-10-02T05:54:11.622Z sha 327854f :: needs changes before merge. :: none
  • reviewed 2026-10-02T08:23:41.759Z sha 24a9f58 :: needs maintainer review before merge. :: none

@steipete

steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Resolve overlap with the conversation delivery worker cutover while retaining both worker operations and async read callers. Focused composed proof: 72 tests across five files passed in 185.34 seconds wall; production types, targeted lint, database worker ratchet, import cycles and isolated autoreview passed.
@steipete

steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Integrate main dbb580a. All 76 focused S14 and category-projection cases passed; the prior WAL SQL-budget failure no longer reproduces. Independent review is scoped-clean through P2. The inherited duplicate logger trace property is corrected by main d81a2d8 and will be integrated before publication.
Integrate main 0f470ae, including d81a2d8 which removes the inherited duplicate logger trace. Production typechecking and the database-worker ratchet pass. The S14 patch is byte-identical to the independently reviewed and focused-tested composition; incoming changes are the logger correction and disjoint type-only custody refactoring.
@steipete

steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Integrate main 18ad182 including 0a188c4. Preserve both inventory and conversation worker interfaces. The declaration case independently failed on CI main parent 0fc181d and passes after this integration. Worker/registry proof: 23 tests passed; exact declaration regression passed; production types and isolated review through P2 passed.
@steipete

steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete merged commit 7454213 into main Oct 2, 2026
135 checks passed
@steipete
steipete deleted the dbasync/s14 branch October 2, 2026 09:09
@steipete

steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 3, 2026
…3208)

* refactor(sessions): move conversation reads into workers

Read conversation lists, standalone send/turn addresses, and manual-compaction
primary bindings through the existing history worker. Retain source custody
through discovery and cleanup, current route checks, and native incognito reads.

Keep getConversationSession synchronous for the public plugin SDK. Transaction
and delivery authority guards remain native pending the S10 entry-patch cutover.
No schema, stored data, migration, retention, or permission changes.

* test(sessions): await conversation reads in account history proof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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