Skip to content

refactor(sessions): move transcript reads to retained history owner - #166293

Merged
steipete merged 25 commits into
mainfrom
dbasync/w6transcript
Oct 8, 2026
Merged

steipete merged 25 commits into
mainfrom
dbasync/w6transcript

Conversation

@steipete

@steipete steipete commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Transcript deltas, pre-reset Memory capture, and final context validation still execute SQLite work on the Gateway thread. This moves those reads to the existing database workers while preserving physical store identity, foreign-commit freshness, reset ordering, and live authority after asynchronous work.

User Impact

Transcript and file reads retain one physical source across pages. Memory captures the pre-reset excerpt before its continuation proceeds. Public session reads consume current membership facts after awaited history, and captured context prefixes remain valid across later appends. Schema, retention, durability, configuration, transcript format, and released synchronous SDK contracts remain unchanged.

Why This Change Was Made

Raw/visible deltas, bounded Memory capture, and context validation reuse admitted revision facts and existing read kernels. When the exact physical database already has a prepared executor, reads borrow its captured generation and join its admission queue. Otherwise, the existing read-only owner remains responsible. A captured generation cannot fall back to a replacement after revocation. Incognito storage retains its existing process-local owner unless explicitly bound to an executor.

Memory hooks reserve continuation and settlement before capture yields. Manual reset waits for the excerpt; automatic reset joins the complete save. The cold-worker extraction changes types only. Manual compaction and sessions.compact/maxLines retain main's implementation.

Related and overlapping work includes #166054, #166074, #166102, #165921, #162433, #166387, #166503, #166539, #166689, #166698, #166617, #166704, #166778, and #166867. The resolved integration preserves main's worker-owned locked writes, compressed transcript payloads, current public-session readiness, and both sides of the host-owned test routing. Manual compaction and sessions.compact/maxLines retain main's implementation.

Nested delta, watermark, and context reads reuse the transcript lock's retained worker and FIFO. Append preparation uses a child read queue that settles before commit. Final context validation keeps its native mutation witness and synchronous acceptance in the same lock turn. Cancelled waiting reads do not dispatch; escaped callbacks reject after their scope closes. The carrier is shared across native and bundled SDK module copies.

The execution owner also distinguishes coordinated native generation closure from unexpected worker loss. A maintenance operation completing during an intentional close previously retired the entire owner. The fix joins that close while retaining existing revocation, native-loss, and failed-cleanup behavior.

Remaining synchronous reads

  • Workshop and CLI history retain live authority checks immediately before mutation/execution. Released synchronous SDK writers bypass the FIFO, and the native mutation witness is connection-local. A follow-up requires a generation published by every writer. Locations: src/skills/workshop/experience-review.ts:198/:212 and src/agents/cli-runner/history-boundary.ts:159/:161.
  • File RPCs retain their existing entry/root lookup before transcript reading. This is separate entry-owner debt, not new SQL inside a worker grant. Location: src/gateway/server-methods/sessions-files.ts:240.
  • Codex marker resolution retains its exact-entry lookup; explicit physical targets bypass it. Locations: extensions/codex/src/app-server/session-history.ts:135 and :34.

Compatibility

The released-signature audit compares v2026.10.1-beta.1 and v2026.9.8. Raw/visible delta APIs were already asynchronous. The generic three-argument Codex context reader and both validators remain synchronous; the physical-source argument is optional. The codex-transcript-sync-validation compatibility record and type test cover that retained boundary. The removed SessionColdTurnGuard re-export was internal-only; its canonical type remains, and emitted JavaScript is identical.

The final local SDK comparison for 2f1f73ccb222 → bab073ed48a9 completed in 852.05 seconds with native cleanup (digest 0ac1cc24926dd88a4934f6057007fb5bf57117f5927e33e3a081d06c507f787a): zero entrypoint additions/removals and zero direct public declaration changes. The independent audit confirms 165 reachable exports and 16 named declaration records (15 distinct text pairs). The successor 8d6bd1327651 changes only a test observer; production and SDK inputs are identical. The measured/report SHAs are retained rather than relabeled. No new OPENCLAW_* names are introduced.

Evidence

