Skip to content

refactor(sessions): activate memory-only incognito actors - #169363

Closed
steipete wants to merge 167 commits into
mainfrom
dbasync/phasee4
Closed

steipete wants to merge 167 commits into
mainfrom
dbasync/phasee4

Conversation

@steipete

@steipete steipete commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Related: #168602. Completes Phase E after #169124, #169227, and #169327.

What Problem This Solves

Incognito sessions still used a separate SQLite owner on the Gateway thread. This activates the session actor’s memory backend for all incognito flows and removes the native and inactive pinned-worker alternatives in the same change. Durable sessions retain the SQLite-worker backend. Acquisition selects one backend once; there is never a second writer for a native session.

Creation, turns/continuations, SessionManager/SDK, history/search, collaboration, Boards, usage, reset/delete and close now consume actor operations and committed facts. Memory state survives handle release, disappears on owner/session close or process exit, and keeps the existing nonrenewing 24-hour expiry. Reads of absent state never create it or fall back to SQLite. Source and built SDK modules share the process owner registry. Deprecated synchronous SDK persistence/history calls reject incognito targets and identify their awaited replacements; durable compatibility remains within its existing window.

The native owner, SQL kernels, pinned-worker adapter, generations, bindings, reverse RPCs, repeated bookkeeping checks and obsolete tests are deleted. While activation was in flight, #169621 removed the inactive prerequisite and #169811 restored it on main. This PR activates that backend while preserving main’s subsequent async readers, immutable snapshots and receipt changes. Schemas, retention and large-payload SQL projections are unchanged.

Boundaries and accepted edges

The memory backend opens no SQLite database and consumes no database-worker slot. Creation retains one worker batch checking for a real durable row, so an incognito key cannot hide user data. Global ACP, Talk, audit, placement and publication metadata retain their existing owners. Content-free audit identifiers and global placement identifiers are retained as documented; incognito entry/transcript content is not persisted.

GitHub publication reads small session/member facts from the actor and shared facts from the existing state worker. One memory admission runs before the destination transaction because its requester policy callback may write state. Shared facts are validated within that transaction; durable source fencing and live checks before external publication remain unchanged.

Removed checks and accepted edges:

  • Native generations, admission/read claims, repeated target capture and suggestion generation comparisons: accepted work uses its captured target; later caller mutation does not retarget it.
  • Per-frame currency reads and post-read revision handshakes: a read may finish with its committed snapshot while later actor commands proceed. Low-level transcript deletion does not itself revoke an already admitted run; actual effect authority remains current.
  • Whole-roster recapture and repeated placement-evidence reads: new owners and later placement changes appear on the next listing/sweep; captured facts do not authorize effects.
  • Post-write sharing rereads: receipts are authoritative; later writes publish their own receipts.
  • Progress-card config recapture: accepted work finishes against its captured store; later operations use the new configuration.
  • FTS revision/index checks and projection rebuild admission: memory search reads committed events; uncommon Unicode tokenization or equally ranked snippets may differ from SQLite.
  • Usage refresh-lock handshakes: overlapping memory refreshes may reuse the next request. A bookkeeping ACP failure event may follow a direct durable metadata rewrite; backend/tool effects still require live authority.
  • Unbound incognito identity recapture: a logical lookup may follow a recreated namespace at the same key when session ID and lifecycle still match; retained actor handles remain closed. Policy lookups use the current policy at that key.
  • Transport revocation generations: close plus existing transport teardown is sufficient; already handed-off transport work may finish during close.
  • Per-checkpoint borrowed-worker file identity rereads: the borrower trusts its admitted live owner; reopen/repair checks remain.
  • Absent creation-witness rejection after an earlier lazy owner capture: a lazy capture alone does not reserve or refuse creation; a later creator may use the already observed path identity when that owner has no creation witness. Existing file-identity and effect checks remain.
  • Repeated cleanup authority forwarding through synchronous memory reads: the caller is checked once by the cleanup guard; selected actor and owner-close authority remain, and later effects check their own authority.
  • Memory publication source fencing: close after preparation admission may leave an internal request/receipt; external publication still checks live authority.

Credentials, approvals, tool/command execution, destructive transcript effects, external sends and cross-user disclosure retain their real authority checks.

