Repository navigation
perf(test): reuse MCP archives and batch worker fixture copies - #157689
Conversation
Keep all eighteen package cases and every corruption assertion while packing one validated reference archive. Paired Linux wall median falls from 27.823s to 23.166s; ten endurance runs and the full tarball family pass.
Avoid decoding unchanged generated JavaScript and batch every stale-checkout input copy through the existing fixture lifetime. Preserve all thirty-five cases, hashes, URL rebinding and joined failures. Linux wall median falls from 69.574s to 62.513s; ten endurance runs and all four additional helper consumers pass. Full subgroup wall remains effectively unchanged.
|
🦞👀 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. |
|
New Windows evidence relevant to the unchanged positive packaging path: hourly-main run 36062054946/1, job 107851787616, source The callback is synchronous, including finally cleanup. Vitest 5.0.1 checks elapsed time when that callback resolves, so this generic deadline is not evidence of an unfinished offline install or a particular failed child. Four child limits are already 180 seconds from #155931; outer pack remains 30 seconds. No child-status assertion localizes the cost. At this PR's current To avoid a competing patch or timeout increase, I started one unchanged native Windows tooling-cohort replay: 36074367470, frozen failing source, Node 24.20.0 / pnpm 12.4.2 / Vitest 5.0.1, one worker, existing assertions/deadlines, keepalive zero. The supported workflow accepts the six-file tooling cohort but not the original packages/ selector, so preceding unit-project context is absent; a pass will be non-reproduction, not whole-job or fix proof. If timing remains unexplained, the next useful evidence is bounded monotonic phase timing (including assertions and cleanup), coordinated with these existing fixture/diagnostic owners—not weaker assertions, a longer deadline, or a duplicate PR. No source or owner-branch changes have been made. No full-main CI was dispatched. Terminal replay result — September 25, 00:04 UTCThe unchanged native replay 36074367470/1 completed successfully: 172 passed, 9 existing skips across six tooling files; bundled MCP 18/18 passed. Npm positive took 47,082 ms, pnpm 13,094 ms, with the existing 60,000-ms case deadline unchanged. Dispatcher wall was 496.00 s. This is non-reproduction, not a fix. Source 25f07e8, the twelve enumerated dependency-input hashes, Node 24.20.0/npm 11.19.0/pnpm 12.4.2/Vitest 5.0.1, worker count and actual tooling-file order were verified. Important limits: the replay image was 20260907.229.1, versus 20260922.246.2 in the original failure, and the preceding unit project was absent. No full historical-job, complete post-run source-tree or installed-payload equivalence is claimed. Post-checkout/complete-job and Actions orphan-cleanup annotations are present; descendant settlement remains explicitly unverified, with five distinct retained-namespace warnings. These warnings are not proof of leaks, and no VM/file-erasure claim is made. The retained six-file native evidence artifact is 10839871613 (SHA256 53ee1ad26733a098584dde44d987b6f120bcb4a71f8b768641f9c6cd412ea6c3). This PR has since merged as 36abfd8; the replay did not contain that patch and does not validate its Windows effect. Per-phase clocks, including cleanup, remain the missing evidence for the original cumulative cost. No timeout/assertion changes, failed-test retry, competing patch or additional full-main dispatch were made. |
* commit 'ef2dd3235123371860c9154da7b47b2c1e940788': (41 commits) fix(ci): prevent Security Review checkout retry collisions (#157652) fix(ci): recover interrupted Security Review response bodies (#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) ...
* commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) docs(gateway): show how we build OpenClaw on Team (#157675) refactor: verify IRC surrogate chunking over loopback (#157580) ...
* fix(ui): keep Stop available while drafts cannot send * chore: integrate main fixes for Stop UI validation * commit 'ef2dd3235123371860c9154da7b47b2c1e940788': (41 commits) fix(ci): prevent Security Review checkout retry collisions (#157652) fix(ci): recover interrupted Security Review response bodies (#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) ... Co-authored-by: Vincent Koc <[email protected]>
…law#157689) * perf(test): reuse bundled MCP archive fixtures Keep all eighteen package cases and every corruption assertion while packing one validated reference archive. Paired Linux wall median falls from 27.823s to 23.166s; ten endurance runs and the full tarball family pass. * perf(test): reduce worker artifact fixture copying Avoid decoding unchanged generated JavaScript and batch every stale-checkout input copy through the existing fixture lifetime. Preserve all thirty-five cases, hashes, URL rebinding and joined failures. Linux wall median falls from 69.574s to 62.513s; ten endurance runs and all four additional helper consumers pass. Full subgroup wall remains effectively unchanged.
* fix(ui): keep Stop available while drafts cannot send * chore: integrate main fixes for Stop UI validation * commit '5dae23c843013fce2e0bb80037d232bbabfc70e5': (41 commits) fix(ci): prevent Security Review checkout retry collisions (openclaw#157652) fix(ci): recover interrupted Security Review response bodies (openclaw#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (openclaw#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131) refactor(msteams): share stored service URL validation (openclaw#157706) fix(codex): honor configured tool PATH in native commands (openclaw#157290) refactor(msteams): share approval kind labels (openclaw#157705) fix(sessions): keep session results current during cold reads (openclaw#156121) fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535) refactor(i18n): reuse native branch candidate extraction (openclaw#157636) fix(update): preserve recovery files after ownership refusal (openclaw#148890) fix(test): prevent late announcements from contaminating registry tests (openclaw#157681) fix(e2e): scan full onboarding logs for prompts (openclaw#157624) refactor(session-tools): derive contracts from schemas (openclaw#156365) refactor(channels): derive config contracts from schemas (openclaw#156367) perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689) refactor: reuse prepared fixtures in slow core tests (openclaw#157685) refactor(codex): reuse marketplace reference selection (openclaw#157621) chore(ui): refresh control ui locales (openclaw#157710) ... Co-authored-by: Vincent Koc <[email protected]>
* refactor(ui): share slash-command failure results * Merge main to incorporate the upstream update type fix * commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits) fix(subagents): stop completion transcript retry loops (#157571) perf(sessions): remove duplicate foreground history reference scans (#157572) improve(typesafe): defer startup work until the first decision (#157380) fix(update): restore npm-pack helper typechecking (#157659) fix(packaging): avoid heap exhaustion on large bundles (#157471) refactor(infra): share process error handler registries (#157632) chore(ui): refresh control ui locales (#157573) fix(gateway): release remote Skills subscriptions when shutdown drains (#157592) perf(plugins): reuse declared tool membership during resolution (#156205) fix(ui): pasted text previews fail before sending (#157390) fix(agents): wait for database resources during deletion (#157631) improve: move operator profile database reads off the Gateway thread (#155800) fix: explain rejected settings without losing edits (#157549) fix: keep Gateway responsive while recording trajectory events (#157598) fix(auth): show SIWC email and selected model account identity (#157629) docs: explain Codex app approval precedence (#155089) refactor(wizard): share select prompt requests (#157607) fix(ui): omit empty sections from conversation Markdown exports (#157590) fix(doctor): explain update lint supervisor refusals (#156547) fix(ui): GitHub folder links lose repository context (#157619) ... * Merge frozen main to include the question fixture authority fix * commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) docs(gateway): show how we build OpenClaw on Team (#157675) refactor: verify IRC surrogate chunking over loopback (#157580) ... * chore: merge frozen main prerequisite repairs Co-authored-by: Vincent Koc <[email protected]>
* refactor(ui): share slash-command failure results * Merge main to incorporate the upstream update type fix * commit 'dda1f68bfa102cb804392c0e7cc22c0566a0944a': (68 commits) fix(subagents): stop completion transcript retry loops (openclaw#157571) perf(sessions): remove duplicate foreground history reference scans (openclaw#157572) improve(typesafe): defer startup work until the first decision (openclaw#157380) fix(update): restore npm-pack helper typechecking (openclaw#157659) fix(packaging): avoid heap exhaustion on large bundles (openclaw#157471) refactor(infra): share process error handler registries (openclaw#157632) chore(ui): refresh control ui locales (openclaw#157573) fix(gateway): release remote Skills subscriptions when shutdown drains (openclaw#157592) perf(plugins): reuse declared tool membership during resolution (openclaw#156205) fix(ui): pasted text previews fail before sending (openclaw#157390) fix(agents): wait for database resources during deletion (openclaw#157631) improve: move operator profile database reads off the Gateway thread (openclaw#155800) fix: explain rejected settings without losing edits (openclaw#157549) fix: keep Gateway responsive while recording trajectory events (openclaw#157598) fix(auth): show SIWC email and selected model account identity (openclaw#157629) docs: explain Codex app approval precedence (openclaw#155089) refactor(wizard): share select prompt requests (openclaw#157607) fix(ui): omit empty sections from conversation Markdown exports (openclaw#157590) fix(doctor): explain update lint supervisor refusals (openclaw#156547) fix(ui): GitHub folder links lose repository context (openclaw#157619) ... * Merge frozen main to include the question fixture authority fix * commit 'dc64cc3a3a3cf38fff1e44c1d7af42a32929d7e4': (25 commits) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (openclaw#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131) refactor(msteams): share stored service URL validation (openclaw#157706) fix(codex): honor configured tool PATH in native commands (openclaw#157290) refactor(msteams): share approval kind labels (openclaw#157705) fix(sessions): keep session results current during cold reads (openclaw#156121) fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535) refactor(i18n): reuse native branch candidate extraction (openclaw#157636) fix(update): preserve recovery files after ownership refusal (openclaw#148890) fix(test): prevent late announcements from contaminating registry tests (openclaw#157681) fix(e2e): scan full onboarding logs for prompts (openclaw#157624) refactor(session-tools): derive contracts from schemas (openclaw#156365) refactor(channels): derive config contracts from schemas (openclaw#156367) perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689) refactor: reuse prepared fixtures in slow core tests (openclaw#157685) refactor(codex): reuse marketplace reference selection (openclaw#157621) chore(ui): refresh control ui locales (openclaw#157710) docs(gateway): show how we build OpenClaw on Team (openclaw#157675) refactor: verify IRC surrogate chunking over loopback (openclaw#157580) ... * chore: merge frozen main prerequisite repairs Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
MCP integrity tests repeatedly repack nearly identical archives, while worker-artifact fixtures repeatedly decode unchanged generated JavaScript and copy checkout inputs serially.
User Impact
No product behavior changes. Paired Linux measurements show a 16.7% wall-time reduction for bundled MCP checks and 10.1% for worker-artifact checks. All cases and assertions remain.
Why This Change Was Made
Pack and validate one real reference archive, then create an independent corrupted archive for each integrity case using tar's public API. Real npm/pnpm packing, offline installations, byte comparisons, CLI probes, and all corrupt-payload checks remain. Each mutation proves it actually removed the intended original archive entry before checking the exact failure. The existing preparation deadline is unchanged.
Worker fixtures now avoid decoding JavaScript without a source URL to rebind, and copy every stale-checkout input in bounded batches with shared directory creation. Hash verification, URL rebinding, manifests, dependency junctions, process probes, and joining all started work remain. The generic package fixture and production checker are unchanged. This is the archive part of the area-C speed pass; declaration fixture work is in #157669 because its lifetime cutover exceeds 1,500 raw diff lines. No test-tier, timeout, retry, or assertion reductions.
Evidence
Three interleaved before/after runs on one Linux Blacksmith Testbox, Node 24.19.0, canonical tooling config, historical CI count of one worker:
test/scripts/check-openclaw-package-tarball.bundled-mcp.test.tsvitest-worker-artifacts.test.tscheck-openclaw-package-tarball.test.tsworker-deploy-build-plugin.test.tsmac-elevation-host.test.ts11.718 s wall saved across the two changed files (4.657 s MCP, 7.061 s worker artifacts). MCP passed 10/10 additional repetitions. Worker artifacts passed 10/10 additional repetitions. All four additional consumers of the prepared-worker helper passed, 189 cases, with no unhandled errors. The complete two-file family passed all 119 cases, 52.021 → 46.453 s wall. The final historical Windows job 5 tooling subgroup (4 files, 83 cases) passed 80.345 → 57.284 s on Linux with both archive and declaration candidates; that combined improvement is not attributable solely to this PR. The final subgroup proof includes the unchanged 60-second preparation budget.
Historical ranking uses broad PR run 36047699189 and hourly main run 36048371548. These Windows job times selected candidates; they are not used as Linux speed baselines. Native Windows behavior remains for PR CI.
Targeted type-aware lint, formatting, and
git diff --checkpassed. Independent local review is P2-clean. The changed-lane plan was inspected and the authorized type-aware lint substitute passed; a root-test canary failed with the expected typed diagnostic before it was removed. Post-rebase branch review is also P2-clean. Exact-head CI will be recorded below. No auto-merge is requested.The full 20-file cohort and unchanged UI/provider rationale are recorded in the declaration PR. Five measured candidates save 46.661 s (4.525% of the 1,031.156 s Linux baseline sum); the 30% aggregate target remains unmet. These are file-level measured savings, not measured overall CI critical-path savings. No PR/main tier membership changes or removed tests are claimed.
Complete historical tooling subgroup replays on Linux, one worker:
Within subgroup 2, worker-artifact native time was 62.564 → 61.753 s. This is much smaller than the isolated three-run gain, so this PR does not claim a full-subgroup or overall CI speedup from worker copying. Every file and assertion remains selected.
Worker proof provider: Linux Blacksmith Testbox
tbx_01m3aq9cg8y5fxehcvmw8n4c9s, https://github.com/openclaw/openclaw/actions/runs/36065536904. The fixture was tested throughnode scripts/run-vitest.mjs run --config test/vitest/vitest.tooling.config.ts --maxWorkers=1with the explicit target files; all ten endurance runs, both owning subgroups, and all four helper consumers passed. Results were downloaded and the lease is confirmed stopped/completed.Hosted CI
Exact-head run: https://github.com/openclaw/openclaw/actions/runs/36072695796, head
3fa46860376d63ee4ddd2c7e1caf545d2cc15478, attempt 1. The run completed success: 44 jobs passed, 20 skipped. Both changed files passed native Windows: MCP 18 cases; worker artifacts 30 passed / 5 existing platform skips (all 35 passed on Linux).Historical reference is hourly run 36048371548. Job inventories and main changed between these runs, so their entire reduction cannot be attributed to this patch. A closer unchanged-file control is the declaration PR's initial run 36071021696: MCP 70.492 → 42.947 s; worker artifacts 115.524 → 117.285 s. Thus no Windows gain is established for worker copying. Its measured improvement remains the isolated Linux median, with the flat full-subgroup result reported above. No retries or timeout changes were used.
This run's merge ref includes the owning update-type fix from #157659; it avoids the unrelated TS2459 that affected the declaration PR's initial run.