Final candidate: 8d6bd132765108f2e7f40c70cc2a28320e4a4f7e. Runtime/SDK proof is pinned to bab073ed48a9954e4b3bbeaa250db013125560a0; the only successor change recognizes the combined freshness probe in session-entry-readonly.worker.test.ts, preserving all assertions. Independent P2 reviews of the integration, atomic-probe extraction, and final observer repair are clean. Exact-head CI: 37749479845.

Post-integration core production, all 27 core test graphs, extension production/test, UI, scripts and root types passed. Subsequent reader and owner repairs passed affected core/config/SDK/state type lanes and Madge (zero cycles). The resolved integration initially passed 92 focused cases. Final focused local proof passed 18 context/delta cases, plus the six native-close recovery cases; native and worker transcript-lock suites also passed. Prior-head Linux proof at 981cd975605e passed 431 focused cases across 26 files in 362.63 seconds, the X E2E in 392.52 seconds, 31 selected import/build/wrapper cases, and all ten tail gates. The wrapper selection intentionally excluded 16 unrelated cases. These are prior-head results; final-head CI owns the integrated broad test gate.

SQL measurements

The integrated sanity comparison completed one alternating M,C pair for each of five scenarios (ten fresh samples), on the same Darwin arm64 host with Node 24.21.0, SQLite 3.53.4 and pnpm 12.5.1. Main is 2f1f73ccb2224bbe7d961b4c0d3b29cfdd51e7f8; measured candidate is bab073ed48a9954e4b3bbeaa250db013125560a0. The final test-only successor has identical runtime and SDK inputs. All-thread successful SQL executions are counted, including transaction envelopes and background owners; no statements are dropped.

Scenario / phase Main Candidate
Shared boot 2709 2715
Shared connect 366 239
Shared first turn 3730 3666
Shared warmed turn, ten-turn mean 1429.8 1350.8
Shared second session 4904 4636
Shared control 42 40
Shared cron 1948 1971
Shared compaction 792 761
Shared shutdown 1060 1049
RPC seed 2430 2176
RPC history-tail 13 172
RPC seed + history 2443 2348
RPC files-list, first + ten reads 112 107
RPC files-get, first + ten reads 101 93
RPC files-assets, first + ten reads 100 117
Three contiguous file blocks 313 317
Raw facade first / warmed 608 / 7 7 / 6
Visible facade first / warmed 6 / 6 6 / 6
Active-memory first / warmed 7 / 7 6 / 6
CLI presence first / warmed 2 / 2 2 / 2
Memory capture first / warmed 607 / 6 9 / 6
Installed Codex marker first / warmed 32 / 25 31 / 24
Installed Codex explicit target first / warmed 64 / 24 62 / 23

Independent raw audit verified all 638 archive files, all 41 harness files, both actual packages, exact source trees/diff, ten alternating samples and native process settlement. There were zero SQL failures and zero raw/CSV, per-SQL or summary mismatches. Of 43 phase medians, 30 decreased, seven were equal and six increased as attributed below. The unchanged legacy strict auditor reports REVIEW REQUIRED because it rejects any positive phase; the current landing policy applies the documented tolerances explicitly.

Complete scenario, context totals Main Candidate
Shared Gateway 29849 28585
RPC 6513 6354
Facades 3656 3012
Memory 3482 2864
Installed Codex 4066 4041

The positive phase deltas are attributed, not erased. Boot's +6 is unchanged-owner work; boot+connect falls 3075→2954. Cron's changed-owner net is −54 and unchanged-owner net +77; control+cron rises 1990→2011 (+1.055%). RPC catalog/auth/entry-patch work shifts from seed into history, while their combined window falls. Across the three file blocks, foreground SQL falls 235→234 and background SQL rises 78→83 (+1.278% total). File get/assets retain seven foreground executions per read; the added work is scheduled WAL, shared-state, OAuth, secret-expiry and pairing maintenance. Some unchanged-owner background query shapes occur only in the candidate sample; this is not claimed as an exact trace match. The documented non-turn tolerances and adjacent windows apply.

The run retains duration flags: shared boot 5.20× and first turn 3.26×, RPC boot 2.40× and compaction 1.55×, facade warmed phases 2.17–3.54×, memory capture first 33.73×/warmed 2.34×, and Codex marker first 1.75×/warmed 2.08×. The complete duration audit retains all 16 flags, including RPC post-work completion 143.39×. Shared warmed-turn duration falls 2572→2284.4 ms. This is the explicitly requested one-pair landing sanity check, not a latency pass or a replacement multi-pair performance benchmark. No PR-attributable first/warmed SQL increase triggers expansion under the landing instruction.