Evidence

Measurement

One live shared-harness pair under the revised proof rules: baseline b9119c5435bcd54cfd6e37e38b0dcd70cfc29c7a, candidate f0b7763478e3bf3189727ee95528e4c1523f3a31. Ranges are across ten warmed turns within each run, not independent repeated pairs. Later integration/fixture/publication fixes are separate source and CI evidence; this is not relabeled as final-head runtime proof.

Metric Baseline Candidate
Warmed all-thread statements, median [min–max] 354.5 [302–549] 375 [340–483]
Warmed database requests, median [min–max] 108 [95–148] 103.5 [94–124]
Warmed MAIN statements, median [min–max] 0 [0–2] 0 [0–2]
First-turn statements / requests / MAIN 798 / 164 / 38 1,169 / 205 / 48
Whole-workload statements / requests 10,119 / 2,119 10,215 / 1,994

Per-operation attribution over warmed turns (statements / requests):

Actor operation Baseline Candidate
Accept input 153 / 21 150 / 20
Adopt run 42 / 10 40 / 10
Append transcript event 260 / 20 260 / 20
Complete turn 60 / 10 60 / 10
Delivery settled 63 / 20 60 / 20
Read 31 / 31 37 / 37

These operations add no SQL forms. Actor reads rise because unchanged background index writes invalidate cached snapshots between turns: three normal reads per turn remain identical; extra hydration occurs at precisely the boundaries with intervening unscoped index writes (one baseline turn, seven candidate turns). Publisher, write-receipt and SQLite executor code are unchanged between measured heads.

Background memory indexing/cache publication adds 170 warmed statements. First-turn actor commands and request counts are unchanged; deferred schema admission (+128), memory reindex/FTS publication (+56), and write preparation (+62) explain most of its increase. Candidate warmed duration was 9.34s versus 5.26s. The raw increase is scheduling/background variance under the attribution rule, not a timing-controlled speed benchmark. Both runs completed all thirteen turns, cron, compaction and shutdown; both returned the same non-warmed mentions.dismiss UNAVAILABLE result.

Shared read-family audit under the tightened attribution rule follows. Counts are successful native SQL; families overlap and must not be summed. Requests count distinct requests executing the family. Mean, median and ranges are across the same ten warmed turns.

Family Base SQL/turn mean; median [range] Candidate SQL/turn mean; median [range] Base → candidate requests/turn
Exact-entry facts 10.9; 10.5 [10–12] 11.9; 11.5 [11–14] 10.9 → 11.9
Actor hydration 5.7; 5.5 [5–7] 5.7; 6 [5–6] 5.7 → 5.7
Entry-cache snapshot loads 2; 2 [0–4] 3.4; 4 [2–6] 1 → 1.7
Row facts 27.5; 30 [20–30] 25; 25 [20–30] 5.5 → 5
Watermark reads 14.5; 15 [13–15] 7; 7 [6–8] 13.5 → 7

Exact-entry statements increase 109 → 119. The complete partition is corpus writable admission 9 → 15 (+6), pre-input reads following background index writes 1 → 6 (+5), and remaining exact-entry reads 99 → 98 (−1). Each corpus-admission read pairs one-to-one with the next corpus request within one second, sharing the empty-session-key argument fingerprint. Source readSessionTranscriptCorpusInWorker deliberately performs this read before corpus discovery; its durable branch is unchanged. The additional pre-input reads all follow cache.write.inline / source.replace.inline commits after the preceding final delivery, the same windows recorded in the actor-read trace analysis. Normal runtime reads during the turn remain 10 → 10. Background index commits and actor reads use the same writer connection in each run; the unchanged write-receipt implementation advances the unscoped revision included in session replica tokens.

Actor hydration remains 57 → 57 SQL: actor.read 31 → 37 is offset by acceptInput/adoptRun/deliverySettled hydration 6 → 0; appendTranscriptEvent stays 20 → 20. The six extra actor.read requests are already attributed in the actor-read trace analysis to background index writes invalidating the existing replica before the next input.

