Skip to content

fix(agents): cap issue-format optimizer retries - #2998

Merged
stranske merged 13 commits into
mainfrom
codex/issue-2991-format-guard-loop-bound
Aug 9, 2026
Merged

fix(agents): cap issue-format optimizer retries#2998
stranske merged 13 commits into
mainfrom
codex/issue-2991-format-guard-loop-bound

Conversation

@stranske

@stranske stranske commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Source: Issue #2991

Closes #2991

Automated Status Summary

Scope

Loop safety in the agents-issue-format-guard <-> agents-issue-optimizer handshake: templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml and .github/workflows/agents-issue-optimizer.yml. The goal is that no single issue can be routed to the optimizer without bound, whatever the validator's verdict.

Context for Agent

Related Issues/PRs

Tasks

  • Treat a closed issue as exempt in templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml:62-67, reading the state field already fetched at :59-60 (for example [[ "$(jq -r '.state // "" | ascii_downcase' issue.json)" == "closed" ]] sets exempt=true), so no validation, comment, or dispatch occurs for closed issues.
  • Add run-name: to .github/workflows/agents-issue-optimizer.yml so every run carries the issue number regardless of trigger — e.g. Agents Issue Optimizer #${{ github.event.issue.number || inputs.issue_number }} — making displayTitle correlatable for both issues and workflow_dispatch runs.
  • With the run name fixed, change the two correlation filters from contains($issue) to endswith($issue) at .github/workflows/agents-issue-optimizer.yml:150 and templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml:245, so #4640 is not counted against #464.
  • Pass an explicit --limit 100 to the gh run list call at .github/workflows/agents-issue-optimizer.yml:144-146, so the one-hour window is not truncated by the 20-run default.
  • Add a sequential attempt cap to the routing step at templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml:121-269: count prior <!-- format-guard: markers on the issue and, at or above a fixed maximum, apply agents:auto-pilot-pause, post one comment recording that automated formatting is exhausted, and stop dispatching instead of routing again.

Acceptance criteria

  • pytest tests/workflows/test_issue_optimizer_recursion_guard.py::test_recursion_guard_counts_workflow_dispatch_runs passes. The test feeds the guard's jq filter a fixture of five workflow_dispatch run records for one issue inside the window (the shape captured above), asserts the computed count is 5 so the -gt 3 branch trips, and includes a #4640 record that must NOT be counted against #464.
  • Deliberate-break demonstration: restore contains($issue) in place of endswith($issue) and remove the run-name: line so displayTitle is the bare workflow name, confirm test_recursion_guard_counts_workflow_dispatch_runs FAILS with a computed count of 0 (the exact production symptom), then revert and confirm it passes again.
  • pytest tests/workflows/test_issue_format_guard.py::test_closed_issue_is_exempt passes: given an issue.json fixture with "state": "CLOSED", the resolve step sets exempt=true and no dispatch occurs.
  • pytest tests/workflows/test_issue_format_guard.py::test_routing_stops_at_attempt_cap passes: given an issue whose comments already carry the maximum number of <!-- format-guard: markers, the routing step applies agents:auto-pilot-pause and performs no gh workflow run dispatch.

Summary by CodeRabbit

  • Bug Fixes

    • Improved format-optimizer retry tracking with trusted attempt markers.
    • Limited automatic retries to three attempts and clearly records each attempt.
    • Pauses processing after the retry limit is reached and provides guidance for resolving the issue.
    • Improved dispatch matching and handling of ambiguous workflow results.
  • Documentation

    • Documented the bounded retry behavior and required recovery steps.

@stranske stranske added agent:codex Agent-created issues from Codex agents:keepalive Use to initiate keepalive functionality with agents autofix Opt-in automated formatting & lint remediation labels Aug 9, 2026
Copilot AI lite review requested due to automatic review settings August 9, 2026 00:09
@stranske stranske added agent:codex Agent-created issues from Codex agents:keepalive Use to initiate keepalive functionality with agents autofix Opt-in automated formatting & lint remediation labels Aug 9, 2026
@cursor

cursor Bot commented Aug 9, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The format-guard workflows now track trusted optimizer attempts, enforce a three-attempt limit, correlate accepted runs by issue title, and preserve attempt markers across ambiguous dispatch failures. Documentation, tests, and worker metadata were updated.

Changes

Format-guard retry control

Layer / File(s) Summary
Retry budget and pause behavior
.github/workflows/agents-issue-format-guard.yml, templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml, tests/workflows/test_agents_issue_optimizer_format_trigger.py
The workflows count authenticated retry markers, number attempts, cap dispatches at three, and pause exhausted issues by adding agents:auto-pilot-pause and removing agents:format. Tests cover trusted markers and cap behavior.
Dispatch correlation and attempt recording
.github/workflows/agents-issue-format-guard.yml, templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml, tests/workflows/test_agents_issue_optimizer_format_trigger.py
Dispatch matching requires the workflow title to end with the issue identifier. Accepted ambiguous and successful dispatches record numbered attempt markers.
Workflow documentation and attempt metadata
docs/ci/WORKFLOWS.md, langsmith-fleet-worker-attempt.json
The workflow catalog documents the three-attempt limit. Worker metadata records the updated timestamp and pull request number.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Issue
  participant FormatGuardWorkflow
  participant GitHubActions
  participant IssueLabels
  Issue->>FormatGuardWorkflow: unchanged non-conforming body
  FormatGuardWorkflow->>Issue: inspect trusted attempt markers
  FormatGuardWorkflow->>GitHubActions: dispatch format optimizer
  GitHubActions-->>FormatGuardWorkflow: accepted run or ambiguous CLI result
  FormatGuardWorkflow->>Issue: record numbered attempt marker
  FormatGuardWorkflow->>IssueLabels: pause after third attempt
Loading

Possibly related issues

  • stranske/Workflows issue 2991: The changes implement its requested loop-safety behavior for bounded attempts, trusted markers, run correlation, and exhaustion pausing.

Possibly related PRs

Suggested labels: agent:retry, verify:compare

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: limiting issue-format optimizer retries.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/issue-2991-format-guard-loop-bound

Comment @coderabbitai help to get the list of available commands.

@stranske

stranske commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

Runner dispatch state for autofix on PR #2998. Do not edit.

@stranske-keepalive

stranske-keepalive Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

🤖 Keepalive Loop Status

PR #2998 | Agent: Codex | Iteration 0/12

Current State

Metric Value
Iteration progress [----------] 0/12
Action skip (needs-human)
Disposition skipped
Gate success
Tasks 3/9 complete
Timeout 45 min (default)
Timeout usage 7m elapsed (18%, 38m remaining)
Keepalive ✅ enabled
Autofix ❌ disabled

🔍 Failure Classification

| Error type | infrastructure |
| Error category | unknown |
| Suggested recovery | Capture logs and context; retry once and escalate if the issue persists. |

⚠️ Failure Tracking

| Consecutive failures | 7/3 |
| Reason | agent-run-failed |

@stranske-keepalive

stranske-keepalive Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor
Keepalive Work Log (click to expand)
# Time (UTC) Agent Action Result Files Tasks Progress Commit Gate
0 2026-08-09 00:09:45 Codex wait (gate-pending-transient) skipped 0 0/9
0 2026-08-09 00:12:28 Codex run (agent-run-failed) failure 2 file(s) +3 3/9 1573de8 cancelled
0 2026-08-09 00:15:04 Codex run (agent-run-failed) failure 2 file(s) 0 3/9 800be34 cancelled
0 2026-08-09 00:17:32 Codex run (agent-run-failed-repeat) failure 2 file(s) 0 3/9 e656fed cancelled
0 2026-08-09 00:18:09 Codex skip (needs-human) skipped 0 3/9
0 2026-08-09 00:18:48 Codex skip (needs-human) skipped 0 3/9 cancelled
0 2026-08-09 00:19:28 Codex skip (needs-human) skipped 0 3/9 cancelled
0 2026-08-09 00:23:56 Codex skip (needs-human) skipped 0 3/9 success
0 2026-08-09 00:26:13 Codex run (agent-run-failed-repeat) retry failure 2 file(s) 0 3/9 71f7f12
0 2026-08-09 00:26:54 Codex skip (needs-human) skipped 0 3/9
0 2026-08-09 00:27:30 Codex skip (needs-human) skipped 0 3/9 cancelled
0 2026-08-09 00:28:11 Codex skip (needs-human) skipped 0 3/9 cancelled
0 2026-08-09 00:28:48 Codex skip (needs-human) skipped 0 3/9 cancelled
0 2026-08-09 00:32:43 Codex skip (needs-human) skipped 0 3/9 success
0 2026-08-09 01:33:22 Codex fix (agent-run-failed-repeat) failure 2 file(s) 0 3/9 a516c11 failure
0 2026-08-09 01:34:15 Codex skip (needs-human) skipped 0 3/9
0 2026-08-09 01:34:55 Codex skip (needs-human) skipped 0 3/9 cancelled
0 2026-08-09 01:38:52 Codex skip (needs-human) skipped 0 3/9 success
0 2026-08-09 02:08:01 Codex run (agent-run-failed-repeat) retry failure 2 file(s) 0 3/9 afb4959 success
0 2026-08-09 02:08:55 Codex skip (needs-human) skipped 0 3/9
0 2026-08-09 02:09:35 Codex skip (needs-human) skipped 0 3/9 cancelled
0 2026-08-09 02:10:21 Codex skip (needs-human) skipped 0 3/9 cancelled
0 2026-08-09 02:15:40 Codex run (agent-run-failed-repeat) failure 2 file(s) 0 3/9 cdedf30 success
0 2026-08-09 02:16:24 Codex skip (needs-human) skipped 0 3/9
0 2026-08-09 02:17:00 Codex skip (needs-human) skipped 0 3/9 cancelled
0 2026-08-09 02:18:04 Codex skip (needs-human) skipped 0 3/9 cancelled
0 2026-08-09 02:22:06 Codex skip (needs-human) skipped 0 3/9 success
0 2026-08-09 02:24:22 Codex skip (needs-human) skipped 0 3/9
0 2026-08-09 02:31:53 Codex skip (needs-human) skipped 0 3/9 success

@stranske
stranske temporarily deployed to agent-high-privilege August 9, 2026 00:09 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Runner dispatch state for codex on PR #2998. Do not edit.

@stranske
stranske temporarily deployed to agent-high-privilege August 9, 2026 00:10 — with GitHub Actions Inactive

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

Copy link
Copy Markdown

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.

Reviewed commit: 864a97bd84

ℹ️ 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".

Comment thread .github/workflows/agents-issue-format-guard.yml
Comment thread .github/workflows/agents-issue-format-guard.yml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a sequential attempt cap to the agents-issue-format-guard routing logic to prevent unbounded re-dispatching to the issue optimizer, and updates workflow-text assertions to ensure the cap machinery is present in both the root workflow and the consumer template.

Changes:

  • Add a format-guard attempt counter derived from prior <!-- format-guard:... --> markers and stop routing once a fixed maximum is reached, applying agents:auto-pilot-pause.
  • Emit a one-time “attempt cap” marker/comment when automated formatting is exhausted.
  • Extend the existing workflow YAML text-based test to assert the attempt-cap logic is present and positioned before dispatch.

Reviewed changes

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

File Description
tests/workflows/test_agents_issue_optimizer_format_trigger.py Adds assertions that the attempt-cap variables/marker/comment exist in both workflow copies and appear before the optimizer dispatch call.
templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml Adds attempt counting + cap behavior (pause label + exhaustion comment) to prevent unbounded sequential optimizer retries in consumer templates.
.github/workflows/agents-issue-format-guard.yml Mirrors the same attempt counting + cap behavior in the root workflow copy.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/agents-issue-format-guard.yml
Comment thread tests/workflows/test_agents_issue_optimizer_format_trigger.py
@agents-workflows-bot
agents-workflows-bot Bot temporarily deployed to agent-high-privilege August 9, 2026 00:16 Inactive
@agents-workflows-bot agents-workflows-bot Bot added agent:needs-attention Agent needs human review or intervention needs-human Requires human intervention or review labels Aug 9, 2026
@agents-workflows-bot
agents-workflows-bot Bot temporarily deployed to agent-high-privilege August 9, 2026 00:18 Inactive
@agents-workflows-bot
agents-workflows-bot Bot temporarily deployed to agent-high-privilege August 9, 2026 01:32 Inactive
@agents-workflows-bot agents-workflows-bot Bot added agent:needs-attention Agent needs human review or intervention needs-human Requires human intervention or review labels Aug 9, 2026
@agents-workflows-bot
agents-workflows-bot Bot temporarily deployed to agent-high-privilege August 9, 2026 01:34 Inactive
@stranske stranske removed needs-human Requires human intervention or review agent:needs-attention Agent needs human review or intervention labels Aug 9, 2026
@agents-workflows-bot
agents-workflows-bot Bot temporarily deployed to agent-high-privilege August 9, 2026 02:07 Inactive
@stranske-keepalive stranske-keepalive Bot added agent:needs-attention Agent needs human review or intervention needs-human Requires human intervention or review labels Aug 9, 2026
@agents-workflows-bot
agents-workflows-bot Bot temporarily deployed to agent-high-privilege August 9, 2026 02:09 Inactive
@stranske stranske removed needs-human Requires human intervention or review agent:needs-attention Agent needs human review or intervention labels Aug 9, 2026
@agents-workflows-bot agents-workflows-bot Bot added agent:needs-attention Agent needs human review or intervention needs-human Requires human intervention or review labels Aug 9, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/agents-issue-format-guard.yml (1)

303-309: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Increase and test the accepted-dispatch probe limit.

Line 306 limits the probe to 20 runs. During a burst, the accepted dispatch can fall outside this result set. The workflow then releases agents:format and can dispatch the optimizer again. Use the required limit of 100 and assert it in the workflow contract test.

  • .github/workflows/agents-issue-format-guard.yml#L303-L309: change --limit 20 to --limit 100.
  • templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml#L303-L309: apply the same synchronized limit.
  • tests/workflows/test_agents_issue_optimizer_format_trigger.py#L63-L87: assert that both workflows contain --limit 100.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/agents-issue-format-guard.yml around lines 303 - 309,
Increase the accepted-dispatch probe limit from 20 to 100 in both workflow
files, .github/workflows/agents-issue-format-guard.yml lines 303-309 and
templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml lines
303-309. Update tests/workflows/test_agents_issue_optimizer_format_trigger.py
lines 63-87 to assert that both workflows contain --limit 100.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/agents-issue-format-guard.yml:
- Around line 303-309: Increase the accepted-dispatch probe limit from 20 to 100
in both workflow files, .github/workflows/agents-issue-format-guard.yml lines
303-309 and
templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml lines
303-309. Update tests/workflows/test_agents_issue_optimizer_format_trigger.py
lines 63-87 to assert that both workflows contain --limit 100.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a93ca531-29b5-4420-9ee3-848dd7f3f3d7

📥 Commits

Reviewing files that changed from the base of the PR and between 498dc15 and f6e1913.

📒 Files selected for processing (5)
  • .github/workflows/agents-issue-format-guard.yml
  • docs/ci/WORKFLOWS.md
  • langsmith-fleet-worker-attempt.json
  • templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml
  • tests/workflows/test_agents_issue_optimizer_format_trigger.py

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Provider Comparison Report

Provider Summary

Provider Model Verdict Confidence Summary
openai gpt-5.6-terra CONCERNS 96% The PR partially addresses loop safety by updating both copies of the format guard and adding related test coverage. However, it does not modify the required agents-issue-optimizer.yml workflow a...
anthropic claude-sonnet-5 CONCERNS 75% The merged PR implements three of five required changes on the format-guard side: closed-issue exemption, endswith-based correlation (in format-guard.yml only), and a sequential attempt cap with `a...
📋 Full Provider Details (click to expand)

openai

  • Model: gpt-5.6-terra
  • Verdict: CONCERNS
  • Confidence: 96%
  • Scores:
    • Correctness: 6.0/10
    • Completeness: 4.0/10
    • Quality: 7.0/10
    • Testing: 4.0/10
    • Risks: 5.0/10
  • Summary: The PR partially addresses loop safety by updating both copies of the format guard and adding related test coverage. However, it does not modify the required agents-issue-optimizer.yml workflow at all. Consequently, the issue-number run naming, unambiguous endswith run correlation in the optimizer, and expanded run-list limit are absent from this change set. These omissions prevent the PR from fully satisfying the documented acceptance criteria for bounded optimizer routing.
  • Concerns:
    • The required optimizer-workflow changes are not present in the PR diff. .github/workflows/agents-issue-optimizer.yml is not modified, despite the acceptance criteria requiring a run-name containing the issue number, endswith($issue) correlation, and gh run list --limit 100.
    • Without the optimizer run-name, workflow_dispatch runs retain a non-issue-specific display title and cannot be reliably correlated by the recursion guard. This leaves the stated production symptom—workflow-dispatch runs being counted as zero—unresolved.
    • Because the optimizer workflow is unchanged, its correlation filter may still use contains($issue), which can incorrectly associate issue #4640 with #464; the required collision-safe matching was required in both workflow locations.
    • The required acceptance-test files/tests are not included in the changed test set: no changes are shown for test_issue_optimizer_recursion_guard.py or test_issue_format_guard.py. The modified test_agents_issue_optimizer_format_trigger.py does not, based on the supplied diff summary, demonstrate coverage of the required workflow-dispatch count, closed-issue exemption, or attempt-cap behavior.
    • The guard workflow changes appear to implement the closed-issue exemption and a marker-based routing cap in both the root and consumer-template copies, but the overall handshake remains incomplete because its optimizer-side safeguards were not delivered.

anthropic

  • Model: claude-sonnet-5
  • Verdict: CONCERNS
  • Confidence: 75%
  • Scores:
    • Correctness: 6.0/10
    • Completeness: 3.0/10
    • Quality: 6.0/10
    • Testing: 3.0/10
    • Risks: 5.0/10
  • Summary: The merged PR implements three of five required changes on the format-guard side: closed-issue exemption, endswith-based correlation (in format-guard.yml only), and a sequential attempt cap with agents:auto-pilot-pause. However, the companion workflow .github/workflows/agents-issue-optimizer.yml — which needed a run-name: addition, the corresponding endswith($issue) fix at line 150, and an explicit --limit 100 on gh run list — is not present in the diff at all, and these tasks remain unchecked in the plan. This leaves the optimizer side of the handshake unfixed, so the stated goal of bounding the retry loop is only partially met. Additionally, the specific test files named in the acceptance criteria (test_issue_optimizer_recursion_guard.py, test_issue_format_guard.py) are absent from the diff; only an unrelated test file was modified, making it impossible to verify from the code that the acceptance criteria's test-based checks actually pass. Given the explicit incompleteness of the task list and the missing optimizer-side fix that is core to the loop-safety objective, this warrants a CONCERNS verdict rather than PASS.
  • Concerns:
    • The PR diff does not touch .github/workflows/agents-issue-optimizer.yml at all, yet the task list explicitly leaves two items targeting that exact file unchecked: adding run-name: (for issue-number correlation across trigger types) and passing --limit 100 to gh run list. Without the run-name fix, the endswith($issue) correlation filter in the optimizer cannot function correctly for workflow_dispatch runs, so the loop-safety guarantee is only half-implemented — the optimizer side of the handshake remains vulnerable to the exact #464/#4640 collision and 20-run truncation bugs described in the issue.
    • The acceptance criteria specify concrete test files: tests/workflows/test_issue_optimizer_recursion_guard.py::test_recursion_guard_counts_workflow_dispatch_runs and tests/workflows/test_issue_format_guard.py::test_closed_issue_is_exempt / test_routing_stops_at_attempt_cap. None of these files appear in the diff; instead, only tests/workflows/test_agents_issue_optimizer_format_trigger.py was modified. This makes it impossible to confirm from the diff that the stated acceptance tests exist or pass.
    • The deliberate-break demonstration (revert endswithcontains, remove run-name, confirm test fails then passes again) cannot be evaluated since the relevant optimizer.yml changes and test files are absent from the diff.
    • Because the optimizer.yml correlation/limit fixes are missing, the stated goal 'no single issue can be routed to the optimizer without bound, whatever the validator's verdict' is not fully achieved — only the format-guard side (closed-issue exemption, attempt cap, endswith in format-guard.yml) was completed.
    • Two of the five listed tasks are explicitly marked unchecked in the PR/issue task list, confirming self-reported incompleteness rather than just a documentation lag.

Agreement

  • Verdict: CONCERNS (all providers)
  • Correctness: scores within 1 point (avg 6.0/10, range 6.0-6.0)
  • Completeness: scores within 1 point (avg 3.5/10, range 3.0-4.0)
  • Quality: scores within 1 point (avg 6.5/10, range 6.0-7.0)
  • Testing: scores within 1 point (avg 3.5/10, range 3.0-4.0)
  • Risks: scores within 1 point (avg 5.0/10, range 5.0-5.0)

Disagreement

No major disagreements detected.

Unique Insights

  • openai: The required optimizer-workflow changes are not present in the PR diff. .github/workflows/agents-issue-optimizer.yml is not modified, despite the acceptance criteria requiring a run-name containing the issue number, endswith($issue) correlation, and gh run list --limit 100.; Without the optimizer run-name, workflow_dispatch runs retain a non-issue-specific display title and cannot be reliably correlated by the recursion guard. This leaves the stated production symptom—workflow-dispatch runs being counted as zero—unresolved.; Because the optimizer workflow is unchanged, its correlation filter may still use contains($issue), which can incorrectly associate issue #4640 with #464; the required collision-safe matching was required in both workflow locations.; The required acceptance-test files/tests are not included in the changed test set: no changes are shown for test_issue_optimizer_recursion_guard.py or test_issue_format_guard.py. The modified test_agents_issue_optimizer_format_trigger.py does not, based on the supplied diff summary, demonstrate coverage of the required workflow-dispatch count, closed-issue exemption, or attempt-cap behavior.; The guard workflow changes appear to implement the closed-issue exemption and a marker-based routing cap in both the root and consumer-template copies, but the overall handshake remains incomplete because its optimizer-side safeguards were not delivered.
  • anthropic: The PR diff does not touch .github/workflows/agents-issue-optimizer.yml at all, yet the task list explicitly leaves two items targeting that exact file unchecked: adding run-name: (for issue-number correlation across trigger types) and passing --limit 100 to gh run list. Without the run-name fix, the endswith($issue) correlation filter in the optimizer cannot function correctly for workflow_dispatch runs, so the loop-safety guarantee is only half-implemented — the optimizer side of the handshake remains vulnerable to the exact #464/#4640 collision and 20-run truncation bugs described in the issue.; The acceptance criteria specify concrete test files: tests/workflows/test_issue_optimizer_recursion_guard.py::test_recursion_guard_counts_workflow_dispatch_runs and tests/workflows/test_issue_format_guard.py::test_closed_issue_is_exempt / test_routing_stops_at_attempt_cap. None of these files appear in the diff; instead, only tests/workflows/test_agents_issue_optimizer_format_trigger.py was modified. This makes it impossible to confirm from the diff that the stated acceptance tests exist or pass.; The deliberate-break demonstration (revert endswithcontains, remove run-name, confirm test fails then passes again) cannot be evaluated since the relevant optimizer.yml changes and test files are absent from the diff.; Because the optimizer.yml correlation/limit fixes are missing, the stated goal 'no single issue can be routed to the optimizer without bound, whatever the validator's verdict' is not fully achieved — only the format-guard side (closed-issue exemption, attempt cap, endswith in format-guard.yml) was completed.; Two of the five listed tasks are explicitly marked unchecked in the PR/issue task list, confirming self-reported incompleteness rather than just a documentation lag.

🔍 LangSmith Traces

@stranske

stranske commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

Closer disposition: verifier CONCERNS = false positive vs current main

Audited provider-comparison CONCERNS (comment at 2026-08-09T02:30:56Z) against live origin/main after merge of this PR.

Claims vs current main

Claim Current main evidence
Missing run-name: / endswith($issue) / --limit 100 on .github/workflows/agents-issue-optimizer.yml Already on main via merged PR #2993 (54d8b9e3, 2026-08-08T23:35:38Z). Live file has run-name: Agents Issue Optimizer #..., endswith($issue), and --limit 100.
Format-guard closed-issue exemption + attempt cap Delivered by this PR (#2998). Live root + consumer template have closed-state exempt and max_format_guard_attempts=3agents:auto-pilot-pause.
Named acceptance tests absent under exact filenames Coverage exists under nearby names: tests/workflows/test_issue_format_guard_closed_issues.py, tests/workflows/test_agents_issue_optimizer_format_trigger.py (plus #2993 recursion-guard delivery).

Disposition

Closer agent: cursor | round 2026-08-09T02:40:19Z

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 agent:needs-attention Agent needs human review or intervention agents:keepalive Use to initiate keepalive functionality with agents autofix Opt-in automated formatting & lint remediation needs-human Requires human intervention or review verify:compare Compare multiple LLM evaluations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P0] Format-guard → optimizer loop is unbounded: closed issues never exempt, run-correlation always matches zero, no attempt cap

3 participants