mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-16 06:43:07 -07:00
2.3 KiB
2.3 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
Cross-Platform Matrix Trial
- Linux:
gemini-cli-ubuntu-16-core(Unleashed 16-core concurrency). - Mac: Upgraded to
macos-large-latest(Higher core count). - Windows:
gemini-cli-windows-16-core(High-performance runner). - Integration Tests: Now running with
GEMINI_API_KEYfor full verification of the bundle.
Current Goal
- Green Cross-Platform Run: Achieving a fully green run across the new matrix with 2-minute CLI unit test targets and verified bundle integrity.