Snapshot statements increase 20 → 34: corpus inventory scans 9 → 15 each execute exactly two snapshot SELECTs (18 → 30); periodic session-registry-maintenance scans 1 → 2 each execute the same two SELECTs (2 → 4). Source blob identities prove that the memory sync scheduler, cache loader, ordered/retained read helper, and registry-maintenance scheduler are unchanged. Candidate sends preserve the maintenance caller stack; baseline redispatch lost its original caller.

Row-facts work falls 55 → 50 requests and 275 → 250 SQL. Watermark reads fall 145 → 70: patch.commit 70 → 10, lifecycle.project 10 → 0, row-facts 55 → 50, transcript-anchors 10 → 10.

Attribution limit: traces expose SQL stacks, request keys, timestamps and argument fingerprints, but not an explicit replica-invalidation reason. The pre-input link combines unchanged source with preceding index commits on the same writer connection; it is not a directly logged invalidation reason. Every net increase is accounted for; raw family counts are not presented as flat.

The isolated public CLI incognito lifecycle passed on measured candidate f0b7763: two creations, two provider-backed turns, both history reads, reset and deletion. Three persistence scans found no incognito entry/transcript content or backing file; the backend opened zero SQLite connections and issued zero SQLite statements or worker requests. Only exact documented audit/placement identity fields were retained. The initial overly broad scanner was corrected against those field contracts, not by excluding whole tables. The native baseline accepted creation/send but timed out before the provider; its 351 create and 396 partial-send native statements are incomplete-flow evidence, not a comparable full-lifecycle saving.

The measured delete path still executed 297 global placement authority reads and two secret-store reads on MAIN. These belong to existing global owners, so the whole lifecycle is not SQL-free. Inspection found duplicate forwarding of the same cleanup callback through synchronous memory reads; the final source removes that forwarding while preserving one explicit cleanup authority check and memory-owner closure checks. No unmeasured post-fix count is claimed.

Final integration and source accounting

Head e9ade9baabf29057e559f4df102bf3722b26ab33 integrates main f6c9a769e0f24780696a5aaf0e90dabf748adbcc, retaining the earlier integrations and two test-only fixture repairs. This integration combines main's durable worker APIs and committed predicates with Phase E's memory-first acquisition. Native incognito bindings and synchronous fallbacks introduced by the overlapping main change remain deleted. New asynchronous ownership calls retain their release/disposal and registration-publication contracts. The chat entry points keep their public exports; their unchanged admission, input-custody, ACK and dispatch implementation moves into a separate module to stay within the existing file-size limit. Memory capability capture and creation-test admission helpers move into their existing owners. The final conflict repair also preserves main’s cold writer preparation and creation-witness fixes, asynchronous runtime-config preparation, and removal of a redundant lifecycle check. The memory branch remains selected before durable config/storage preparation. The later conflict repairs preserve main’s fresh-input custody admission by applying its exact delta to the extracted dispatch module, and retain main’s prepared initial-context optimization alongside memory actor reads. Final CI repairs remove dead adapters, keep awaited release callbacks typed correctly, update stale fixtures to their current APIs, and preserve current memory delivery checks at approval effects.

The historical incognito-reachable T1 checklist falls 29 → 0: 18 calls deleted, ten now worker-only, and one durable-only reader bypassed by memory. The completed exact 1de4df00 CI ratchet reports 427 → 401 global T1 calls against its executed merge base d593d284, compatibility exceptions 9 → 9, and dialect groups 1 → 1 mechanical, 7 → 7 design, 9 → 5 engine maintenance. The earlier generated snapshot at e49e1cc7 predates this integration; the CI ratchet supplies the latest executed comparison. The two successor commits change tests only; no ratchet execution is claimed on their head. This global scope differs from the historical incognito checklist.

Relative to integrated main e61083f8: production/tooling +14,953 / −33,043 = −18,090; tests/fixtures +14,971 / −29,627 = −14,656; docs +600 / −1,382 = −782. Total +30,524 / −64,052 = −33,528 across 895 files (git diff --numstat --no-renames; test/spec/fixture paths grouped as tests).

