Skip to content

feat: add automated action version sync to templates#444

Merged
stranske merged 7 commits intomainfrom
fix/sync-action-versions-to-templates
Jan 1, 2026
Merged

feat: add automated action version sync to templates#444
stranske merged 7 commits intomainfrom
fix/sync-action-versions-to-templates

Conversation

@stranske
Copy link
Copy Markdown
Owner

@stranske stranske commented Jan 1, 2026

Source: Issue #124

Automated Status Summary

Scope

  • After merging PR chore(codex): bootstrap PR for issue #101 #103 (multi-agent routing infrastructure), we need to:
  • 1. Validate the CLI agent pipeline works end-to-end with the new task-focused prompts
  • 2. Add GITHUB_STEP_SUMMARY output so iteration results are visible in the Actions UI
  • 3. Streamline the Automated Status Summary to reduce clutter when using CLI agents
  • 4. Clean up comment patterns to avoid a mix of old UI-agent and new CLI-agent comments

Tasks

  • ### Pipeline Validation
  • After PR chore(codex): bootstrap PR for issue #101 #103 merges, create a test PR with agent:codex label
  • Verify task appendix appears in Codex prompt (check workflow logs)
  • Verify Codex works on actual tasks (not random infrastructure work)
  • Verify keepalive comment updates with iteration progress
  • ### GITHUB_STEP_SUMMARY
  • Add step summary output to agents-keepalive-loop.yml after agent run
  • Include: iteration number, tasks completed, files changed, outcome
  • Ensure summary is visible in workflow run UI
  • ### Conditional Status Summary
  • Modify buildStatusBlock() in agents_pr_meta_update_body.js to accept agentType parameter
  • When agentType is set (CLI agent): hide workflow table, hide head SHA/required checks
  • Keep Scope/Tasks/Acceptance checkboxes for all cases
  • Pass agent type from workflow to the update_body job
  • ### Comment Pattern Cleanup
  • For CLI agents (agent:* label):
  • Suppress <!-- gate-summary: --> comment posting (use step summary instead)
  • Suppress <!-- keepalive-round: N --> instruction comments (task appendix replaces this)
  • Update <!-- keepalive-loop-summary --> to be the single source of truth
  • Ensure state marker is embedded in the summary comment (not separate)
  • For UI Codex (no agent:* label):
  • Keep existing comment patterns (instruction comments, connector bot reports)
  • Keep <!-- gate-summary: --> comment
  • Add agent_type output to detect job so downstream workflows know the mode
  • Update agents-pr-meta.yml to conditionally skip gate summary for CLI agent PRs

Acceptance criteria

  • CLI agent receives explicit tasks in prompt and works on them
  • Iteration results visible in Actions workflow run summary
  • PR body shows checkboxes but not workflow clutter when using CLI agents
  • UI Codex path (no agent label) continues to show full status summary
  • CLI agent PRs have ≤3 bot comments total (summary, one per iteration update) instead of 10+
  • State tracking is consolidated in the summary comment, not scattered
  • ## Dependencies
  • - Requires PR chore(codex): bootstrap PR for issue #101 #103 to be merged first

Head SHA: 260aa8b
Latest Runs: ✅ success — Gate
Required: gate: ✅ success

Workflow / Job Result Logs
Agents PR meta manager ❔ in progress View run
CI Autofix Loop ✅ success View run
Gate ✅ success View run
Health 40 Sweep ✅ success View run
Health 44 Gate Branch Protection ✅ success View run
Health 45 Agents Guard ✅ success View run
Health 50 Security Scan ✅ success View run
Maint 52 Validate Workflows ✅ success View run
PR 11 - Minimal invariant CI ✅ success View run
Selftest CI ✅ success View run
Validate Sync Manifest ✅ success View run

Add workflow and script to keep templates in sync with action versions
after Dependabot merges updates to .github/workflows/.

New files:
- .github/workflows/maint-sync-action-versions.yml: Automated workflow
- scripts/sync_action_versions.sh: Manual sync script

Also updates templates to current versions:
- actions/checkout: v4 → v6
- actions/download-artifact: v4 → v7
- actions/upload-artifact: v4 → v6
- actions/cache: v4 → v5

This prevents the recurring issue where consumer repo syncs would
downgrade action versions that were updated by their own Dependabot.
Copilot AI review requested due to automatic review settings January 1, 2026 21:25
@stranske stranske temporarily deployed to agent-high-privilege January 1, 2026 21:25 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 1, 2026

Automated Status Summary

