Repository navigation
refactor(sessions): activate memory-only incognito ownership - #170712
Merged
Merged
Conversation
# 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
This was referenced Oct 19, 2026
This was referenced Oct 19, 2026
scribe-dandelion-cult
added a commit
to karmaterminal/openclaw
that referenced
this pull request
Oct 20, 2026
…ump merge One merge from the step-72 lane tip (8c4f725, upstream d0dbb62) to upstream main f20c3c7 (BRIEF addendum 2026-10-20 17:25Z). 170 conflicted files (166 content, 3 modify/delete, 1 add/add), resolved in eight parallel slices (agents/subagents, agents other, auto-reply x2, infra, gateway, config/sessions, rest) plus the lead's src/state, schema, generated and baseline files. Rules per hunk: keep continuation behaviour, adopt upstream everywhere else, port upstream changes into the fork's split-out helpers, honour the Gate 2.7 reviewer ledgers. Agent schema: upstream went 26 -> 31 (27 outbox sequence, 28 write layout, 29 index retirement, 30 trajectory storage, 31 memory revision; version constant now in openclaw-schema-versions.ts). Continuation's recipient authority, the lane's unreleased v27, is v32 on top of 31. The fleet's schemas 25 and 26 (03de0ce runs agent 26 with the authority table) are still recognised by shape: they run upstream's 26..31 steps, then the idempotent authority step. The fleet-26 migration schema is anchored on upstream's historical 26 plus the authority table, no longer on the authority version. The lane's unreleased 27 is not recognised (upstream's 27 is the outbox sequence): such dev databases are refused, not migrated (named in agent-schema-history.md). Witness accepts 24..32. PostgreSQL: recipient authority is SQLite-only; v32 is a version-only PG step and the port descriptor accepts sources 27..31. Structural ports onto upstream owners: - shared state worker: upstream retired the eager dispatcher (openclaw#174420); continuation custody registers as the `continuationCustody` registry domain with typed per-command handlers; schema ensurer moved to createSqliteSchemaEnsurer + getOpenClawStateFeatureSchemaSql, run inside the write transaction; custody kernels take EngineConnection. - session controller (openclaw#175837): continuation admission, election and idle waits use isSessionRunActiveForKey / resolveActiveSessionRunId / waitForSessionRunIdle; the folded provenance note uses steerSessionControllerOperation with waitForTranscriptCommit; session lanes are gone, so a subagent's continuation turn takes the subagent lane. - incognito became memory-only (openclaw#170712): the fork's incognito branches in owner assignment and sharing follow upstream; recipient-authority capture is still refused for incognito sessions. - openclaw#169714 (prepared runtime config): fork suites publish config per suite as upstream's do; announce's continuation owner loader carries the run's config. - deleted, fully carried by upstream replacements: core-tool-factory- descriptors.ts (tool-catalog.ts), status.command-report-data.ts (status.command-report.ts), openclaw-state-worker-runtime.ts (registry); unused fork leftovers subagent-announce-reply.ts and the nested-matrix test-support. - line-cap extractions of upstream code: openclaw-tools.pdf-tool.ts, subagent-registry-kill-confirmation.ts, agent-runner-recovery-read.ts, session-event-wake.merge.ts, user-turn-transcript.metadata.ts helpers. Generated: worker inventory and config baseline regenerated; plugin SDK surface measured on this tree: 3821 exports / 2212 callable (upstream 3810 / 2208, +11 / +4 continuation). Mock-factory baseline pruned to the exact tree (9854 -> 8014; no entry outside either parent). Proof on this tree: tsgo core 0, extensions 0, scripts 0, ui 0. Not yet run (follow-up commits): test-shard typecheck, pnpm build, lint/line-cap and the other static gates, Gate 2.7/2.5, tests. Known follow-ups: witness line cap, system-events test shadowing, the restart-sentinel continuation-delivery harness and the incognito-actor authority test ports, ledger MANUAL rows marked ABSORB-8083-LEAD. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
scribe-dandelion-cult
added a commit
to karmaterminal/openclaw
that referenced
this pull request
Oct 20, 2026
…fecycle suites - session-recipient-authority.incognito-actor: upstream made incognito sessions memory-only actor owned (openclaw#170712) and deleted the old actor modules. The suite now creates and writes incognito sessions through the memory owner (acquireSessionActorStorage + commitMemory, bound with runWithSessionActorStorage) and keeps every invariant: capture through the collaboration path is refused with the dedicated-owner message; capture while the binding is active is refused (and never creates the native store); a native epoch for the key is not current; a narrowing visibility patch through the memory writer does not run afterPersistInTransaction and leaves authority non-current. Ownership is now decided by the incognito key, so the old "native capture before any actor exists" step has no equivalent: the suite seeds the epoch row directly and checks a durable control key is current while the incognito key is not. - session-history-budget-owner: `typescript/unstable/ast` became `typescript/ast` with the TypeScript update, as upstream imports it. - session-utils.queued-collector-rollback-custody: openclaw#177787 removed killSubagentRunAdmin / control.preparePublication and openclaw#175837 context.chatAbortControllers; the Stop is now held right after its committed kill write (spy on markSubagentRunTerminated), still inside the retirement publication the collector waits on. Assertions unchanged; the failure case fails the Stop after that write. - session-delivery-queue.storage-lifecycle: upstream openclaw#174696 removed suppressTextDelivery from SessionDeliveryAgentRunUpdate and deleted the same two lines from its own copy of this case; this fork split does the same. Proof on this tree (run-vitest, 3 shards): storage-lifecycle 7/7, incognito-actor 2/2, history-budget-owner 13/13, rollback-custody 2/2. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
scribe-dandelion-cult
added a commit
to karmaterminal/openclaw
that referenced
this pull request
Oct 21, 2026
"keeps process-held incognito authority with its native owner" (fork 3f85769) asserted that an incognito session captures recipient authority through a native in-process owner. Upstream openclaw#170712 (3de654b) made incognito sessions memory-only and deleted that native owner, and the fork's collaboration capture now refuses memory-owned sessions. The replacement rule is pinned by session-recipient-authority.incognito-actor (ported in f486a29, 2/2). The other decision cases are unchanged (4/4). Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 21, 2026
This was referenced Oct 24, 2026
amittell
added a commit
to amittell/openclaw
that referenced
this pull request
Oct 28, 2026
…visibility, tests, baselines, fixtures - cron: beta.4 moved createCronPromptExecutor into run-prompt-executor.ts; the fork's fallback attribution (requested tuple, usedFallback) and its "do not pin a fallback model to the session" rule move there. run-executor.ts is beta.4's. - chat-history compaction span (fork): openclaw#170712 deleted the host's session-history-subagent-projection; durable spans now prepare their subagent facts through the history worker's inline-visibility lookups (chat-history-compaction-span-visibility.ts) and fail closed on a missing fact. - tests beta.4 removed as low-value (openclaw#172040 and siblings) stay removed in run-session-state, agent-runner-failure-reply, mattermost monitor-ingress and gateway-request-scope; the fork's own cases stay. dispatch-from-config.ingress-retry is beta.4's file plus the fork's appended "re-presented inbound" block. - baselines by merge-base arithmetic: assertion-safety keeps only src/infra/diagnostic-events.ts 2 in the four conflicted rows (the fork's SAFETY comments clear compaction-safeguard, oauth, persisted and helpers); plugin-sdk surface budgets 3760+3 and 2195+3 for the fork's three diagnostics-otel redaction exports. - prompt-snapshot fixtures: beta.4's, to be regenerated by the snapshot tests once the tree builds.
This was referenced Oct 28, 2026
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the atomic ownership cutover in #169363 after the independent fixture repairs in #170667 (merged as
c6546e217ed5aff7fe3b8e553075b84e4111878b). 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:
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, candidatef0b7763478e3bf3189727ee95528e4c1523f3a31. 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.Per-operation attribution over warmed turns (statements / requests):
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.34 s versus 5.26 s. 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.dismissUNAVAILABLE 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.
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
readSessionTranscriptCorpusInWorkerdeliberately performs this read before corpus discovery; its durable branch is unchanged. The additional pre-input reads all followcache.write.inline/source.replace.inlinecommits 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.
Split, review, and size
The independent fixture repairs landed in #170667 (
c6546e217ed5aff7fe3b8e553075b84e4111878b) after CI 38350649661 passed. Remaining acquisition, transcript reads/writes, execution, and close must transfer together: deleting native ownership first breaks callers; activating memory while native remains an active writer violates single ownership.Two Codex review rounds completed. Missing pre-creation manager visibility and the live-source check before destructive compaction were fixed with negative controls. The null-lifecycle concern was declined because null means an absent lifecycle; session identity, non-null lifecycle and writer checks remain. Later CI and conflict repairs were source-reviewed, not represented as part of those automated rounds. P2 follow-ups after the two-round limit concern surfacing a listener/projection publication failure after memory state has already committed, without retrying the write: ACP, reactions, message-tool outcomes, outbox, trajectory, heartbeat, conversation delivery, progress cards, usage rollups, and Boards. These remain explicit follow-ups under the review-round limit; the committed state and effect authority checks remain intact.
Completed CI evidence head
c0fb66ec68e7623b2cffb8c1c96b3ddb313ad281integrates main3e5eff31690aefaaa95d9cb2d688db5ff2c025aa: 890 files, +30,561 / −63,910 lines (net −33,349). No native-incognito path is restored. Changed-file oxfmt, focused syntax oxlint, and whitespace checks pass for the 25 resolved files and two related membership-guard updates. Required proof below is labeled by the head that actually executed it.Completed CI and static evidence
CI 38431370576 completed on
c0fb66ec68e7623b2cffb8c1c96b3ddb313ad281: 123 passed, 22 skipped, and three failed jobs. All selected static jobs passed. The only test failures are the native workspace-discovery case in job115417211113 and two OpenAI realtime credential-custody cases in job115417203911; both have exact main/baseline receipts below. The third red is their aggregateopenclaw/ci-gate. Its job-name classifier reports unknown because current main uses different shard names; the test-level evidence resolves that classification. Knip and the SDK comparison were not selected by this CI plan and remain separate proof. GitHub became conflicting while this run completed; the final conflict-only integration will preserve this evidence under the explicit prior-CI landing exception.The predecessor CI 38380461797, head
b6b29690b9d047d4c9ec2032217fdd22ae35b43b, completed all191 jobs. Production types, lint, architecture/boundary/source guards, build artifacts, all seven UI E2E jobs, and T1/dialect ratchets passed. Its remaining failures are individually accounted for below; it is not labeled clean evidence for a later head.c0fb66ec; the job explicitly enabled and executed the Madge checkpnpm deadcode:dependencieson99ecffc8completes in287.17 s with only exact inherited findings: unlisted@solidjs/webandsolid-jsinscripts/bundle-a2ui.mts, and unusedreadPluginMetadataStateRowsInDatabaseinsrc/plugins/installed-plugin-index-row.ts. Same findings in scheduled-main38432046450/job115417046598, headbdb31e995c792c6d99f3a0dbf64ea9d867191173. The production-phase failure short-circuits the all-exports phase in both runs; no all-exports pass is claimed.9b041a9e→99ecffc8completed with immutable source/dependency fingerprints: no added/removed entrypoints or exports; 237 reachable-type closure changes and two structurally identical property-order signature differences. Baseline render 2005.47 s, candidate 1098.60 s, comparison 0.72 s. Acknowledgment digest9e5aaac3ed5585693c11d8935bd691860644efb9c011a8311209351345100158. Later main/conflict-only integration reuses this evidence.2372fb1bd79201c3aa0c1b56ae766fec343cef46; tooling headfada6e0812ce163dfc39d4ca19dacf0acc3a4c1b. Reused for later fixture/conflict-only integrations under the authorized rules; no later-head execution impliedgateway-usage-memory-apis.e2e.test.ts,1/1 case,18.048 s; measured isolated CLI lifecycle described aboveThe standalone inventory regeneration was stopped under host contention; its generated document remains main's snapshot. Source-derived CI ratchets above are the executed evidence. No third review, second SQL pair, or repeated package dispatch is requested.
Failure diagnosis and fixes
7fbd58bc3ad8), compiled-worker registration. Seven requested item-limit, field-limit, bounded native evidence and oversized mirrored-frame cases pass on integratedcc446cc726a53432c71b10577f7118d36acfa4d7, durable and incognito variants;37 skipped, exit0. Vitest 1311.87 s (86% transform), wrapper 1513.87 s including585.341 s worker preparation. Delayed fork teardown recovered without timeout changes or retry. No rerun592b7e4aea9386e05912e6df2d3ba5493e629aaareproduces missing-email andToken expirederrors with the same pinned client and raised diagnostic budgets. Candidate's original timeout stopped before the assertion. Diagnostic fixtures restored0813ec09and mainfcb89a331a1f59eedde59c4b3a338febdb199cb7both fail REQUIRED-NATIVE-0-A before inference withRemote workspace skill discovery failed, preceded by pairing-change errors. Case148.633 s/140.185 s; runner355.18 s/297.12 s. Evidence headc0fb66ecrepeats this exact pre-inference error in CI job115417211113,25.745 s case/35.29 s runner. Historical receipt cancellation is a different signature; native startup remains with its owner0813ec09after main fixture repair989e66ac6a354:1 passed/19 skipped, case 12.158 s, wrapper 264.08 s. Historical hour shard ran Telegram after Codex isolated-completion passed, not history. This is repaired-fixture evidence, not attribution of the old timeout3848ef684b3e3: main's new batch helper called removed native classifiers. It now uses actor capture as the single-entry helper does. Focused missing/live/closed memory and durable export:3 passed/7 skipped, Vitest 774.06 s/wall 904.00 s. Fix also resolves the dependent type/declaration/boundary failurestranscript.withOwnedTranscriptWrite, matching production attempt authority. Terminal settlement and active/detached ordinary-write rejection assertions remain. Focused1 passed/39 skipped on2372fb1bd7920, Vitest 327.46 s/wrapper 680.11 s; same-head CI passes all40 casesdf90bc7bb5c62: mutation moved from unused repository identity resolution to awaited registry listing after memory capture. Unchanged, unrelated-visibility, and contributing-visibility cases pass ond99d9626259f8:3 passed/5 skipped, Vitest 261.23 s/wall 328.54 sd99d9626259f8: remove obsoletehasUsage/hasBillingfields after main made billing derive from actual usage. All lost-update, token/cost, final-custody and zero-SQLite assertions remain. All production and test type jobs on evidence headc0fb66ecpass67dde3984e17d: main #170820 (b957f1a…) records terminal errors as run notices. Assert each notice's exact safe summary and first run ID separately from successful assistant output; retryable completion still requires zero notices. All four cases pass on evidence headc0fb66ecin CI job115417211113,150.17 s runner394be69a4d068db353c837c3590a13df0efae329prepares directory facts before fake timers, excluding the process-owned30 s observer from refresh timer accounting. Included here; no timer assertion failed in completed CI 38431370576. Exact per-case logs were not extracted3fce262259acad2c9e1e063c78706e416a9cf306isolates discovery from the process-owned directory observer. Included here; no timer assertion failed in completed CI 38431370576. Exact per-case logs were not extractedRefresh's five cases and inference's concurrency case passed earlier on both baseline
92063ce6c86fadc5aa87f7bac8b7483627ad0db0and candidated99d9626259f8fa0b9e2b5fabc2403fbc9c7ebab. These replays do not establish the timer failures' cause or inheritance. The current head includes the upstream fixes and retains bounded callback/type/delay diagnostics if they recur. No production timeout changed.Other executed focused evidence: orphan recovery4 passed/32 skipped (Vitest 444.90 s/wall 494.02 s); active reclamation observation now follows the actual close join, with all17 cases passing in CI 38373550479/job 115218590523; title-recovery fixture matches main's pre-dispatch background naming, all eight cases passing in job 115218591131; main's reload clock repair passes all four cases in job 115218591292.
Local limitations remain explicit. Title-recovery timed out locally on
2372fb1bd7920while exact-same-head CI passed all eight cases; this is not presented as a root-cause repair. The question-refresh attempt was stopped during CPU-active collection without a selected case result (exit143/wall 437.56 s); main's clock repair7a5529f4c9640is integrated, and CI owns confirmation. No latency claim comes from this loaded host.Exact inherited-failure receipts
27aef9ac6a0231b9fa494905a79361b30097fe67: identicalAuth profile credential writes require an admitted worker,credential-write-custody.ts:72 → sqlite.ts:485 → store.ts:1710 → video-generation-provider.test.ts:160. Two failed/five skipped, Vitest 632.11 s/wrapper 703.07 s; total1331.07 s including600 s slot wait. Test unchanged by cutover.a959e70b417b1f933556c102db452b1d08e96a1breproduces child statusnull atrunDoctor:45, caller439 (one failed/two skipped; case 71.173 s/Vitest 263.59 s). Source-SHA guard, matching metadata/build-info and three artifact hashes verified; baseline is an ancestor. Full runtime-byte manifest unavailable; child's stalled phase unknown,60 s timeout inferred because signal/error were omitted. Existing red-main owner continues diagnosis. Phase E's missing-ACP-artifact baseline attempt is excluded.chat.send completed before its authorization read was heldat lines310/307 matches scheduled main38371740449/job 115210402594; file unchanged by this PR.Conflict integration
Final integration head
f1151754b82b24b94ce8b665f9c37dce83f82e0dmerges maine52278fc9831b85e35a609d404a95880819b0d82into completed CI evidence headc0fb66ec68e7623b2cffb8c1c96b3ddb313ad281. The delta consists only of main and conflict resolution. Final diff against that main: 891 files, +30,608 / −63,910 lines (net −33,302).The integrations resolved these files and one related extraction:
src/config/sessions/session-accessor.reset.ts: keep main's deferred durable maintenance; memory commits skip the SQLite maintenance kick and retain lifecycle-reset conflict handling.src/config/sessions/session-actor.test.ts: keep memory acquisition and main's native-publication reconciliation cases.src/gateway/server-runtime-subscriptions.ts: preserve main's terminal-outcome import, recovery custody, and detached transcript publication.src/infra/session-cost-usage-worker.ts: preserve main's extracted collection helper and receipt-covered usage cache; remove native-memory host branches.src/infra/session-cost-usage-cache.kernel.ts: preserve write-scope publication around rollup pruning; delete the retired native-incognito partition exception.src/infra/session-cost-usage-refresh-inputs.worker.ts: carry the same native-owner deletion into main's newly extracted helper while preserving bounded receipt-covered stats and rollup reuse.src/agents/main-session-recovery/main-session-restart-dispatch.ts: keep the captured memory reader and main’s session-ID/lifecycle-revision predicate, shared interrupted-run helper, and completion-source assertion.src/gateway/server-methods/sessions-archive.incognito.test.ts: retain memory fixtures with main’sinitialTargetsnapshot and awaited archive release.test/e2e/qa-lab/runtime/gateway-codex-refusal-product-proof.e2e.test.ts: retain the existing typed notice and run-ID assertions; resolution is byte-identical to the candidate file already passing all four cases in the completed CI evidence.src/agents/sessions/session-manager-write-admission.ts: preserve operation-scoped memory acquisition/release and terminal binding restoration while adopting main’s per-manager FIFO, durable writer labels, and release between actor appends.src/config/sessions/session-transcript-hydration.ts: preserve the early memory reader and durable-only cohort contract; add main’shistory.hydrationadmission label.src/agents/subagents/spawn/subagent-spawn-session-patch.ts,subagent-spawn.incognito.test.ts, andsubagent-spawn.memory.test.ts: retain memory acquisition/isolation and the current skill effect guard while adopting main refactor(subagents): reduce spawn and completion database overhead #171137’s captured-parent row reuse; fixtures supply committed memory rows.src/gateway/server-methods/chat-send-handler.tsand its extractedchat-send-input-dispatch.ts: retain memory storage ownership and port main fix(gateway): attribute slow chat admission and persistence waits #171250’s six timing scope/finish lines into the extracted dispatch owner. Related admission/setup/timing-test auto-merges preserve both changes.Changed-file oxfmt, oxlint and
git diff --checkpass. The nine-file filtered conflict proof passes on18f38aec: 24 selected cases, 245 unselected cases skipped, wrapper wall 550.75 s. Knip and SDK results are recorded above. The manager/hydration, spawn, and chat diagnostics resolutions pass onf1151754: fourteen selected cases across six files, fifty unselected cases skipped, no missing filter matches, exit0, wrapper wall251.64 s (worker preparation45.459 s). All source readers and the proof slot are released. The earlier six-case invocation never acquired a CPU slot or read source and was stopped before integration; no completed cases were repeated. Under the explicit operator prior-CI exception, later conflict-only integration reuses the completed, inherited-only run above; this does not label the final head's CI green.The latest integration retains main's membership authority and publication/release ordering, companion projection reads, actual generated-media delivery evidence, conversation resume observation and clean-close seals with the memory-only path. The membership writer guard removes only the retired native-incognito forwarding exception. The prior
session-turn.tsresolution retains main's prepared expectations, optional hot snapshot and transaction preimage alongside memory reads and initial-input phase selection.Resolved files in the completed CI evidence head
docs/reference/database-schemas/worker-access.mdsrc/agents/command/post-run.tssrc/agents/main-session-recovery/main-session-restart-recovery-marking.test.tssrc/config/sessions/cleanup-service.readonly.test.tssrc/config/sessions/conversation-registry.memory.test.tssrc/config/sessions/session-accessor.entry-mutation.tssrc/config/sessions/session-accessor.sqlite-deletion-receipts.test.tssrc/config/sessions/session-actor-memory-collaboration.test.tssrc/config/sessions/session-sharing-store.test.tssrc/config/sessions/session-sharing-store.tssrc/gateway/server-methods/session-metadata.admission.test.tssrc/gateway/server-methods/sessions-rewind.storage.test.tssrc/gateway/server-methods/sessions-sharing.identities.test.tssrc/gateway/server-methods/skills-library.tssrc/gateway/session-companion-rpc.test.tssrc/gateway/session-companion-rpc.tssrc/gateway/session-sharing-policy.tssrc/gateway/session-sharing-preparation.test.tssrc/gateway/session-sharing-preparation.tssrc/gateway/session-sharing-worker-grant.tssrc/gateway/session-sharing.memory.test.tssrc/gateway/tools-invoke-authorization.test.tssrc/gateway/tools-invoke-shared.tssrc/state/openclaw-agent-db-close.tssrc/state/openclaw-agent-db.ts