Repository navigation
fix(gateway): settle restart intents and update reports in workers - #167572
Conversation
Consume restart intents atomically through the shared-state writer, preserve signal ordering and shutdown budgets, and join accepted update-report receipt work before shutdown. Keep physical-source and live-authority fences, reconcile committed replies without replay, and retain native CLI and boot contracts. No schema, retention, or permission changes.
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. What this changesThe branch moves restart intents, successor handoffs, and update-report receipts into existing SQLite workers, joins accepted work during shutdown, and reduces eager Control UI imports. Example: An operator restarts the Gateway while SQLite has a competing writer.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR remains necessary: current main retains non-atomic restart-intent consumption. Both prior fixture findings are resolved, and no new actionable patch defect was identified. The remaining CI failure is in inherited session-admission code. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Gateway lifecycle coordinates restart signals, storage shutdown, and successor startup. Failure reporting uses the same storage infrastructure to record consented submissions and finish accepted cleanup before shutdown. flowchart TD
A[Restart signal] --> B[Gateway lifecycle]
C[Confirmed failure report] --> D[Current authority checks]
B --> E[Shared SQLite workers]
D --> E
E --> F[Atomic writes and commit receipts]
F --> G[Report submission and cleanup]
F --> B
B --> H[Successor startup]
Technical reviewBest possible solution: Complete the worker cutover through the existing lifecycle owners while preserving live publication authority, accepted-work settlement, and released synchronous SDK contracts. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the read/delete failure mechanism on current main, and the PR records a failing historical contention case. This read-only review did not execute a reproduction. Is this the best way to solve the issue? Yes, atomic consumption and settlement belong in the existing shared writer and lifecycle owners; the branch removes the competing synchronous runtime paths while retaining documented native contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0ffd46b94dd3. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1076, Tests +1139, Docs +23, Other +14. Total +2252 across 75 files. Added test files: 1. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 9, 2026, 1:31 AM ET / 05:31 UTC (Revision 5). |
Merge current main without rebasing, preserving admitted-worker ownership, report cleanup consolidation, and test pruning. Keep atomic restart intent consumption, current authority checks, and commit receipt settlement. Complete the extracted PR wrapper dependency inventory and adapt the new hosted-stop fixture to async intent consumption. Move Settings-only helpers out of eager navigation and keep deferred Lit directives out of startup; the unchanged startup gzip budget now passes at 373236 bytes. Fresh Codex P2 autoreview found no actionable findings. Focused runtime and type verification continue on this integrated tree before landing.
Supply the canonical execution-owning request context in direct and WebSocket update-report fixtures. Join shared database workers before raw receipt inspection and teardown. Wait for restart-drain ownership before advancing the managed-stop test's fake clock, preserving its original deadline and lease-settlement assertions.
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…penclaw#167572) * fix(gateway): settle restart intents and update reports in workers Consume restart intents atomically through the shared-state writer, preserve signal ordering and shutdown budgets, and join accepted update-report receipt work before shutdown. Keep physical-source and live-authority fences, reconcile committed replies without replay, and retain native CLI and boot contracts. No schema, retention, or permission changes. * test: synchronize update report receipt races * test: preserve restart lifecycle mock exports * fix: break restart lifecycle import cycles * fix: make asynchronous signal settlement loops explicit * fix(gateway): avoid loading unrelated commands during restart handoff * perf(gateway): preload restart worker code during shutdown * test(state): preserve the cold import isolation fixture * fix(gateway): await restart preparation cleanup in its owner * test(gateway): join async restart and report fixture work Supply the canonical execution-owning request context in direct and WebSocket update-report fixtures. Join shared database workers before raw receipt inspection and teardown. Wait for restart-drain ownership before advancing the managed-stop test's fake clock, preserving its original deadline and lease-settlement assertions.
What Problem This Solves
Restart-intent consumption could block the Gateway signal thread behind a SQLite writer, then return an intent whose separate deletion failed. A later signal could consume it again. Update-report receipts also used main-thread SQLite and needed accepted work to settle before their transport and storage owners closed.
Runtime intent consumption, handoff writes, report receipt transitions, and cleanup now use their existing workers. Intent consumption is atomic
DELETE … RETURNING; duplicate suppression, current publication authority, and accepted-work settlement remain intact.The schema-cache parent #167001 merged and its branch was deleted, so this PR targets
main. Approved-head lane proof below comparesc786f4d4c4ea27630466a529630e56071845a682→b48f88f9f3f6eafedfce6b06bc227f38c3b209c6. Parent/cache improvements are inherited and are not credited to this change.Ownership and restart readiness
The shared-state writer owns runtime intent consumption and handoff persistence. The sentinel writer owns receipt reservation, transitions, finalization, and cleanup; its read worker supplies receipt reads. Callers capture physical database identity before yielding. Authoritative rereads and writes remain synchronous inside worker transactions, with live authority checked again at transaction, commit, and publication boundaries. Commit receipts reconcile lost replies without replaying accepted writes. Reservation-bound artifact paths prevent delayed cleanup from deleting a successor's report.
The signal owner preserves FIFO and joins accepted intent work before close. The report RPC uses its existing execution join so connection retirement waits for receipt and cleanup settlement. Supervisor handoff persistence remains after canonical writer drain and the final restart decision.
Real restart proof showed that cold worker code loading was on the readiness critical path. Restart operations now use the existing lightweight registry, and an accepted supervised restart may preload code only while shutdown proceeds. Preparation opens no database and performs no schema admission, intent consumption, or handoff write. It uses existing broker capacity and can be preempted by ordinary work. Post-drain admission still obtains fresh physical identity and current grants; it never reuses a retiring database handle. Unavailable preparation retains cold admission; genuine capacity preemption permits a fresh cold open. Failed, stale, foreign, or reused preparation handles reject. Cleanup remains owned and joined.
Six alternating base/candidate pairs on one Hetzner Linux host, Node 24.21.0, passed real RPC restart, clean predecessor exit, successor identity, persisted handoff restoration, HTTP readiness, authenticated reconnect, first successful
sessions.list, and process cleanup. All twelve runs passed. The first-accepted-request median increase is 193.778 ms, within the specified ≤200 ms gate.This pass has 6.222 ms of median headroom. HTTP readiness alone increased by 227.192 ms; the specified gate is the first accepted authenticated request. The observed handoff log span was 32.647 [30.057–45.109] → 123.319 [113.119–128.458] ms; that is a log-receipt diagnostic, not native-operation timing. These results cover normal capacity and an isolated external supervisor, not native macOS/Windows timing or a universal latency bound. Saturation can decline or preempt optional preparation and retain the correct cold fallback. Earlier candidates exceeded the readiness budget; the final result is the measured prewarming implementation.
Schema, durability, retention, permissions, configuration, and released synchronous SDK contracts are unchanged. Native boot/supervisor handoff consumption and service CLI lock primitives retain their documented synchronous contracts. An inherited unused internal
ClientVoiceToolEffecttype export was made private to satisfy Knip; it has no released SDK export path.Final direct statements and requests
Three strictly alternating pairs exercise the real report handler with synthetic GitHub transport and current system-operator authority, then receipt/restart operations through their compiled shared writer. Counts include every observed thread/helper and zero-SQL requests. All count ranges below are deterministic across the three runs; full ranges remain in the phase table.
Worker placement is not an all-thread saving. This change reduces direct product statements by 40, while adding 36 product worker requests. The complete fixture reduces statements by 31 and adds 85 requests, including source-loader/initialization, setup, lifecycle, and verification requests. Preparation costs are included; none are hidden in an uncounted warm-up.
Cold handoff removes one timeout read (2→1), two timeout assignments (6→4), and the WAL-autocheckpoint read/disable (1+1→0+0), while retaining one additional combined version observation (2→3): −1−2−2+1=−4. Numeric timeout values are grouped within each run before taking medians. Requests add exactly open + handoff. Preparation's approximately 2 ms host phase only starts code loading; imports may continue through the fully counted drain/handoff phases.
inspectOpenClawStateOwnershipFromDatabase/assertOpenClawStateWriteAllowed). Domain receipt transitions and their transaction envelopes remain. Added requests: receipt read, reserve, mark prepared, mark pending, finalize, complete cleanup.readStateSchemaContentVersionRow→readContentVersionMarker→assertSupportedStateSchemaVersion. The actual receipt SELECT and foreign-commit observation remain. This is an explicit required-freshness cost, not unrelated noise. The current base reuses the previously separate schema/user-version observations; stale cleanup remains 7→7.DELETE ... RETURNING(−1 domain statement). Repeated native admission removes 24 statements—seven schema/user-version probes, six catalog reads, three table-existence reads, two integrity checks, two busy-timeout operations, and one each of direct data-version, schema metadata, ownership, and content-version reads—offset by one additional combined version observation. Net native admission −23; total −24. OnerestartLifecycle.consumeIntentrequest is added.The complete product SQL delta is −5−2−2−1−1−4−24−4+1+1+1 = −40. Ordinary reservation stays 6→6, ordinary receipt transitions stay 7→7, and warm handoff stays 6→6; each adds one worker request and moves MAIN work to its existing worker. File-only save/publish/discard stays zero SQL and zero requests. No unchanged operation is presented as an ALL-thread saving.
Every added product request
These counts sum to +36 per measured product cycle in each pair. All requests, including zero-SQL requests, are retained.
openrestartLifecycle.consumeIntentrestartLifecycle.writeHandoffrestartSentinel.beginCleanuprestartSentinel.beginStaleCleanuprestartSentinel.claimSweeprestartSentinel.completeCleanuprestartSentinel.finalizeReceiptrestartSentinel.markPendingrestartSentinel.markPreparedrestartSentinel.refreshPreparationrestartSentinel.releaseSweeprestartSentinel.reserverestartSentinel.reportReceiptComplete-window accounting
Initialization is −50 SQL/+38 requests: import SQL is unchanged, with one extra source-loader request; fixture warming is −50 SQL/+37 requests, including two source-loader requests and 35 domain requests. Warming exercises intent twice (−48 statements combined) and receipt paths (eight ownership reads removed, six content-version reads added, net −2). These initialization effects are separate from the product saving.
Fixture setup is −2 SQL/+2 requests: created and uncertain setup each remove one ownership SELECT; abort/stale setup reserves add their worker requests. Lifecycle is +1 SQL/+1 request, from one additional final
wal_checkpoint(TRUNCATE)and its worker close; canonical drain and preparation release do not add SQL or requests.Verification is +60 SQL/+8 requests: the same-process native boot verifier after worker-only handoff independently admits MAIN (13→92, +79); the second intent consume saves 24; receipt verification adds five content-version reads. +79−24+5=+60. Warm native boot verification is unchanged at13. The cold verifier is explicit fixture lifecycle work and is retained in all-phase totals; it is not a claim about a separately spawned successor process.
The complete conservation is −50−2−40+1+60=−31 SQL, and +38+2+36+1+8=+85 requests. Source-loader tooling accounts for three of those added initialization requests. Production/initialization/request differences are not silently discarded.
The inherited duplicate +267 schema-construction statements remain absent. On the current base, receipt/sweep-lease reads are 2 → 3, stale cleanup 7 → 7, and artifact sweep 18 → 19. Required freshness checks remain; subsequent base admission/cache improvements explain the difference from the previously accepted 2→5, 7→9, and 18→21 observations. Final direct runs have zero failed native executions, including intent consumption and exactly-once verification.
Complete final direct phase table: medians [min–max]
Single-operation duration ratios are diagnostic under the accepted exclusion; they are not shared-workload duration gates or evidence of real restart readiness. The instrumented handoff call alone took 65.484 [48.797–67.145] → 523.373 [523.011–534.468] ms. The fixture introduces no extra sleep to wait for preparation; the real Gateway's overlapping shutdown is measured separately above. Complete fixture duration ratio is 1.065; the product subtotal is 1.667. The generic summarizer’s
durationValid=falseflags for individual operations/subtotals are preserved, not relabeled as timing passes. Disposition uses the accepted direct-operation exclusion and the independently measured real restart readiness gate. Native verification after worker-only handoff independently opens its MAIN connection (13 → 92 statements); those 79 statements remain in verification and total counts, not hidden as product savings.Accepted shared chat and shutdown evidence
The coordinator accepted six alternating pairs at historical base
b881e1423c4a10bfc338f823dccefadcf996261dand candidatea1cd0d8e3cc3ca8756be17250c028cac08a5837e. These are retained as historical W6 evidence, not measurements of the final head against current main. A final source audit confirms preparation requires an accepted supervised restart, so it is inactive in first/warmed chat and the fixture's SIGTERM stop. Ordinary broker SQL/request envelopes and the atomic intent kernel remain unchanged by preparation. Independent base freshness/admission changes prevent transplanting historical absolute totals onto the final base.Warmed turns were 1513.45 → 1513.1 ALL, 6.5 → 6.5 MAIN, and 299 → 299.1 requests/turn. No chat-turn saving, global request reduction, or under-500-turn claim is made. Total shared requests were 4744.5 → 4754.5.
Raw first-turn statements were 3482 → 3505 (+23). The accepted deferred-startup window was boot+connect+first 6225.5 → 6222; conservatively retaining every other origin leaves 3448 → 3434.5 first-turn statements. Only post-ready plugin maintenance, pairing notification, outbound recovery, remote catalog refresh, and cron startup planning were classified as deferred startup. First/warmed traces had zero intersections with W6 files changed at that measured head. Connect uses boot+connect 2741 → 2763.5 (+0.8209%). Second-session +0.3735% and cron +0.2073% belong to unchanged owners and fit the non-turn allowance. Every shared phase has a duration ratio ≤1.5.
Historical shutdown was 702 → 679.5 ALL, 202 → 150 MAIN, and 82 → 75 requests. The W6 saving is intent consumption 41 → 6 ALL, 41 → 0 MAIN, with one added worker request: SELECT+DELETE→DELETE RETURNING removes one domain statement; repeated native admission removes 34 others (11 schema/user-version probes, 11 catalog reads, three table-existence reads, two busy-timeout operations, two integrity checks, and one each of schema metadata, quarantine, ownership, content-version, and comparison-table work).
The median-supplying shutdown observations decompose as intent −37 plus unchanged owners +14.5 = −22.5; intent's standalone median is −35 because different observations supply those medians. Memory admission is the largest positive background component, offset by native closure/WAL, placement, session, and memory settlement. Thread movement and unrelated background decreases are not credited as W6 savings.
Historical shared traces had zero intent lock refusals. Their 13 other refusals belong to unchanged owners: 11 startup plugin-lease releases and two audit-prune refusals, one per side. Final direct runs had zero failed native executions; final readiness and driver logs had zero observed lock-refusal diagnostics. Readiness was uninstrumented and does not replace the historical all-thread refusal count. This is not a globally lock-free-shutdown claim.
Complete accepted historical shared table and combined windows
Base
b881e1423c4a→ candidatea1cd0d8e3cc3. ALL includes every observed thread/helper, MAIN is the Gateway thread. Counts are medians [min–max]. Warmed counts are each run’s ten-turn mean. Requests include zero-SQL operations.All shared phase duration ratios are ≤1.5. First-turn work is assessed with the source-attributed deferred-startup window, not reported as a W6 turn saving. Warmed variation is also in unchanged owners.
Historical combined windows and complete shared total
These medians are calculated from the raw sums in each run; they are not sums of independently selected phase medians.
Evidence
Canonical
node scripts/database-worker-inventory.mjs --jsongives T1 784 → 770, T2 374→374, T3 252→254, W 1072→1076; the T1 ratchet passes without a baseline change. The 14 retired T1 sites are handoff 2, intent 2, sentinel-row read 1, receipt facade 6, and receipt kernel 3. Historical T1 was 797→779 (18 retired); current main had already consolidated five receipt transitions into one helper, accounting for four fewer raw sites.The diff spans 63 files, +3434/−1232. Production: 34 files, +1830/−755, net +1075. Tests/support: 27 files, +1563/−474. Docs: +23; tooling: +18/−3. Growth carries physical identity, live admission, commit acknowledgement, accepted-work settlement, and bounded code-preparation custody through the existing owners. Superseded synchronous runtime paths are deleted; retained native contracts are documented.
30f671da51b8; final broker/run-loop 209/209 in 234.18 s; final Talk store 9/9 in 44.69 s; cold-import correction 5/5 in 49.35 s. Runs overlap and are not summed as unique coverage.check-changedb48f88f9f3f6vsc786f4d4, both local and Linux, no skip flags or baseline relaxation. Core lint reported eight warnings and zero errors; script lint zero warnings/errors.30f671da51b8vsc786f4d4, with complete run-loop/lifecycle and broker-admission context. Later test-fixture and cleanup/lint corrections were separately scoped-clean before the final commit.f9f5b82033db9e5507a2e1162438f963279451c9bf71a11a89cce304a0ebab48. The tagged private QAqa-runtimeintent writer stays synchronous, verified separately because it is outside the published SDK manifest.7b314d7a98a6e02075db9fde174eb3e0f6acc5f26b33386c305d9643b577db78.b48f88f9f3f6eafedfce6b06bc227f38c3b209c6; update exit 0, runfinished, readyz 200, running version and durable/incognito checks passed, cleanup passed. Update command took 564.665 s.Original intent contention was red on the historical parent (intent returned while its row survived) and green on candidate (yield, join writer, atomically delete, second consume returns null). Coverage also protects physical replacement, foreign commits, lost replies after commit, revoked publication authority, reservation/sweep takeover, FIFO, capacity preemption, stale/foreign/reused preparation handles, native retirement, and late Stop decisions.
Measured test times are command/wrapper wall times, not CI seconds; CI seconds are unavailable at PR creation. The direct report fixture uses synthetic GitHub transport, not live GitHub authentication or network RPC admission. The real compiled Gateway readiness and published-driver tests establish their separate runtime boundaries. No final-head full shared-workload medians are claimed. Each direct fixture retains one initial warming snapshot send with unmatched receiver pairing; it is counted on both sides and does not affect product request totals. Missing-context rows and duplicate sends are zero.
Packaging reports a Control UI startup-JS gzip budget violation: 373702 B versus 373454 B (+248 B), despite canonical package/integrity exit 0. UI source is untouched, but this batch has no matching base full-UI build to establish inheritance; the UI budget is not claimed as passed. Startup CSS remained below its hard ceiling. The driver’s running-version probe establishes the exact handshake build identity; its separate status probe is scope-limited, not an operator-read RPC health claim. No UI budget or other baseline was changed. The initial SDK attempt failed creating a disposable worktree with
Disk quota exceededbefore comparison; its retry places checkout, temporary worktrees, and caches on verified disk-backed storage. The disk-backed SDK-only retry completed successfully on the same pinned revisions; successful runtime/package gates were not rerun.Final successful runtime allocation waited approximately 107 minutes in the default lane queue. This continuation's seven attempts recorded 20/5/17/44/21/59/106 one-minute wait messages, two fleet refusals (21/20), and two 10-minute backoffs; interrupted waits are approximate, not exact summed wall time. An AWS quota fallback selected an unsuitable 2 GiB machine, which was released before heavy proof; a later inventory prerequisite failure was corrected in the proof adapter. Earlier distinct proof windows recorded roughly 175 and 29 minutes of waits. The final SDK-only retry obtained a normal lane slot without another wait. Both final Hetzner leases were released and provider cleanup verified complete; the initial asynchronous cleanup warning was resolved by the final lease inspection. The fleet cap stayed unchanged and at most one lease was held. Earlier queued attempts were cancelled for reviewed validation corrections. The final runtime run and SDK-only retry used the same pinned source; their tooling/environment recovery did not change product code.
Landing integration and startup bundle repair
Integrated main at
5c81678cb280e6aa871522b08dceef5e706af03ewith a merge commit. Overlap with #167493, #167542, and #167552 is resolved: main's test pruning, shared report-cleanup helper, and admitted-writer owner remain. Report receipt operations retain their explicit transaction/commit grants and commit acknowledgments. One newly extracted hosted-stop fixture now uses the asynchronous intent mock. The compiled PR wrapper inventory includes the new memory-pressure subscription module.The historical 248-byte Control UI overage was reproduced as 516 bytes after integration. Settings/sidebar-only navigation helpers now load with their consumers, and deferred Lit
guard/unsafe-htmldirectives no longer enter the forced startup chunk. Implementations, rendering, and behavior are unchanged. Startup JavaScript gzip is 373970 → 373236 bytes, below the unchanged 373454-byte cap, with 8 startup requests. The strictpnpm ui:check-performancegate passes. No size budget was raised.The released SDK surface was rechecked against both
v2026.9.9andv2026.10.1-beta.1:qa-runtimekeeps the synchronouswriteGatewayRestartIntentSynccontract; the changed consume/handoff/receipt functions are internal, and existingsqlite-runtimesignatures remain. The approved-head SDK report and published 2026.9.8-driver update proof above remain valid for unchanged contracts. No SQL remeasurement was performed at landing: receipt statements and prewarming SQL behavior remain the reviewed implementation, while existing sentinel operations preserve main's admitted-write behavior.Integrated diff: production +1956/-880 (net +1076), tests/support +1583/-446 (net +1137), docs +23, tooling +19/-3. ClawSweeper initially reviewed
b48f88f9f3f6eafedfce6b06bc227f38c3b209c6with zero findings. Its laterf94c6cf17f0breview identified missing execution context in the direct report fixture and a Linux managed-stop fake-clock race. Both findings are addressed by the final fixture repairs below.Landing validation: fresh Codex P2 review is scoped-clean for the integrated tree.
pnpm tsgo:core,pnpm tsgo:core:test(all shards), andpnpm tsgo:uipass. Madge reports the pre-existingprepared-model-catalog-fingerprints.ts↔prepared-model-catalog-worker.tscycle. Both files are byte-identical to mainae64a98a4eb1bc45765290f5b9988c75ce7eb8ca, outside this PR's delta; no cycle edge is introduced here. The main CI census included successful run https://github.com/openclaw/openclaw/actions/runs/37877146172 on that SHA; this is source-based inheritance evidence, not a claim that the run executed Madge.Final landing head:
6e8377a8acd8015c177f619b52a63db0f8a4bc95, tree31060dd6f244ae422945f1f6b9da15ee8f42a2e5. Both report fixtures use the canonical execution-owning context; the WebSocket fixture joins database workers before raw reads and teardown. The Linux managed-stop fixture waits for actual restart-drain ownership before advancing its unchanged 29,999 + 1 ms deadline. No production behavior, assertion, timeout, or budget was relaxed.The final three-fixture P2 review is scoped-clean. Focused verification passes: direct report handler 10/10, WebSocket authority 18/18, sentinel/recovery 55/55, run-loop 138/138, UI navigation/search/chunking 155/155. The last integration batch took 630.37s wrapper wall time (Vitest phases 255.23s, 295.82s, 54.28s); this loaded macOS host spent substantial time transforming sources. Prior completed transport 26, daemon 15, report 21, cold-import 5, wrapper 17, build-graph/import-boundary 11 and reply-import 1 cases are retained as separate evidence, not summed as unique coverage.
The real report suite passed 45/46, including accepted transport, receipt and cleanup settlement. Its first unknown Doctor-check case timed out at 120s; the exact case independently reproduced on main
ca31b89d2217e952a7d59f68f511e4c652e5d4a3(152525ms, 586.14s wrapper). The catalog-loading owner is byte-identical; cold Doctor-catalog loading under host contention is the likely cause, while the precise stalled stage remains uninstrumented. This inherited timeout is recorded, not claimed fixed.CI on
f94c6cf17f0bfound the repaired direct/WebSocket fixture omissions and managed-stop timer race, plus two inherited main failures: the Madge cycle above and the pending-admission read insessions.initial-transfer-custody.test.ts. The latter comes from main-addedsession-transcript-worker-read-admission.tsin #167515: it asserts writable admission before the test’s read-only lookup, before reaching this PR’s worker dispatch. Final-head CI run 37884748337 completed with every selected job green except this independently inherited session-transfer case and its aggregate; there were no cancellations. The Linux managed-stop case passed in 2350 ms in job 113672444383. Required security checks are green. Landing uses the native pre-existing-failure exception with the exact tested merge, complete job accounting, source-blob equality and scoped passing proof; the CI failure is not relabeled green. The separate Testbox request timed out before execution and was cleaned up; completed GitHub CI supplies the Linux proof.