Head SHA: 815d407
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / Enforce agents workflow protections
Required: core tests (3.11): ⏳ pending, core tests (3.12): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 92.21%
Baseline 85.00%
Delta +7.21%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
scripts/workflow_health_check.py 62.6% 28
scripts/classify_test_failures.py 62.9% 37
scripts/ledger_validate.py 65.3% 63
scripts/mypy_return_autofix.py 82.6% 11
scripts/ledger_migrate_base.py 85.5% 13
scripts/fix_cosmetic_aggregate.py 92.3% 1
scripts/coverage_history_append.py 92.8% 2
scripts/workflow_validator.py 93.3% 4
scripts/update_autofix_expectations.py 93.9% 1
scripts/pr_metrics_tracker.py 95.7% 3
scripts/generate_residual_trend.py 96.6% 1
scripts/build_autofix_pr_comment.py 97.0% 2
scripts/aggregate_agent_metrics.py 97.2% 0
scripts/fix_numpy_asserts.py 98.1% 0
scripts/sync_test_dependencies.py 98.3% 1

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

  • After merging PR chore(codex): bootstrap PR for issue #101 #103 (multi-agent routing infrastructure), we need to:
  • 1. Validate the CLI agent pipeline works end-to-end with the new task-focused prompts
  • 2. Add GITHUB_STEP_SUMMARY output so iteration results are visible in the Actions UI
  • 3. Streamline the Automated Status Summary to reduce clutter when using CLI agents
  • 4. Clean up comment patterns to avoid a mix of old UI-agent and new CLI-agent comments

Tasks

  • ### Pipeline Validation
  • After PR chore(codex): bootstrap PR for issue #101 #103 merges, create a test PR with agent:codex label
  • Verify task appendix appears in Codex prompt (check workflow logs)
  • Verify Codex works on actual tasks (not random infrastructure work)
  • Verify keepalive comment updates with iteration progress
  • ### GITHUB_STEP_SUMMARY
  • Add step summary output to agents-keepalive-loop.yml after agent run
  • Include: iteration number, tasks completed, files changed, outcome
  • Ensure summary is visible in workflow run UI
  • ### Conditional Status Summary
  • Modify buildStatusBlock() in agents_pr_meta_update_body.js to accept agentType parameter
  • When agentType is set (CLI agent): hide workflow table, hide head SHA/required checks
  • Keep Scope/Tasks/Acceptance checkboxes for all cases
  • Pass agent type from workflow to the update_body job
  • ### Comment Pattern Cleanup
  • For CLI agents (agent:* label):
  • Suppress <!-- gate-summary: --> comment posting (use step summary instead)
  • Suppress <!-- keepalive-round: N --> instruction comments (task appendix replaces this)
  • Update <!-- keepalive-loop-summary --> to be the single source of truth
  • Ensure state marker is embedded in the summary comment (not separate)
  • For UI Codex (no agent:* label):
  • Keep existing comment patterns (instruction comments, connector bot reports)
  • Keep <!-- gate-summary: --> comment
  • Add agent_type output to detect job so downstream workflows know the mode
  • Update agents-pr-meta.yml to conditionally skip gate summary for CLI agent PRs

Acceptance criteria

  • CLI agent receives explicit tasks in prompt and works on them
  • Iteration results visible in Actions workflow run summary
  • PR body shows checkboxes but not workflow clutter when using CLI agents
  • UI Codex path (no agent label) continues to show full status summary
  • CLI agent PRs have ≤3 bot comments total (summary, one per iteration update) instead of 10+
  • State tracking is consolidated in the summary comment, not scattered
  • ## Dependencies
  • - Requires PR chore(codex): bootstrap PR for issue #101 #103 to be merged first

@stranske stranske temporarily deployed to agent-high-privilege January 1, 2026 21:27 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 1, 2026

🤖 Keepalive Loop Status

PR #444 | Agent: Codex | Iteration 0/5

Current State

Metric Value
Iteration progress [----------] 0/5
Action wait (missing-agent-label)
Gate success
Tasks 0/33 complete
Keepalive ❌ disabled
Autofix ❌ disabled

🔍 Failure Classification

| Error type | infrastructure |
| Error category | resource |
| Suggested recovery | Confirm the referenced resource exists (repo, PR, branch, workflow, or file). |

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds automation to keep GitHub Action versions synchronized between .github/workflows/ and templates/ directories. Previously, Dependabot would update action versions in workflows but not in templates, causing consumer repos to receive outdated versions when syncing.

