Skip to content

Codex/issue 123#132

Merged
stranske merged 35 commits intomainfrom
codex/issue-123
Dec 25, 2025
Merged

Codex/issue 123#132
stranske merged 35 commits intomainfrom
codex/issue-123

Conversation

@stranske
Copy link
Copy Markdown
Owner

@stranske stranske commented Dec 25, 2025

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: 36e1825
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

github-actions bot and others added 24 commits December 24, 2025 20:05
- Add analyzeTaskCompletion() to match commits/files to task text
- Add autoReconcileTasks() to auto-check high-confidence task matches
- Add Auto-reconcile task checkboxes step to keepalive workflow
- Export head_sha from evaluate job for commit comparison
- Add tests for task reconciliation logic

When Codex makes changes but doesn't update task checkboxes, the system
now analyzes commit messages and file paths to identify which tasks
were likely completed, and automatically checks them off if confidence
is high (50%+ keyword match + file/commit match).
Copilot AI review requested due to automatic review settings December 25, 2025 05:52
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 25, 2025

Automated Status Summary

Head SHA: 0d76a94
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

  • 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 25, 2025

🤖 Keepalive Loop Status

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

Current State

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

⚠️ Failure Tracking

| Consecutive failures | 11/3 |
| Reason | missing-agent-label |

🛑 Paused – Human Attention Required

The keepalive loop has paused due to repeated failures.

To resume:

  1. Investigate the failure reason above
  2. Fix any issues in the code or prompt
  3. Remove the needs-human label from this PR
  4. The next Gate pass will restart the loop

Or manually edit this comment to reset failure: {} in the state below.

- Change max_iterations from hard cap to stuck-detection threshold
- Continue past max if agent made file changes and has no failures
- Show 'ready-extended' reason and 🚀 badge when in extended mode
- Fix iteration loading from state (config default 0 was overriding state)
- Add test for extended mode behavior

This allows productive PRs to continue indefinitely while still stopping
stuck/failing PRs at the max_iterations limit.
@stranske stranske temporarily deployed to agent-high-privilege December 25, 2025 05:56 — with GitHub Actions Inactive
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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 implements automatic task checkbox reconciliation in PR bodies by analyzing commit messages and file changes. The main improvement also includes preserving summary content when updating keepalive state markers, ensuring the summary comment remains the single source of truth.

  • Added auto-reconciliation logic that analyzes commits and changed files to identify completed tasks with keyword matching
  • Modified keepalive state updates to preserve existing summary text instead of overwriting the entire comment
  • Extended workflow to capture head SHA before agent runs and trigger task reconciliation after changes are made

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
codex-output.md Updated documentation describing the keepalive state preservation feature and task reconciliation implementation
.github/workflows/agents-keepalive-loop.yml Added head_sha output capture and new auto-reconcile step that runs after agent changes are committed
.github/scripts/keepalive_state.js Implemented upsertStateCommentBody function to preserve summary content when updating state markers
.github/scripts/keepalive_loop.js Added analyzeTaskCompletion and autoReconcileTasks functions for automatic task checkbox management
.github/scripts/tests/keepalive-state.test.js Enhanced test stub to track comment store mutations and added test for summary preservation behavior
.github/scripts/tests/keepalive-loop.test.js Added comprehensive test coverage for task analysis and auto-reconciliation with high/medium confidence scenarios

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

The workflow was passing 'auth-via-codex-auth-json' as a literal API key
to codex-action, which doesn't work. The fix:

1. Remove openai-api-key parameter - when empty, codex-action reads
   from auth.json directly instead of using the proxy
2. Set codex-home to a custom location and copy auth.json there
3. Use safety-strategy: unsafe since we're not using the API proxy
   (sandbox: read-only still limits Codex capabilities)
@stranske stranske temporarily deployed to agent-high-privilege December 25, 2025 06:10 — with GitHub Actions Inactive
@github-actions github-actions bot added the needs-human Requires human intervention or review label Dec 25, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@stranske stranske temporarily deployed to agent-high-privilege December 25, 2025 06:12 — with GitHub Actions Inactive
stranske and others added 3 commits December 25, 2025 00:13
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@stranske stranske temporarily deployed to agent-high-privilege December 25, 2025 06:14 — with GitHub Actions Inactive
@stranske
Copy link
Copy Markdown
Owner Author

@codex fix comments

@chatgpt-codex-connector
Copy link
Copy Markdown

Summary

Testing

  • node --test .github/scripts/__tests__/keepalive-state.test.js
  • node --test .github/scripts/__tests__/keepalive-loop.test.js

View task →

Reverts commits 686ffec, 73367d2, e288c5f, 5f2be33 which introduced
syntax errors by incorrectly mangling keepalive_loop.js - removing a
closing brace and inserting code in the wrong location.

The keepalive_state.js changes are also reverted as they were part of
the same broken patch sequence.
@stranske stranske temporarily deployed to agent-high-privilege December 25, 2025 06:22 — with GitHub Actions Inactive
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@stranske stranske temporarily deployed to agent-high-privilege December 25, 2025 06:24 — with GitHub Actions Inactive
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@stranske stranske temporarily deployed to agent-high-privilege December 25, 2025 06:24 — with GitHub Actions Inactive
UI Codex incorrectly replaced the function arguments with a comment,
breaking the autoReconcileTasks function. This restores the proper
arguments: github, context, prNumber, baseSha, headSha, taskText, core
@stranske stranske temporarily deployed to agent-high-privilege December 25, 2025 06:28 — with GitHub Actions Inactive
@stranske stranske removed the needs-human Requires human intervention or review label Dec 25, 2025
@stranske stranske merged commit 567fa13 into main Dec 25, 2025
199 checks passed
@stranske stranske deleted the codex/issue-123 branch December 25, 2025 06:32
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.

3 participants