Commit Graph

6 Commits

Author SHA1 Message Date
gemini-cli[bot] 1a8c7ec226 # Actions Cost Reduction: CI Matrix and Pulse Optimization
This PR implements several measures to reduce the cost of GitHub Actions usage, focusing on the highest-impact areas identified through real per-workflow minutes consumption analysis.

### Summary of Changes

1.  **CI Matrix Optimization**: Reduced the `test_mac` matrix in `Testing: CI` to only run on Node.js 20.x.
    - **Reason**: macOS runners (especially `macos-latest-large`) are significantly more expensive than Linux runners. Node.js 22.x and 24.x are still covered by the `test_linux` matrix, ensuring core compatibility. OS-specific issues are likely to be caught on the recommended Node.js version (20.x).
    - **Impact**: Expected to reduce Mac runner usage by approximately 66% in the CI pipeline.

2.  **Pulse Workflow Optimization**:
    - Added a check to skip `npm ci` and subsequent steps if no reflex scripts are present in `tools/gemini-cli-bot/reflexes/scripts`.
    - Reduced `fetch-depth` from 0 (full clone) to 1 (shallow clone).
    - **Reason**: The Pulse workflow runs every 30 minutes. Installing dependencies when there is nothing to run is a waste of resources.
    - **Impact**: Eliminates unnecessary dependency installation and reduces clone time for the Pulse workflow.

3.  **Brain Workflow Optimization**:
    - Reduced `fetch-depth` from 0 to 1.
    - **Reason**: The Brain workflow does not require full repository history for its reasoning or metrics collection phases.
    - **Impact**: Reduces clone time for the daily Brain workflow runs.

4.  **Metrics Reporting Fix**:
    - Implemented pagination in `tools/gemini-cli-bot/metrics/scripts/actions_spend.ts` to ensure a full 7-day window is captured.
    - **Reason**: The previous 1000-run limit was causing significant under-reporting for constant-rate workflows like Pulse during CI surges, as the sample was saturated by bursty CI activity.
    - **Impact**: Provides more accurate cost metrics, revealing the true scale of constant "heartbeat" costs.

### Data-Driven Justification

Analysis of the last 7 days of metrics (`actions_spend_minutes`) showed:
- **Testing: CI**: 4074 minutes (approx. 64% of total spend).
- **macOS Runners**: The primary driver of CI cost due to high per-minute rates on large runners.
- **Pulse Workflow**: Previously under-reported due to sampling limits, but now identified as a consistent baseline cost that can be significantly optimized.

These changes prioritize high-impact reductions in expensive runner minutes while maintaining robust cross-platform testing on the primary supported Node.js version.
2026-05-06 00:03:36 +00:00
Christian Gunderman f87072f4e3 feat(bot): add actions spend metric script (#26463) 2026-05-04 21:01:39 +00:00
gemini-cli[bot] 363854172f Metrics updates (#26348)
Co-authored-by: gemini-cli[bot] <gemini-cli[bot]@users.noreply.github.com>
2026-05-01 19:20:02 +00:00
gemini-cli[bot] caa0466416 # Metrics Integrity & Standardized Reporting (BT-01) (#26240)
Co-authored-by: gemini-cli[bot] <gemini-cli[bot]@users.noreply.github.com>
Co-authored-by: Christian Gunderman <gundermanc@google.com>
2026-04-30 23:11:39 +00:00
Christian Gunderman 58a57b72ae Implement bot that performs time-series metric analysis and suggests repo management improvements (#25945) 2026-04-28 16:49:53 +00:00
Christian Gunderman c4b38a5aef feat(repo): add gemini-cli-bot metrics and workflows (#25888) 2026-04-24 17:16:20 +00:00