perf(ci): remove the anthropic-cli jiti stall and stripe the full-plan whales#109769
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 3:46 AM ET / 07:46 UTC. Summary PR surface: Source +15, Tests +14, Config +5, Other +4. Total +38 across 9 files. Reproducibility: yes. at source level for the module-scope full-barrel load and the sidecar TOCTOU window, with supplied Testbox timing evidence for the former. The full-plan automation result has not been demonstrated after the change. Review metrics: 2 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Rebase the exact head, run the full/main workflow that exercises every new shard and cache-warm path, and add redacted runtime or CI logs showing the SQLite permission sweep survives disappearing WAL/SHM sidecars. Do we have a high-confidence way to reproduce the issue? Yes at source level for the module-scope full-barrel load and the sidecar TOCTOU window, with supplied Testbox timing evidence for the former. The full-plan automation result has not been demonstrated after the change. Is this the best way to solve the issue? Yes for the core implementation shape: the lightweight plugin-owned artifact and centralized shard plan fit existing boundaries. It is not yet merge-ready because the final exact head lacks full-plan and SQLite runtime proof. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f095549d1d31. Label changesLabel justifications:
Evidence reviewedPR surface: Source +15, Tests +14, Config +5, Other +4. Total +38 across 9 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
src/plugin-sdk/anthropic-cli.ts snapshots CLAUDE_CLI_BACKEND_ID at module scope through the sync facade loader, which jiti-evaluates the full anthropic api.js barrel on source checkouts: 130.86s of self time per cold worker on CI (Testbox import profile), silently stalling every job whose graph reaches cli-runner/prepare.ts. A narrow cli-api.js artifact carries the two static facts; Testbox proof: the reliability+helpers agents-core pair drops from 157.6s to 14.3s.
core-fast ran the import-bound unit-fast graph as one job (247s vitest, 181s module evaluation) and core-tooling as one serial job (241s); both now stripe on the full plan like the compact plan, so the compact-only expansion is deleted and the docker helper config rides with the isolated shard on both plans. Group hints refreshed from main run 29551077288; stale per-file commands hints dropped (the consolidation landed); cache-writer selection and the warm workflow track the stripe names.
…sweep existsSync+chmodSync raced SQLite's own WAL/SHM cleanup: a checkpoint or close between the two calls throws ENOENT (observed from the transcript reconcile worker in server-startup-web-fetch-bind on CI). chmod directly and swallow only ENOENT, which removes the TOCTOU window.
329d5e7 to
9493d36
Compare
|
Merged via squash.
|
Group walls measured from compact run 29564411446 (post-#109769): core-unit-fast-isolated runs 78.6s on 4 vCPU because fork-per-file isolation parallelizes poorly there; pin it to the 8 vCPU class where the same segment runs ~50s. Unit-fast stripes measure ~25-37s (hinted 100/60) and tooling stripes 71-87s; refresh both so the packer stops overfilling small bins (the 299s compact tail this run produced). Cheap stripes may now co-locate in one bin, so the compact test only requires their presence.
…n whales (openclaw#109769) * perf(sdk): load Claude CLI identity from a narrow plugin artifact src/plugin-sdk/anthropic-cli.ts snapshots CLAUDE_CLI_BACKEND_ID at module scope through the sync facade loader, which jiti-evaluates the full anthropic api.js barrel on source checkouts: 130.86s of self time per cold worker on CI (Testbox import profile), silently stalling every job whose graph reaches cli-runner/prepare.ts. A narrow cli-api.js artifact carries the two static facts; Testbox proof: the reliability+helpers agents-core pair drops from 157.6s to 14.3s. * perf(ci): stripe unit-fast and tooling node tests on the full plan core-fast ran the import-bound unit-fast graph as one job (247s vitest, 181s module evaluation) and core-tooling as one serial job (241s); both now stripe on the full plan like the compact plan, so the compact-only expansion is deleted and the docker helper config rides with the isolated shard on both plans. Group hints refreshed from main run 29551077288; stale per-file commands hints dropped (the consolidation landed); cache-writer selection and the warm workflow track the stripe names. * fix(state): tolerate vanished sqlite sidecars in agent-db permission sweep existsSync+chmodSync raced SQLite's own WAL/SHM cleanup: a checkpoint or close between the two calls throws ENOENT (observed from the transcript reconcile worker in server-startup-web-fetch-bind on CI). chmod directly and swallow only ENOENT, which removes the TOCTOU window.
) Group walls measured from compact run 29564411446 (post-openclaw#109769): core-unit-fast-isolated runs 78.6s on 4 vCPU because fork-per-file isolation parallelizes poorly there; pin it to the 8 vCPU class where the same segment runs ~50s. Unit-fast stripes measure ~25-37s (hinted 100/60) and tooling stripes 71-87s; refresh both so the packer stops overfilling small bins (the 299s compact tail this run produced). Cheap stripes may now co-locate in one bin, so the compact test only requires their presence.
What Problem This Solves
Follow-up to #109332, attacking the two ~250s serial CI bins that now own main-run wall time, plus a profiled 130s module-evaluation stall:
src/plugin-sdk/anthropic-cli.tsstalled ~131s per cold worker on CI. It snapshotsCLAUDE_CLI_BACKEND_IDat module scope through the sync facade loader, which on source checkouts jiti-evaluates the anthropic plugin's fullapi.jsbarrel (Testbox import profile:anthropic-cli.tsself-time 130.86s). Every graph that reachessrc/agents/cli-runner/prepare.tspaid it — this is whyagentic-agents-core-runner-clistripes ran 157–245s for two files whose tests finish in 1s, and why yesterday's timing census concluded the file "cannot be split further".core-fast(268s) andcore-tooling(265s) ran as single jobs on the full/main plan. core-fast is import-bound (247s vitest: 181s module evaluation vs 49s tests); core-tooling is test-time bound (173s of spawned-process tests). The compact PR plan already stripes tooling; the full plan did not.Why This Change Was Made
Maintainer-requested bundled follow-up ("do all of it, one larger PR"). After #109332 and the caching waves (#109330/#109425/#109593), these were the measured critical-path items.
User Impact
cli-runner/prepare.ts.Evidence
vitest.agents-coreoncli-runner.reliability + helpers: 157.6s → 14.25s (import 155.7s → 12.8s); import profile before/after namessrc/plugin-sdk/anthropic-cli.ts(130.86s self) as the sole whale. New narrow artifactextensions/anthropic/cli-api.tsfollows the documented lightweight-artifact pattern (extensions/CLAUDE.md), knip models it like the browser artifacts, andpnpm plugin-sdk:surface:checkis clean (facade exports unchanged).core-unit-fast→ 2 include-list stripes (8 vCPU, admission wave 0, stripe 1 is the vitest fs-cache writer) + a wholecore-unit-fast-isolatedshard (isolated + fake-timer projects stay unsliced);core-tooling→ 4 stripes + combined docker+isolated shard, shared by full and compact plans. Planner invariants tested: stripes partition files with no overlap, bundled include coverage equals base coverage, cache-warm workflow warms the union of unit-fast configs.ci-node-test-plan,ci-workflow-guards,ci-changed-node-test-plan,ci-run-node-test-shard,plugin-sdk-subpathscontract,extensions/anthropic/cli-shared,cli-runner/prepare— all green post-rebase (300+ assertions). Remotepnpm buildgreen (facade/lazy-boundary rule). Codex autoreview (gpt-5.6-sol, xhigh): clean.check-prompt-snapshotsstays ~196s — still ~304s on a 16 vCPU Testbox with the facade fix, so its cost is broad graph execution under tsx, not the stall.