The final integration preserves main’s publication receipt admission and transcript-worker shutdown cancellation; its queued-admission regression now uses an isolated durable fixture because the worker-memory backend is deleted. It also preserves main’s archived-session error type, forwards durable registry changes to admission, and transfers main’s session-initialization callback changes into the extracted dispatch owner. CI repairs publish the committed actor entry in pending-delivery fixtures, route the TTS-stream fixture through the existing host-owned infra pool, and register Solid cleanup once per test file through Vitest setup. Behavioral assertions and timeouts stay intact. Main’s disconnected cloud-startup expectation repair is inherited unchanged. The final test-only repair supplies valid agents.list rosters in reconnect fixtures and publishes the archive fixture’s archived descriptor only after the mutation succeeds; assertions remain intact.

Review and behavior evidence

Two Codex autoreview rounds completed; no third round was run. Missing pre-creation manager visibility and the live-source check before destructive compaction were fixed with negative controls. The null-lifecycle concern was declined after tracing the contract: null means an absent lifecycle; session identity, non-null lifecycle and writer checks remain. Review used chunked source/diff input without execution, which limits whole-branch coverage.

The live CLI lifecycle and SQL pair above are measured-head evidence, not final-head runtime claims. Earlier focused repairs cover durable-child backend selection, canonical mixed-case memory keys, acknowledged metadata/transcript reads, reset/deletion, foreign-source rejection, and transport/effect revocation. No timeout increases or weakened assertions were used. Final merge-resolution tests preserve these memory contracts while adopting main's async API and cleanup contracts; CI supplies their execution proof.

Basic changed-file oxfmt, plain oxlint and whitespace checks passed. Broad local test/type suites were not run under the revised proof rules. A two-file diagnostic attempt spent 374s compiling cold worker inputs and then produced no completed test results; it was stopped rather than claimed as passing evidence. The generated worker inventory was rebuilt through the campaign CPU semaphore. No remote lease or token remains.

CI, SDK and update proof

The exact 1de4df00 CI passed production types, every test-type and lint stripe, source contracts, architecture/Madge (zero cycles), and database ratchets. The final integrations and test-only repairs have now passed all selected static checks on e9ade9ba; the required aggregate gate is still pending. Knip was not selected on 1de4df00; the prior scan and exact matching main findings remain the Knip evidence. The exact 8d6d4add main-coverage run has passed production types, all test-type and lint stripes, source contracts, Madge (zero cycles), database ratchets and all seven SDK runtime guardrails. Its full Workflow Sanity passed: public SDK 154 entrypoints / 3,737 exports; all SDK 370 / 7,153; no unauthorized removals against stable v2026.10.2.

The executed ba8025d1 → e8c5e3ac SDK API report passed (job 115078657328, artifact 11783591796): 236 reachable changes, zero direct declaration-string changes, zero entrypoint additions/removals. Acknowledgment: cfcc4c01, full digest cfcc4c0106ed65fbdcde48093b3c97f56493ccc12b4c453f290fcf8eb4024418. Source continuity was checked through the final integration; incoming main's OAuth progress-callback repair preserves the stable call signature. Main's five removed sandbox exports and buildSessionEntryInProcess third-parameter change are inherited public-contract differences, not Phase E changes. The required startedAtMonotonicMs input belongs to the explicitly private-local harness API; its owner is byte-identical on integrated main and this head. Final-head source continuity preserves the same Phase E SDK delta; this is bounded source evidence, not a final-head SDK renderer run.

Published-driver update passed on e8c5e3ac: run 38330336538/job 115083001775, published 2026.10.2 → candidate, readiness HTTP 200 and running version verified (artifact 11783650972). Later conflict and fixture repairs reuse that result; it is not relabeled as a new-head execution.

Executed-main inheritance receipts come from scheduled main run 38331230273, whose checked-out commit is 2dd42a977aa9086801b27a7ede145451e83bc07f: all remaining Knip findings (job 115081407331), orphan recovery (115081407591), worker chat-abort (115081407653), dashboard JSON shape (115081407655), and nine loader runtime-config fixture failures (115081408121). These failing files are untouched relative to integrated main, and each was assigned to the red-main repair owner. The final CI disposition distinguishes any still-present failures from fixes supplied by the incoming main integration.

The 1de4df00 runtime run also matched executed failures in scheduled main run 38334375513, which checked out d6b01a20: OAuth personal authority; account/model catalog authority; account/worktree and workspace-policy authority; chat CLI auth and membership; skill-library reads; publication restart/reset; trusted-proxy HTTP; cron manual-tool authority; selection-authority aliases/roles. Their exact job/test receipts were assigned to the existing red-main owner. No source-only comparison is used as behavioral inheritance proof.

Other 1de4df00 runtime observations remain unclassified: publication singleflight returned one shared failed result instead of published; Codex status omitted the synthetic account email; account-only model routing returned an error; one agents.delete RPC timed out; three account-connect authority cases failed; native same-session completion timing differed. They have no matching executed-main failure in the collected evidence. UI reconnect and archive fixture defects from that run are repaired in the final test-only commits. The required gate on the pushed head determines landing readiness.

No touched-test failure is classified as inherited. Earlier runtime observations without matching main execution remain explicitly unproven: delayed Codex teardown, synthetic account/status fixtures, selected-model cleanup, pending-project recovery timing, and some real-Gateway UI startups. They do not establish a product regression. The actor oversized-receipt case passed on baseline 648d4ab8 with the receipt, persisted row and synchronous actor snapshot in agreement (89.898s test; 1,125.19s including cold build/setup/cleanup). The same focused case passed on candidate 1de4df00 (97.052s test; approximately 979s total), with receipt, persisted row and synchronous actor snapshot all agreeing on the original session and updatedAt 543. Both temporary diagnostics were restored byte-for-byte and their processes stopped. Candidate used Node 24 and baseline Node 26; these passing probes do not establish inheritance or repair of the earlier CI failure. The context-engine baseline probe was stopped after 20 minutes: a 489.4s worker build completed, but no test result followed. It is inconclusive, not inherited-failure evidence. All diagnostic probe processes were stopped. No dependency or release publication is included.

Latest integration

Head 602c994b59e2c2dcb9165947d6d78a65b1ddd0c0 resolves the single usage-worker conflict with #170399. Durable refresh keeps main’s combined body/partition snapshot read; the superseded second partition read stays deleted. The worker’s removed memory-cache condition stays removed because production incognito acquisition returns through the actor memory backend before database-worker admission. All other incoming changes merged automatically. Changed-file oxfmt, oxlint, whitespace checks and commit hooks passed. This predecessor is superseded by the exact-head CI result below; earlier execution evidence is labeled above.

The subsequent e9ade9baabf29057e559f4df102bf3722b26ab33 integration preserves #170520’s broker request-custody transfer. The two conflicts retain the new slot custody field and retirement call while keeping the obsolete incognito worker target/ephemeral fields deleted. Automatically merged request activation, cancellation, dispatch, settlement and failure handling remain intact. Changed-file formatting, lint, whitespace checks and commit hooks passed. Exact-head CI run 38339117139 executed merge 126ecfab03be3c019dd8b3741adf983cba039e56 against main 76edfee2d2202e1da8ea4274a05cb98ae1e723bf: all selected production/test types, lint, source contracts, architecture/Madge and database ratchets passed. Madge reports zero cycles. T1 is 427 → 401, compatibility exceptions 9 → 9, dialect 1 → 1 mechanical / 7 → 7 design / 9 → 5 engine maintenance. PostgreSQL conformance was not selected; no pass is claimed. The required aggregate gate remains pending while runtime jobs finish.

Exact e9ade9ba failures matched to executed scheduled main 38339144048 at 76edfee2: sessions-describe-catalog.test.ts main completed-provider-policy assertion (candidate job115107255739 / main job115106094741), and Workboard generated manifest drift (candidate job115107254308 / main job115106091218). Additional exact matches from that same scheduled main run are models-list freshness (candidate job115107258463 / main job115106099219), row-projection backfill (115107255850 / 115106094610), row-projection recovery (115107255835 / 115106094690), and Cron model-override forwarding (115107255542 / 115106094544). These failing test files are unchanged from integrated main, and the existing red-main owners retain their repairs. Remaining runtime failures are still being classified; this is not a green aggregate-CI claim.