Pinned workload and commands

The identical 41-file workload on both sides is rpc-catalog-settled-v1; harness manifest SHA-256 7f833b9f28b49c963c1c0962e1fc29ed86e75d5d0bfb5aa4dc4ad18d2f923635, archive SHA-256 af92bfc0678b9815585fa7d2f78b8ffa3eab4706b0bc2ea1c8a6f603951cc205. The independently audited numerical archive is 22eb972474863669257f129c9fefe203c048a54a479726130c668ed8e4a7b142. Main package SHA-256 is bc99fdd016a48ddf1634089f2ab2333f712eee664e56aa6e7ff2ce5176001b5c; candidate package SHA-256 is 01be755b6f1051e13328742206d8eb1d9bcbbeeefda71623c9234708d510a9e3. The source/command binding manifest is 8a05bf85c322249bdbd8bf78fd581651d6066b713749f838b2c417545010289d; orchestration SHA-256 a4507c74dec75329e5509b73d5e6a1929f57bcb7aa76bd5ccb1f8a23d1e0f713. The harness is task-local, not a checked-in product file or a publicly downloadable artifact; these are immutable content identities and the actual command recipe, not a claim of a public harness URL.

Both source builds precede sampling. Execute each scenario once on main, then once on candidate, in the table's scenario order; REPO, SHA, OUT, HARNESS and INSTALL below name the pinned source/output paths. Both actual Codex packages are built and installed before their M,C sample pair.

python3 "$HARNESS/shared/measure.py" --repo "$REPO" --out "$OUT" --sha "$SHA" --repetitions 1 --skip-build
python3 "$HARNESS/rpc/measure.py" --repo "$REPO" --out "$OUT" --sha "$SHA" --repetitions 1 --skip-build
python3 "$HARNESS/facades/measure-facades.py" --repo "$REPO" --out "$OUT" --sha "$SHA" --repetitions 1
python3 "$HARNESS/memory/measure-facades.py" --repo "$REPO" --out "$OUT" --sha "$SHA" --repetitions 1
node scripts/package-openclaw-for-docker.mjs --allow-unreleased-changelog --bundle-plugin codex --output-dir "$PACKAGE" --output-name openclaw-codex.tgz
npm install --prefix "$INSTALL" --no-audit --no-fund --save-exact "$PACKAGE/openclaw-codex.tgz"
python3 "$HARNESS/codex/measure-built-codex.py" --package-root "$INSTALL/node_modules/openclaw" --out "$OUT" --identity "$SHA" --repetitions 1

Failures diagnosed and repaired

The public-reader 404 was a real readiness bug: membership publication during awaited history was mistaken for a missing share. 9005380f57ca rejoins the existing readiness owner before and after history, retaining identity and revoke/reset checks; the corresponding main implementation is now preserved.

The subsequent X HTTP 503 was a fixture settlement race. The cache correctly refused a response invalidated by actual child publication and returned Retry-After without stale content. The stable GET must follow the child's admission release. Main now contains that wait plus explicit membership preparation and an active-share assertion; this PR preserves the complete fixture. It makes one GET with no retry or weakened assertion.

699a0a02dbca removed an incorrect exact-validation shortcut for captured context. Four affected cases each passed 5/5 on main and failed 5/5 on the pre-fix PR with SessionTranscriptReadFenceError; all three repaired suites then passed 83 cases. 03545d95ae64 and bb4abcada046 fixed measured cold-read admission regressions by reusing the prepared physical executor for transcript and watermark reads. Both queued-writer regressions failed before the corresponding owner fix and passed afterward.

CI run 37672190145 on e514 exposed two fixture defects, not inherited-main failures. The mirror case assumed projection repair could not finish before an awaited public read; the test now joins the existing projection owner and asserts the exact committed two-entry page. The dedicated visible-delta test still asserts refusal while projection is dirty. The pairing counter recognized only PRAGMA data_version, missing the combined SELECT ... FROM main.pragma_data_version() probe. The same issue was found in the conversation counter. f821bdac8872 recognizes both forms while retaining exact 1/3/4 and 3 freshness counts and foreign-change assertions.