Key changes:

  • New automated workflow maint-sync-action-versions.yml that triggers on workflow file changes and creates PRs to sync action versions to templates
  • Manual bash script scripts/sync_action_versions.sh for local version synchronization
  • Initial template updates bringing them in sync with current workflow versions (actions/checkout v4→v6, actions/download-artifact v4→v7, actions/upload-artifact v4→v6, actions/github-script v8→v7)

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/maint-sync-action-versions.yml New automated workflow to extract action versions from workflows and update templates, creating PRs when changes are detected
scripts/sync_action_versions.sh Manual bash script for local version synchronization with same logic as automated workflow
templates/integration-repo/.github/workflows/notify-workflows.yml Updates actions/checkout from v4 to v6
templates/dependency-refresh.yml Updates actions/checkout from v4 to v6
templates/cosmetic-repair.yml Updates actions/checkout from v4 to v6
templates/consumer-repo/.github/workflows/pr-00-gate.yml Updates actions/checkout from v4 to v6
templates/consumer-repo/.github/workflows/maint-coverage-guard.yml Updates actions/checkout from v4 to v6 and actions/download-artifact from v4 to v7
templates/consumer-repo/.github/workflows/autofix.yml Syncs actions/github-script to v7 (matching main workflows)
templates/consumer-repo/.github/workflows/agents-pr-meta.yml Syncs actions/github-script to v7 (matching main workflows)
templates/consumer-repo/.github/workflows/agents-keepalive-loop.yml Updates actions/checkout from v4 to v6 and actions/upload-artifact from v4 to v6
templates/consumer-repo/.github/workflows/agents-guard.yml Updates actions/checkout from v4 to v6
templates/consumer-repo/.github/workflows/agents-autofix-loop.yml Updates actions/checkout from v4 to v6 and actions/upload-artifact from v4 to v6
templates/ci-full.yml Updates actions/checkout from v4 to v6 across multiple jobs
templates/ci-basic.yml Updates actions/checkout from v4 to v6 across multiple jobs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 1, 2026

✅ Codex Completion Checkpoint

Commit: 87cac14
Recorded: 2026-01-01T21:49:16.163Z

No new completions recorded this round.

About this comment

This comment is automatically generated to track task completions.
The Automated Status Summary reads these checkboxes to update PR progress.
Do not edit this comment manually.

- Revert checkout from v6 to v4 (v6 is very new, staying with v4 for stability)
- Keep upload-artifact@v6 and download-artifact@v7 (matching main workflows)
- Fix version comparison: use numeric instead of string comparison
- Fix subshell variable issue: use for loop instead of pipe to while

Addresses Copilot review comments on PR #444
@agents-workflows-bot agents-workflows-bot bot temporarily deployed to agent-high-privilege January 1, 2026 21:49 Inactive
@github-actions github-actions bot added autofix Opt-in automated formatting & lint remediation and removed autofix:escalated labels Jan 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 1, 2026

Status | ✅ no new diagnostics
History points | 1
Timestamp | 2026-01-01 21:59:24 UTC
Report artifact | autofix-report-pr-444
Remaining | 0
New | 0
No additional artifacts

- SC2129: Use grouped redirects { ... } >> file for GITHUB_OUTPUT
- SC2044: Use find -exec instead of for loop over find output
@stranske stranske temporarily deployed to agent-high-privilege January 1, 2026 21:58 — with GitHub Actions Inactive
@stranske stranske merged commit adf3060 into main Jan 1, 2026
226 checks passed
@stranske stranske deleted the fix/sync-action-versions-to-templates branch January 1, 2026 22:02
stranske added a commit that referenced this pull request Jan 1, 2026
This commit updates all GitHub Action versions in templates to match
what Dependabot has been updating in consumer repos:

- actions/checkout: v4 → v6
- actions/github-script: v7 → v8
- actions/upload-artifact: v4 → v6
- actions/download-artifact: v4 → v7
- actions/cache: v4 → v5
- actions/setup-python: v4 → v5
- peter-evans/create-pull-request: v6 → v8

ROOT CAUSE: Templates had older action versions. When workflow-sync
ran, it would DOWNGRADE consumer repos that Dependabot had updated.
This caused a constant battle: Dependabot updates consumer → sync
downgrades → Dependabot updates again → sync downgrades again.

This fix, combined with PR #444 (automated sync), ensures templates
stay current with Dependabot updates going forward.
stranske added a commit that referenced this pull request Jan 1, 2026
* fix: update ALL template action versions to latest

This commit updates all GitHub Action versions in templates to match
what Dependabot has been updating in consumer repos:

- actions/checkout: v4 → v6
- actions/github-script: v7 → v8
- actions/upload-artifact: v4 → v6
- actions/download-artifact: v4 → v7
- actions/cache: v4 → v5
- actions/setup-python: v4 → v5
- peter-evans/create-pull-request: v6 → v8

ROOT CAUSE: Templates had older action versions. When workflow-sync
ran, it would DOWNGRADE consumer repos that Dependabot had updated.
This caused a constant battle: Dependabot updates consumer → sync
downgrades → Dependabot updates again → sync downgrades again.

This fix, combined with PR #444 (automated sync), ensures templates
stay current with Dependabot updates going forward.

* Update templates/dependency-refresh.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update templates/cosmetic-repair.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autofix Opt-in automated formatting & lint remediation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants