Repository navigation
fix(test): avoid plugin retention child startup timeouts - #150951
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 September 17, 2026, 11:31 AM ET / 15:31 UTC (Revision 4). ClawSweeper reviewWhat this changesPrecompiles the plugin memory-retention test child through the shared test-worker system and extends artifact selection and freshness coverage. Merge readiness✅ Ready for maintainer review The fix remains useful: current main still charges TypeScript startup to the retention child's deadline. No actionable correctness or security findings remain, and the cited CI run passed for the reviewed head. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's test runner prepares executable workers before tests launch subprocesses. The plugin retention tests use those subprocesses to verify that retired plugin objects can be garbage-collected. flowchart TD
A[Test runner] --> B[Worker descriptor]
B --> C[Shared worker compiler]
C --> D[Hashed JavaScript artifacts]
D --> E[Retention child process]
E --> F[Plugin retirement and GC assertions]
F --> G[Test result within unchanged deadline]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +15, Other +4. Total +19 across 6 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep compilation in the shared worker preparation phase while preserving the existing retention assertions and execution deadline. Do we have a high-confidence way to reproduce the issue? Yes for the mechanism: main launches the source child inside its timeout, and the supplied evidence records failure under CPU load. This read-only review did not independently reproduce the timing failure. Is this the best way to solve the issue? Yes. Registering the existing child with the shared compiler is a narrow repair that preserves source-mode behavior, freshness verification, and GC semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b669279a2e01. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
be58c99 to
e8ddf61
Compare
|
Merged via squash.
|
…0951) Avoid plugin-retention CI timeouts caused by compiling TypeScript imports inside the child process execution deadline. Register the existing child with the shared prepared-worker compiler and declaration inventory, then launch it through the existing runtime-worker resolver. Extend the existing artifact-selection and freshness fixtures. Production runtime behavior, GC assertions, source fallback, scenario arguments, and the 20-second deadline remain unchanged. Validation: current-head retention proof passed 9/9; CI run 35237032106 passed for e8ddf61 with zero pending checks. Scoped review found no actionable defects. Related: openclaw#150898, openclaw#150244.
Related: #150898, #150244
What Problem This Solves
Fixes plugin-retention tests being killed at their 20-second child deadline when a loaded CI shard spends that budget compiling TypeScript imports.
User Impact
No user-visible runtime change. CI exercises the existing plugin-retirement assertions without charging source compilation to the child execution deadline. The GC checks and 20-second deadline remain unchanged.
Why This Change Was Made
Pass
pluginRuntimeRetentionEntrypointthrough the sharedcreateRuntimeProcessBuildEntriesdescriptor list and register its declaration for prepared-worker substitution. ItssourceWorkerNameisruntime.retention.test-support, and itsdistWorkerPathisplugins/runtime.retention.test-support.js;currentModuleUrlisimport.meta.urlin the descriptor module.The compiler’s import-closure collector tracks the descriptor, and the build hooks track the child source. The existing worker-artifact probe checks prepared JavaScript selection; the freshness fixture now verifies both input records and rejects a changed retention descriptor. This uses the inventory and lazy-input ownership introduced by #150244. Production runtime code is unchanged: tooling +4/-0, tests/support +33/-18 lines.
Evidence
1ebfbb58216c88fe2416ce3d768e1289559ece99; verified that merged fix: Windows cleanup leaves descendants running after leader exit #150244 (146c4147a8691f3f8dfa150300d5e996fa521efa) is an ancestor. Frozen-lockfile install passed.e8ddf61ed8e1c227e3c7c7faa93e81bd07a4daa9againstorigin/main, maximum priority P1: scoped-clean, no actionable findings.16a410f25e0e25ca870bb689f48d044a80acaa4f: loader child killed by SIGTERM at 20.164 s, with 9,807 other passes.node scripts/check-changed.mjspassed formatting, ratchet, boundary, dependency, and erasability guards, then stopped before TypeScript compilation because a retained local dist-artifact ownership lock was stale. No check retry or deadline, dependency, or baseline change was made.pull_requestCI run 35237032106 is green. The native watcher returnedGREENwith GitHub rollupSUCCESS, zero pending checks, and exit code 0 for heade8ddf61ed8e1c227e3c7c7faa93e81bd07a4daa9. No CI rerun was requested.