Skip to content

Reduce CI cleaner frequency from hourly to 2-3 hour intervals#7424

Merged
pelikhan merged 4 commits intomainfrom
copilot/reduce-ci-cleaner-frequency
Dec 23, 2025
Merged

Reduce CI cleaner frequency from hourly to 2-3 hour intervals#7424
pelikhan merged 4 commits intomainfrom
copilot/reduce-ci-cleaner-frequency

Conversation

Copy link
Contributor

Copilot AI commented Dec 23, 2025

The Hourly CI Cleaner accounts for ~29% of Copilot token spend despite running when there's often no work. This reduces execution frequency from 24 to 10 runs per day.

Changes

  • Peak hours (9 AM - 5 PM UTC): Every 2 hours instead of hourly

    schedule:
      - cron: "0 9-17/2 * * *"  # 9 AM, 11 AM, 1 PM, 3 PM, 5 PM
  • Off-peak hours: Every 3 hours

    schedule:
      - cron: "0 0,3,6,18,21 * * *"  # 12 AM, 3 AM, 6 AM, 6 PM, 9 PM
  • Updated workflow description to reflect schedule change

Impact

  • 58% fewer runs: 24 → 10 runs per day
  • ~17% reduction in overall token spend: CI cleaner drops from 29% to ~12% of total
  • Maintains CI health with denser coverage during active development hours

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login b/workflows GOPROXY (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login ithub/workflows x_amd64/compile /usr/bin/git l /tmp/gh-aw-mergerev-parse 64/bin/go git rev-�� f/tags/v6 sed (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login it/ref/tags/330a01c490aca151604b8cf639adc76d48f6remote.origin.url git e/git-remote-https te '**/*.cjs' '*infocmp Reduce CI cleane-1 64/bin/go e/git-remote-https om/a�� om/actions/upload-artifact.git sh ache/node/24.12.0/x64/bin/node by/8d72346cbece7gh git 64/bin/go git (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Reduce Hourly CI Cleaner schedule frequency to off-peak hours</issue_title>
<issue_description>## Objective

Reduce the Hourly CI Cleaner workflow execution frequency from every hour to every 2-3 hours during off-peak times to cut token spend.

Context

The Copilot Token Report (referenced in discussion #7407) shows that Hourly CI Cleaner alone accounts for ~29% of Copilot token spend, despite low average cost per run. Running every hour is excessive when there may not be work to do. Reducing frequency can save ~$5-7/month.

Approach

  1. Locate the Hourly CI Cleaner workflow file
  2. Modify the schedule from hourly to:
    • Every 2 hours during peak hours (9 AM - 5 PM UTC)
    • Every 3 hours during off-peak hours
  3. Document the rationale for the schedule change
  4. Monitor token usage after implementation

Files to Modify

  • Search for workflow file with schedule trigger running hourly (likely in .github/workflows/)
  • Update cron expression in frontmatter

Example Schedule Change

# Before
on:
  schedule:
    - cron: '0 * * * *'  # Every hour

# After
on:
  schedule:
    - cron: '0 */2 * * *'  # Every 2 hours

Acceptance Criteria

  • Workflow schedule updated to run less frequently
  • Documentation explains the reduced schedule
  • Token usage monitoring shows ~29% reduction in scheduled spend
  • CI cleanup still functions effectively despite reduced frequency

Expected Impact

AI generated by Plan Command for discussion #7407

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 23, 2025 17:58
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
- Changed from running every hour to every 2 hours during peak hours (9 AM - 5 PM UTC)
- Changed to every 3 hours during off-peak hours
- Updated workflow description to document the rationale
- Recompiled workflow to generate new lock file

This change reduces the CI cleaner from 24 runs per day to 10 runs per day,
which should reduce Copilot token spend by approximately 58% on this workflow
(from ~29% of total spend to ~12% of total spend).

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
All validation steps passed:
- Build: ✓
- Tests: ✓
- Recompile: ✓
- Format: ✓
- Lint: ✓

The changes successfully reduce the CI cleaner schedule from 24 runs per day
to 10 runs per day, maintaining coverage during peak and off-peak hours.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Reduce CI Cleaner schedule frequency to off-peak hours Reduce CI cleaner frequency from hourly to 2-3 hour intervals Dec 23, 2025
Copilot AI requested a review from mnkiefer December 23, 2025 18:15
@pelikhan pelikhan marked this pull request as ready for review December 23, 2025 18:54
@pelikhan pelikhan merged commit b8c044b into main Dec 23, 2025
4 checks passed
@pelikhan pelikhan deleted the copilot/reduce-ci-cleaner-frequency branch December 23, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Reduce Hourly CI Cleaner schedule frequency to off-peak hours

3 participants