Repository navigation
refactor(agents): consolidate remaining runtime lifecycle paths - #168770
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
|
Codex review: needs changes before merge. What this changesThis PR shares repeated agent runtime operations within their existing owners while preserving behavior. Example: A noninteractive node exec request requires approval for
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it is a useful maintainer-directed consolidation, and source review established no introduced defect. Priority: P3 Before merge
FindingsNone. Provenance
Agent review detailsHow this fits togetherAgent runtime owners consume prepared configuration, credentials, session context, and tool requests, then produce provider requests, execution results, streamed messages, and settled lifecycle state. flowchart TD
A[Gateway or CLI request] --> B[Prepared agent runtime]
B --> C[Model and auth owners]
B --> D[Tool and approval owners]
B --> E[Identity and workspace readers]
C --> F[Provider and tool execution]
D --> F
F --> G[Transcript and stream processing]
G --> H[Reply and lifecycle settlement]
Technical reviewBest possible solution: Retain the smaller shared operations with existing authority, replay, and storage contracts intact. Do we have a high-confidence way to reproduce the issue? This is a refactor rather than a reported product bug; source inspection verified the central equivalence claims, and no target code was executed during this review. Is this the best way to solve the issue? Sharing repeated operations inside their existing owners is appropriate, and the inspected changes preserve policy precedence, lifecycle ordering, and caller-visible results. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 90f04bfb10df. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
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 (8 earlier review cycles)
Reviewed October 11, 2026, 4:30 AM ET / 08:30 UTC (Revision 9). |
16b5147 to
cc8ee8e
Compare
cc8ee8e to
d6012fa
Compare
|
Exact-head CI disposition for Run 38122624811 is complete. Every check run was freshly enumerated: 123 success, 56 scope skips, four failures, one neutral; no pending or cancelled checks. Dependency review and security-sensitive review are successful. The failures below are inherited; failed CI is not being relabelled green.
The Linux main output is: The Linux candidate output is: Both detailed failures match hosted CI: settlement acceptance at line217 receives zero callbacks instead of one The owned Docker container was stopped and removed after collecting both results. No remote lease was allocated. No timeout, retry, skip, assertion, scanner rule or fixture was weakened. The lane removes 916 net production lines (+1,628/-2,544 across 130 production files). The complete local changed-check sequence passed. The final conflict-free rebase leaves all six lane commits patch-identical and every lane production file byte-identical to that validated revision; current core types, runtime cycles (zero), Madge (zero), and lint-suppressions passed. SDK comparison/review found no supported contract change (acknowledgement |
…claw#168770) * refactor(agents): share remaining runtime projections and lifecycle paths * refactor(agents): retain the catalog transaction query owner * refactor(agents): preserve narrowed result and wait types * refactor(agents): preserve resolved TLS optional value types * refactor(agents): tighten shared worker and catalog contracts * refactor(agents): retain exec environment preparation
) * fix(context): context budget falls back to 200k for bundled provider models in cold sessions * fix(context): context budget falls back to 200k for bundled provider models in cold sessions * fix(context): context budget falls back to 200k for bundled provider models in cold sessions * fix(context): preserve discovered context provenance * fix(memory-flush): keep server compaction threshold resolution synchronous * fix(context): keep authored config windows non-sticky on ownership ties * fix(context): drop the test-only parallel budget resolver The exported flush window resolver was reachable only from its own tests, so the bundled cold-budget fallback could regress in production while the suite stayed green. Remove the helper and cover the bundled catalog windows through runMemoryFlushIfNeeded, the actual maintenance boundary that feeds resolveMemoryFlushPlan. * fix(sessions): context window shows 200k for plugin-discovered models Embedded runs labeled every run-level context window as legacy resolved, which cold session projections intentionally distrust, so sessions list and /context fell back to the 200k default when synchronous catalog lookup could not see the model. Carry the resolution source from run preparation and persist model- or config-resolved windows as resolved-v1; the generic default keeps the legacy marker. * fix(sessions): clarify context provenance comment * fix(agents): let accepted discovery replace synthetic context fallback Related: #156635 * test(agents): cast override fixture config through unknown * fix(github-copilot): keep a missing /models native window synthetic When Copilot /models omits or reports an invalid max_context_window_tokens, the mapper filled in the 128k default as if it were a reported native ceiling. With a real max_prompt_tokens present, that fabricated window became authoritative and could both clamp the prompt limit and grant replacement authority over the synthetic fallback. Mark that default with the same contextWindowSource: "synthetic" provenance used by the unknown-model branch, never let the estimate sit below a real prompt limit, and thread the marker through the provider result copy, persisted catalog schema, model registry and config merge. Authored contextWindow/contextTokens clear the marker. Supersession now requires a reported limit: a real prompt limit, or a non-synthetic native window. A genuinely reported 128k window is unchanged. Reported-by: snotty <[email protected]> * fix(sessions): recover synthetic 128k session capacity from its admitted owner An existing session whose persisted telemetry came from the synthetic 128k fallback stayed at 128k after discovery until a later run, because the projector trusted it as runtime telemetry and took min(persisted, resolved). - Embedded runs stamp contextTokensSource: "synthetic" when the prepared budget is exactly a provider unknown-model estimate (no reported prompt limit, authored cap, modelsConfig sizing or narrower caller budget), including failed/cancelled attempt metadata. - Synthetic rows are never trusted telemetry, including locked sessions. - /status and session_status bind the displayed session to its admitted prepared owner (agent + spawned workspace) before choosing capacity. A synthetic row takes that owner's accepted capacity (or an authored cap). An unbound, retired, failed or model-less owner settles as owner-scoped unavailable and renders unknown, never the stale estimate or another owner's process-global cache value. - Genuine (non-synthetic) persisted 128k stays conservative. * test(proof): add redacted patched-Gateway capture for #156636 Adds a human-run procedure and script that capture /status and session_status context lines from a patched scratch Gateway for a fresh session, existing-session recovery and an account switch. Output is redacted (tokens, IPs, phone numbers, emails, private endpoints, paths, account/session ids) and the script never starts a Gateway, writes config or reads credentials. --self-test exercises the redaction rules. * fix(sessions): keep authored context windows out of resolved-v1 Authored models config windows and caller budget caps are removable operator config. Persisting them as resolved-v1 let cold session projection keep publishing a cap after the operator removed it. * fix(sessions): keep selectable context windows out of resolved-v1 A model that declares context-window options sizes its budget from the session's window selection (or the declared default). The cold session reader matches resolved-v1 rows only by provider, model, and harness, so a persisted 200k selection could outlive a later switch to 1m, and the reverse. Keep those budgets on the legacy resolved marker. * test(agents): move context provenance cases to a sibling e2e file embedded-agent-runner.e2e.test.ts is over the line cap, and the line-cap ratchet rejects any growth there. The provenance cases only need the fast-run mocks, so they live in their own e2e file. * fix(status): correct stale context limits after model discovery * test(copilot): use current context cache fixture owner * refactor(copilot): keep context contracts within owner size limits * test(agents): consolidate context provenance coverage * fix: preserve declared provider catalog context windows * fix: separate configured context constraints from runtime capacity * test: diagnose native catalog admission failures * fix: resolve context budgets from current model catalog authority * test: account for context capacity through the published catalog owner * fix(copilot): finish catalog publication caller cutover * fix(context): apply configured budgets across native runtimes * fix(agents): preserve synthetic context provenance in run metadata * fix(context): qualify persisted capacity by runtime and account * test: update media fixture context budget mocks * test(cron): remove duplicate selection coverage * fix(status): project context from current session owners * test(sessions): distinguish unavailable native capacity * fix(agents): preserve authored caps and compaction provenance * fix(status): use discovered capacity for current session reports Keep status, context reports, session listings, and Gateway defaults bound to current model metadata and verified session budgets. Do not clamp admitted display facts to a stale process cache or invent a default denominator when capacity is unknown. Preserve the original discovery/status fix by @snotty while dropping the independent Copilot accounting stack. Co-authored-by: snotty <[email protected]> * fix(sessions): borrow published local gateway capacity Consume the active local Gateway catalog without starting discovery, and resolve automatic runtime selection before matching a verified saved budget. Keep API capability fallback separate from native capacity and include that choice in the Gateway row memo. * test(context): use local model capacity fixtures Keep generic context-report fixtures on the OpenClaw runtime so they do not borrow API metadata for an implicitly selected native harness. * fix(status): preserve runtime choices and scoped report ownership Keep additional Gateway runtime capacities in CLI catalog conversion. Resolve summary defaults only through an available agent owner, and keep namespaced transcript model IDs bound to their current provider catalog. Update neighboring regression fixtures to supply admitted metadata or expect unknown capacity. * fix(sessions): preserve spawned workspace capacity ownership * test(context): cover captured reporting cache isolation * test(context): retain contributor cache-isolation coverage Co-authored-by: Mike <[email protected]> * fix(sessions): retain offline listing when Gateway inspection fails --------- Co-authored-by: zhang-guiping <[email protected]> Co-authored-by: Yigtwxx <[email protected]> Co-authored-by: saju01 <[email protected]> Co-authored-by: Dallin Romney <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: snotty <[email protected]> Co-authored-by: Mike <[email protected]> (cherry picked from commit 8eefd33) Backport notes (release/2026.10.5): - src/agents/context-resolution.ts: conflict only in the configured-token early returns, which main had collapsed (ea1e27e, #168770 refactor). Kept the branch's two equivalent early returns and took main's allowCacheLookup-gated provider cache lookups unchanged. - src/auto-reply/reply/commands-status.test.ts: main deleted three /status cases in ce34a0f (#169092) before this PR landed, so the PR never updated them. They still exist on this branch and asserted the stale behavior this fix removes. Updated them to the PR's contract, the same way the PR updated src/auto-reply/status.test.ts: unknown capacity renders "?" instead of the 200k default, a provider-local slash transcript model binds to its admitted catalog entry, and an unresolved active fallback no longer reuses the caller's live contextTokens.
First-parent upstream d9eba8a..facdd3c (13 PRs, including openclaw#168847 reply session coordination, openclaw#168833 Solid MCP apps, openclaw#168770 runtime lifecycle consolidation, openclaw#168840 Solid settings pages). Conflict: - src/auto-reply/reply/commands-system-prompt.ts: upstream dropped the try/catch around createOpenClawCodingToolsAsync; took upstream's form and re-applied our only delta (buildInventoryContinuationToolOpts spread). Auto-merged files carrying continuation overlay, reviewed: - transcript-redact.ts: upstream's sanitizedField restructuring leaves our sanitizeTranscriptToolCallBlock projection in front of the walker intact. - embedded-agent-utils.ts / subscribe snapshot, update, stream-rendering: upstream factored createAssistantStreamBlockState; display-text sanitization untouched. - session.ts: upstream's rollover simplification is disjoint from our clearReplacedSessionRuntimeState call (continuation reset authority). - session-updates.ts: upstream dropped the skill-snapshot expectedSession guard; our newSessionId/sessionKey compaction projection args kept. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
What Problem This Solves
Agent runtime maintenance still requires updating repeated auth, execution, catalog, and message-processing paths that perform the same work.
User Impact
No user-visible change. Features, configuration, CLI flags, protocol and stored shapes, tool descriptions, prompts, and error text retain their existing behavior.
Why This Change Was Made
Share those operations within their existing owners, with explicit parameters for real differences. The main reductions cover identity/avatar read lifecycles, exec approval and denial results, shell scanning, model/auth projections, Code Mode dispatch, and message/tool transformations. Authority checks, lazy-loading boundaries, and cleanup ordering remain intact.
This final d31 pass removes 916 production lines (+1,628/-2,544 across 130 files), excluding tests, fixtures, support and generated files. It uses the authorized 500–999-line exception after a completed deep pass: 990 production files have per-file coverage notes. The campaign's 3% target is not claimed. The only test change removes an unused internal argument; every assertion remains.
Evidence
Current candidate:
d6012fa46f076da0a5df6d4634bd33f053a19e71, based on43c68c34df71bed694fc4b1de0725f5e7495b8c1. The named Codex CI gate required integrating upstream #168801, which moves transcript admission outside writer locks. All six lane commits are patch-identical after this conflict-free rebase; all lane production files are byte-identical to the previous reviewed head. The earlier publication conflict repair retainsrebuild() -> stage() -> #publish()and main's notification lifecycle.The coordinator-directed sequential comparison used independent frozen installs on the same machine (Node 26.5.0, pnpm 12.9.0), first clean main, then the candidate. Text-end reconciliation, workspace publication and sandbox publication all passed: 3 files / 33 cases on each revision, in 599.601 and 459.096 wrapper seconds respectively. Main already includes the stream-boundary fix
9931e6efb02and fs-safe fallback coverage correction8f1dfe36e47; no assertion or dependency was changed in this lane.Current-head production types, runtime cycles, Madge, and lint-suppression tests passed; both cycle counts are zero. Full-candidate P0–P2 review on the byte-identical prior head repeated the existing-agent finding discussed below; the complete unchanged guards disprove that path. No actionable finding was accepted. The older evidence below remains explicitly historical.
The previous reviewed head passed the complete native changed-check sequence in 7,499.666 seconds, including every selected type, lint, dead-code, ratchet, and runtime guard. It also passed four rebase-focused files / 28 cases (1,245.016 seconds) and all three wrapper source-closure cases. This proof is retained for the unchanged lane code; new critical runtime context was checked separately on the current head.
The canonical SDK comparison on
45630ed8→cc8ee8e2completed in 4,108.786 seconds and was independently reviewed: 151 affected export records (150 reachable changes and the same private-class signature change), zero entrypoint/export additions or removals, and no supported contract difference. All nine declaration pairs match the previously reviewed comparison; the two additional affected gateway-runtime records have identical before/after signatures and empty declaration-change arrays. TLS optional-undefined fields remain intact. Acknowledgement2bb4f9fcbelongs to that exact comparison (full digest2bb4f9fc5606281a25b69957639de95a0a807306a5aa9886927c8c25213bd2f7); it is reused for unchanged lane bytes, not relabelled as a new comparison.Upstream #168801 landed after
cc8ee8e2CI's captured base and addresses the investigated writer-lock/admission cycle. With that fix, the exact ten-file selection passes all 168 cases locally on clean main (1,127.746 seconds) and the current candidate (550.809 seconds), using Node 24.19.0 and two workers. The passing candidate includes every previously failing steering, acceptance, persistence, and cleanup case. The hosted Codex sequence still fails ond6012fa4; local passing results do not resolve its attribution. Earlier Node-26 single-worker probes had different startup-budget failures. No test deadline, assertion, retry or skip was added.Exact-head run
38122624811completed. The final census is 123 successful checks, 56 scope skips, four failures and one neutral result, with no pending or cancelled checks. All three failed test jobs are independently reproduced on main: the Gateway PID fixture; the stalecat-file blobinjection (also repaired upstream by #168975); and the complete six-case Codex sequence. The aggregate only reflects those jobs. The Linux comparison ran all ten Codex files sequentially on main and this head in one secretless Node24.19.0 container: both report 162 passed / 6 failed, with identical case outcomes and detailed errors after normalizing only report formatting and temporary database paths. The exact failed persistence sub-operation remains unproven; matching main failures are not relabelled as passing tests. No timeout, assertion, retry, skip, or scanner policy was changed. The historical tables below remain prior-head evidence.The final follow-up withdraws a three-line cleanup in
bash-tools.exec-request-preparation.ts, returning that file exactly to its integration-base bytes after the changed-path scanner flagged inherited Git-environment lookups. It changes no rule, suppression, signature, import, or runtime contract. Independent P0–P2 review cleared this withdrawal. Four focused files (45 cases, including the lint-suppression guard), production and agents-root test types, lint, formatting, runtime cycles and Madge passed for the follow-up. Runtime and Madge cycles are zero.The full-candidate proof at
86e56cdremains separately identified below. The complete earlier ordinary selection atb670173accounted for all 2,048 files but had 65 failed cases. Local validation retains unresolved failures and missing proof; no fully green local or blanket inherited-failure claim is made. Exact-final-head hosted CI remains the landing gate.86e56cd: two duplicate findings rejected after complete control-flow inspection; no accepted actionable finding. Final withdrawal: scoped-clean, 271.346 seconds.86e56cd; the three lint-suppression cases passed again for the final withdrawal. Its signatures/imports are unchanged.node scripts/check-changed.mjs86e56cdstopped at 456 environment names versus budget 455; candidate and exact base had identical sets. All seven affected static gate commands passed separately. Local dead-export production/full-tree scans remain missing proof as detailed below.86e56cd; remaining source is unchanged.2dd328a→86e56cdcompleted in 2,612.968 seconds: 149 affected exports (148 reachable changes, one private class declaration change), zero entrypoint/export additions or removals. The nine declaration deltas and optional-undefined TLS domains were independently reviewed; no new supported contract difference was found. Acknowledgement6793abc7belongs to that exact comparison. The final withdrawal changes neither exports nor signatures.86e56cd, all 21 exact affected targets passed: 344 cases, no skips, 1,815.814 seconds. The final withdrawal passed all four targets / 45 cases with no skips in 759.516 seconds, covering workdir delegation, environment errors/hooks and lint suppressions.b67017316b51479c24ceaa236976083af2604bf2453e416: seven failed test jobs plus the aggregate; zero cancelled checks. The precise changed-path scan passed. The coordinator authorized the subsequent conflict repair and parity work described above. The completed first attempt belongs to86e56cd; its failed jobs are recorded below. The zero-step cancelled Auto response job was rerun and passed under the earlier instruction. No old-head result is claimed as current-head hosted proof.Historical 16b5147 head: all failed jobs and then-current landing blockers
Current run
38105112899tested mergeb2a9ae9e474d9542c066db2276bc544c26acf097, whose parents are main5ff4d101c72d7561acd0f7f4cd66f8ea1de69bb8and head16b51479c24ceaa236976083af2604bf2453e416. The exact merge object and parent identities were fetched and verified. The final check-run census contains 120 successes, 50 scope skips, eight failures and one neutral result, with no pending or cancelled check runs. The separate security-sensitive and dependency-review statuses are successful; the CI-gate status is failure.\nSecondinstead ofSecond. Exact-source inspection locates main commit3666e847: empty-group filtering loses the separator in the synthetic prefix, leaving the consumed offset at five instead of six. P3 substitutes an identical fresh-state factory in this owner; its changed chunking branch is bypassed. The file is nevertheless touched by P3, and clean-main runtime proof is absent: no strict waiver is claimed.626eeac/ #168629: verified upstream source intentionally catches ENOTSUP and publishes through an exclusive placeholder plus rename. This source explanation is not independent post-upgrade baseline execution. No contract, dependency or assertion is changed here.38092712422/ job114340510754, including the missingregisterSessionBindingAdapterV2mock export. The new merge/base blobs preserve that mismatch; eight relevant paths and the failing stack contain no P3 edits. Independently attributed for this job.38101298609/ job114357727405. Exact test/lifecycle blobs match the new CI base. The fixture'spromptError: truetriggers the upstream early return before recording; P3 changes neither owner nor test. Independently attributed for this job.38103250398/ job114363496384at7cc1ca64798cf9897b3f27e1751ae2a8e73d462d. Mainbb7c69ddd04moved Details into the header while the test retained its gutter selector. The failing test and seven relevant UI/fixture owners match the tested base and are untouched by P3. Independently attributed for this job.Main subsequently advanced into a content conflict in
src/agents/prepared-reply-dispatch-runtime.ts. The coordinator explicitly authorized its repair and sequential parity proof; the current candidate above supersedes this blocked historical state. No source failure was hidden with retries, timeout increases, skips, assertion weakening, or new suppressions.First hosted attempt: exact-head failures and dispositions
These results belong to
86e56cd, tested through merge2097608f44d968f7697a8a83e7591204e0bbf15awith main76a1a8043866891d4bdeca57599ea68bc0e7f845. They are not final-head results. All check runs were enumerated; no cancelled job remained after the Auto response rerun.38095292949and38101298609; those passes do not fix or attribute the failure. Direct UI owners are unchanged, but a changed CSP helper executes in fixture setup. No inherited exemption is established.38092712422, job114340510754: main migrated the binding manager to V2 while the fixture mock exports only V1. No P3 change lies on the failing path. This is evidence for this job alone.38095292949, job114340368611, including initialization-binding and rollback-owner errors. Direct stacks are unchanged, but setup executes changed transcript-redaction code; strict no-overlap waiver readiness is not established.af82e00296dadded a fixture withpromptError: true;e52cbaafccamoved the failed-turn return before recording. Exact failure reproduced on scheduled main38101298609, job114357727405, at5cdfc2f; relevant blobs match and P3 changes neither owner nor test.Prior-revision proof and integration review
These results belong to preceding candidates and do not establish final-head success:
1cb9b5a/8cb103bcomparison completed in 3,334.066 seconds with acknowledgement57ed5337; that acknowledgement is historical only.8cb103b, production types and touched-source lint passed. Core-test types passed 26 of 27 graphs; the Gateway error is recorded separately below. Its first focused run passed 199 cases and failed the scoped-refresh case reproduced on its base. The subsequent completion selection executed all 237 exact targets across 13 configurations: 236 files passed and one failed; 4,429 cases passed, one failed, and five were skipped in 4,908.329 seconds. The sole failure was the reused-exec_0case. Its wrapper aggregate does not mean 13 failed configurations.code-mode-swarm.lazy.test.ts, passed through the native one-worker wrapper: 250.6 seconds wall time, including 132.7 seconds worker preparation and 76.1 seconds case execution. It retains all assertions. Hosted CI timing is not yet available.The final review's two duplicate findings alleged that unconditional
applyAgentConfigoverwrites existing agents. The unchanged earlier guards throw for a non-bootstrap duplicate and return unchanged configuration for recovery or authored/persisted bootstrap state. Reaching the call with an existing entry therefore proves the deleted injected-bootstrap predicate. The findings were rejected on that complete control flow; source remained unchanged.Local failures reproduced on captured main
These are matching local observations on the stated baseline, not fixes or automatic exceptions for a later hosted job. Each final-head failure still requires its own attribution.
code-mode-retention.test.ts: completed-input/frontier retention deadlined719f09reproduces the approximately 15-second deadline. A narrower pass does not erase either failure.code-mode.failure-phase.test.ts: guest settlement of a tool call (reject: false,parked: false)d719f09reproduces the pre-dispatch QuickJS timeout in the matching isolated selection.code-mode.output.test.ts: unsettled calls with clipped outputd719f09reproduces the status assertion in the matching isolated selection. This does not attribute the separate guest-phase metadata failure.prepared-model-catalog-worker.secrets.test.ts: credential inspection deadlinesd719f09reproduces the six candidate deadline variants: config literal, marker, env-template, loader-substituted literal, loader-escaped literal, and profile-only sibling. Main also times out in the pending-shorthand case, but candidate'sspawn EBADFthere is a different failure retained below.worktrees/service.gc.test.ts: large Git-index collection and edit restorationd719f09reproduces the deadline. No worktree contract or timeout was changed.embedded-agent-runner/compact.delegate-resources.test.tscli-runner.reliability.test.ts: direct caller fresh retry without a pre-clear hook1cb9b5areproducesFailoverError: session expired, with 55 other cases passing. The fixture freezes Date while recovery uses monotonic time; this predates the lane. The log does not measure elapsed budget at the guard, and no fix is claimed.prepared-model-runtime.scoped-refresh.test.ts: two expected worker calls, three observed after credential removal1cb9b5areproduces the exact assertion with 19 other cases passing. The relevant policy owners/test are byte-identical. The final base changes this contract upstream, and its focused suite passed on the final head.1cb9b5areproduces TS2345 at untouchedsrc/gateway/control-ui-public-session-refresh.test.ts:51for a possibly undefined regex capture. The final-head Gateway test-type graph passed after the upstream integration.openclaw-tools.media-factory-plan.test.ts: deferred PDF resolution/active model2dd328areproduces the same non-vision assertion at line 414, with nine other cases passing. The resolved result isunsupported_pdf_reference; it passed the no-model guard, but the selected model/provider is not identified. Direct owners and test are byte-identical. No fix is claimed.agent-bundle-mcp-runtime.test.ts: concurrent catalog loading and in-progress connections after invalidation2dd328aexecution reproduces both empty-fixture-log assertions at the same await boundaries; 55 cases passed. The other two failures differ and remain below.code-mode.wait.test.ts: concurrent waits2dd328areproduces the setup assertion at line 542: failed instead of waiting before either wait call, 523 ms versus candidate 517 ms; 29 other cases pass. Underlying error phase is unprinted; the concurrent-wait guard is not reached.worktrees/service.removal-budget.test.ts: missing-object snapshot backoffd719f09baseline reproduces the 120-second whole-case timeout (134.134 seconds versus candidate 122.792). Twelve other cases pass, including the intervening cancellation case. The precise stalled phase remains unknown; worker preparation separately took 609.459 seconds.2dd328abase have an identical native-collected set of 456 names against budget 455. The unchanged check remains enabled; the lane does not raise its budget.Earlier static failures—a stale size entry, an extra suppression in an untouched sessions fixture, and two unused Gateway exports—were also reproduced on captured main and then fixed upstream. The integrations retain those fixes without lane-authored changes to those owners.
Unresolved local failures and incomplete proof
Source review found no established causal lane regression for the investigated cases, but does not prove performance equivalence. Passing baseline replays and failures at different boundaries do not establish inheritance. No assertion, timeout, retry, skip or budget was weakened to hide these observations.
code-mode.output.test.ts: direct metadata on guest timeoutfailurePhase: hostinstead ofguest; the remaining metadata assertions were not reached. Clean main passed this case. Existing shared-budget expiry before worker progress publication is a supported hypothesis, not attribution.code-mode.bridge.host-denial.test.ts: no-start gateway, auto-sandbox, required-missing and required-outside (four cases)failed. Main failed the same assertion with outercompletedand innerrunning, a materially different result. This is not an exact reproduction.code-mode.bridge.lifecycle.test.ts: consecutive responses reuseexec_0bridgeDispatchStarted: false, and zero calls. Main passed. This failure occurred before the nested-activity behavior could be asserted.prepared-model-catalog-worker.integration.test.ts: in-flight/cache identityprepared-model-catalog-worker.secrets.test.ts: loader-pending shorthandspawn EBADF; main's credential deadline is not the same failure.prepared-model-catalog-worker.metadata.integration.test.ts: canonical metadata ownershipsqlite-modelwhere the discoveredplugin-generation-v1row was expected. Earlier ownership assertions passed; later discovery-marker assertions were not reached. An early static return is possible. Final base changes native demand, so no old-boundary reproduction or fix is claimed.prepared-model-catalog-worker.chat-metadata.integration.test.ts: 64-agent fixtureagent-command-local.test.ts: static capabilities (empty, authored, replace, generic, explicit off)agent-bundle-mcp-retention.test.ts: memory-session runtimes across shared-worker filesagent-bundle-mcp-runtime.test.ts: healthy sibling missing and retirement startuphealthyServerfrom the first catalog (2.089 seconds) and settled beforeslow.logrecorded initialize (2.022 seconds). Whole-file main failed those cases at different boundaries: outer 120-second and eight-second test timeouts. These are not exact reproductions; startup latency is a supported hypothesis, not established attribution.openclaw-tools.session-status.gateway-model.test.ts: original operator policy and unrestricted callersoperator source identity changed; start a new request. The nested cause isUserProfileNotFoundErrorduring initial authority capture, before the failing invocation enters its tool callback. The captured catalog is current but does not resolve the profile to its expected canonical ID. The log does not identify which invocation failed, so earlier model selections may already have run. Direct owners are unchanged, but modified catalog dependencies remain reachable. Whole-file pinned-main execution passed all nine cases in 231.070 seconds. That narrower pass does not establish a fix or inheritance; the cause of the canonical profile mismatch remains unknown.worktrees/service.removal-budget.test.ts: persisted timeout backoffd719f09baseline passed this case in 117.054 seconds; this does not establish a fix or inheritance. No stalled phase or individual Git timeout is identified.auth-profiles/oauth-refresh-fence.test.ts: adoption after forced refresh failurecreateCredential(candidate)preserves those old values. Preceding sequential case durations already exceed ten minutes before adoption. The unchanged freshness check rejects them, preventing adoption and adopted-key construction; therefore the wrapper's cause is the original forced-refresh error instead of the expected aggregate. Source and fixture are identical across base/candidate/new base. This pre-existing fixture-time defect is recorded for the coordinator; no replay or fix is claimed.subagents/registry/subagent-reset.lifecycle.test.ts: chat requester/controller cleanupworktrees/service.gc-performance.test.ts: cold inventories across registry reopenauth-profiles/oauth.concurrent-agents.test.ts: copied refresh generation ownershipcli-runner/prepare.command-continuity.test.ts: new, published, and explicit-false requesterssandbox/sdk-state-owner.process.test.ts: foreign-owner and standalone SDK behavioroffline-oncalls. Output collection continues during diagnostic grace after callbacks stop, so the last reply cannot locate the parent's unfinished phase. Reports provide no named deadlock cause. Direct owner files are unchanged, the CSP normalizer has no call in this flow, and broader causal independence remains unproven. No replay or fix is claimed.main-session-recovery-state.terminal-residue.test.ts: terminal-only custodysandbox/docker.config-hash-recreate.test.ts: retained registry custodycontainer name is already in use(65.947 seconds). Container commands are mocked; real registry work and cleanup remain in the timed span. No markers identify the timeout phase or establish a relationship between the failures. Direct owners are unchanged; no replay or fix is claimed.subagents/spawn/acp-spawn-resume.worker.test.ts: resume ownershipsubagents/spawn/subagent-capabilities.store.test.ts: explicit-store requester policyextensions/codex/src/app-server/session-history.test.ts: durable item-limit capture diagnosticb670173, the 95.663-second case expecteditem_limitbut loggedhistory_read_failed; incognito item-limit and both field-limit variants pass. Unknown thrown errors or rejected worker results can produce that generic reason. The durable worker path has a 60-second request limit, but whole-case elapsed time does not prove it fired. The underlying exception is not logged. No matching baseline or fix is claimed.b670173; it is not final-head broad success. Remainder: 1,601 files, 64 failed cases, exit 1, 62,192.662 seconds. The separate initial 447-file invocation had one failed case. Final-head SDK/static/focused proof is complete; hosted CI remains pending.Deep coverage and the under-1,000-line exception
Revisited retained and partial candidates, swept remaining top-level production files largest-first, and inspected the authorized adjacent owners. More than two hours of actual implementation/review preceded this disposition. The audit covers 903 top-level production files / 172,713 baseline lines plus 87 adjacent production files / 18,465 baseline lines: 990 files / 191,178 baseline lines. Independent ownership/count reconciliation found no missing or duplicate allocation. Final-head measurement supersedes earlier draft counts.
Measured alternatives are documented in the per-file coverage: bootstrap-record consolidation initially grew three lines; a patch-ending projection saved zero; a catalog read closure was withdrawn to retain the approved SQLite worker owner; broader provider object-rest projections were withdrawn to retain exact fields and evaluation behavior. Remaining paths retain distinct authority, privacy, normalization, streaming or lifecycle contracts. Tests, fixtures, support and generated output do not count toward the reduction.