Repository navigation
test(plugins): drop duplicate SDK-alias loader case that timed out under load - #125134
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Pre-empting the obvious objection to deleting this case: "that was the only It was not. The loader has no per-subpath logic for The invariant is therefore covered as a chain, with an owner for each link:
The surviving loader case deliberately spans both alias visibility classes: What the deleted case uniquely contributed was cost, not proof: it picked the |
|
Codex review: found issues before merge. Reviewed August 17, 2026, 4:00 AM ET / 08:00 UTC. ClawSweeper reviewWhat this changesThe PR deletes a slow installed-plugin SDK-alias test and adds comments explaining that the retained fixture covers public and private SDK alias classes. Merge readinessKeep open: the retained fixture proves generic alias registration, but this PR removes the only test that evaluates the retired llama.cpp bridge through the installed-plugin loader and Jiti fallback path. Priority: P2 Review scores
Verification
How this fits togetherInstalled plugins import OpenClaw SDK subpaths through the plugin loader, which maps those imports to the local SDK and evaluates the plugin module. The changed test protects that upgrade-time loader boundary for previously published plugin packages. flowchart LR
A[Installed legacy plugin] --> B[Plugin discovery]
B --> C[Plugin module loader]
C --> D[SDK alias map]
D --> E[Jiti source fallback]
E --> F[Legacy embedding bridge]
F --> G[Plugin registration]
Decision needed
Why: The desired test-runtime reduction conflicts with a shipped upgrade compatibility contract; generic alias and direct-export tests do not establish equivalent module-graph evaluation. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceTests -70. Total -70 across 1 file. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep a focused installed-plugin loader regression for memory-core-host-engine-embeddings, or replace it with a cheaper proof that still evaluates that exact legacy bridge through the real loader. Do we have a high-confidence way to reproduce the issue? Yes, from source: the proposed deletion removes the only fixture that loads the legacy embedding bridge through the installed-plugin loader; the retained and direct tests exercise different boundaries. Is this the best way to solve the issue? No: removing the test is not the best solution until a cheaper replacement evaluates the same legacy bridge through the real loader rather than only its generic alias class or direct export. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e446679131a7. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
…der load The deleted case took ~54s and exceeded the 120s per-test timeout under CPU contention. Its coverage is already provided by the sibling pre-split SDK bridge case, which spans both private-local-only and public alias classes, and by extensions/llama-cpp/index.test.ts.
0f7d319 to
fe9532e
Compare
|
Merged via squash.
|
…der load (openclaw#125134) The deleted case took ~54s and exceeded the 120s per-test timeout under CPU contention. Its coverage is already provided by the sibling pre-split SDK bridge case, which spans both private-local-only and public alias classes, and by extensions/llama-cpp/index.test.ts.
What Problem This Solves
Resolves a problem where developers running the plugin test suite hit spurious
failures from
src/plugins/loader.native-module-loader.test.ts. Itsloads the released pre-managed llama.cpp provider import through the SDK aliascase took ~54s on its own and blew through the 120s per-test timeout whenever the
machine was under CPU contention, then passed on an immediate standalone rerun.
It was observed as the sole failure of a 1171-file / 18320-test run while landing
#125037.
The cost was structural, not incidental. In a source checkout there is no
dist/, so the fixture'sopenclaw/plugin-sdk/memory-core-host-engine-embeddingsimport resolves to TypeScript source. The loader's fallback path deliberately
drops
openclawfrom jiti'snativeModules(
src/plugins/plugin-module-loader-cache.ts:200), so jiti transformed andevaluated the full core graph reachable from that subpath — roughly 3,000 modules
per run — just to prove an alias resolves.
Why This Change Was Made
The expensive case proved nothing that was not already proven elsewhere, so it is
deleted rather than given a bigger timeout (raising timeouts to hide a slow test
is explicitly a masking pattern under the Repair Doctrine).
Its two invariants are each already owned somewhere cheaper:
openclaw/plugin-sdk/*through the loaderalias — covered by the sibling
loads published pre-split SDK bridge importscase in the same file. Thatfixture spans both alias visibility classes on purpose:
runtime-doctorisprivate-local-only (same class as the deleted subpath) and
channel-feedback/channel-outboundare public, so removing the llama.cpp case loses no aliasclass.
memory-core-host-engine-embeddingsstill exportscreateLocalEmbeddingProvider, and it rejects with upgrade guidance instead ofreviving the retired runtime — covered by
extensions/llama-cpp/index.test.ts, added in the same PR (fix(plugin-sdk): installed llama providers fail to load after upgrade #124041) thatintroduced the deleted case.
An inline comment now records why the surviving fixture's subpath list is what it
is, so the trap does not come back the next time someone extends it.
User Impact
Developer-facing only; no runtime or product behavior changes. The test file
drops from ~67s to ~30s, and the flakiest test in the plugins lane is gone. No
coverage is lost.
Evidence
Per-test timings before, on this machine (
--reporter=verbose):After:
The surviving bridge case absorbs the cold jiti/core-graph warm-up the deleted
case used to pay first, which is why it rises from 10.9s to 28.6s while the file
total still drops by more than half.
Commands run:
node scripts/run-vitest.mjs src/plugins/loader.native-module-loader.test.ts— 3 passednode scripts/run-vitest.mjs src/plugins— 1171 files / 18320 tests, same result before and afterautoreview --mode uncommitted(codex, gpt-5.6-sol) — clean, no accepted findingsProduction LOC delta: 0. Test LOC delta: +3 / -73.
Known follow-up, not introduced here: the broad
run-vitest src/pluginsrunproduces a small, non-deterministic set of failures under CPU contention that all
pass in isolation —
provider-auth-choices.test.tsin one run;contracts/tts.contract.test.ts,web-search-providers.runtime.test.ts, andstatus-effective-plugin-discovery.test.tsin another. Verified pre-existing(present on the unmodified tree, absent when the files are run on their own) and
unrelated to this diff;
mainCI is green.