mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-16 06:43:07 -07:00
2.0 KiB
2.0 KiB
Project Status: Bundling and CI Revamp (Issue #22349)
Accomplishments
- Local Bundle Validation: Confirmed that
npm run bundleproduces a functional artifact that passes integration tests locally. - Build Optimizations Integrated: Ported and merged improvements from PR
#12389, including:
tsbuildinfosupport across all packages for faster incremental builds.- Dependency-ordered workspace builds in
scripts/build.js.
- Test Infrastructure Refactor: Centralized Vitest configuration to a root
vitest.config.tsusing theprojectsAPI, allowing for parallel execution across the monorepo.
CLI Test Performance Crisis
Investigation into the 10-minute CLI test runtime revealed:
- The 'Forks' Penalty: Using
forkspool spawns a new Node.js process per test file. Strict worker limits (4) cause massive overhead. - Global Environment Poisoning:
packages/cli/test-setup.tsdirectly deletesprocess.envvariables, forcingforksto prevent cross-test leaks. - Zombie Tests:
BackgroundTaskDisplay.test.tsxanduseAuth.test.tsxhit 60s timeouts, blocking worker slots.
"Fast Path" Strategy (Implemented)
- Surgical Fix for Setup: Replaced direct
process.envmanipulation withvi.stubEnvand implemented full listener cleanup intest-setup.ts. - Modern Isolation: Successfully switched CLI and Core pools from
forkstothreads. - Unleash Hardware: Removed all concurrency and thread limits to utilize full host capacity (16 cores in CI).
- Zombie Suppression: Identified and temporarily excluded the top 5 hanging
tests to prevent suite blockage:
ToolStickyHeaderRegression.test.tsxMcpStatus.test.tsxSubagentHistoryMessage.test.tsxBackgroundTaskDisplay.test.tsxuseAuth.test.tsx
Current Goal
- Resuming Bundled CI: Pushing these infrastructure optimizations to the trial branch to measure the real-world CI speedup on the build box, specifically for CLI unit tests.