Matched Node 24.21.0/SQLite 3.53.4 reproductions ran each complete file five times on main 7e16a229 and unpatched PR 2d14ae01, singly with --maxWorkers=1, with identical test bytes. Main passes all 15 invocations. All 15 PR invocations reproduce exactly the diagnosed failure; every other case passes. The repaired four-file selection passes all 24 cases in 101.59 seconds. The earlier Linux candidate passed these files; the final integrated broad test gate is the exact-head CI linked above. A separate PR-context failure was corrected by using the required Evidence heading; no test was rerun merely to obtain green.

Historical CI run 37565579194 had 38 admission/replay cases independently attributed to main: 34 through matched remote main reproductions and four through exact scheduled-main failures (main run 37559068121). Main fixes b7987881046c, a6092b141bc2, and a74c84be818e are integrated, and those failures were absent from inspected later main run 37583759368. That evidence is retained as historical attribution, not an exception for the newer fixture defects.

Historical head 981cd975605e passed CI 37693825224 and ClawSweeper 37693922653 with no actionable findings. These are prior-head evidence. Final head 8d6bd1327651 now has green exact-head CI (37749479845) and a completed ClawSweeper review at 2026-10-08 08:37 UTC with no actionable code findings. Its remaining measurement request is answered above. The generic schema/config warnings are rejected based on the same review’s explicit technical finding of no DDL, migration, serialized-state or default change.

The worker-lock integration exposed two additional self-waits. A delta read reacquired its enclosing writer reservation; final context validation did the same before reaching the prepared reader. Both were reproduced before repair. The context diagnostic specifically reached final-validation admission after projection returned; its queued callback never entered before the 60-second deadline. The repaired boundary tests cover raw/visible/watermark reads, final context acceptance, asynchronous preparation, cancellation and closed contexts.

An existing generation-replacement regression then exposed a separate owner race. The trace showed an intentional native close starting without native failure, followed by concurrent maintenance preparation treating the closing native store as failed and closing the entire execution owner. The assertion remains unchanged. The owner fix passes it and the existing contention, deadline, shutdown, genuine native-loss and cleanup-recovery cases. Temporary diagnostics are removed. The queue fixture now identifies its exact reader by target and signal, so unrelated background admission cannot satisfy its gate.

CI on 60f6951f1f58 stopped in preflight because the main integration registered session-transcript-runtime.configured-store.test.ts twice in the host-owned test list (failed job). 470cebf4ea5f removes only the later duplicate, preserving the original routing and all assertions. The real CI manifest command passes locally in 45.94 seconds after the repair. This was PR-caused, not an inherited failure.

The next CI run exposed three lint diagnostics in the lock integration and one stale version-probe counter (lint job, test job). 34ba3f89e354 renames the nested queue parameter, preserves caller-owned abort reasons using the retry owner’s narrow lint exception, and teaches the validation-cache observer to recognize the combined pragma-function SELECT. Cancellation logic and every exact-count, foreign-change, transaction and revocation assertion remain unchanged. Focused lint passes; all 32 validation-cache cases pass (648.77 seconds including compiled-worker preparation), with native process settlement verified. Fresh P2 review is clean. These failures are repaired, not claimed as inherited.

GitHub reported another real conflict after 34ba3f89e354. Merge commit d2ecdabf676f integrates main 2f1f73ccb222: it preserves main’s Workshop rewrite and carries committed schema markers from the combined version probe into the existing schema-invalidation owner. No second snapshot read is added. All 27 core test type graphs, core and extension production/test type lanes, 93 focused cases, and the import-cycle check passed. bab073ed48a9 then moves that unchanged atomic probe into the already-imported snapshot module to satisfy main’s 700-line lint limit. Focused lint/core types, 42 schema cases, 11 import/build-graph cases, and fresh P2 review pass. The additional overlaps are #166587 and #161057. Final one-pair measurement and SDK comparison use this integrated head.

The final observer repair 8d6bd1327651 fixes the same combined-probe recognition in the readonly-worker suite. Its focused case passed in 75.74 seconds including worker preparation (one selected case, 18 deliberately filtered); all exact-count and foreign-schema refusal assertions remain. CI on the preceding head exposed this PR-caused observer defect; it is not classified as inherited.

The two agent stop-command cases observed on bab073ed also fail in scheduled main run 37740077201, head 2f1f73ccb222, with the same Error: Expected record stack at agent.test-harness.ts:98 and agent.abort-integration.test-utils.ts:250/:495. The cases are “preserves stop-command reason when /stop lands during the accepted ack yield” and “does not dispatch when a stop command lands during pre-accept setup.” The test and both harness files are byte-identical and untouched by this PR. These qualified the inherited exception on the prior head, but final-head CI passed: no inherited-failure bypass or rerun was needed.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling extensions: codex size: XL labels Oct 6, 2026
@clawsweeper clawsweeper Bot added 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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 6, 2026
@clawsweeper

clawsweeper Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 8, 2026, 4:37 AM ET / 08:37 UTC (Revision 13).

ClawSweeper review

What this changes

Moves transcript pages, pre-reset memory capture, and context validation through retained database workers while preserving existing storage and synchronous plugin contracts.

Warning

SQLite table change

This PR modifies persisted SQLite tables in src/infra/sqlite-schema-facts.ts. Prefer a design that avoids changing persisted SQLite tables. Migration or upgrade compatibility proof is recorded, but maintainers should still confirm that the schema change is necessary.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The inspected implementation is coherent and prior findings are repaired, while the declared integrated measurement still limits confidence.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The host identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. Focused real-worker boundary results and historical Gateway evidence support the change, but the integrated SQL qualification remains pending. Source inspection confirms no stored-data model change requiring migration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes
User problem: Large conversation-history reads can occupy the Gateway thread and delay other work.
Reason: Moving the remaining read cohorts to existing workers follows the established area direction and addresses a concrete responsiveness cost without adding settings or changing stored data.

Merge readiness

⛔ Blocked before merge - 3 items remain

This PR remains useful: current main still performs the targeted transcript reads synchronously. The freshness-observer finding is fixed, and no new actionable code defect was found in the inspected paths, but the declared integrated SQL qualification remains incomplete.

Priority: P2
Reviewed head: 8d6bd132765108f2e7f40c70cc2a28320e4a4f7e

Before merge

  • Resolve merge risk (P1) - The integrated five-scenario alternating SQL qualification is still pending, so current first-turn and warmed-turn placement and overhead are not yet established by the declared comparison.
  • Complete next step (P2) - Complete and publish the declared integrated five-scenario alternating SQL qualification, including immutable workload/commands and first-turn and warmed-turn results.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.

Findings

None.

Provenance

  • Schema freshness, ownership metadata reuse, and native-close retirement: original intent not found (unknown: Local feature-history searches were attempted, but missing historical blobs required a promisor fetch that failed with HTTP 403; complete introduction reasons could not be independently recovered.)

Tests

  • Missing end-to-end proof: Publish the declared integrated five-scenario alternating workload and commands with first-turn and warmed-turn results; prior-head Gateway runs and focused worker regressions do not establish that final comparison.
Agent review details

How this fits together

OpenClaw stores conversation transcripts in per-agent SQLite databases. These readers supply conversation pages, memory excerpts, and validated model context to the Gateway and bundled plugins.

flowchart TD
  A[Conversation and plugin requests] --> B[Capture physical database]
  B --> C{Prepared worker available?}
  C -->|Yes| D[Retained execution worker]
  C -->|No| E[Existing history reader]
  D --> F[Check freshness and current authority]
  E --> F
  F --> G[Transcript pages and validated context]
Loading

Technical review

Best possible solution:

Complete the existing worker cutover with source-bound SQL qualification while retaining the documented synchronous SDK compatibility and final authority fences.

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

Not applicable as a behavior-preserving worker refactor; current-main source confirms the synchronous reads, and the body records focused failing-before regressions for the repaired integration defects.

Is this the best way to solve the issue?

Yes: reusing the existing physical database and history owners is a maintainable direction, with final acceptance fences and released synchronous contracts preserved; the declared measurement remains necessary to qualify the integrated result.

AGENTS.md: found and applied where relevant.

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

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Complete the existing worker cutover with source-bound SQL qualification while retaining the documented synchronous SDK compatibility and final authority fences.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Provenance checked

Testing

Proof path: in-process harness. Added test files: 30.

Security

None.

Evidence

What I checked:

  • Current main still needs the cutover: Current main's asynchronous raw and visible SDK methods still invoke synchronous transcript kernels; memory capture is also synchronous. (src/plugin-sdk/session-transcript-runtime.ts:278, 4dc47557f10d)
  • Previous observer finding resolved: The head-to-parent delta changes only the freshness classifier to recognize direct PRAGMA and the combined pragma-function SELECT. The exact one-probe assertion and subsequent foreign-schema refusal remain intact. (src/config/sessions/session-entry-readonly.worker.test.ts:73, 8d6bd1327651)
  • Qualification still pending: The complete GitHub body was read, including ranges omitted from the prompt. Its captured identity is SHA-256 9a60a623eed500241b12a8da09bbfcd8ea51eadd3eb5a71648495aeb2af1b12f. It explicitly leaves the integrated five-scenario alternating SQL comparison pending. The maintainer request at refactor(sessions): move transcript reads to retained history owner #166293 (comment) also asks for immutable workload and command references. (8d6bd1327651)
  • Retained reader fences: Prepared reads check physical identity, generation, cancellation, and current ownership around worker execution; nested reads borrow the enclosing lock's worker and settlement queue. (src/config/sessions/session-transcript-execution-read.ts:104, 8d6bd1327651)
  • Final context acceptance: Final consumption retains the writer queue and connection-local mutation witness rather than accepting worker facts without revalidation. Added boundary coverage exercises nested reads, append preparation, cancellation, foreign rewrites, and generation replacement. (src/config/sessions/session-transcript-anchor-read.ts:150, 8d6bd1327651)
  • SDK and stored-state compatibility: The diff retains synchronous Codex reader and validator results, adds an optional physical-source argument, and records the validator deprecation window. The inspected production changes introduce no DDL, migration, serialized-state format, or configuration default. The body records completed SDK comparisons; independent release-blob inspection was unavailable because the partial-clone fetch returned HTTP 403. (src/plugin-sdk/codex-session-transcript-runtime.ts:132, 8d6bd1327651)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • jalehman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production and test growth Production net +1,305 lines; tests/support net +971 lines, excluding docs Most growth supplies worker dispatch and retained-reader lifecycle handling; the qualification should establish the value of that additional machinery.

Stored data model

