Repository navigation
fix(ci): keep worker builds sequential and release input snapshots - #199560
Conversation
Keep cache-enabled CI builds sequential while preserving parallel builds on large local hosts. Release completed input snapshots after memoized cache metadata is prepared. Cover actual compiler scheduling and cache miss/hit retention with owned child lifetimes. Allocate 138 test lines for the scheduling and retention regressions; support fixtures are separate. The shutdown-check cache opt-in is excluded because its measured memory and cold-start tradeoffs failed acceptance.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR keeps cache-enabled CI worker builds sequential and releases prepared input snapshots while cache handles remain usable. Example: A full worker compilation runs with CI=1, OPENCLAW_VITEST_WORKER_CACHE=1, and 16 GiB available memory.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes focused, justified repairs, with no actionable patch defect found and exact-head CI passing. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Vitest worker compiler turns source entries into reusable subprocess artifacts, while its cache owner verifies retained outputs and prepares input signatures. flowchart TD
A[Vitest invocation] --> B[Worker compiler]
B --> C[Cache owner]
C --> D[Input signature]
C --> E[Verified retained artifacts]
B --> F[Build graph scheduling]
F --> G[Compiled worker artifacts]
Technical reviewBest possible solution: Keep the existing compiler and cache owners, restrict build overlap to local execution, and scope snapshots to the memoized metadata initializer. Do we have a high-confidence way to reproduce the issue? Current-main source exposes both paths directly; the PR reports baseline failures and passing focused regressions, which were inspected but not executed during this read-only review. Is this the best way to solve the issue? The patch is the smallest complete repair: it reuses the existing CI policy and narrows snapshot lifetime without changing cache signatures, artifact validation, or local parallel-build support. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against de40bf5ca2c0. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +265, Other +10. Total +275 across 7 files. Added test files: 3. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 Reviewed November 15, 2026, 5:23 AM ET / 10:23 UTC. |
|
Merged via squash.
|
Declare the two live spawned test fixtures introduced by openclaw#199560 as exact Knip roots. Hold the current asynchronous executable stat in the HTTP readiness test after openclaw#200038 retired its access call. Preserve all readiness assertions and production behavior.
* fix(ci): restore worker fixture and readiness checks Declare the two live spawned test fixtures introduced by #199560 as exact Knip roots. Hold the current asynchronous executable stat in the HTTP readiness test after #200038 retired its access call. Preserve all readiness assertions and production behavior. * fix(test): hold current runtime preparation during startup readiness * fix(ci): complete live workflow consumer graph after consolidation
Keep cache-enabled CI builds sequential while preserving parallel builds on large local hosts. Release completed input snapshots after memoized cache metadata is prepared. Cover actual compiler scheduling and cache miss/hit retention with owned child lifetimes. Allocate 138 test lines for the scheduling and retention regressions; support fixtures are separate. The shutdown-check cache opt-in is excluded because its measured memory and cold-start tradeoffs failed acceptance.
…w#200133) * fix(ci): restore worker fixture and readiness checks Declare the two live spawned test fixtures introduced by openclaw#199560 as exact Knip roots. Hold the current asynchronous executable stat in the HTTP readiness test after openclaw#200038 retired its access call. Preserve all readiness assertions and production behavior. * fix(test): hold current runtime preparation during startup readiness * fix(ci): complete live workflow consumer graph after consolidation
What Problem This Solves
Cache-enabled CI worker compilation can overlap two large build graphs, and live worker-cache handles retain input snapshots after their metadata has been prepared.
User Impact
Internal CI/tooling fix: CI worker builds stay sequential, and completed cache input snapshots can be collected while cache handles remain usable. Large-host local parallel builds remain supported. No user-facing configuration, migration, or action is required.
Why This Change Was Made
The compiler used cache enablement as a proxy for allowing parallel builds. The existing
isCiLikeEnvpolicy now preserves sequential CI builds without removing the intentional local optimization. The cache factory now constructsCompilerInputSnapshotinside its existing memoized metadata initializer, so long-lived cache methods retain the prepared metadata rather than the snapshot.The proposed shutdown-check cache opt-in and its workflow assertion were removed after complete fixed-cohort measurements failed memory and cold-start acceptance. This PR does not enable that opt-in or claim a measured performance win. Cache input hashes, namespaces, verification, and retention policy are unchanged.
Production delta is +8 lines: the CI resource-contract guard and its explanation, plus the cache-owner lifetime clarification. Tests cover CI, GitHub-Actions-only environments, local overlap and failure joining, and real cache miss/seal/restore lifetimes.
Evidence
Promise.allmutation fails the local failure-boundary join assertion.tsconfig.scripts.jsonandtest/tsconfig/tsconfig.test.root.tooling.jsonpassed; production lint passed. The overall native invocation exited 1 on one test-supporttypescript/unbound-methoddiagnostic. A justified explicit-receiver annotation was added, then affected-file lint and format passed. No executable code changed in that correction;git diff --checkpassed.bf5a454465517f4489c246a6c308bdec20c9c70fat P2 priority. It returned one finding, not a clean verdict: it requested a cache opt-in in the retention child. Independent source review rejected that premise: direct factory admission is the reserved-slot check inscripts/lib/vitest-worker-cache.mts:191, while environment opt-in belongs to callers atscripts/lib/vitest-worker-compiler.mts:53andscripts/lib/vitest-worker-run.mts:24. Adding caller policy to this direct owner test would obscure its purpose. The final annotation-only change was independently checked against the reviewed bytes.db5895bf0079682eb09206ddfecac0df0f70f4b6: the CI gate and published CI, dependency-review and security-sensitive-review statuses are SUCCESS. The full ClawSweeper review covers this head with zero findings, Before merge: None, and no Rank-up moves; the single manual request is Complete. Its readiness is advisory maintainer review, not a measured performance claim.db5895bf0079682eb09206ddfecac0df0f70f4b6; no rebase or source push was needed.