The follow-up fixture correction separates the native worker reply from workspace settlement, matching the documented behavior introduced on main by #169484. It proves successful agent.wait while workspace resume remains held, preserves queued-input custody, and waits for the existing placement event before asserting the follow-up has settled. The Cron editor fixture uses the shared lazy-dialog readiness helper and retains its Remove-label and resulting-state assertions. No production behavior or timeout was changed. Basic formatting, plain lint and whitespace checks passed. The focused UI diagnostic produced no test results before the runner’s existing 120-second collection watchdog stopped it; execution proof remains with CI.

Head a72bd0f32062b18fa9ca57747b48d20d461d4344 includes those two test-only repairs and integrates main 4a05c7c5d59d5 without conflicts. This brings in main’s verified Workboard generated-manifest repair and preserves its author through ancestry. The two earlier worker conflict resolutions remain unchanged. Exact-head CI is pending; the successful static checks above belong to predecessor e9ade9ba.

Head 6e48ed681e32fa397ff22f5f1f8ed630f6acd0e9 integrates main c363cb3594479a0bf71d4f7ef54a4e3d8cc5d7f3. The four manual resolutions are test/setup-only: session-management.archive.e2e.test.ts keeps main’s deferred patch barrier and publishes the archived descriptor before releasing it; chat-pane-history-issuance.test.ts and chat-pane-task-suggestions.test.ts retain main’s typed roster fixtures plus the valid reconnect roster; lit-warnings.setup.ts keeps main’s cleanup comment and registration. No production code was manually changed by this integration.

Changed-file oxfmt, plain oxlint, whitespace checks and commit hooks passed. Focused chat proof passed: two files, 28 tests, 95.41 seconds, including the resolved shared setup. Command: node scripts/run-vitest.mjs run --config ui/vitest.config.ts ui/src/pages/chat/chat-pane-history-issuance.test.ts ui/src/pages/chat/chat-pane-task-suggestions.test.ts --maxWorkers=1. The archive browser test subsequently passed on 75e47509: ten tests, 155.21 seconds. Exact-head CI is summarized below. Earlier CI evidence is retained above rather than represented as current-head execution.

Head 71c49241b5be93fd9baab66a624f4701a0f36daf then integrates main 5d76ebfc35fd042fd8b299b2d0fa938cc285b6c3. Its sole manual resolution is src/gateway/worker-environments/worker-turn-transcript-target.ts: the memory branch still reads actor state, and the durable branch passes the requested target to main’s writer-independent settlement projection. Main’s new settlement regression merged unchanged. No new behavior beyond combining those existing paths was introduced. Changed-file oxfmt, plain oxlint, whitespace checks and commit hooks passed. The focused transcript and archive tests subsequently passed on 75e47509, as recorded below. The latest exact-head CI result is pending.