Persistent data-model change detected: database schema: src/infra/sqlite-pinned-read-snapshot.ts, database schema: src/infra/sqlite-schema-facts.ts, migration/backfill/repair: src/plugins/compat/session-persistence-records.ts, unknown-data-model-change: src/infra/sqlite-schema-facts.ts, unknown-truncated-pull-files. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded internal responsiveness improvement with preserved user-facing contracts and no demonstrated urgent regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Link the immutable workload and commands, then publish the five-scenario alternating SQL comparison for bab073e or an independently verified production-equivalent head.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (12 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-07T19:19:01.067Z sha e514a3c :: blocked before merge. :: [P2] Synchronize the mirror fixture with projection settlement
  • reviewed 2026-10-07T22:01:57.738Z sha e514a3c :: blocked before merge. :: [P2] Synchronize the mirror fixture with projection settlement
  • reviewed 2026-10-07T22:10:57.427Z sha 981cd97 :: blocked before merge. :: none
  • reviewed 2026-10-08T05:47:01.733Z sha 60f6951 :: blocked before merge. :: none
  • reviewed 2026-10-08T06:10:57.857Z sha 470cebf :: blocked before merge. :: [P2] [P2] Update the remaining freshness observers for the combined probe
  • reviewed 2026-10-08T06:50:25.913Z sha 34ba3f8 :: blocked before merge. :: [P2] [P2] Recognize the combined probe in the remaining freshness observer
  • reviewed 2026-10-08T07:48:16.256Z sha bab073e :: blocked before merge. :: [P2] Recognize the combined probe in the remaining freshness observer
  • reviewed 2026-10-08T08:30:25.165Z sha 8d6bd13 :: blocked before merge. :: none

Integrate main through 424fb49 to include the MCP dependency-audit repair from #166217 and the current cold-storage liveness owner. Preserve the retained reader cutover and main compaction behavior.
Record the synchronous Codex validator deprecation boundary and prove the released three-argument generic reader and validator signatures remain compatible. Runtime behavior, stored data, and update semantics are unchanged.
@steipete

steipete commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Oct 7, 2026
Keep Gateway read and turn suites in their existing forked project. Join projection reconciliation before settled cursor assertions, while retaining separate unavailable coverage. Count evaluated table-valued PRAGMA branches without losing cached direct-PRAGMA counts; positive controls preserve the zero-schema and freshness budgets.
@steipete

steipete commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Integrate main 5be0e77. Preserve the
Board, transcript-delta, and Memory operations in the shared history reader.
Keep foreign-DDL admission revocation and exact freshness-probe bounds.
steipete added a commit that referenced this pull request Oct 7, 2026
The transcript append checkpoint precedes final session metadata writes. Join
the real session-work admission before asserting a stable public response.

Reuse the fixture correction prepared for #166293
(1444b89); keep the public-read and permission assertions unchanged.
@steipete

steipete commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Oct 8, 2026
The two cancellation branches added in #166293 rejected raw abort reasons,
requiring new lint suppressions.
Preserve existing Error identity and wrap other reasons with the canonical
AbortError factory, retaining string messages and the exact original cause.

Keep listener cleanup, FIFO ordering, and accepted-work draining unchanged.
Cover both already-aborted and queued operations with Error, string, and
object reasons. The four non-Error regressions fail before this change.
Remove the now-obsolete exact inventory entry added by #167185.
No persistence format, migration, or public SDK signature changes.

Validation: the six-case regression fails on the original non-Error paths
and passes with this change. Linux runtime-config passed 5,492 tests;
all 40 SDK lock/read cases passed. Full infra completed with 27,124 passes
and two stale fixtures already fixed on the landing base. Full tooling's
runner prerequisite and Git-shape failures were reconciled by unchanged
17-file replays (1,407 passing tests, no skips).

Production/all-exports Knip, source contracts, architecture, formatting,
typed/boundary lint, core/root test types, and changed-file lanes passed.
The suppression guard passes on the rebased tree. P2 review is scoped-clean.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
…penclaw#166293)

* refactor(sessions): move transcript reads to retained history owner

* test(codex): capture callable history worker spy

* test(sdk): guard released transcript reader compatibility

Record the synchronous Codex validator deprecation boundary and prove the released three-argument generic reader and validator signatures remain compatible. Runtime behavior, stored data, and update semantics are unchanged.

* test(sessions): stabilize transcript worker CI contracts

Keep Gateway read and turn suites in their existing forked project. Join projection reconciliation before settled cursor assertions, while retaining separate unavailable coverage. Count evaluated table-valued PRAGMA branches without losing cached direct-PRAGMA counts; positive controls preserve the zero-schema and freshness budgets.

* fix(gateway): rejoin sharing readiness after history reads

* test(gateway): await child settlement before stable public reads

* fix(sessions): preserve transactional context prefix validation

* perf(sessions): reuse prepared executors for transcript reads

* perf(sessions): reuse prepared watermark readers

* test(sessions): fix worker reader integration fixtures

Wait for the existing projection owner before asserting the committed mirror
page. Recognize combined SQLite version probes in the pairing and conversation
counters while preserving exact freshness counts and foreign-change checks.

Remove an unused cold-worker type re-export; the canonical type and emitted
JavaScript remain unchanged.

* fix(ci): remove duplicate transcript test routing

* fix(ci): align transcript lint and freshness counter checks

* refactor(sqlite): keep atomic version probes with snapshots

* test(sessions): count combined runtime-target freshness probes
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
The two cancellation branches added in openclaw#166293 rejected raw abort reasons,
requiring new lint suppressions.
Preserve existing Error identity and wrap other reasons with the canonical
AbortError factory, retaining string messages and the exact original cause.

Keep listener cleanup, FIFO ordering, and accepted-work draining unchanged.
Cover both already-aborted and queued operations with Error, string, and
object reasons. The four non-Error regressions fail before this change.
Remove the now-obsolete exact inventory entry added by openclaw#167185.
No persistence format, migration, or public SDK signature changes.

Validation: the six-case regression fails on the original non-Error paths
and passes with this change. Linux runtime-config passed 5,492 tests;
all 40 SDK lock/read cases passed. Full infra completed with 27,124 passes
and two stale fixtures already fixed on the landing base. Full tooling's
runner prerequisite and Git-shape failures were reconciled by unchanged
17-file replays (1,407 passing tests, no skips).

Production/all-exports Knip, source contracts, architecture, formatting,
typed/boundary lint, core/root test types, and changed-file lanes passed.
The suppression guard passes on the rebased tree. P2 review is scoped-clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: codex gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants