Skip to content

chore(codex): bootstrap PR for issue #123#124

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

chore(codex): bootstrap PR for issue #123#124
stranske merged 21 commits intomainfrom
codex/issue-123

Conversation

@stranske
Copy link
Copy Markdown
Owner

@stranske stranske commented Dec 24, 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

@stranske stranske added the agent:codex Agent-created issues from Codex label Dec 24, 2025
Copilot AI review requested due to automatic review settings December 24, 2025 20:08
@stranske stranske added agents:keepalive Use to initiate keepalive functionality with agents autofix Opt-in automated formatting & lint remediation labels Dec 24, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 24, 2025

Automated Status Summary

Head SHA: 8bf722d
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

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 creates a bootstrap file for Codex to track work on issue #123. The change adds a single markdown file following the established pattern used throughout the agents/ directory.

  • Adds a new bootstrap file agents/codex-123.md with a placeholder comment

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

stranske added a commit that referenced this pull request Dec 24, 2025
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.
stranske added a commit that referenced this pull request Dec 24, 2025
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.
@stranske stranske removed the agents:keepalive Use to initiate keepalive functionality with agents label Dec 24, 2025
@stranske stranske added the agents:keepalive Use to initiate keepalive functionality with agents label Dec 24, 2025 — with GitHub Codespaces
@stranske stranske removed the agents:keepalive Use to initiate keepalive functionality with agents label Dec 24, 2025
@stranske stranske added the agents:keepalive Use to initiate keepalive functionality with agents label Dec 24, 2025 — with GitHub Codespaces
@stranske stranske reopened this Dec 24, 2025
Copy link
Copy Markdown
Owner Author

Triggering workflows after security guard fix (PR #126 merged)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 24, 2025

🤖 Keepalive Loop Status

PR #124 | Agent: Codex | Iteration 6/5

Current State

Metric Value
Iteration progress [##########] 5/5
Action run (ready)
Gate success
Tasks 0/33 complete
Keepalive ✅ enabled
Autofix ❌ disabled

Last Codex Run

Result Value
Status ✅ Success
Changes ✅ 1 file(s)
Commit 4016f3b

Codex output:

Updated keepalive state updates to preserve any existing summary content by replacing or appending the keepalive-state marker instead of overwriting the whole comment, so the summary stays the single source of truth. This is implemented in .github/scripts/keepalive_state.js and verified with new...

📋 Task Reconciliation Needed

⚠️ Codex changed 1 file(s) but didn't check off any tasks.

Next iteration should:

  1. Review the changes made and determine which tasks were addressed
  2. Update the PR body to check off completed task checkboxes
  3. If work was unrelated to tasks, continue with remaining tasks

@github-actions github-actions bot added autofix:clean Clean autofix needs-human Requires human intervention or review and removed autofix:clean Clean autofix labels Dec 25, 2025
@github-actions github-actions bot added autofix:clean Clean autofix and removed autofix:patch labels Dec 25, 2025
@github-actions github-actions bot added the autofix:clean-only Clean-only autofix label Dec 25, 2025
@stranske stranske removed the needs-human Requires human intervention or review label Dec 25, 2025
@stranske stranske merged commit 94e30ef into main Dec 25, 2025
51 checks passed
@stranske stranske deleted the codex/issue-123 branch December 25, 2025 05:24
stranske added a commit that referenced this pull request Dec 25, 2025
* chore(codex): bootstrap PR for issue #123

* chore(codex-keepalive): apply updates (PR #124)

* Trim CLI status summary details

* chore(codex-keepalive): apply updates (PR #124)

* Suppress keepalive instructions for CLI agents

* chore(codex-keepalive): apply updates (PR #124)

* style: fix black formatting in test_keepalive_workflow.py

* chore(codex-keepalive): apply updates (PR #124)

* feat(keepalive): emit step summary for agent runs

* chore(codex-keepalive): apply updates (PR #124)

* test(keepalive): add per-run task delta to step summary

* chore(codex-keepalive): apply updates (PR #124)

* feat(pr-meta): infer agent type from labels

* chore(codex-keepalive): apply updates (PR #124)

* feat(gate-summary): skip CLI agent comments

* chore(codex-keepalive): apply updates (PR #124)

* fix(keepalive): preserve summary when updating state

* chore(codex-keepalive): apply updates (PR #124)

* feat(keepalive): add automatic task checkbox reconciliation

- 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).

* feat(keepalive): allow productive work to extend past max_iterations

- 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.

* fix(agents-verifier): use auth.json instead of fake API key

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)

* Update .github/scripts/keepalive_loop.js

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

* Update .github/scripts/keepalive_state.js

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

* Update .github/scripts/keepalive_state.js

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

* Update .github/scripts/keepalive_loop.js

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

* fix(keepalive): revert broken UI Codex patches that broke syntax

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.

* Update .github/scripts/keepalive_loop.js

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

* Update .github/workflows/agents-keepalive-loop.yml

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

* fix(keepalive): restore analyzeTaskCompletion function arguments

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

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Codex <codex@example.com>
Co-authored-by: Codex <codex@local>
Co-authored-by: Codex <codex@openai.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

agent:codex Agent-created issues from Codex agents:keepalive Use to initiate keepalive functionality with agents autofix:clean Clean autofix autofix:clean-only Clean-only autofix autofix Opt-in automated formatting & lint remediation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants