Skip to content

fix: complete truncated updateKeepaliveLoopSummary script#125

Merged
stranske merged 1 commit intomainfrom
fix/keepalive-script-truncation
Dec 24, 2025
Merged

fix: complete truncated updateKeepaliveLoopSummary script#125
stranske merged 1 commit intomainfrom
fix/keepalive-script-truncation

Conversation

@stranske
Copy link
Copy Markdown
Owner

@stranske stranske commented Dec 24, 2025

Summary

The Update summary comment step in agents-keepalive-loop.yml was truncated, missing:

  • The closing }; for the inputs object
  • The await updateKeepaliveLoopSummary({ github, context, core, inputs }); function call

This caused a SyntaxError: Unexpected token ')' when the workflow ran, which is why PR #124's keepalive loop failed.

Evidence

From the workflow logs:

Update keepalive summary  2025-12-24T20:08:45.2193593Z SyntaxError: Unexpected token ')'
Update keepalive summary  2025-12-24T20:08:45.2235872Z ##[error]Unhandled error: SyntaxError: Unexpected token ')'

Fix

Added the missing 2 lines to complete the JavaScript code block:

            };
            await updateKeepaliveLoopSummary({ github, context, core, inputs });

Testing

Closes #124's blocking issue.

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: b665a4a
  • Latest Runs: ❔ in progress — Agents PR meta manager
  • Required: gate: ⏸️ not started
  • | Workflow / Job | Result | Logs |
  • |----------------|--------|------|
  • | Agents PR meta manager | ❔ in progress | View run |
  • | CI Autofix Loop | ⏹️ cancelled | View run |
  • | Copilot code review | ✅ success | View run |
  • | Health 45 Agents Guard | ⏹️ cancelled | View run |

Head SHA: 04f263d
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
Copilot code review ✅ 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

The Update summary comment step in agents-keepalive-loop.yml was
truncated, missing the closing brace and function call. This caused
a SyntaxError: Unexpected token ')' when the workflow ran.

Fixes the keepalive loop failure on PR #124 and any other PRs with
agent:codex labels.
Copilot AI review requested due to automatic review settings December 24, 2025 20:22
@stranske stranske temporarily deployed to agent-high-privilege December 24, 2025 20:22 — with GitHub Actions Inactive
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 fixes a syntax error in the agents-keepalive-loop.yml workflow file caused by truncated JavaScript code. The Update summary comment step was missing the closing brace for the inputs object and the function call to updateKeepaliveLoopSummary, which caused PR #124's keepalive loop to fail with a SyntaxError: Unexpected token ')'.

  • Adds the missing closing brace }; to complete the inputs object definition
  • Adds the missing function call await updateKeepaliveLoopSummary({ github, context, core, inputs });

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

@github-actions
Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 2d2a361
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 77.97%
Baseline 0.00%
Delta +77.97%
Minimum 70.00%
Status ✅ Pass

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


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

@stranske stranske merged commit d1a7f00 into main Dec 24, 2025
225 checks passed
@stranske stranske deleted the fix/keepalive-script-truncation branch December 24, 2025 20:27
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.

2 participants