Repository navigation
feat(sessions): add inactive session actor and scoped receipts - #168602
Merged
Merged
Conversation
…odules Merge current main while preserving shared physical admission, cancellation, reader validation birthtime, and live deletion authority. Split worker usage, pool construction, failure settlement, and schema owner types to keep the existing line caps.
Checkpoint the single-owner cutover, cache invalidation regressions, and request-owned read transactions. Keep explicit migration verification. Paired measurement and final validation are still in progress.
Route retained existing-state writer coverage through the host-owned worker project, preserve first-admission incompatibility refusal, and match the final deletion-authority contract. Keep the gateway test under its inherited line count by moving existing pure fixture helpers. Regenerate assertion allowances without adding production assertions.
Include the thirteen transitive admission modules required by the native wrapper import-closure proof. Carry the existing birthtime through the worker validation fixture to preserve its physical-file identity.
Merge current main and preserve its optional settlement-only receipt delivery through the extracted owner. Keep the worker refusal error with the leaf contract to stay within the existing admission line cap. End the marker-free read-only fixture transaction normally; dedicated rollback and explicit revocation coverage remains unchanged.
Preserve snapshot-local reuse without freshness queries, publish dedicated archive writes, and remove Workboard polling. Retain native authority and settlement boundaries. Checkpoint reviewed corrections and focused regression repairs; final integrated proof remains in progress.
Define inactive typed durable phases, versioned hot snapshots, complete commit receipts, pure bookkeeping reducers, and unknown-outcome fencing. Share lifetime and settlement vocabulary with the existing incognito actor without changing routing or persistence.
This was referenced Oct 11, 2026
This was referenced Oct 11, 2026
This was referenced Oct 12, 2026
This was referenced Oct 19, 2026
wheakerd
pushed a commit
to wheakerd/clawdbot
that referenced
this pull request
Oct 22, 2026
… writer (openclaw#170077) Backport note: production change only; the main regression test depends on the session actor owner (openclaw#168602), which is not on this release line. (cherry picked from commit 6b2bfd1) (cherry picked from commit 26c1509) Co-authored-by: RomneyDa <[email protected]>
This was referenced Oct 26, 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.
Related: #168316 (stacked parent)
What Problem This Solves
Chat turns repeatedly read and update the same session state through separate database requests.
User Impact
There is no intended user-visible change: this PR supplies an inactive session actor for later input, transcript, and delivery cutovers, with no production caller switched. A supporting SQL-classification fix also avoids false invalidation in existing readers. Storage format, durability, retention, permissions, and released SDK contracts are preserved.
Why This Change Was Made
The existing writer owns each actor by captured physical database identity and session key. Phase commands reuse its synchronous transaction kernels and held preimages; cold commands hydrate inside that transaction. Retained handles cover accepted descendants until actual drain, while FIFO is held only for synchronous work. Durable and worker-backed incognito targets delegate to their current workers. Contract update 2: native incognito: actor declines; existing owner until P12. Acquisition returns
not-actor-ownedbefore constructing an actor. Accepted edge case: native incognito sessions get no actor savings until Phase E/P12 moves incognito onto the actor as its memory-only backend. Follow-on B3 #168539 and B4 #168592 must honor the decline.Exact receipts capture complete postimages, adopted IDs/parents, custody, and reducer results before fallible publication. MAIN installs them before acknowledgement. Known commits stay known after publication failure; unknown outcomes fence and reconcile without replay. Live authority remains checked at effects. Session-scoped receipts preserve unrelated snapshots while related windows and aliases invalidate together; explicit broad events still fence all affected keys.
The persistence interface contains typed commands, explicit version/domain predicates, and complete postimages; native database handles and SQL dialect operations remain within the storage adapters. The actor's write path uses in-process receipt counters and bypasses the legacy TEMP generation read. This does not claim removal of legacy callers' reads before their cutovers.
Following “Choose good compromises,” the replica no longer clones and validates command IDs, phases, and before/after versions a second time, or repeats freshness checks around synchronous cloning. It trusts the existing command owner and keeps one freshness check before installation. This removes 33 production lines and 17 test lines. Accepted edge: the private replica does not independently reject a fabricated receipt after the owner has already validated it. Generic unknown-outcome replay remains disabled because additive usage reducers lack durable deduplication; no new retry ledger or recovery protocol is added.
Commands accept an optional expected version and return an authorized stale-version postimage on mismatch, so callers can retry once without a separate read request. Native admission callbacks cannot mutate the preimage. Shared SQL helpers preserve one mutation implementation, and the worker transport no longer imports host configuration capture. Inactive API roots remain explicitly audited until the cutovers make them reachable.
Final comparison base:
1d4f42e8f3852c8804da09edf2e81ed848762d78ondbasync/w11entrycache. Five real conflicts required one parent integration, preserving its steer-only rewrites, empty-cleanup skip, expanded incognito facts, and admission lifetime fixes. Parent savings are not credited to this PR.Evidence
Statement and request measurements
Passed: 14 complete alternating baseline/candidate pairs, stopped at the first duration-valid series. Warmed all-thread statements are 678.1 → 672.5, DB requests 148.05 → 145.05, and logical requests 171.25 → 168.10 per turn. The first-turn increase is 1.5 statements (+0.0713%), with fewer requests and attributed existing work. The additional whole-workload check is lower by 48 statements and 32.5 logical/DB requests. The actor remains inactive; only the supporting SQL-classifier fix receives causal savings credit.
Measurements compare parent
1d4f42e8f3852c8804da09edf2e81ed848762d78with frozencc65e9aacc50bfd2e86a8edc0eb89d561e571b3aartifacts. Final source6e8a003has separate focused cleanup proof described below. The shared harness is unchanged. A lane-owned observer defers stack symbolization until after each run, equally on both revisions, preserving the 512 MiB worker heap limit. Transfer frames count once, independently of logical/DB requests and admission/control frames. Successful explicit COMMIT/END counts are separate from autocommit statements. All native statements, including work not joined to a logical request, remain in the totals.All phases: all-thread and MAIN medians [min–max], requests, frames, transactions and duration
14 alternating pairs; each cell is median [min–max]. Warmed observations are the per-run ten-turn means. MAIN requests and frames originate on Gateway thread 0; MAIN statements execute there. Explicit committed transactions count successful COMMIT/END statements separately from autocommit statements.
Native statements
All logical worker requests
Database worker requests
CPU worker requests
Native execution errors
Native prepare errors
Resource cleanup requests
Transfer frames
Admission and control frames
Actor commands
Explicit committed transactions
Frame direction and control class (all threads)
Instrumented phase duration
Statement and request attribution
The active saving is the SQL mutation classifier repair in
src/infra/sqlite-schema-mutation.ts, covered bysrc/infra/sqlite-schema-facts.test.ts. The prior keyword regex matchedupdateinside quotedopenclaw.system-updatein read-only transcript projections and invalidated the retained entry facts. The quote-aware classifier removes that false invalidation. Neither moving work to a worker nor the inactive actor is credited.Across 140 warmed turns, baseline observes 700 affected projection SELECTs: database.domain.publish:session.metadata.append=280, model-context=140, transcript-hydration=280.
In the request interval after model-context and before the next transcript hydration, one-statement entry reads are session-exact-entries: 140 → 3; session.entry.read: 147 → 10. These are temporal attribution counts; all statements and requests remain in the raw phase totals.
Transcript identity/header extraction preserves the same SQL; source-location moves are not counted as savings. Transfer frames are independently observed but no causal frame saving is credited.
Candidate-only request types observed across all 14 pairs:
[]. Earlier seven-pair observations included deviceAuth.prepare/read and moved anchor/model-context forms; later baseline samples exercise those same existing paths. This is a statement about the final observed set, not an assertion that earlier one-sided observations never occurred.session.pendingInputs.mutateatsrc/config/sessions/session-pending-input-operations.kernel.ts:insert into "session_pending_inputs" ("input_id", "session_key", "session_id", "idempotency_key", "run_id", "request_hash", "message_json", "lifecycle_generation", "state", "accepted_at") values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) returning *Pending-input request cost histograms: baseline
{'11': 182, '9': 14}; candidate{'11': 182, '9': 14}. RETURNING captures the custody postimage in the existing statement; it does not add a statement or request.Whole-workload median-contribution decomposition (largest 16 contributors plus remainder, from middle total-ranked run(s), so contributions sum exactly; independent per-operation medians are also retained in
attribution-series.json):Final gate disposition
The first-turn increase is +1.5 statements (+0.0713%), below the +0.5% noise floor; requests decrease by 2. Its complete contribution table is in
sql-attribution.md. Positive native sites are existing admission/lease/maintenance work:sqlite-schema-admission.ts+6,openclaw-agent-db-lease.ts+5,sqlite-busy-timeout.ts+5,sqlite-transaction.ts+5,sqlite-wal.ts+4,sqlite-staging-token.ts+4, andsqlite-pinned-read-snapshot.ts+3. Those source files are byte-identical to baseline. Transcript identity/presence helpers contain the same statement forms previously in the store/header modules; moving those source locations is not new SQL. Participant projection changes only a type export. The per-site audit includes every positive site inpositive-owner-attribution.json. These are contributions from the median-ranked runs, not independent causal saving estimates.The extra whole-workload comparison is also lower (−48 statements, −32.5 logical/DB requests), satisfying the RAW TURN INCREASE redistribution check. All actual phase-duration ratios are ≤1.5; empty done has zero statements/requests and is excluded from that gate. No actor operation ran, no new logical request type appears across the full series, and the only new normalized SQL form is pending-input INSERT RETURNING with unchanged command cost.
The second-session increase is +31.5 statements (+1.152%), within the 2% non-turn tolerance. Its positive non-moved sites are unchanged memory publication/chunk/cache workers, entry revision reads, maintenance/health reads, and type-only participant projection. The control-plane increase is +1.5, within the 10-statement absolute allowance: unchanged
plugin-state-store.reads.ts,delivery-queue-storage.kernel.ts, andopenclaw-state-ownership.ts. Other nonempty phases are lower.For context, second-control is 2833 → 2897.5 (+2.2767%); per-run sums appear below.
For context, second-control-cron is 3703 → 3718.5 (+0.4186%); per-run sums appear below.
Native SQL unassigned to a logical request is fully included in all-thread/MAIN totals. All 28 included workloads pass native/request conservation and phase coverage; no observed event falls outside a named workload phase, and SQL after its logical request’s terminal reply remains included in its named workload phase and native totals. See
final-sql-conservation-and-drain.json.Exact operation contributions for increasing phases and whole-workload family costs
02.first-turn: exact median-contribution decomposition
These values use the middle total-ranked run(s) for each side. They sum to the phase median delta; independently computed per-operation medians need not sum.
04.second-session: exact median-contribution decomposition
These values use the middle total-ranked run(s) for each side. They sum to the phase median delta; independently computed per-operation medians need not sum.
05.control-plane: exact median-contribution decomposition
These values use the middle total-ranked run(s) for each side. They sum to the phase median delta; independently computed per-operation medians need not sum.
Whole-workload families used for attribution
Every positive native-source contribution in increasing phases
These contributions use the same median-ranked runs as the operation decomposition above. Extracted source locations are paired with the retired location and are not new statements.
src/infra/sqlite-schema-admission.tssrc/config/sessions/session-accessor.sqlite-transcript-identity.tssrc/state/openclaw-agent-db-lease.tssrc/infra/sqlite-busy-timeout.tssrc/infra/sqlite-transaction.tssrc/config/sessions/session-accessor.sqlite-transcript-presence.tssrc/infra/sqlite-wal.tssrc/infra/sqlite-staging-token.tssrc/infra/sqlite-pinned-read-snapshot.tsextensions/memory-core/src/memory/manager-database-context.tssrc/state/agent-deletion-journal.tssrc/state/openclaw-state-db-schema-helpers.tssrc/config/sessions/session-accessor.sqlite-entry-revision.tssrc/infra/sqlite-wal-write-admission.tssrc/state/openclaw-quarantine-store.tssrc/state/openclaw-agent-db-registry.tssrc/state/openclaw-agent-db-registry.read.tssrc/state/openclaw-state-db-operator-approval-migration.tssrc/state/openclaw-state-db-session-watch-migration.tssrc/state/agent-deletion-journal.snapshot.worker.tssrc/state/openclaw-agent-db-validation-cache.tssrc/config/sessions/session-accessor.sqlite-participant-projection.tssrc/acp/runtime/session-meta-keys.tssrc/state/openclaw-agent-db-schema.tssrc/config/sessions/session-accessor.sqlite-entry-cache-projection.tssrc/trajectory/runtime-retention.sqlite.tssrc/state/openclaw-agent-db.tssrc/state/openclaw-state-ownership.tssrc/state/agent-deletion-journal.read.tssrc/config/sessions/session-accessor.sqlite-transcript-identity.tssrc/config/sessions/session-accessor.sqlite-transcript-presence.tsextensions/memory-core/src/memory/manager-publication.worker.tssrc/config/sessions/session-accessor.sqlite-entry-revision.tsextensions/memory-core/src/memory/manager-database-context.tsextensions/memory-core/src/memory/manager-sqlite-lease.tsextensions/memory-core/src/memory/manager-chunk-writer.tssrc/state/openclaw-state-db-schema-helpers.tssrc/config/sessions/session-accessor.sqlite-participant-projection.tssrc/acp/runtime/session-meta-keys.tssrc/state/openclaw-agent-canonical-validation-receipt.tssrc/state/openclaw-quarantine-store.tsextensions/memory-core/src/memory/manager-embedding-cache.tssrc/config/sessions/session-accessor.sqlite-entry-cache-projection.tssrc/channels/message/ingress-queue-health.kernel.tssrc/config/sessions/session-accessor.sqlite-entry-inventory.tssrc/config/sessions/session-canonical-key.tsextensions/memory-core/src/memory-entry-origin-reads.tsextensions/memory-core/src/memory/manager-vector-write.tssrc/infra/delivery-queue-sqlite.kernel.tsextensions/memory-core/src/memory/manager-source-state.tsextensions/memory-core/src/memory/manager-db-kernel.tssrc/config/sessions/session-accessor.sqlite-entry-read.tsextensions/memory-core/src/memory/manager-sync-base.tssrc/plugin-state/plugin-state-store.reads.tsextensions/memory-core/src/memory/manager-source-index-kernel.tsextensions/memory-core/src/memory/manager-retrieval-read.tssrc/infra/sqlite-wal-checkpoint.tssrc/plugin-state/plugin-state-store.kernel.tssrc/infra/device-pairing-store.tssrc/plugin-state/plugin-state-store.reads.tssrc/state/openclaw-state-ownership.tssrc/infra/outbound/delivery-queue-storage.kernel.tsCombined-window per-run sums
The following are contextual combined windows; they do not replace or hide individual first/warmed phase totals. Run order is the complete alternating pair order.
boot-connect
Duration ratio: 0.8457.
boot-connect-first
Duration ratio: 0.9946.
second-control
Duration ratio: 1.0692.
second-control-cron
Duration ratio: 1.0281.
control-cron
Duration ratio: 0.8868.
compaction-shutdown
Duration ratio: 1.1142.
Execution diagnostics
Native execution and prepare errors are reported separately in the phase tables. SQL after a logical request’s terminal reply is included in its named phase; the workload’s
donephase has zero SQL. Exact SQL, error text and stacks are retained innative-error-attribution.json; do not ascribe observed lease-release/audit-prune errors to the older restart-intent campaign issue. All included workloads completed successfully.One baseline11 attempt failed before a turn: Gateway readiness 114.941 seconds, handshake timeout at auth_validated (16.649 seconds handshake, 16.933 seconds connection); zero completed turns, boot/connect phases only. Its five fixture PIDs were confirmed exited before retry.
failed-base-11/retains logs, environment, timing, native raw hashes and process-drain proof. The retry used unchanged workload and timeouts. Baseline11’s completed trace then needed a proof-only classifier entry for existingsession-maintenance-read; the same raw workload was re-aggregated, not resampled.A candidate14 attempt also completed no turns: sessions.create returned UNAVAILABLE while discovery read a newly created database before its first schema transaction committed. Initialization BEGIN was 335792770397958ns; discovery SELECT was 335792774968958ns; initialization COMMIT was 335793138231666ns. The five direct path modules are byte-identical on baseline 1d4, final source 6e8 and origin/main b794062 (startup-schema-edge-parity.json). This is source parity, not a baseline behavioral replay. This is an existing visible/retryable startup edge, recorded as a follow-up, not fixed by retrying. All five fixture PIDs exited; completed baseline14 was retained and candidate14 retried with identical runtime/workload/timeouts. failed-candidate-14/ retains sanitized failure RPC, logs, hashes, exact timing and drain proof.
Included harness elapsed time (excludes build, aggregation and waits): base 1242.7s, candidate 1276.5s, total 2519.3s. First/last included phase timestamps: 2026-10-10T16:44:30.457000+00:00 → 2026-10-10T18:41:00.308000+00:00. Host load varied substantially; no unloaded-host or latency-saving claim is made.
Validation
Final source candidate:
6e8a0034934cc2c914562f7bade42cf1d2c49a3e, treed4ba7ae64fff2257e6d86370c6a2877f748bc648; baseline1d4f42e8f3852c8804da09edf2e81ed848762d78. The duration, statement and request gates pass with the attribution above. Proof is composed with explicit revision provenance; overlapping test counts are not added together.c47a8541ebdb1bcebdb1bccb20b6ebdb1bc, four remaining atcb20b6cb20b6cb20b6c47a85411d4atc47a8541cc65e9acc65e9acc65e9acc65e9a6e8a0036e8a003Unless marked otherwise, wall time excludes capacity admission wait. Runtime uses the native wrapper with
--maxWorkers=1. Actual GitHub CI seconds were not measured. The integrated selection covers actor commit/rollback/unknown outcomes, authority and actual drain, scoped receipts and replicas, the former native adapter and worker incognito, and legacy sharing, cold-storage, archive, replacement, lifecycle, custody, metadata, and generation-copy owners.The earlier integrated cleanup reuses the exact-entry helper, repairs native-fixture types, adds the relocated assertion's invariant comment, and removes the unused pending-write revision export/callback.
cc65e9achanges only its corresponding assertion baseline from 2 to 1; runtime source is unchanged fromcb20b6. The final assertion guard passed after that shrink. The pairing-account guard was rerun successfully because its earlier exit was not captured during the explicit pre-build drain.Inherited findings are recorded without claiming those checks passed:
@solidjs/signals, unlisted@solidjs/compiler1d4; no diagnosed file is touched. Source blobs match inspected main01238a50.1d4and exact main8be3518ewith the unchanged native checker and an isolated index.1d4; main8be3518ehas identical root inventory, config, and checker.POST_ACTIVATION_INSPECTIONS_STEP, and solid-lint default8be3518e.MockConfigin untouchedagents-mutate.test.ts; 16 untouched cap warnings are advisory1d4. Current main uses the type and fixes this parent-only error.Main source parity for boundary/dead-export findings is not represented as a main scanner execution. Full core lint has a terminal failure log at
ebdb1bc; the final changed files subsequently pass targeted lint. Its only error is the documented parent-only import. The native continuation passes scripts lint, schema/legacy-store guards, media and sidecar boundaries, import cycles, webhook and pairing-store guards, plus the earlier formatting, dependency, documentation, export-boundary and ratchet checks. All 35 selected commands are now accounted for by exact receipts and terminal logs, including the two final passing guards. Four inherited failure classes remain within this selection, plus standalone Knip; this is complete composed coverage, not a fully greencheck:changedinvocation.cc65e9a, with final cleanup reuse explained below.cc65e9apassed against1d4: 148 reachable-only changes, all direct declarations identical, zero entrypoints added/removed; digest38ea5a5ee9ff1385c6c5b38878609a9db0f23cc5e4a88dd47ef77f79d75a5ecb. Matching declaration names across the 29 starred module pairs resolves moved aliases and unchanged helpers; this is not a zero-diff claim. New actor/receipt capabilities are additive. Two actual internal nuances are documented: the incognito facts constructor gains a required callback, and the internal pending-input snapshot narrows explicit-undefined assignment underexactOptionalPropertyTypes. Their raw execution adapters are private-local-only in both revisions; neither is a released writable SDK input. No removed or narrowed released contract was identified by source/declaration inspection. This does not claim exhaustive downstream compiler compatibility.b453af227b4ccf53475e8cba86c57733e06a14adran read-only against1d4: all three construct groups are unchanged across 89 differing production files. No ratchet exception or baseline expansion is used.c098dab982890cccfd6b03d7aefb1bf7010f3ef4on AWS after Testbox expiry. Candidate package build passed. The published2026.10.1driver stopped before candidate installation: the fixture uses legacyagents.list, while the driver requires keyedagents.entries(exit 78;before-readyfailed). Update behavior remains unverified by this cell; this is a pre-candidate fixture failure. No schema migration is introduced.Limits and follow-ups
Residency is bounded to 128 sessions with an 8 MiB soft budget. One oversized working set remains until another key displaces it, avoiding perpetual read-to-command epoch loss; large sessions can exceed that byte budget. Partial S1–S3 receipts invalidate the touched session’s full hot snapshot rather than claiming complete context/custody coverage; unrelated sessions remain resident.
Observed existing startup edge: read-only discovery can see a newly created database before another worker commits its first schema transaction, returning
UNAVAILABLEfromsessions.createbefore any session mutation. The five direct failure-path modules are byte-identical on the candidate, comparison parent, and inspected mainb7940621; this is source parity, not a baseline replay of the race. The failed attempt and timing evidence are retained. A subsequent successful workload does not establish a fix. This lane leaves that visible, retryable startup condition to the admission owner instead of adding another handshake.Regression coverage includes recovery terminal delivery, age maintenance, and the released SDK entry-patch path. It does not directly exercise every maintenance flavor, every SDK export, or the tombstone-successor clone entrypoint. Existing native mutation primitives remain shared. Subsequent caller-cutover PRs own production savings.
Diff at
6e8a0034934cc2c914562f7bade42cf1d2c49a3eagainst1d4f42e8f3852c8804da09edf2e81ed848762d78: production/config +7,385 / −2,275 (net +5,110); tests/support +3,339 / −4; docs +87 / −0. Production includes audit-root configuration; tests/support includes the Vitest shard helper. Much of the textual churn scopes existing writers without changing their SQL. New code supplies the shared actor contract, transaction/hydration owner, retained host/replica, existing-owner adapters, and failure/authority regressions. Shared helpers preserve one mutation implementation.Final proof reuse:
6e8a003only removes duplicate validation in the inactive host/replica, updates the existing replica test and documents the interface. The full build/SDK proof and frozen SQL artifacts remain pinned tocc65e9a; final source types and focused behavior passed separately. No imports, dependencies, database statements or production callers change in that cleanup. Its internalbeginCommandsignature is absent from the SDK report; the public operation type receives only documentation. SQL traces record zero actor commands. This is explicit prior-artifact reuse, not a claim that the final source was rebuilt and remeasured.Native incognito ownership correction
Contract update 2: native incognito: actor declines; existing owner until P12. The inactive native adapter, registrations, exports, and adapter-only tests are removed. Acquisition returns
not-actor-ownedbefore constructing an actor or allocating a worker. Worker-backed incognito stays supported. Native incognito gets no actor savings until Phase E/P12; B3 #168539 and B4 #168592 must honor the decline.The database-worker ratchet caught a real new main-thread transaction in the removed adapter. The transcript-state helper's broadened admission guard also obscured its migration-only scope; that original guard is restored. No ratchet baseline or limit was edited. Integration with current main passes the existing admission record to the scoped exchange and keeps descriptor record construction in the existing registry owner.
Adapter-removal candidate tree
52f360d30459afc84da503eea3a528b5e482e8d5passed 62 focused actor/incognito/admission tests (six files; 65.83 seconds total wrapper time), type-aware oxlint, export-name collisions, production Knip, and core tsgo on AWS Crabbox runrun_2ff8b4c74d49802b3b1e7264e16db51b(201.30 seconds command time). The local database-worker ratchet passed against main756b2650a8544f5c0b852a00024e58e54c40eb46with no baseline edit. The initial post-merge test/type failure was the receipt exchange callback signature and is fixed. Earlier measurement and validation entries above retain their original head scope. Scoped P0/P1 autoreview passed for the removal and final integration repair. Adapter-removal repair head:8dc7b6750795aa6778d81040dd2abecdcff38ee5. New-head CI remains required before landing; no static failure is waived.Published-driver update proof remains incomplete: the 2026.10.1 driver rejected the fixture before candidate installation (
agents.listmoved to keyedagents.entries, requiring Doctor). Candidate packaging passed, but that failed before-ready cell is not update-success evidence. This correction removes the inactive native adapter and does not change the update path or schema.Final architecture guard repair
Head
17569dbde0719e4ef4bb12aef91b839f179411f6removes the explicit Kysely helper result generic by using the existing insert/on-conflict builder for both paths. It still executes one statement and updates onlyupdated_aton conflict. No ratchet baseline was edited. A conflict-only merge of main83b5f5425eab6021ff03104c9de1b4826f0c3d97preserves main's degraded-compaction persistence inside the actor-aware append path.On candidate tree
caacb70b490fa7557919835743aa26f940917a53, the complete localpnpm check:architecture(including both import-cycle checks and Kysely guardrails) andpnpm check:database-worker-ratchet --base 83b5f5425eab6021ff03104c9de1b4826f0c3d97passed. The 12 focused actor and degraded-compaction tests passed (94.05 seconds total wrapper time), as did type-aware oxlint, Kysely guardrails, and core tsgo on Hetzner Crabbox runrun_bcdf2eb316a847df8e9e562de47c38b9(356.26 seconds command time). Scoped P0/P1 autoreview found no actionable findings. Earlier export-name collision and production Knip proof remains applicable to the adapter removal; this final repair adds no exports or dependencies. New-head static CI must pass before landing.Final worker-fixture repair and inherited CI qualification
The Kysely repair passed both
check-guards-architectureandchecks-fast-baseline-ratchetson17569dbde0719e4ef4bb12aef91b839f179411f6. No ratchet baseline was changed.The remaining PR-caused worker-test failure was traced to the fixture's simulated macOS platform on a real Linux host. After the admission registry refactor, the retained registry and reloaded identity helper captured different birthtime policies. The fixture now loads the identity helper under the physical host platform before simulating library selection. Production identity/admission checks and all test assertions remain intact. The unchanged test failed twice before the repair and all 14 cases passed afterward on Linux; test-wrapper wall time was 52.57 seconds. Type-aware oxlint and formatting passed. Candidate tree:
b79b1f21e792fc5054767229402d244564ce252a.Other observed CI failures are independently inherited: task-suggestion layout and the panel-loading-skeleton TSX import failure match main run
38103250398jobs114363496384and114363497233; the reconstructed transcript-anchor expectation matches job114363497110. The compaction replay expectation was reproduced directly on main83b5f5425eab6021ff03104c9de1b4826f0c3d97(remote runrun_a875f2e5056ba3c498406efe861c3107). The named failure files are unchanged by this PR.Final landing evidence
Final head:
f0607fa83adf7a338032944be5ad94c91139495e. In CI run 38108783953,check-guards-architecture,checks-fast-baseline-ratchets, the repaired worker shard, production types, and all other static checks passed. Security checks passed. No baseline was edited.The remaining three failed jobs are independently inherited in unchanged sources: gateway TSX parsing and task-suggestion viewport tests match main run
38103250398; the compaction replay continuation expectation also fails on main83b5f5425eab6021ff03104c9de1b4826f0c3d97(remote runrun_a875f2e5056ba3c498406efe861c3107). The aggregate CI gate remains red for those test failures. Landing uses the explicitly authorized pre-existing-failure admin exception; this is not a claim of fully green CI. The published-driver update fixture limitation recorded above remains unchanged.