Repository navigation
refactor(sessions): compose incognito actor acquisition and authority (P7k, inactive) - #165885
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: blocked before merge. Reviewed October 6, 2026, 8:24 AM ET / 12:24 UTC (Revision 10). ClawSweeper reviewWhat this changesThe PR composes worker-owned incognito session acquisition, discovery, and live authority while preventing retained transcript readers from disclosing messages after closure. Merge readiness⛔ Blocked before merge - 1 item remains Keep open as a distinct, maintainer-owned prerequisite that current main does not implement. The exact-head receipts resolve the previous validation request, and no actionable introduced defect was found. Priority: P2 Review scores
Verification
How this fits togetherIncognito sessions hold private conversation state in process-local databases. The session execution owner supplies retained worker access and current authority to session readers, sharing checks, delivery guards, and completion routing. flowchart TD
A[Session request] --> B[Captured actor binding]
B --> C[Existing session execution owner]
C --> D[Worker reads and writes]
D --> E[Published session facts]
E --> F[Current authority check]
F --> G[Authorized consumption]
F --> H[Refuse stale access]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +974, Tests +859, Docs +27, Other -1. Total +1859 across 48 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep this composition inactive and preserve the existing native routes until the coordinated activation installs all adapters and removes superseded ownership together. Do we have a high-confidence way to reproduce the issue? Not applicable as a standalone bug report: this is an inactive refactor, with source-backed regressions and recorded real-worker negative controls for authority and disclosure failures. Is this the best way to solve the issue? Yes. The patch extends the existing execution and binding owners while preserving native production routing and released synchronous contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 608f1530d231. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
Keep related actor acquisition independent of the mutable presentation checks and valid through settlement. Move the captured-root regression into a host-owned actor fixture at the two-worker floor, and prune the retired status-tool max-lines entry.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Integrate the landed dependency repair, session-authority B1, and native creation writes. Move the two new internal classifier callers to the request module while retaining host-owned inactive production routing.
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Retain P7l operation capture alongside P7k acquisition and topology helpers. Keep accepted-write authority distinct from read disclosure checks and retain both inactive prerequisite sections. Production routing remains host-owned.
Carry admission cancellation in the retained summary snapshot authority so cancelled reads cannot invoke their consumer before rejecting. Cover the race with a real-worker regression in the existing actor-binding suite. Integrate main's detached observer persistence and internal Runtime admission while preserving host-owned incognito routing and released SDK boundaries.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
… (P7k, inactive) (openclaw#165885) * refactor(sessions): compose incognito actor acquisition and authority (P7k, inactive) * fix(sessions): preserve related incognito read authority Keep related actor acquisition independent of the mutable presentation checks and valid through settlement. Move the captured-root regression into a host-owned actor fixture at the two-worker floor, and prune the retired status-tool max-lines entry.
What Problem This Solves
The incognito actor needs a complete acquisition, discovery, and authority composition before one atomic runtime cutover can retire native host ownership. This is P7k's inactive prerequisite.
User Impact
No runtime activation or user-visible routing change. Production acquisition stays host-owned; native routes remain until the coordinated activation. No schema, stored-byte, retention, durability, permission, configuration, dependency, or update changes. No new environment-variable names. Released synchronous SDK contracts remain unchanged; the v2026.9.8 Gateway context type reachability was checked. T1 delta: 0 for this inactive prerequisite. Retained context readers reject further message disclosure immediately when their owner closes.
Why This Change Was Made
Existing-only and explicit-create acquisition share the existing binding and canonical execution owner. Physical identity is captured before yielding, nested scopes retain enclosing authority, and accepted work is joined before release. Entry/current/claim reads, logical candidates, combined discovery, and placement evidence retain their actor and FIFO snapshot through consumption. Mixed discovery, placement, and durable completion lineage stay in one captured state root.
Sharing, delivery, presence, and completion lineage consume the actor owner's published facts. A pending creation exposes only its exact live operation's transaction preimage; accepted persistence survives scheduler admission cancellation while new reads refuse it. SessionManager/Codex iterators revalidate on disclosure and close with their consumer. Target-based synchronous SDK refusal is prepared but remains inactive for unbound callers.
Small coherent extractions keep existing owner files under their growth caps. There is no second owner, synchronous bridge, persistent cache, or new worker service. Inactive helpers live in production-imported modules with the P7 internal Knip notes.
Overlap: parallel P7l/P7m work, #165819, and the standing #162433 umbrella. Hunks stay within acquisition/authority; the later lander must adapt overlapping hunks. The final activation must also coordinate the remaining native-classifier callers in entry status/freshness, trajectory writing, and follow-up turns.
Evidence
The following evidence describes the original implementation at
4863c5b66d793; current landing verification follows below.pnpm test <files below> --maxWorkers=1, 552.17s wall. Per-project runner durations: completion lineage 76.72s; real Gateway close manager/compute 102.95s; actor sessions 35.48s; combined-store worker 26.67s; status tool + real-storage status 34.73s; full-context snapshots 97.98s; Codex history adapter 119.34s.get-reply, history-read, transcript-reconcile).node scripts/check-changed.mjs --base ab2e92694e635beb25ebc9808756728897d11356: ran for 1,227.35s and stopped at core lint. All earlier guards and core/test type graphs passed. Branch-local lint findings were repaired at their owners, then all changed core files passed type-aware lint (69.09s), core typechecking passed again (11.69s), script lint passed (56.21s), and every later planned architecture/auth guard completed separately (162.16s). The inheritedno-shadowerror atsrc/infra/heartbeat-runner.scheduler.test.ts:436is outside this diff: its blob is identical to the pinned base (33685b11891470a859e8687746eca3a865fe36b5) and current main already fixes it inac3830b776a3d(perf(worktrees): avoid warm checkout admission spawns #165750). This is not a claim that the full pinned-base command passed.pnpm deadcode:knip: passed, 221.72s. Madge: 0 cycles, 157.77s. Subsequent repairs changed no production import edges or exported-helper reachability.qaRuntimebuild: passed, 219.59s, including CLI bootstrap import guard. A broaderpnpm buildwas stopped in package declaration generation after 689.64s; it is not claimed as passing.4863c5b66d793, 378.03s; 0 entrypoints added/removed, 0 direct export declaration changes, 129 reachable declaration-closure changes across 23 entrypoints, acknowledgement digest709ebe1c. The closure delta consists of internal actor/type additions, private helper/type moves, and the optional incognito merger reader; no Gateway-context service method was changed from synchronous to asynchronous. This is not an empty SDK diff.vitest.database-worker-core-paths.mjs. Ordinary status/offline paths retain their existing local route.Focused replay files:
src/gateway/mcp-http.completion-lineage.test.ts,src/gateway/server-close.incognito-manager.test.ts,src/gateway/server-close.incognito-compute.test.ts,src/state/openclaw-agent-execution-incognito.sessions.test.ts,src/config/sessions/combined-store-gateway.worker.test.ts,src/agents/openclaw-tools.session-status.test.ts,src/agents/openclaw-tools.session-status.gateway-model.test.ts,src/agents/sessions/session-manager-model-context-snapshot.test.ts, andextensions/codex/session-history-worker-runtime.test.ts.The longer suites exercise real worker FIFO, retained storage owners, and actual Gateway close order; a pure mock would bypass those contracts. Most wall time is import/compiled-worker preparation on the loaded host. These timings describe the original publication candidate; landing verification follows below.
Failures were investigated rather than hidden: auxiliary test actors were closed per test to fix worker-capacity exhaustion in the original suite order; the status mock now covers the direct leaf selector; a malformed expected-path argument in the new completion test was corrected after the production fix passed its authority assertion. Callback contracts now explicitly declare
this: void; a shadowed local and an obsolete max-lines suppression were corrected. Those final lint repairs preserve the tested runtime behavior. No limits, timeouts, assertions, or baselines were weakened.The proof uses injected actors and isolated state. It establishes inactive composition, not the final atomic activation. Native host routes and the separate private-display consumers remain explicit activation work. No new SQL was found in this lane's actor-side grant checks: shared-state and agent admission consume in-memory generation/refusal facts; completion file-source checks use filesystem identity. Caller-supplied authority callbacks retain their existing contracts.
Landing verification
Main was merged without conflicts in
85bb55cb3818d, including the heartbeat lint repair.bbfbabd31fa04fixes two PR-caused failures from CI run 37394813906: related actor acquisition now retains fixed root authority instead of recursively including itself in mutable presentation checks; the complete set of live sources still guards synchronous consumption. The direct completion-root regression now has a dedicated host-owned actor fixture at the broker's two-worker floor, avoiding an extra ephemeral actor after the MCP suite fills the budget. The canonical ratchet also pruned exactly the retired status-tool max-lines entry. No assertions, capacity limits, timeouts, or production routing were weakened or activated.The row failure reproduced 5/5 on the integrated PR and passed 5/5 on the merge base; it also passed in inspected scheduled-main jobs 112009431938 and 112028952064. The capacity failure reproduced 5/5 with an eight-CPU fixture. The repaired row and relocated fixture each passed 5/5 replays. Native-wrapper wall totals were 500.57s for the five row runs and 332.14s for the five lineage runs; cold worker compilation accounts for most of the slow first runs. The original MCP suite passes all 14 tests under the same constraint, and its baseline passed 5/5 full-file replays. These commands used
node scripts/run-vitest.mjs <file> --maxWorkers=1, the underlyingpnpm testrunner. A separate Slack announcement-settlement timeout from the original CI run remains under isolated baseline/PR investigation; it is not being labeled inherited or flaky without evidence.Fresh independent Codex P2 review of the complete repaired candidate is scoped-clean, including the complete row-reader source. Post-integration runtime build-graph, PR wrapper inventory, and
get-reply, history-read, and transcript-reconcile import-closure tests passed. Knip passed, and Madge reported 0 cycles; the later repair adds no production import edges or module exports.node scripts/check-changed.mjs --base 2f1e555cc58fapassed on the repaired tree, including all selected production/test typechecks, lint, ratchets, export scans, and guards. It reports one existing max-lines warning in the unchangedserver-close.agent-databases.test.ts. The final-head SDK report (bbfbabd31fa04) has 0 added/removed entrypoints, 0 direct export changes, and 129 reachable declaration changes across 23 entrypoints (digest3b4046bd).Released-contract inspection covered v2026.9.8 and v2026.10.1-beta.1, including Gateway context reachability, SDK subpaths, and runtime session methods. The asynchronous status selector and moved scope helpers are internal; released synchronous selectors remain unchanged. The released context-reader callback and Promise signature are unchanged, so no compatibility adapter or deprecation record is required.
ClawSweeper's fresh review of
bbfbabd31fa04completed at 2026-10-06 01:24 UTC with no actionable code findings. Its data-model checklist was reviewed against source:session-accessor.entry.tsadds an internal binding-aware selector while preserving the synchronous resolver;session-status-session-resolve.tsprojects existing entries for display. Neither changes persisted fields, stored bytes, schema, migrations, durability, retention, or update behavior. This is an inactive composition with no stored-data migration to exercise. Its fresh review explicitly confirms that the previous migration-proof concern does not apply; the automated checklist still repeats that heuristic. The row-reader repair also overlaps the in-flight P7m work; its hunks preserve the current owner's behavior and remain scoped to this integration failure.Integration at
5aa0ba39cbe5dMerged main
98262d8b5fdafwithout rebasing or textual conflicts. This includes the landedsource-map-jsrepair (9c66e8f40532), session-authority B1 (#165370), native creation writes (#165819), and lifecycle-lock cancellation repair (#165898). No dependency change was authored in this PR. Two new internal callers on main still imported the moved scope classifiers from the runtime module; the post-integration typecheck identified them, and their imports now use the canonical request owner. Both sides' behavior is preserved and production acquisition remains host-owned/inactive.Fresh whole-candidate Codex P2 review is scoped-clean. Post-integration production and core test typechecking, Knip, and Madge (zero cycles) passed. The completed focused replay covers 185 tests / 22 files, including actor acquisition and lineage, actual Gateway shutdown, combined storage, status, context snapshots, SDK/Codex history, sandbox status, tool authority, wrapper inventory, build graph, and import closures. The resumed 19-file portion completed in 2084.65s; the earlier 3-file portion passed before the coordinator restart. Final-head SDK comparison passed with 0 added/removed entrypoints, 0 direct export changes, and 131 reachable declaration changes across 24 entrypoints (digest
759b9911dd90cc451fd05fdc6c60c2f285cb9a2552c63f505a360aa49355be6d). ClawSweeper completed on this exact head at 2026-10-06 06:28 UTC, with no actionable code findings; its technical assessment explicitly says the prior migration-proof concern does not apply.Current-head CI 37423200298 passed its security, production/test type, lint, and other executed checks except
checks-node-changed-4and the downstream aggregate. The remaining failure is the Slack announcement-settlement case intest/e2e/qa-lab/runtime/channel-progress-presentation.e2e.test.ts: the second task remains pending after model completion. The CI checkout was merge1acf2f6484e5491193d3102e5e00b8d4d61f6a70, with main parent20306571364c5b8df244fba15e88727b2b7c7a0e. Attribution is still under investigation with unchanged full-file main/candidate replays and CI-equivalent two-CPU affinity. Passing higher-capacity replays are not being treated as a fix or proof of inheritance.Prior candidate (
1b969e54984c1)Merged P7l from main
ca43d19197888in560f85d2f727b, preserving both binding helpers and both inactive documentation sections. Then merged main253b51435c85in1b969e54984c1, including the observer persistence fix from #165680. Background observer persistence now leaves the publishing turn's async admission context; the new owner regression proves that persistence queues after the publisher and joins disposal. The trajectory writer preserves both the extracted reader classifier and main's internal worker-backed Runtime admission. Production incognito remains inactive and host-owned. The new acquisition and synchronous-refusal entry points still have no production callers.The final independent Codex P2 review is scoped-clean. An earlier pass found a real summary-read cancellation gap: the consumer could receive rows after admission ended, before the outer promise rejected. The retained snapshot authority now checks that signal before consumption. A regression using the real actor/worker failed on the old guard at the disclosure assertion and passes with the fix. It lives in the existing actor-binding suite, preserving the line-cap budget without removing coverage or adding a fixture module.
Post-integration proof passed: 82 tests / 10 files covering the observer authority fix, trajectory writes, actual Gateway shutdown, incognito session composition, runtime build graph, and import closures. The cancellation repair additionally passed the complete 16-test actor-binding suite (30.81s Vitest duration), then the final receiver-bound regression passed alone (11.80s Vitest; 76.51s native wrapper). Production and all core test typecheck shards passed on the final tree. Full core/script lint and the remaining architecture/authorization guards passed; the two changed guard/test files passed targeted type-aware lint again. Madge reports 0 cycles, Knip passed, and the line-cap ratchet passed. No production import edge or released signature changed in the cancellation repair.
The full
check-changedinvocation at the P7l integration remains failed, solely at an inherited dead-export scan:OUTBOUND_GREETING_FALLBACK_MSinextensions/voice-call/src/webhook/realtime-call-session-control.ts. Scheduled main job 112162743824 fails on that same export. Its blob is identical on the tested main baseline, main253b51435c85, and this candidate (a0501c5ae0d7e9f35c60dcf899072e7ebd9b7266), and this PR does not touch the file. Every later planned check was run separately and passed; this is not a claim that the complete command passed.The earlier Slack settlement timeout did not reproduce in five full-file runs on main
20306571or in a paired full-file replay of that main and exact failed CI merge1acf2f64: each paired run passed 16/16 tests under two-CPU affinity. The Slack case took 81.446s on main and 83.382s on the candidate. The VM had 16 GB rather than CI's 8 GB, so this does not prove a fix or inherited failure. The candidate then integrated the newly landed observer ownership repair. No unchanged CI rerun was requested.Final-head CI 37441307139 tested merge
4a36af0e93f51296b849b4868d2655c80d3a634d, with ordered parents main7f483b7a23a9and this head1b969e54984c1. The complete Slack presentation file passed 16/16 in job 112196049852, 414.97s on 2 CPUs / 8 GB; the previously failing case passed in 89.847s. This supplies the required final-head flow proof. The redundant queued Testbox was stopped before it executed any product command. The earlier timeout remains nonreproduced; a passing replay is not being presented as proof of its cause.The only failed CI roots are production types and core test type stripe 1, plus their downstream aggregate. Both report the same TS18004 at
src/cli/gateway-cli/run-loop-shutdown-completion.test-support.ts:54:gatewayLoghas no value in scope. Main's #166012 (607d5ee583c00) removed that parameter binding while retaining the shorthand argument. The fixture has identical blob563bb2cc97b9b8ae8e17462b832154f4eb55c29ein the CI main parent, tested merge, main9ad97b209d6e, and the subsequently captured mainf997ec3775567. This PR does not change it. Independent execution of both the production tsgo project and the exactcore-test-config-cligraph on main9ad97b209d6ereproduces that diagnostic. All other selected CI jobs passed; zero jobs were cancelled. This inherited-failure qualification was prepared, but no merge request was submitted. Main subsequently fixed this error in7b9405e22d7b0; the current candidate integrates that fix instead of using the exception.ClawSweeper completed its review of this exact head at 2026-10-06 09:19 UTC, with no actionable code findings and sufficient real-worker proof. Its technical review again confirms that no stored-data contract changed and that the migration-proof concern does not apply. The final-head SDK comparison completed locally: 0 entrypoints added/removed, 0 direct export changes, 131 reachable declaration changes across 24 entrypoints. Acknowledgement digest:
83468345(full digest8346834571de5f46768c7c42654c14faa182b2138feee38ef3c220927175077f). This is not an empty SDK diff; the released synchronous methods and callback contracts remain intact.Prior integration (
77a3c37e0c01e)Merged current main
67ec6071cb6fewithout rebasing or textual conflicts, including thegatewayLogfixture repair7b9405e22d7b0. A fresh independent Codex P2 review of the integrated candidate is scoped-clean. Read-only integration audit confirms production remains inactive and host-owned: acquisition/refusal helpers have no new production callers, native incognito exclusion remains, and the summary cancellation guard is preserved.The concurrent-creation entry admission/read changes from main preserve the explicit actor branches. Main's transcript SDK updates and their compatibility record/type test are unchanged from main; the released synchronous callback remains available. No dependency changes were authored here. Post-integration focused suites passed 138 tests / 9 files (summed Vitest project durations 928.91s, excluding shared preparation). Production and every selected core test typecheck shard passed. Knip passed and Madge reported 0 cycles. The final SDK report completed locally with 0 entrypoints added/removed, 0 direct declaration changes, 131 reachable exports across 24 entrypoints; digest
dff4275e2bfdbf6850c17957cbce1119c3ec6affbe8f5c998664e3167067592f. Independent declaration comparison confirms the same 12 unique internal deltas and no new released-contract obligation. Remaining lint/architecture checks and CI failure classification are still in progress.Current landing candidate (
752ebb4c4314f)Merged main
e62b6f87bfcba, including P7m (#165890), without rebase or textual conflicts. The shared actor/binding integration retains both P7k acquisition/cancellation guards and P7m history/compute callbacks. Production acquisition stays inactive and host-owned. The integrated tree includes the voice-call unused-export repair. No dependency change was authored in this PR. Later overlap with #166085 removes descriptive comments only; its relevant delta was inspected and leaves executable statements, signatures, and admission behavior unchanged.Fresh independent Codex P2 review is scoped-clean. The combined focused replay passed 127 tests / 9 files, using
node scripts/run-vitest.mjs <files> --maxWorkers=1, in 985.73s including shared worker preparation and cleanup. It covers acquisition, session composition, history, Memory, compute, actual Gateway close, runtime build graph, and import closure. Madge passed with 0 cycles, andpnpm deadcode:knippassed. All selected production and core test typecheck lanes passed after this integration.The final SDK comparison completed locally for this exact head against
e62b6f87bfcba: 0 entrypoints added/removed, 0 direct declaration changes, 131 reachable exports across 24 entrypoints. Acknowledgement digest:f7fed0cf(fullf7fed0cf9ab6e94cb5d4174390b1d1e806067fe52d3b10728868a05fd98a5f46). Independent comparison confirms that P7m's optional compute callback and history binding are identical on both sides; the released synchronous contracts remain intact, with no new compatibility obligation.The full
check-changedcommand passed its preceding guards and types, then stopped at the untouchedsrc/agents/model-catalog.runtime.tsre-export ofloadManifestModelCatalog. Main removed it inece9d9cbce947(#166077). The PR's file is identical to its base, and an explicit prospective-merge check against main78e8de276bd2retains the main repair exactly (blob48bb8e2a2c2790e1643e5ca81133f6bb026dbf2d). No passing full-command result is claimed. All ten remaining planned lint, schema, architecture, and authorization checks passed separately.Current-head CI 37454999910, attempt 1, tested merge
fcfa2dbdf6fd2df5e6818b59b95f8dc0cbbf46c6with ordered parents mainb2fab204731eand this head. Its tree was independently reconstructed. The complete 123-job inventory has exactly two failed Node jobs and their downstream gate, with zero cancelled CI jobs; all other selected families passed.WebChat startup recovery fails in
sendQueuedTurn:323withagent.wait,CLIENT_TIMEOUT, and a 30000ms deadline. Scheduled main job 112226285417 atdea0ebb68779chas that exact failure. Twenty relevant test, request, admission, and client inputs are byte-identical across the CI baseline, tested merge, failing main, and captured main78e8de276bd2.RPC restart ownership has the same pre-close 120s test timeout and 180s cleanup timeout independently observed in main job 112226285349. This run additionally enters a closing-resource retry loop, logs 977,828 refusals, and ends in V8 heap exhaustion,
SIGABRT, and an unhandled worker error. Those diagnostics remain explicitly included. Forty-two boundary, drain, resource-close, runner, dependency, and workflow inputs are unchanged across the four revisions. The drain retains failed items and reschedules them while fast-test mode skips debounce, explaining the downstream escalation after teardown. The historical main log proves the primary timeouts, not an identical OOM; no heap profile or precise suspended await is claimed. Both jobs used 8 CPUs / 32 GB and an 8192 MB Node heap. The ordinary durable RPC flow cannot select the added incognito binding.The complete inherited-failure evidence includes both roots, the aggregate, actual checkout composition, source identities, passing scoped checks, and hashed logs. Landing uses the explicitly authorized native admin route. No failing test, deadline, heap limit, or assertion was weakened, and no product CI job was rerun. Earlier local WebChat probes hit different overall deadlines; their five-run comparison remained incomplete. The redundant Testbox preparation was stopped before any product test ran after matching main CI became available, and the lease is verified stopped.
ClawSweeper completed on this exact head at 2026-10-06 11:19 UTC, with no actionable findings. Its technical assessment confirms that no stored-data contract changed; the repeated migration checklist heuristic does not apply. The completed integration and SDK receipts above address its remaining evidence request.
Native routes the atomic activation must delete (P7k deletion sizing)
Estimates cover 690–855 production lines, excluding replacement code and other lanes. These anchors describe the original
4863c5b66d793prerequisite and need refreshing during activation after the integrated main changes. Preserve worker-local memory bootstrap/schema/temp-store/lifecycle kernels, durable SDK/offline paths, detached managers, the generic merger, and transaction-local authoritative reads.src/state/openclaw-agent-db.ts:249,752;src/state/openclaw-agent-db-readonly.ts:86;src/state/openclaw-agent-db-lifecycle.ts:715,726,736src/config/sessions/session-entry-read-runtime.ts:111,226,326;session-entry-current-runtime.ts:59;session-accessor.sqlite-entry-admission.ts:179;session-entry-read-request.ts:52src/config/sessions/session-accessor.entry.ts:185,278,401,655src/config/sessions/combined-store-gateway.ts:199,288,303,385;combined-store-gateway-read.ts:42,55,99,133src/config/sessions/session-placement-evidence.ts:106,117,122,148,289src/gateway/session-sharing-preparation.ts:364;src/config/sessions/session-delivery-generation.ts:221;src/gateway/presence-projection.ts:36;src/gateway/tool-resolution-completion.ts:146src/config/sessions/session-accessor.sqlite-incognito-sharing.ts:1;session-accessor.sqlite-entry-cache-publication.ts:47,291,307,323,332,362,394,417,420;session-accessor.sqlite-owner.ts:48,132src/agents/sessions/session-manager-append.ts:74;session-manager-metadata.ts:27;session-manager-entries.ts:202;session-manager-suffix-persistence.ts:60;session-manager-persistence.ts:449;session-manager-branching.ts:175,286;session-manager.ts:211,228src/agents/sessions/session-manager-write-admission.ts:222,260,275src/agents/sessions/session-manager-incognito.ts:161,207,243,251src/agents/sessions/session-manager-incognito-scope.ts:95;src/plugin-sdk/codex-session-transcript-runtime.ts:95;extensions/codex/session-history-worker-runtime.ts:123The DB-keyed facts module can disappear only after the private-display lane removes its consumers. Do not delete the entire memory bootstrap.