Skip to content

[plan] Optimize hourly maintenance workflow schedules #7335

@github-actions

Description

@github-actions

Objective

Reduce the frequency of hourly maintenance workflows (Hourly CI Cleaner and Tidy) that are running excessively, saving ~$70/month.

Context

Two maintenance workflows are running ~19-20 times/day when less frequent execution would be sufficient:

  • Hourly CI Cleaner: 19 runs/day, $38.30/month, 42 missing tool errors
  • Tidy: 20 runs/day, $40.32/month, 19 missing tool errors

Both workflows also have missing tool errors that should be investigated.

Changes Required

1. Hourly CI Cleaner

File: .github/workflows/hourly-ci-cleaner.md

Schedule Change: 19 runs/day → 2 runs/day

on:
  schedule:
    - cron: '0 6,18 * * *'  # Twice daily (6am, 6pm)

Missing Tool Errors: 42 instances - investigate what tools are missing
Savings: ~$34/month

2. Tidy

File: .github/workflows/tidy.md

Schedule Change: 20 runs/day → 1 run/day

on:
  schedule:
    - cron: '0 7 * * *'  # Daily at 7am

Missing Tool Errors: 19 instances - investigate configuration
Savings: ~$38/month

Investigation Required

Before reducing frequency, investigate the missing tool errors:

  1. Review workflow run logs for both workflows
  2. Identify missing tools - check error messages for tool names
  3. Possible causes:
    • Tools not declared in tools: section
    • Network access issues preventing tool downloads
    • Tool availability problems
  4. Fix missing tools by updating workflow frontmatter configuration

Implementation Steps

  1. Phase 1: Fix Missing Tools

    • Review recent runs for both workflows
    • Identify what tools are referenced but not configured
    • Update tools: section in frontmatter
    • Test with a manual run
  2. Phase 2: Reduce Frequency

    • Update cron schedules as specified above
    • Run make recompile to regenerate .lock.yml files
    • Commit changes with message: "feat: optimize maintenance workflow schedules"
  3. Phase 3: Validate

    • Monitor workflows over 3-5 days
    • Ensure cleanup/maintenance tasks still complete effectively
    • Verify error rates decrease after tool fixes

Acceptance Criteria

  • Missing tool errors investigated and documented
  • Workflow configurations updated to fix missing tools
  • Hourly CI Cleaner schedule updated to twice daily
  • Tidy schedule updated to once daily
  • .lock.yml files recompiled
  • Both workflows run successfully on new schedules
  • Missing tool errors eliminated or significantly reduced
  • Cost reduction of ~$70/month achieved

Expected Impact

AI generated by Plan Command for discussion #7231

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions