Repository navigation
perf(agents): prepare tool authority fingerprints and skill preparation through session readers (session authority B1) - #165370
Conversation
… workers Move current chat admission, reply authority, lifecycle preparation, verbosity, and maintenance reads through existing workers. Retain physical source identity and foreign-commit freshness, preserve accepted lifecycle settlement through close, and carry prepared transcript selection facts.
Join accepted event batches and listener settlement in fixtures. Keep restart metadata preparation with the work-admission owner and make callback this contracts explicit.
Merge main to resolve session admission and event-test conflicts. Preserve the qualified worker-backed admission owner from #164682 and main's consolidated tests, awaiting asynchronous event handling where required. Reuse internal-effects filtering across both Gateway read paths.\n\nThe complete candidate is clean through P2 autoreview. Focused conflict tests and remaining changed-check and published-driver update gates are tracked on #165028.
Use the existing async-aware event subscription helper in the consolidated verbosity test. The previous merge retained the plain unsubscribe callback while awaiting its drain method, causing a TypeError before the assertions. The corrected event-handler file passes all 82 tests. Together with the four unchanged passing files, the integrated focused group covers 163 cases. The one-line fixture correction is clean through P2 autoreview.
Merge main's transcript-context lane while retaining its prepared-start validation and released callback compatibility. Use the captured session initialization binding instead of a caller-thread session read, and combine context validation with lifecycle facts in the final anchor snapshot. Focused reply, anchor, context, runtime-build and import checks pass. P2 review raised a conditional global-alias concern, rejected after independent source tracing: the final read uses an admission receipt created from the selected stored key, and mismatched admission/session keys are refused beforehand. No actionable review finding remains.
Await asynchronous agent-event consumers and projection disposal. Move lifecycle fault injection to prepared callbacks, and track accepted writes through owner-controlled persistence before fixture cleanup. Initialize runtime config before observing row publications.
Use partial mocks for lifecycle preparation, session entry writes, and worker reads. Remove the three obsolete mock-factory baseline entries. The five affected tests, typed core lint, mock-export scanner, and P2 review pass.
Merge main 228ff57 to incorporate the host-owned cron test routing fix. Read session currentness before the final transcript anchor snapshot, then recheck live routing and run authority without another worker lookup. A real branch switch during the old final lookup returned stale delivered state; the new regression proves the repair. Move the unchanged transcript reply text helper and its existing tests to the reply-input owner, updating every internal caller. Released callback contracts remain unchanged.
Merge main dc518bf for the real session-store conflicts introduced by snapshot-only entry hydration. Retain main's projection types and selection defaults alongside physical source identity retention and internal-effect filtering. The four focused worker/currentness/anchor cases, typed core lint, diff checks, and fresh P2 review pass. Earlier unchanged proof retains its original source attribution.
Join the physical-store writer queue before inserting the malformed fixture row. Session replacement starts asynchronous maintenance; an uncoordinated synchronous host write can block the admission callback a worker needs to release its SQLite lock. Preserve the raw bytes, post-admission position, lack of publication, and all assertions. The original lock reproduced in CI and one of five head controls; the targeted repaired case, typed lint, formatting, and P2 review pass. The separate slow handle-cap case remains recorded in local controls.
|
🦞👀 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: blocked before merge. Reviewed October 6, 2026, 12:09 AM ET / 04:09 UTC (Revision 21). ClawSweeper reviewWhat this changesThe branch moves tool-permission fingerprints, queued-input classification, and skill preparation through session readers while preserving steering order, caller authorization, and released plugin callbacks. Merge readiness⛔ Blocked before merge - 2 items remain This PR remains useful and distinct from the merged worker-read migrations. No actionable introduced correctness or security defect was found; the previous generic configuration/upgrade blocker is unsupported by the preserved contracts. Priority: P2 Review scores
Verification
How this fits togetherSession authority determines which tools and queued messages an agent may use. Gateway, channel, and Talk inputs pass through session readers and final admission before reaching agent queues, native transports, or skill persistence. flowchart TD
A[Gateway and channel input] --> B[Captured caller and session]
B --> C[Session reader preparation]
C --> D[Current authority and FIFO admission]
D --> E[Agent queue or native transport]
D --> F[Skill snapshot writer]
D --> G[Refused input]
E --> H[Accepted input custody]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep worker-prepared facts bound to the existing final admission owners, with fresh caller checks, exactly-once input custody, and the documented SDK compatibility window. Do we have a high-confidence way to reproduce the issue? Not applicable to this internal performance migration. The PR records before/after SQL measurements and failing boundary controls; this read-only review executed no runtime code. Is this the best way to solve the issue? Yes. Reusing the existing session readers and final admission owners preserves current authority without adding a competing storage or scheduling owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0e9f1bf7bcf1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (20 earlier review cycles; latest 8 shown)
|
Observe the async binder called by runReplyAgent so the admission cases check publication and main-thread SQL before authority binding, then delegate to the original async implementation. Update the cleanup comment for the binder's current placement inside the runner's try/finally. Testbox proof on ca43d19: before, exactly four handoff assertions failed and 221 tests passed; after, all 225 tests passed in 154.58s. Core and messaging test typechecks, focused lint, formatting, and independent review passed. Scoped check-changed stopped at an unrelated baseline unused export: OUTBOUND_GREETING_FALLBACK_MS in the voice-call realtime session controller.
…on through session readers (session authority B1) (openclaw#165370) * perf(sessions): serve remaining per-turn session authority reads from workers Move current chat admission, reply authority, lifecycle preparation, verbosity, and maintenance reads through existing workers. Retain physical source identity and foreign-commit freshness, preserve accepted lifecycle settlement through close, and carry prepared transcript selection facts. * refactor(sessions): finish async admission cutover Join accepted event batches and listener settlement in fixtures. Keep restart metadata preparation with the work-admission owner and make callback this contracts explicit. * test(sessions): drain the merged event subscription fixture Use the existing async-aware event subscription helper in the consolidated verbosity test. The previous merge retained the plain unsubscribe callback while awaiting its drain method, causing a TypeError before the assertions. The corrected event-handler file passes all 82 tests. Together with the four unchanged passing files, the integrated focused group covers 163 cases. The one-line fixture correction is clean through P2 autoreview. * test(gateway): finish async lifecycle fixture cutover Await asynchronous agent-event consumers and projection disposal. Move lifecycle fault injection to prepared callbacks, and track accepted writes through owner-controlled persistence before fixture cleanup. Initialize runtime config before observing row publications. * test(gateway): preserve lifecycle fixture module exports Use partial mocks for lifecycle preparation, session entry writes, and worker reads. Remove the three obsolete mock-factory baseline entries. The five affected tests, typed core lint, mock-export scanner, and P2 review pass. * test(gateway): serialize malformed-row fixture writes Join the physical-store writer queue before inserting the malformed fixture row. Session replacement starts asynchronous maintenance; an uncoordinated synchronous host write can block the admission callback a worker needs to release its SQLite lock. Preserve the raw bytes, post-admission position, lack of publication, and all assertions. The original lock reproduced in CI and one of five head controls; the targeted repaired case, typed lint, formatting, and P2 review pass. The separate slow handle-cap case remains recorded in local controls. * perf(agents): prepare tool authority through session readers * fix(agents): retain all steering guards and exact sandbox reads * test(gateway): import the steering contract from its owner * test(reply): retain acceptance coverage with preparation tests * fix(agents): preserve legacy steering during worker preparation Keep run-owned policy preparation separate from caller lifetime bindings so released unbound V1 backends remain usable. Explicit caller assertions still require the guarded path, and legacy dispatch revalidates current owner and policy. Retain terminal availability classification and update indirect fixtures for real fingerprints, awaited question registration, and optional steering preparation. Focused proof: 299 tests in 11 files passed in 535.58 seconds; fresh P2 autoreview is clean. No schema, retention, durability, or configuration change. * fix(reply): retain input when its steering target completes Treat completion or abortion of the captured target during fingerprint preparation as follow-up admission. Keep caller revocation and live-target route changes fenced, and let the existing completion barrier settle before draining the next turn. Deferred-read regressions fail on the prior head and prove exactly-once follow-up at both await boundaries, revoked caller rejection, and aborted-owner settlement. All 26 focused tests, production/messaging types, lint and formatting pass; fresh P2 autoreview is clean. * test(gateway): await source reply publication in media fixtures Wait for the existing response-bearing dedupe receipt after source reply finalization before asserting the single terminal broadcast. Retain every content and persistence assertion without polling, retries, or a larger timeout. Validation: 3 focused cases and all 130 directive-tag tests pass on Node 24; Gateway test types, lint, formatting, diff checks and fresh P2 autoreview pass. * fix(agents): retain independent guards in prepared steering Compose the independent caller predicate with source preparation before actual enqueue. Keep Talk operator, owner, and completion-claim checks live while async and legacy compatibility owners retain policy refresh. Preserve released guarded queue adapters without an async companion. Real AgentSession regressions prove allowed enqueue and refusal before enqueue for false or revoked callers. Talk compatibility cases cover both sink generations. Also replace an observed pre-steering fixture deadline with its provider readiness signal. All 96 focused tests, relevant type graphs, lint, formatting and fresh P2 review pass. * fix(talk): prepare input for released control adapters Preserve rendered steering context, follow-up wrapping, and the transcript recorder for supplied four-argument Talk queue adapters. Revalidate the owner after awaited preparation and avoid creating a second recorder through an optional callback. Keep built-in message preparation inside its FIFO reservation. Cover released adapter inputs and revocation during preparation alongside the existing cross-surface ordering tests. The focused proof covers 64 tests across four files, and fresh P2 review found no actionable findings. * fix(ci): deduplicate skill preparation worker routing Keep the canonical worker-project entry after main and B1 both added the same test. The actual CI manifest reproduced duplicate ownership in five head runs; five pinned-main controls and the corrected manifest pass. * test(reply): preserve ordered reader batch cardinality
Observe the async binder called by runReplyAgent so the admission cases check publication and main-thread SQL before authority binding, then delegate to the original async implementation. Update the cleanup comment for the binder's current placement inside the runner's try/finally. Testbox proof on 3183807: before, exactly four handoff assertions failed and 221 tests passed; after, all 225 tests passed in 154.58s. Core and messaging test typechecks, focused lint, formatting, and independent review passed. Scoped check-changed stopped at an unrelated baseline unused export: OUTBOUND_GREETING_FALLBACK_MS in the voice-call realtime session controller.
What Problem This Solves
Tool-authority fingerprints, queued-input sandbox classification, and skill preparation still read session state on the Gateway thread. Moving those reads across awaits must preserve current caller authority, input custody, and steering order.
Why This Change Was Made
Use the existing session readers and captured physical sources to prepare fingerprints, route bindings, queue classification, and skill eligibility. Retain each source through preparation, consumption, validation, and cleanup; compare current policy at admission and reserve FIFO order through actual backend enqueue.
Compose independent caller assertions with prepared authority, retain terminal-delivery fences, and use exact-row worker reads for durable sandbox classification. Async SDK companions migrate bundled callers while released synchronous methods and callback shapes retain their compatibility window, documentation, and type coverage.
Integration preserves main's backend-readiness owner. Steering captures its backend before awaited policy preparation, rechecks the exact operation afterward, validates the caller before returning input to follow-up custody, and always settles typing cleanup. Final ordinary enqueue consumes current policy and terminal-delivery facts inside the existing worker admission; input construction and subscriber notifications stay outside that admission. Registry, Talk, embedded, and Gateway wrappers carry the complete preparation into this final boundary. Legacy descriptors must also check their captured source and row lineage before consumption; file-backed checks use the captured physical source outside worker grants, and incognito checks use published owner facts. Released Talk adapters still receive complete context, follow-up wrapping, and one transcript recorder.
User Impact
This is session authority B1. Parent #165028 landed at
4bd8ee5fedcb179527daeffffacbfa0920e61132; this branch integrates main4308a8fb8d929e515a4702afe248746afed8af45with merge commits, without rebasing. B2 #165552 remains based on this branch.The final change preserves released V1 steering, valid follow-up input when its target closes, refusal of revoked callers, and legacy Talk input/recording semantics. Once a sink accepts input, later backend, confirmation, participant-bookkeeping, or admission-cleanup errors remain indeterminate and cannot trigger duplicate follow-up execution. There is no schema, retention, durability, persistent-cache, worker-service, configuration, or protocol change, and zero new
OPENCLAW_*names. Streaming prompt preflight remains accepted after enqueue even when feedback fails. Delivery adapters settle observer failures and join in-flight admission when failed exact cancellation cannot prove safe withdrawal. If the delivery owner proves exact removal before submission, a typed withdrawal result permits fallback; current-source refusal and genuine delivery uncertainty still take priority, including through aggregate cleanup errors. Question transport/final dispatch and image-triggered question cancellation remain with B2.Overlap: worker session patches #165819, agent/Gateway cleanup #165907, early chat acknowledgment #165608, transcript source authority #165793, steering diagnostics #165876, parent A, observer #165205, native-session #165193, readiness/FIFO #165537, ACP registry retirement #165236, session signals #165681, and queued-turn recovery #164656. Overlapping cleanup changes are retained. Main's readiness and lifecycle changes are retained, including the deliberate removal of the private ACP registry. Earlier parent integration also included #164922 and test cleanup #165124/#165243. Related #156941 is closed; #162433 is the umbrella draft.
Evidence
Current integration proof
Integrated candidate:
3a0f95aa0a597223eb23ad70956e18a48accf6c4.The security remedy #165902 landed as
9c66e8f40532ffb29b658283168f3034f0f06c62; this candidate merges current main4308a8fb8d929e515a4702afe248746afed8af45without rebasing or conflicts. Only the mock ratchet, compiled-wrapper inventory, and native-completion test overlap B1, and both sides were retained. All B1 production source is unchanged. Main's published-source-map patch clears the local production dependency audit (no HIGH-or-higher npm bulk advisory); this branch adds no separate override beyond main.The complete post-integration type matrix passes: core/UI production, all 27 core test graphs, extension projects, scripts, and all four root-test graphs. Overlap-scoped typed lint and the line ratchet pass. A fresh three-pass P0–P2 review is clean. Main also fixes the Doctor fixture TS2739 errors; the three CLI mock-arity failures remain byte-identical to the independently attributed main failure. A read-only interaction audit found no lost B1 authority/custody fence and no new worker-routing gap across the registry, settled-turn compaction, and plugin-identity changes. Current runtime proof passed 118/118 cases across seven files in 132.86s (133.18s measured wall), covering native completion, session preparation/boundaries, settings, steering authority, plugin invocation, and prepared registry reads. All 38 import/wrapper checks across six files passed in 48.70s. An optional JSON-reporter invocation was rejected by the mixed-project runner before the full import batch could execute; the supported plain-output invocation completed all six suites. Source hashes remained unchanged and all test processes exited. The canonical local SDK comparison completed for
4308a8fb8d929→3a0f95aa0a597: digest472a8da8a681580604c6b87a9e90399dbe526cc04dc36819a6ec069f18f5d310, acknowledgement472a8da8. It reports 188 reachable changes and no added/removed entrypoints or exports. The two additional exports relative to the prior report (listProviderPluginCommandSpecsandgetPluginCommandSpecs) retain identical public declarations and have zero declaration-change entries; their reachability changed with main. The existing compatibility boundary remains sufficient.The released contract check now also covers v2026.10.1-beta.1, published 2026-10-05T19:47:49Z (tag commit
6830fe76b3db05ad59e8ff7f0f872d4e2639a1fe). Actual beta SDK exports and runtime paths retain the same synchronous snapshot/operation methods, V2 queue callback, nativewithCurrent, four-argument Talk adapter,Agent.steer, and synchronous sandbox resolver. Existing compatibility records and type tests cover those beta shapes; optional companions remain additive. No new beta-reachable signature gap was found.The prior integrated head
7f7e81c5a25e5707cb0cc27d05c940c8846181eapassed 95 custody/lifecycle cases in 246.20s, 90 lookup/policy cases in 312.86s, and six runtime/wrapper import suites in 171.42s on Node 24.21.0 with--maxWorkers=1. Production and five affected test-type graphs, type-aware lint, line ratchets, and environment count (464/464) passed. Its full five-pass P0–P2 review found no actionable issue. The SDK report completed with 186 reachable declaration changes and no removed entrypoints/exports (acknowledgement10c9545c).The preceding main merge resolves two textual conflicts while preserving both sides: main’s worker transcript source companion and structured steering fallback diagnostics remain alongside B1’s awaited authority, exact lookup retention, and accepted-input custody. The full post-integration type matrix passed: core/UI production, all 27 core test graphs, extension projects, scripts, and all four root-test graphs. Conflict-scoped type-aware lint and the line-cap ratchet also passed. Focused proof passed 21 native binding/transcript cases in 88.53s, 15 selected diagnostics/receipt E2E cases in 60.90s, 37 worker/question-adoption cases in 56.97s, and six runtime/wrapper import suites in 76.38s. E2E used isolated source fixtures with the supported build-skip route; 210 unrelated cases were unselected. Prior-head CI remains prior-head evidence.
node scripts/run-vitest.mjs <files> --maxWorkers=1. Receipt E2E used the supportedOPENCLAW_E2E_SKIP_BUILD=1source-fixture route with isolated state; it did not rebuild managed Gateway artifacts.f19b8dcc43c6eplus fresh review of the full final main-integration delta and accepted-input guard repair. No accepted/actionable finding remains. Earlier review findings have the dispositions and before/after proof described below.b1f85addba465→4df384ebcca43, reviewed acknowledgement086da878(full digest086da878cd140a23a280e2fefacf71231290d46355b4d69d0042132dfa3c48f5). All 186 entries are reachable declaration changes, identical to the prior reviewed declaration-change set; no entrypoints or exports were added or removed. The later one-line routing correction changes no SDK input. Released synchronous signatures remain supported through optional awaited companions, compatibility records, and type tests.50c18b08c7361c2aa5a342dd2b914ac0f8da83b9with the same086da878digest and no removed entrypoints or exports. ClawSweeper completed on that head at 2026-10-06T03:18:20.985Z with no actionable introduced defect. Its config/data-model checklist is addressed by the unchanged configuration and stored-data contracts and the released-SDK compatibility evidence above. That head’s security audit was blocked; the current integration above carries the landed remedy. No inherited-CI admin exception has been used.Before-fix controls reproduced terminal receipt closure during initial and final native preparation, plus registry/Talk policy changes after reader cleanup; unrelated tombstone and benign metadata controls remained allowed. Separate acceptance controls reproduced rejected outcomes after sink acceptance, rejected confirmation, participant-bookkeeping failure, and a real accepted input incorrectly becoming a follow-up. Final green proof is recorded with the candidate below.
The new target-replacement regression failed by enqueueing into the replacement backend. A separate readiness regression failed by acknowledging revoked input as a follow-up; its allowed control passed. After repair, both pass. Existing no-execution-before-settlement assertions now use the real reply-admission owner, matching main's parked-queue contract. The legacy-receipt tests retain committed-answer, replay, and cancellation assertions after retiring setup that supplied the removed precomputed authority parameters.
Final authority corrections
Persistence failure now closes acceptance immediately and joins in-flight steering admission before reporting completion. Successful enqueue retains acceptance and the original persistence error; rejected cleanup preserves both errors and all existing uncertainty/refusal markers. A six-row terminal/abort/handoff matrix also prevents replay unless the owner proves exact withdrawal. The real AgentSession append regressions and pre-enqueue controls failed before the repair; no assertion or authority guard was weakened.
Final policy validation retains the complete original Gateway lookup plan, all scanned candidates and absences, the registry witness, and the selected physical source. It replays canonical selection instead of reconstructing only the selected store. Cross-store regressions use real upsert/delete producers and preserve unrelated-write controls. The first implementation read
databaseIdentityfrom exact projections, which actually publish identity insource; four valid Gateway steering cases and 13 preparation cases exposed that mismatch. The owner now consumessourcewithout weakening physical-identity validation, and all cases passed before this latest main merge. The earlier alias-only hypothesis was rejected because canonical selection already excludes duplicate/noncanonical rows. The Gateway APIs keep their existing signatures and results; retained plans are internal and opt-in.The final main integration preserves early chat acknowledgment and its inherited FIFO ticket. The sole text overlap retains both the awaited injection call and the diagnostics phase marker. Its complete type matrix, conflict-scoped type-aware lint, and line ratchet passed. The first eight-file chat batch passed 95/96 cases; five whole-file candidate reproductions each failed the same browser lifecycle source-error assertion, while five isolated runs on exact main
c20c6e5passed 18/18. Baseline execution-time module snapshots and package sources were verified baseline-owned.This was a PR integration defect: main’s new unconditional source-admission guard interrupted finalization after the sink had already accepted or retained indeterminate input. The entry guard now applies to fresh work. Already-owned input finalizes its immutable captured outcome and returns or fails through terminal cleanup; it cannot fall through to fresh dispatch. The later post-authoring guard remains unconditional. Original test expectations are unchanged. All 96 cases across the eight chat files passed in 180.67s on Node 24.21.0 with
--maxWorkers=1. Fresh P0–P2 review and affected types/lint/line checks are clean. The full f19 candidate had six clean review passes; the final incoming-main delta and guard repair received an additional independent clean P0–P2 review.The latest main integration preserves the timer/type cleanup and real worker-patch coverage. A final-grant regression then exposed a durable-state gap: skill persistence rejected a revoked caller after the write, while the stored row had already gained
skillsSnapshotandsystemSent. The corrected before-fix test produced one intended failure and five passing controls in 20.04s; an earlier probe that hit an unrelated read grant was discarded as non-proof. The existing positive case remains, and no original assertion was weakened.The repair preserves the operator’s prepared source metadata through
composeSessionSourceAssertionand passes it toworkerGuard.source. Same-store facts reach transaction-local predicates; no SQL-capable callback is added directly to a worker grant. Existing native/cross-store handling stays with the patch owner. Both changed functions are internal, remain callable with their existing signatures, and have no released v2026.9.8 plugin-SDK/runtime/documented exposure.Current proof: 36 skill, patch-owner, and caller cases passed in 83.98s; 45 lifecycle cases passed in 58.74s; six runtime/wrapper import suites passed in 63.72s. The complete core/UI production, 27 core-test graphs, extension projects, scripts, four root-test graphs, touched type-aware lint, and line ratchet passed. Fresh two-pass P0–P2 review of the complete incoming-main delta and source-guard correction is clean. The new durable-revocation case takes about 1.6s locally because it exercises the real worker transaction; hosted CI seconds remain unavailable while the required dependency audit is blocked.
Worker routing and lifetime audit
The indirect-consumer audit exercised all nine suites outside the host-owned inventory:
dispatch.question-input,agent-runner-execution-probes,agent-runner-fallback-steering,agent-runner-steer-adoption.question-recovery,agent-runner.media-paths,agent-runner.media-ownership,agent-runner.final-media-runreplyagent,agent-runner.stalled-turn, andqueue.media-carrier. No missing-host-broker refusal was observed, so no additional routing change was made. Existing B1 host-owned routing remains; CLI/offline and incognito owners retain their supported local contracts.The two P7f1 patterns were checked across the combined policy, skill, anchor, and lifecycle owners. Physical reader owners remain retained through scan/consume/validate/cleanup, acceptance callbacks reject unaccepted snapshots, and ordered reads compare current physical identity and mutation facts. The steering integration required the captured-target and final consuming-frame fences described above. A separate peer-scoped sandbox-policy row can change while the execution backend remains active, so checking caller/registration liveness alone was insufficient. Native and ordinary final admission now validate that mutable policy with the receipt before enqueue; legacy compatibility stays outside worker grants.
Wrapper/import proof passed for
runtime-process-build-graph,get-reply.imports,openclaw-state.worker.imports,worker.runtime-imports,worker-turn-launcher.imports, andeager-import-closure.Released contracts and remaining synchronous work
Released surfaces were checked against v2026.9.8. Synchronous reply-operation methods, two-method snapshot literals, V2 queue methods, and four-argument Talk adapters remain supported. Async companions are optional, with compatibility records, migration guidance, and type tests. No stored-data migration is required.
Process-held incognito state uses its existing writer's published receipt facts, including pending transaction postimages and rollback. Complete core preparations use worker-owned row predicates; unsupported/partial released preparations keep full synchronous policy, receipt, and lineage checks outside worker grants. Legacy ordinary preflight remains inside the existing FIFO reservation. The Gateway's initial
canAdmitreceipt read remains as follow-up debt atsrc/gateway/server-methods/chat-send-message-injection.ts:94so the initial question boundary is unchanged; final ordinary/native receipt checks use prepared descriptors. Question compatibility guards gained no receipt SQL. Boundary tests assert zero caller-thread SQL for the moved operations, not a blanket zero-SQL claim for unrelated live-authority checks.Inherited follow-up:
extensions/codex/src/app-server/attempt-steering.ts:122and:133invoke settlement observers before completing their promises. A throwing observer can strand completion; those helper bodies are unchanged from the integrated baseline and were not broadened into this repair.The released
Agent.steer(message): voidsignature and immediate notification behavior remain unchanged. The additiveAgent.admitSteeringMessagelets the host install queue state inside admission and notify afterward.AgentSession.queueSteeris private; its two internal callers were migrated. The optional steering preparation companion preserves the released call shape.Historical performance measurement
These measurements belong to the original B1 workload, not a rerun of the landing corrections or integrated candidate. Accepted baseline:
d3576a5453b0e9750010fa4cd6d8ea24c5990489. Parent comparison:ab39f70e5054a8ba54aec677be71ff53478e0b00. Measured B1 head:b2b681b644732ce05e0421b138c112b073dd1dc4, runtime-identical to original approved headaee090ace971e77b8a39279939d7bad8b131449e. Node 24.21.0 was used. Aggregate reductions include parent and intervening main changes.Warm MAIN vector:
[154,154,154,154,154,163,212,154,154,154]. The two B1 cohorts also recorded zero MAIN statements across the full workload. Maintenance/admission in turns 6–7 remains counted. Aggregate MAIN declined 10.7%; all-thread statements increased 14.7%. First-turn MAIN was 765 → 793. Shared primitives retained for workers/SDK consumers remain in the static inventory.All 13 turns, child execution, cron, compaction, and graceful shutdown passed. 36/37 RPCs succeeded; an absent-mention dismissal returned retryable
UNAVAILABLE. One shutdown-workerBEGIN IMMEDIATElock failure is excluded from successful-statement counts; no MAIN or warmed-phase SQL error occurred. Build: 745.9s; workload: 353.7s; ready/post-ready RSS: 986.0/1,210.4 → 950.2/1,170.5 MB. Loaded-host timing is an observation, not a latency claim.The mention-dismissal trace rolls back in the unchanged shared-state transaction owner before mention-head reads/writes, with no failed SQLite statement in that phase. The same public symptom was previously recorded on main base
b344da3b9855; later main and B1 probes passed. The catch discarded the exact refusing exception, so precise cause and load dependence remain unresolved. Those passing probes do not establish a fix; no speculative retry or weaker guard was added.Landing failure attribution
Initial CI 37270418326 failed six Node shards. All 80 requested single-file attribution runs completed: eight files, each run five times at the original head and five times at its pinned base, with the original file order and
--maxWorkers=1(15,095.48s cumulative wall).Every original CI failure reproduced in all five head runs. Seven files passed all five baseline runs. The handoff baseline had three failures at an earlier provider-entry polling deadline and two passes; those earlier waits do not make the PR's authority failure inherited. Two additional media cases exceeded terminal-publication polling only in head repetition five and passed all five baseline runs. Both fixture waits now use existing owner signals, without retries or timeout increases.
The steering/compatibility corrections passed focused proof and fresh P2 review. Prior corrected heads completed green CI runs 37277098220, 37283225365, 37287352350, and 37299652671. These remain prior-head evidence. ClawSweeper's last pre-integration review, at 12:24 UTC on
24b647065d51, found no actionable findings or security concern.The first integrated run 37391111728 failed four Node shards, covering four files and six assertions. All 40 requested whole-file attribution invocations completed (five head and five merge-base runs for each file), with no unexplained additional failure:
80d27bdf9111d1aa2d5c1334432d099a6dd4a4f7(fix commit50b3573d11eab3bb9a5792c05c64cd7feaccffc7), then merged here.Agent.steerprobes in all five head runs and passed all five base runs. Their probes now observeAgent.admitSteeringMessage, the actual insertion owner. All queue, custody, revocation, and transcript assertions remain intact.The head/base custody and media repetitions used the recorded supported Node 26/24 runtimes; both failures were independently observed in Node 24 CI. Talk/native comparisons and repaired proof use Node 24. The SDK comparison and ClawSweeper review subsequently completed on
50c18b08c7361c2aa5a342dd2b914ac0f8da83b9; its CI outcome is recorded below. ClawSweeper completed7f7e81c5at 2026-10-06T01:54:49.221Z with no actionable correctness or security findings; its SDK/conflict checklist referred to the then-pending final report and main integration. The main test correction followed the authorized direct-push red-main workflow. No PR CI rerun or inherited-failure admin merge has been used.Required security gate
Main CI 37402399816 independently fails its production dependency audit on
[email protected](HIGH GHSA-68fv-2mgg-jv7q). Fix #165902 subsequently merged as9c66e8f40532ffb29b658283168f3034f0f06c62, and the current candidate integrates that trusted main change. Its[email protected]override and version-specific release-age exception (normal admission time 2026-10-07T14:08:09.382Z) belong to main. The local production audit now passes; current-head hosted security still remains required. The PR delta adds no dependency override or security exception beyond main. The inherited-CI admin route cannot waivesecurity-fast.CI 37406450302 failed at preflight and the independent security audit; its aggregate gate failed and 37 dependent jobs were skipped, so no passing hosted test coverage is claimed. Main and B1 had independently added
session-updates.exec-preparation.test.ts, leaving duplicate worker inventory entries. Five actual manifest runs on the PR reproduced the exact duplicate-ownership failure; five on pinned mainb1f85addba465passed. Removing only the duplicate retained the canonical worker entry. The corrected manifest passed in 28.18s using the same recorded CI selection flags and 112 changed paths, and its generated plan owns the test exactly once. A fresh P0–P2 review of this one-line correction is clean. No production code, test assertion, or SDK input changed.CI 37407618344, head
50c18b08c7361c2aa5a342dd2b914ac0f8da83b9, tested merge8d788d1463f48413aaf473f37bcf87afb8247a00against main282f796dfa057e1e21fcdd0f3686712578b0c0e9. It completed with 75 successful jobs, four failing roots plus the aggregate CI gate, and 23 skipped jobs.checks-node-changed-compact-small-33: three TTS credential-hydration cases insrc/cli/capability-cli.test.tsexpect a one-argument mock call. Main commit10481d69470bb(refactor(cli): deslop CLI and commands #165900) now always passes an optional second argument, explicitlyundefinedwhen absent. The runtime accepts that argument; hydrated config still matches. Five whole-file runs each on this PR head and itsb1f85addba465merge base passed 84/84; all five on the CI main parent reproduced exactly those three failures (81/84 passed). This PR changes none of the failing test, producer, or snapshot owner files.check-test-types-core-4: main's same cleanup removed the explicit maintenance return annotation. The flow fixture insrc/flows/doctor-health.migration-refusal.test.tsno longer meets the inferred shape. The exactothertype graph passes on this PR head and itsb1f85addba465merge base, and reproduces both TS2739 diagnostics independently on the CI main parent. The fixture and return-type producer are unchanged by this PR.checks-node-changed-compact-large-20-1: the new queue grouping path passes an empty batch to the ordered session reader. The sharedfollowup-turn-execution.test-support.tsmock assumes exactly one input and dereferences its absent first item.queue.personal-bootstrap-overflow.test.tstherefore enters repeated detached-drain failures before the test's consumer is called. This is PR-reachable fixture incompatibility, not an inherited failure. The mock now maps zero, one, or many inputs to the same number of ordered results. All five bounded whole-file head probes reproduced the same error; they were stopped after recording the repeated error and are not completed assertion runs. All five whole-file baseline runs passed 3/3. The original file and every shared-fixture sibling then passed: 41/41 cases across six files in 50.11s, with 380ms summed test time for the three overflow cases. Source hashes remained stable and all owned processes exited. Production behavior, assertions, and test routing are unchanged; the real-worker siblings retain their existing host-owned routing. A fresh P0–P2 review of the fixture-only patch is clean.The latest scheduled main run predates
10481d69470bb; no matching scheduled-main proof is claimed for the CLI or Doctor cleanup failures. Their attribution rests on independent exact-main reproductions and unchanged affected source.The final fixture-only repair is
573c2852d20719a11bc9162910565b73da6e9d51. Its affected messaging test-type graph and type-aware lint pass. ClawSweeper completed this exact head at 2026-10-06T03:40:26.889Z with no actionable introduced finding. Its remaining dependency-audit prerequisite is mandatory; the generic config/data compatibility checklist is addressed by the unchanged configuration/stored-data contracts and released-SDK evidence. CI 37409631431 completed/cancelled aftersecurity-fastfailed on the same advisory. Its successful failure monitor cancelled 71 other jobs; five jobs succeeded and 23 were skipped. The aggregate gate explicitly identifies security job112095306518as the originating failure. This is incomplete hosted test coverage, not passing CI; no blind rerun was requested. The complete50c18b08SDK report remains applicable: this commit changes only test support, with no production, SDK, declaration, dependency, or build-input changes. That cancelled run remains prior-head evidence. The integrated security remedy and current qualification are described at the top of this evidence section.Final exact-head CI qualification
CI 37411828975 completed on
3a0f95aa0a597223eb23ad70956e18a48accf6c4: 77 successful jobs, 23 skipped, two failed, zero cancelled. The only failing root is CLI job 112102140744, with exactly the three previously reproduced TTS mock-arity cases; the second failure is its aggregate gate. Hostedsecurity-fast, sensitive review, all core typechecks, and the formerly failing queue shard passed. No hidden failed step exists in another job, and no CI rerun was requested.The actual tested merge is
4c5c3a18609eb2f323e5a60bd93b264b220ea5ea, with ordered parents mainad99343036ffbed53d8977790bdb4d28dd984db2and this PR head. Its tree exactly matches Git's merge of those parents. The failing test, its CLI producer, and the runtime snapshot owner have identical blobs across the independently reproduced main, CI main, this PR, and the tested merge. Main-only changes absent from the PR's first-parent history are preserved in the tested merge. The five retained main reproductions each fail only these three cases; this PR does not touch those causal files.ClawSweeper completed this exact head at 2026-10-06T04:09:23.222Z, with no actionable introduced correctness or security finding. Its review text explicitly rejects the previous generic configuration/upgrade concern; this change does not alter configuration or stored-data contracts. The authorized native inherited-failure route is selected with complete evidence. Mandatory security, current owner authority, and review admission remain enforced; failed CI is not described as green.