Repository navigation
fix: first image turn loads every bundled media-understanding provider plugin even when the model handles the image natively - #159234
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 maintainer review before merge. Reviewed October 1, 2026, 5:26 PM ET / 21:26 UTC (Revision 7). ClawSweeper reviewWhat this changesThe PR defers loading media-understanding providers until attachment processing needs them, while preserving raw-content recovery when loading fails. Merge readiness✅ Ready for maintainer review This PR remains necessary: current main and the latest release still perform the unused registry build. The earlier fallback finding is fixed, the recorded runtime proof covers the changed path, and no blocking patch defect remains. Priority: P2 Review scores
Verification
How this fits togetherMedia understanding preprocesses incoming image, audio, and video attachments before the agent replies. Images supported natively by the active model bypass provider processing and continue directly to the model. flowchart TD
A[Incoming attachments] --> B[Media preprocessing]
B --> C{Provider processing needed?}
C -->|No| D[Native image delivery]
C -->|Yes| E[Shared lazy provider registry]
E --> F[Attachment understanding]
E -->|Build fails| G[Raw-content recovery]
D --> H[Agent reply]
F --> H
G --> H
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +32, Tests +165. Total +197 across 3 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep provider discovery demand-driven within the existing preprocessing owner, sharing one successful build or failure across the turn. Do we have a high-confidence way to reproduce the issue? Yes: current main visibly builds the registry before the native-vision skip, and recorded isolated Gateway comparisons reproduce that unnecessary load. This read-only review did not execute contributor code. Is this the best way to solve the issue? Yes: deferring the existing synchronous builder preserves one registry owner, existing callers, provider selection, and raw-content fallback without adding configuration or a parallel implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 61485d58172b. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
…r plugin even when the model handles the image natively applyMediaUnderstanding built the full media-understanding provider registry unconditionally, before any capability handler ran -- even on a turn whose native-vision skip branch (runner.ts) never reads it. Defer the build behind a memoized factory shared across the turn's capabilities, and resolve it lazily in the one pre-skip-decision reader (hasExplicitImageUnderstandingConfig) and once, up front, in every other runCapability path that already needs it. Adds apply.provider-registry-lazy.test.ts covering the skip-and-never-build case, the two unchanged catalog-load cases (explicit tools.media.models, non-vision model), and a mixed image+audio attachment turn (built exactly once, shared by both capabilities).
539db83 to
4ae2627
Compare
|
@clawsweeper re-review The new regression test now has a CI result. On head |
|
🦞👀 Re-review progress:
|
…fails to build Deferring the registry build moved it inside runMediaCapability, whose catch turned a build exception into a failed decision per capability instead of letting it escape applyMediaUnderstanding to the caller's raw-content fallback, as the eager build did. Memoize the build failure (no retry per capability) and rethrow it once the capabilities settle, before any context mutation, so the whole-turn fallback behaves as before.
|
@clawsweeper re-review Both open items are addressed on head [P1] Preserve raw-content recovery when registry construction fails: fixed in code, no policy change requested. The second commit ( Real behavior proof from this PR build. Evidence now opens with a source build of this head and of the merge base
In the same section, the regression tests in the repo toolchain: 6/6 in the new file, 22/22 in Scope correction. The source build also showed that on The red |
|
🦞👀 Re-review progress:
|
|
Additional maintainer verification on unchanged head
These are instrumented rig observations, not a general benchmark. Module avoidance is clear; RSS noise in these samples does not establish a memory saving. Controls also passed through fresh Gateways: a text-only primary model built the registry, successfully described the image through media understanding, and returned the final reply; an injected registry-construction error reached the whole-turn raw-content fallback and still delivered the image and reply. The real-provider gate passed twice on Focused candidate checks: 28 tests passed across the lazy-registry and native-vision files. The exact 32-file media-understanding slice from cancelled CI job CI remains red on the existing contributor run, not from a new push: run 36322984494. The substantive failure is The contributor's commits and credit are unchanged; #159232 remains separate and was not folded into this PR. |
|
Maintainer override on head Red CI and cancelled coverage (run 36322984494):
Proof: a fresh built Gateway.
Evidence: #159234 (comment) |
|
Landed as 6d5bb1b. Thanks @alexeysophia, and congrats on your first OpenClaw PR! |
…r plugin even when the model handles the image natively (openclaw#159234) * fix: first image turn loads every bundled media-understanding provider plugin even when the model handles the image natively applyMediaUnderstanding built the full media-understanding provider registry unconditionally, before any capability handler ran -- even on a turn whose native-vision skip branch (runner.ts) never reads it. Defer the build behind a memoized factory shared across the turn's capabilities, and resolve it lazily in the one pre-skip-decision reader (hasExplicitImageUnderstandingConfig) and once, up front, in every other runCapability path that already needs it. Adds apply.provider-registry-lazy.test.ts covering the skip-and-never-build case, the two unchanged catalog-load cases (explicit tools.media.models, non-vision model), and a mixed image+audio attachment turn (built exactly once, shared by both capabilities). * fix(media): keep the raw-content fallback when the provider registry fails to build Deferring the registry build moved it inside runMediaCapability, whose catch turned a build exception into a failed decision per capability instead of letting it escape applyMediaUnderstanding to the caller's raw-content fallback, as the eager build did. Memoize the build failure (no retry per capability) and rethrow it once the capabilities settle, before any context mutation, so the whole-turn fallback behaves as before.
Closes #159233
What Problem This Solves
Fixes: the first turn carrying an image in a gateway process loads every bundled
media-understanding provider plugin (249 new modules vs. 29 with the build deferred in a traced
pair, and about 220 more modules unpatched under a second trace hook), even when the active model
reads the image natively and nothing in the turn uses those plugins. On current
main(a source build of32dcd029, noplugins.allow) that first image turn first-loads 590 modules, 284 of them the registry cascade across 8 bundled media-understanding providers, against 306 and none with this change (see Evidence). The cost of that load ismodest: on a local Docker rig (5 fresh containers per variant, no instrumentation preloads, both
variants already carrying the sibling native-vision-probe patch from #159232; rig numbers, not
a real deployment) that first photo turn measured median peak RSS +70.9 MiB and 1616 ms
elapsedMsunpatched vs. +65.9 MiB and 1399 ms with the registry build deferred — about 5 MiB of peak and about
0.2 s. This fix is best read together with #159232: both remove an unconditional load on the
same image-turn call chain, ahead of the same native-vision skip decision; #159232's own effect on
that turn is much larger. See Evidence for what the measured patch was and for the deployment context
this fix's small effect sits alongside.
User Impact
Any deployment whose active model already declares native image support and configures no explicit
tools.media.modelsoverride stops paying, on its first image-bearing turn in a fresh process, aprovider-registry build that turn never reads, whichever provider is active: in the rig, about 220
provider-cascade modules not loaded into the process (249 vs. 29 in the traced pair), and about
5 MiB of peak RSS and 0.2 s on that turn (+70.9 vs. +65.9 MiB peak, 1616 vs. 1399 ms; see Evidence).
Later image turns in the same process were not measured.
Deployments with an explicit
tools.media.modelsoverride, or whose active model does not supportvision natively, still build the registry on their image turns, as before, because they need it
(confirmed on the patched build, see Evidence).
On current
main, a restrictiveplugins.allowthat omits the bundled media providers already keepsthem out of the registry, so such a config loads the same modules with or without this change (measured
on a source build, see Evidence); the saving applies to the default config without such an allowlist.
A registry build failure keeps its existing outcome: the build is attempted once per turn and the
error still leaves
applyMediaUnderstanding, reaching the caller's whole-turn raw-content fallback.Why This Change Was Made
applyMediaUnderstanding(src/media-understanding/apply.ts) builds the registry once and shares itacross every capability handler for the turn (image, audio, video), which is the right amortization
when the registry is actually going to be read — the problem is only the when: it is built before
any handler runs, not when the first one that needs it runs.
runCapability's own native-vision skipbranch (
runner.ts) can, and on this project's config does, return before ever reading the registry:its one pre-skip-decision reader,
hasExplicitImageUnderstandingConfig, callsArray.prototype.someovercfg.tools?.media?.models ?? [], and.somenever invokes its predicateon an empty array — so on a config with no explicit media-model overrides, the registry is
read by nothing on that turn.
This change makes the registry's construction lazy and memoized, shared across the turn exactly as
before, but paid for only once something actually dereferences it:
apply.tsno longer callsbuildProviderRegistryeagerly. It instead builds a small memoizedfactory,
providerRegistry(), and passes it, unevaluated, intorunMediaCapability(i.e.runCapability) for every capability in the turn, exactly as it passed the built value before. Thefactory builds the registry on first read and memoizes it. If the build throws, the error is memoized
too (
providerRegistryError, so no capability retries the build) and rethrown right after thecapabilities settle, before any context mutation — so it still leaves
applyMediaUnderstandingandreaches the caller's whole-turn raw-content fallback, as the eager throw did.
runner.tsgets a new type,LazyProviderRegistry = ProviderRegistry | (() => ProviderRegistry),and a one-line resolver,
resolveProviderRegistry, that returns a concrete registry unchanged orcalls the factory.
runCapability's ownproviderRegistryfield is retyped fromProviderRegistryto
LazyProviderRegistry.hasExplicitImageUnderstandingConfig's field is retyped the same way, and its one dereference iswrapped:
providerRegistry: resolveProviderRegistry(params.providerRegistry)— but this call sitsinside the
.some()predicate, so it is only reached whencfg.tools.media.modelsactually hasat least one entry to check. An empty array still short-circuits before the factory is ever called.
providerRegistryinsiderunCapability(resolveModelEntries,resolveAutoEntries,runAttachmentEntries,resolveAutoAudioEntries) is only reached afterthe native-vision skip branch's own early return. Rather than retype all of those functions too,
runCapabilityresolves the lazy value into one concrete local,const providerRegistry = resolveProviderRegistry(params.providerRegistry);, immediately after theskip-check block and before any of those calls — so their own signatures and every downstream file
are untouched.
Bound: on a successful build, the underlying
buildMediaUnderstandingRegistry(...)call runs atmost once per turn — the memoized thunk in
apply.tsis shared by every capability'srunCapabilitycall the same way the eagerly-built value used to be, so a mixed image+audio turn(image skips it, audio's own non-skip path resolves it) still builds it exactly once, not once per
capability. This bound relies on
buildMediaUnderstandingRegistrybeing synchronous: capabilities runconcurrently, but because the thunk body has no
await, one logical call always runs to completion(and sets the memo) before the event loop can enter a second concurrent call to the same thunk — there
is no race.
The exception path (unchanged outcome), and six shapes checked (mixed attachments, concurrency, a throwing builder, per-capability config, document-only attachments)
The exception path keeps the eager build's outcome. Before this change, a throw from
buildProviderRegistrypropagated out ofapplyMediaUnderstandingand reached the caller'swhole-turn raw-content fallback (
applyMediaUnderstandingIfNeededinget-reply-preprocessing.ts,and
dispatch-acp.ts). The deferred build now runs insiderunMediaCapability, whosecatchwouldturn it into a per-capability
outcome: "failed"; the first revision of this PR let that happen. Thesecond commit memoizes the failure and rethrows it after the capability loop, before
MediaUnderstandingDecisionsor any other context field is written, so the caller sees the sameexception it saw before and falls back to raw content for the whole turn. The build is attempted at
most once per turn on the failure path too. The one intended difference: a turn that never reads the
registry (the native-vision skip) no longer fails just because a build it does not need would have
thrown.
No new I/O and no new catalog read are introduced by this change. The success path's own control
flow changes only in when the registry is built, never in what it reads, returns, or does with I/O.
What does not change:
buildMediaUnderstandingRegistryitself, the resolution's ownall-eligible-owners shape for the
mediaUnderstandingProviderskey (see Evidence's root-cause trace),hasExplicitImageUnderstandingConfig's matching logic, and every downstream resolution function's ownbehavior once it has a concrete registry. This diff only changes when the registry is constructed,
never what it contains or how anything reads it.
Six more shapes worth being explicit about (only the first was also run on the rig; the rest are
argued from source and tests):
tools.media.modelsentry, anda model without image input. Both were run on the patched
2026.9.2build with the ESM loadtrace (Evidence below): with
tools.media.modelsset to one entry the photo turn loaded 242 newmodules, and with the model's
inputhot-reloaded to["text"]it loaded 249, in both casesincluding the bundled vendor provider chunks, the same shape as the unpatched build.
attachment resolves the registry exactly once — via
audio's own unconditional resolve, sharing thesame memoized thunk
image's call also holds — even thoughimage's own skip branch never readsit. Covered by a new regression-test case.
resolveProviderRegistry(...)in the sameturn. The at-most-once bound holds only because
buildMediaUnderstandingRegistryitself is fullysynchronous; if a future change made the builder asynchronous, this bound would need revisiting.
test file: a failing build on a turn that needs the registry rejects the whole apply, is attempted
exactly once for an image+audio turn, and writes no decisions to the context; and a builder that
would throw is never called on the native-vision skip path.
tools.media.imageconfig.hasExplicitImageUnderstandingConfigonly ever reads the global
cfg.tools?.media?.modelslist, never a per-capabilitytools.media.imageblock, so a per-capability config does not change which turns build theregistry either way — this diff does not touch that decision. Separately, three of
runCapability'sown early returns (
config.enabled === false, an attachment-free selection, a scope-denied turn)all happen before the native-vision skip check, so those turns now also never build the registry.
The same holds for
processingMode: "files-only".providerRegistryparameter at all, and every capability'srunCapabilitycall returns beforereading the registry when its own capability's attachments are absent. The eager call built the
registry for such a turn anyway; after this change it never does.
Evidence
Real-behavior proof from this PR's own build (source build, not a dist patch)
Built from source at
32dcd029(merge base) and08fb5a2c(this PR) withpnpm install && pnpm buildin
node:24(Node 24.21.0, pnpm 12.5.0). Each run: fresh gateway process and state dir,node openclaw.mjs gateway --verbose; one first image turn through a channel plugin's inbound route(
runChannelInboundEventpath;applyMediaUnderstandingis not called directly); model provideropenai-responseswith one model declaringinput: ["text","image"]as the primary model;tools.media.modelsunset; noplugins.allow. ESM first-load trace viamodule.register, gatewayprocess only, bucketed by the turn's own start/end. Same 960×1280 JPEG (143,737 bytes) every run.
media-understanding-provider.jsloaded32dcd02908fb5a2ctools.media.models: [{provider, capabilities:["image"]}]modelMedia understanding image: success (1/1)B's load set is a strict subset of A's (B − A = 0). The cascade on the base runs before the skip
decision (A1):
Delivery line from the model mock, identical on base and PR:
{"path": "/v1/responses", "model": "gpt-5.4", "input_items": 3, "has_image_input": true, "input_images": [{"has_data_url": true, "decoded_bytes": 263108, "detail": "auto"}]}Scope note: with a restrictive
plugins.allowthat omits the bundled media providers, the basealready loads none of them (bundled plugins outside the allowlist are not registry candidates on
this main), so base and PR are identical there (295/296 modules, 3+3 runs, plus 2 runs with
tools.media.models) — the PR is neutral in that configuration.Regression tests in the repo toolchain (
node scripts/run-vitest.mjs, Node 24.21.0):apply.provider-registry-lazy.test.ts: 6 passed (6), including "a registry build failure stillrejects the whole apply (caller's raw-content fallback), built once" and "a registry that would
fail to build is never built on the native-vision skip path"; Duration 48.67s
runner.vision-skip.test.ts: 22 passed (22); Duration 41.09ssrc/media-understanding/: Test Files 48 passed | 1 skipped (49), Tests 654 passed | 5 skipped(659) (skips are the Windows-only file-URL tests); Duration 75.26s
Earlier measurements on a dist-level patch of the released
2026.9.2Kept for the memory and latency effect size: the source-build runs above carry the ESM trace hook,
which adds per-module cost, so they are proof of mechanism, not an effect-size measurement.
Rig: a local Docker container rig (not upstream CI), cgroup v1, memory capped at
-m 1g— therig numbers below are sandbox numbers, not measurements from a real deployment by themselves; a staging-deployment
deployment's numbers follow separately, as context only.
Root-cause trace: the exact resolution gate on both OpenClaw versions checked
applyMediaUnderstandingcallsbuildProviderRegistry(params.providers, cfg)— an alias forbuildMediaUnderstandingRegistry— which, when given nopreparedProviders, callsresolvePluginCapabilityProviders({key: "mediaUnderstandingProviders", cfg}). The mechanism differsbetween the pinned tag this report's rig measured and current
main, and is not, on eitherversion, "narrows only when a caller supplies a provider id" or "falls back to every plugin only when
the active provider id fails to match a bundled one". The 249-module symptom below is rig-measured;
the exact gate that produces it on the pinned tag is a source read, not something this rig observed
firing directly:
v2026.9.2:mediaUnderstandingProvidersis not in the set of keys whose manifest providersalways merge when active, and the requested-provider-id collector for this key reads only
cfg.tools.media.models— never the active/configured provider id. With this report's own config(
tools.media.modelsunset),requestedis empty, so the resolver reaches its ownalready-active short-circuit test,
activeProviders.length > 0 && !requestedProviders && !mergeManifestProviders.activeProvidersfor this key is itself filtered byplugins.allow, andthe fallback load path that reaches the 249 modules always passes
activate: false, so nothingloaded through that path ever registers as active for a later call either. Whether
activeProviders.lengthis0because "nothing of this capability type has activated yet" (afresh-process, first-call-only reading) or because, on this report's own config, it can never
become non-zero at all is unresolved by this rig — either reading falls through to the same
unfiltered plugin-id resolution (no
providerId, noproviderIds), which matches every plugin thatdeclares the contract at all. This is the path this report's rig measured (249 modules); on neither
reading is the gate "the provider id doesn't match a bundled plugin".
main(source read, not separately rig-measured): the always-merge-when-active setwas extended to also cover
mediaUnderstandingProviders, and the requested-id collector for this keyno longer feeds a requested-id set under any config. Because
mergeManifestProvidersis nowunconditionally
truefor this key, the short-circuit can never fire — every call falls through tothe same plugin-id resolution described above, on every call, not just the first one in a
fresh process, regardless of whether anything is already active for this key. Candidates are still
filtered by control-plane policy (
isManifestPluginAvailableForControlPlane): a bundled pluginoutside a restrictive
plugins.allowis not a candidate unless one of its channels is configured orbundled-provider compat discovery is on. So on
main, the eager full-plugin load is reached by anyconfig without such an allowlist, which is the default. Both sides of that were measured on a source
build of
32dcd029(see the source-build proof above): 8 bundled providers loaded without anallowlist, none with this project's allowlist.
What the patched runs measured: a dist-level patch on
2026.9.2, not this diff. Indist/apply-DQXe2OOG.jsthe eagerbuildProviderRegistry(params.providers, cfg)call was replacedby a lazily-built
new Proxy({}, {get, has})whoseget/hastraps build the real registry onfirst access. On the measured path nothing touches the registry, so the Proxy and this diff's
memoized thunk behave the same there; this diff's
runner.tschanges (the typed resolve calls) werenot part of the measured build. Every patched run below used that same Proxy replacement; every
unpatched A/B run used the same image with the original
dist/apply-DQXe2OOG.jsbind-mounted backover it.
Effect size: clean, uninstrumented A/B, 5 fresh containers per variant, 2026-09-26. Same image,
config and 960×1280 JPEG photo (143,737 B); no Node preloads; the gateway's
VmRSSread from/proc/<pid>/status. Each container: one text-only warm-up turn, then the first photo turn.+Peakis the highest sample from the start of the photo turn to 5 s after it returned, over the settled
pre-photo baseline. Both variants already carry the sibling native-vision-probe patch: "unpatched"
here is that patch alone, "build deferred" is both patches:
Peak and latency separate cleanly (every deferred run's peak and latency below every unpatched run's
own range). So the eager build costs about 5 MiB of peak RSS and about 0.2 s on the first photo turn
of a process — real, and small. Every
decoded_bytesvalue the model mock logged across the A/B was263108, so the image reached the model natively on both variants.
As context only: the same host's staging-deployment numbers, dominated by the other fix. On a staging
deployment (real Telegram photo through the deployment's own channel-inbound turn path, Azure VM
host, cgroup v2, 1200 MiB container memory limit, OpenClaw 2026.9.2 with this fix and the
native-vision fix (#159232) both applied, uninstrumented — real
openclaw-gatewayprocess VmRSS at1 Hz), a fresh gateway's first photo (960×1280 JPEG, 143,737 bytes) measured baseline 436.5 MiB, peak
+58.2 MiB, settled at 120 s +54.3 MiB, thread count 11 → 11; the same host's pre-fix measurement
(neither fix applied, same photo shape) went 425.7 → 718.3 MiB (+292.6 MiB) on one photo, and on a
heavier assistant crossed the 1200 MiB limit and was kernel-OOM-killed
(
anon-rss:1187204kB). That combined-effect number is not this fix's own size — per the rig A/Babove, this fix's own share is small (about 5 MiB of the roughly 227 MiB saved); the dominant share is
#159232's fix. Included here only as deployment context for the same code path.
Mechanism (ESM load trace), the registry-still-built control runs, and the secondary instrumented attribution set
Mechanism: ESM loader-hook trace (
module.register) — the robust signal, since a module countdoes not depend on how RSS is sampled or on what else is loaded in-process. Separate runs from the
A/B, 960×1280 JPEG photo, same image before and after the patch, each photo turn sent right after
one text-only warm-up turn in a fresh gateway process:
Reproduced with a second trace hook. A second loader hook, one fresh container per variant,
counted only the load lines inside the photo turn's own window:
gemini-cli-provider-*,music-generation-provider-*×2,realtime-voice-provider-*×2,realtime-voice-provider-factory-*,video-generation-provider-*×3,xai-oauth-entry-*); deferred: nonegemini-cli-provider-*,music-generation-provider-*,realtime-voice-provider-*, …); deferred: noneCounts are comparable only within a row, not across rows; both rows put the cascade at about 220
modules, consistent with the 249 → 29 pair above. One further patched run with the first hook recorded
249 first-loaded modules, the unpatched count, and this rig could not determine why (candidates not
ruled out: the patched dist not being mounted for that one run, or some other run-to-run rig
variation); its photo-turn latency (2484 ms) is close to the unpatched trace run's (2567 ms) and far
from the other patched run's (1507 ms), which fits the first candidate but does not prove it.
The registry is still built where it is needed (patched build, ESM trace). Two more fresh
containers on the patched image, each with its config edited before the photo turn, counted new
module loads between a settled log before the turn and a settled log after it:
tools.media.modelsset to[{"provider":"usage-proxy","model":"gpt-5.4","capabilities":["image"]}]→ 242 new module loads; the model's
inputhot-reloaded to["text"]→ 249. Both include thebundled vendor provider chunks, the same shape as the unpatched build.
Secondary, instrumented: attribution runs under in-process preloads. Before the A/B, single
attribution runs on the same image and photo carried in-process preloads (V8 heap sampling, an ESM
load-trace hook, and image-codec/worker tracers) and sampled RSS every 0.1 s. Their unpatched deltas
are much larger than the uninstrumented A/B's, so they are not the effect size; kept because the
no-resize and text-only controls exist only in this set:
decoded_bytesidentical (263108) across the runs sharing the same source photo confirms the imagereaches the model natively in every one of them; the no-resize control's own
decoded_bytes(145914)is its own differently sized source photo, delivered unresized. A traced A/B isolating the ESM
load-trace hook (3 fresh containers per variant, ~9 Hz) measured +72.1 MiB / 1969 ms unpatched vs.
+61.0 MiB / 1142 ms deferred — it reproduces the latency gap but not the memory gap (the hook adds
~50 MiB to the baseline, not the turn); the likely explanation for the rest of the unpatched peak in
this set is the remaining preloads, not established further.
Regression test — run locally, quoted below (disclosing honestly what was run locally and what is
left to CI): a faithful extraction of this diff's two new pieces (
resolveProviderRegistry, andboth the Before and After bodies of
hasExplicitImageUnderstandingConfig) plus a minimal stand-in forrunCapability's own statement order around the skip branch, run in an isolated scratch directory(
npm i -D vitest typescript @types/node) on **Node 22.22.2 — not this repo's own `>=24.16.0 <25 ||Regression-guard check (reverting the After variant to resolve the registry before
.some()instead of inside its predicate — the exact regression this fix must not reintroduce). The run's
FAIL,AssertionErrorand summary lines, verbatim; all other output lines omitted:Repository regression test in upstream CI, current head
08fb5a2c(Node 24.21.0, vitest 5.0.1):apply.provider-registry-lazy.test.tspassed 6/6 inchecks-node-changed-compact-large-34
(shard
core-runtime-media-ui-support; the job was cancelled later by fail-fast, after this file hadpassed). Verbatim, shard prefix removed:
Measured cost: 15 ms of test time for the 6 cases in CI.
check-lint,check-prod-types, andcheck-test-types(all stripes) pass on08fb5a2c.CI status of the current head. The one red node shard is
checks-node-changed-compact-large-9:
src/gateway/session-history-worker.integration.test.ts > waits for a missing projection and serves the original history request(SessionTranscriptProjectionUnavailableError,reason: 'rebuilding').That is gateway transcript-projection code this PR does not touch; the same test failed the same way
on the unrelated #159232, and I found no
[CI]issue for it. Earlier heads:check-lintfailed onoxfmtline-wrapping in the new test file (ours, fixed); the other red shards weresession-catalog.performance.test.tsand Slackingress.test.ts(not ours; the latter fixed on mainby
02fd48695).Additional maintainer verification
Exact-head Gateway controls, live GPT-4.1-mini image proof, focused tests, and inherited CI attribution.
No overlap with Pash/Sarah changes.