The next conflict-only integration is 75e47509fb79c, incorporating main 9cf79e201aee731fe1026a6adea95f13ea19c051 (#170572). The sole manually resolved file is src/infra/session-cost-usage-cache.sqlite.ts. Existing durable files now acquire their executor at writer admission using main’s captured file identity; missing stores keep their creation witness, and release tolerates no acquisition. Native incognito and synchronous fallback branches remain deleted. Main’s executor-retirement/replacement/revocation tests merged unchanged. Changed-file oxfmt, plain oxlint, whitespace checks and commit hooks passed. Focused tests passed on this exact head: transcript target 5 tests / 124.33s, usage admission 19 / 177.62s, archive browser 10 / 155.21s. Transcript wrapper time including cold worker preparation was 404.42s; usage wrapper time was 231.03s. All three commands exited zero, and the local proof slot was released. Together with the earlier two-file chat test result, every manually resolved file has focused proof. Exact-head CI run 38343101981 completed cancelled: 118 successful jobs, 21 skipped, five failed and three cancelled. Production types, test types, lint, architecture and database ratchets passed. Security and dependency statuses passed. The final test shard hit its configured 60-minute timeout, which cancelled the aggregate gate; no green aggregate claim is made.

The latest conflict-only integration is 263f021df731f3bfaa845833ee613bd990d61fd3, incorporating main fcb89a331a1f59eedde59c4b3a338febdb199cb7. The two manually resolved files are extensions/codex/session-history-worker-runtime.test.ts and extensions/codex/src/app-server/session-history.test-support.ts: memory-session tracking and cleanup remain, alongside main’s runtime-config fixture preparation. No production code was manually changed. Changed-file oxfmt, plain oxlint and whitespace checks passed. Focused history execution found history_read_failed on durable cases while the corresponding memory cases passed; the run was stopped after repeated failures, and the narrow diagnostic identified a 60-second session-history.worker.ts task timeout (runMs=60013.582, hostWaitMs=0, queueMs=0.213). No matching main execution was established. This is not passing conflict proof.

The completed 75e47509 CI run is not proven inherited-only. Four of its six initially observed failed assertions have matching executed-main evidence: model-list projection freshness, orphan recovery, closed execution admission, and account-only model routing. The routing match comes from a clean installed/built main 43584d99e8a15c9cbb1280e19be098ba9ca7e6b7 run (one failed/two passed, 107.57 seconds), with the same “provider route compatibility with Codex is not declared” refusal. Codex account-status and native same-session completion remain unclassified; baseline attempts stopped at earlier Doctor timeout or Gateway disconnect boundaries and do not prove those assertions inherited. No aggregate-green or complete-inheritance claim is made.

Head efc35bdf3bc6f9fbe82606776d4e589326d8745e integrates main ba1dd61a4e250be287ebbe103b1779899008d976. Its sole manual resolution is test/e2e/qa-lab/runtime/required-native-same-session.e2e.test.ts: the file now exactly matches main’s #170537 repair, which verifies the early reply while quiescence is held and waits for the follow-up’s settled placement. This removes our duplicate fixture changes. Main’s lifecycle-publication repair also merges unchanged. Formatting, plain lint, whitespace and commit hooks passed. Candidate focused execution is pending; the incoming-main passing CI is qualified prior evidence, not a candidate pass.

Head df5f90478e05ff7d5dc86fdaebfa29b35ece19bd integrates main 74c7b3d72589755d14ba630b85e049d671e81a48. The two manual resolutions are test-only: the database-worker registry retains main’s new schema-admission test while the deleted native-incognito tests stay absent; the real-Gateway background-work test keeps its startup predicate and richer sanitized diagnostics alongside main’s named abort-listener cleanup and added stage labels. Formatting, plain lint, whitespace checks and commit hooks passed. Focused registry proof passed on this head: 12 tests / 2.65 seconds (30.15 seconds including wrapper). Browser execution remains unproven. The history diagnostic above was restored byte-for-byte; no passing history result is asserted.

Current landing status: 0813ec0

Head 0813ec0942410d1bebc207aec8aec62c33fc82ec integrates main 04f646700558aac9d314ba7b8fa18571e18d2cd8, including #170560's durable worker consolidation. The conflict-only resolution preserves memory-first actor branches and main's createSessionWorkerExecutionSource, captureSessionStoreReadTarget and settleSessionWorkerReceipt helpers. It keeps the four native incognito workers deleted and removes their newly extracted orphan session-incognito-domain.worker.ts; no references to those retired workers remain. Memory pending-input withdrawal still directs the caller to Stop, and durable synchronous SDK compatibility remains unchanged.

Manually resolved files (all under src/config/sessions/):

  • session-accessor.sqlite-entry-admission.ts
  • session-accessor.sqlite-page-reclamation.ts
  • session-entry-read-writable.ts
  • session-pending-input-history.ts
  • session-pending-input-source.ts
  • session-pending-input-store.ts
  • session-pending-input-withdrawal.ts
  • session-reaction-store.ts
  • session-transcript-events.ts

Changed-file oxfmt, plain oxlint and git diff --check passed on 0813ec09. The focused session command was stopped after native admission refused, before test results; it is not passing proof. Prior-head focused results above remain prior-head evidence. No third autoreview, SQL remeasurement or broad local suite was run.

Native admission was actually invoked read-only against the trusted workflow source for both supported evidence modes, retaining run 38343101981's real cancelled conclusion and historical head 75e47509 separately from current head 0813ec09. Both exited 1 with: “Prior-CI admin admission: selected CI attempt must have the expected conclusion and belong to this PR and tested head.” The conflict-resolution route requires successful prior CI; the pre-existing-failure route binds the failed run to the current head. Neither admits a cancelled historical run plus later conflict-only integrations. No merge request or READY receipt was manufactured.

Independent evidence gaps also remain: Codex account-status and native same-session assertions are not proven inherited, and the final Telegram ingress-coalescing shard exposed 17 test/hook failures before timeout, including 20 received items versus 24 expected. Retained scheduled-main receipts do not establish these failures on main. The newer native fixture matches main's #170537 repair, but main's passing test is not relabeled as candidate proof. The PR remains open; this is an explicit landing blocker, not a complete inherited-failure exception.

All task-owned local proof processes have been drained and temporary source edits restored. The latest runtime build was intentionally stopped after admission refused (exit 143; 6m02s total, completed tsdown stage 4m20.6s); runtime/UI finalization and candidate native/browser tests did not run. The baseline auth test timed out before the target assertion, and its setup-only diagnostic was also stopped without an assertion result. Neither establishes inheritance. The pushed source remains clean at 0813ec09.

# Conflicts:
#	src/config/sessions/session-actor-memory-goals.test.ts
#	src/config/sessions/session-actor-memory-pending.test.ts
#	src/config/sessions/session-actor-scope.ts
#	src/config/sessions/session-pending-input-store.ts
#	src/config/sessions/session-transcript-reconcile.ts
#	src/config/sessions/session-turn.ts
#	src/gateway/session-row-projection-read.ts
# Conflicts:
#	src/gateway/session-row-projection-read.ts
# Conflicts:
#	scripts/pr-lib/wrapper-components.txt
#	src/config/sessions/session-accessor.sqlite-replacement-state.ts
#	src/config/sessions/session-turn.kernel.ts
@steipete

Copy link
Copy Markdown
Contributor Author

Split into #170667 (independent fixture repairs, merged as c6546e2) and #170712 (atomic memory-only incognito ownership cutover). The core replacement preserves this PR’s review, measurement, live lifecycle, SDK and update evidence and integrates the current main fixes. Closing this superseded PR in favor of those two parts.

@steipete steipete closed this Oct 13, 2026
steipete added a commit that referenced this pull request Oct 13, 2026
Activate the session actor's memory-only backend for incognito acquisition and move its remaining callers to the actor owner. Remove the native incognito database owner, SQL kernels, generations, bindings, and superseded tests in the same cutover.

Incognito state and transcripts stay in memory without a SQLite worker. Durable sessions retain the worker backend. Close and existing transport teardown revoke execution; transport work already handed off may finish during close. Keep current authority checks at credential, execution, external-effect, destructive-operation, and disclosure boundaries.

The incognito-reachable main-thread SQLite inventory falls from 29 calls to zero. The isolated CLI lifecycle opened no incognito SQLite connection and issued no incognito SQL statements or worker requests. SQL counts and shared-family attribution, focused failure diagnoses, review follow-ups, and exact CI/update evidence are recorded in the PR.

The independent test-fixture split landed in #170667; this completes the atomic activation and native-owner deletion from #169363.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…w#170712)

Activate the session actor's memory-only backend for incognito acquisition and move its remaining callers to the actor owner. Remove the native incognito database owner, SQL kernels, generations, bindings, and superseded tests in the same cutover.

Incognito state and transcripts stay in memory without a SQLite worker. Durable sessions retain the worker backend. Close and existing transport teardown revoke execution; transport work already handed off may finish during close. Keep current authority checks at credential, execution, external-effect, destructive-operation, and disclosure boundaries.

The incognito-reachable main-thread SQLite inventory falls from 29 calls to zero. The isolated CLI lifecycle opened no incognito SQLite connection and issued no incognito SQL statements or worker requests. SQL counts and shared-family attribution, focused failure diagnoses, review follow-ups, and exact CI/update evidence are recorded in the PR.

The independent test-fixture split landed in openclaw#170667; this completes the atomic activation and native-owner deletion from openclaw#169363.
@RomneyDa
RomneyDa deleted the dbasync/phasee4 branch October 22, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui commands Command implementations docs Improvements or additions to documentation extensions: codex extensions: memory-core Extension: memory-core gateway Gateway runtime scripts Repository scripts security-sensitive-changed size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant