Skip to content

fix(gate): preserve issue format guard setup failures - #2976

Merged
stranske merged 10 commits into
mainfrom
automation/issue-format-review-followup
Aug 7, 2026
Merged

fix(gate): preserve issue format guard setup failures#2976
stranske merged 10 commits into
mainfrom
automation/issue-format-review-followup

Conversation

@stranske

@stranske stranske commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Source-first correction for active consumer sync PR review debt.

  • preserves fail-fast setup while capturing only validator exit status
  • accepts documented spaced heading qualifiers without matching unrelated headings
  • updates canonical and consumer-template surfaces together

Validation:

  • python -m pytest -q tests/scripts/test_issue_format.py (17 passed)
  • python scripts/sync_tool_versions.py --check
  • python scripts/validate_template_sync.py
  • git diff --check

Summary by CodeRabbit

  • Bug Fixes

    • Improved issue-format validation to recognize headings with hyphen, slash, or parenthesis qualifiers.
    • Validation setup now fails fast when preparation steps or required tools are unavailable.
    • Applied consistent validation behavior across generated consumer repositories.
  • Tests

    • Added regression coverage for headings with spaced hyphen and slash qualifiers.
    • Verified validator behavior for newly supported heading formats and error-handling scenarios.

Copilot AI lite review requested due to automatic review settings August 7, 2026 21:35
@cursor

cursor Bot commented Aug 7, 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.

@stranske
stranske temporarily deployed to agent-high-privilege August 7, 2026 21:35 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The issue-format validator accepts section aliases with parenthesized, hyphen, or slash qualifiers. Regression tests cover the new qualifiers. Guard workflows use strict shell handling during setup and controlled return-code handling during validator execution. Worker metadata records PR 2976.

Changes

Issue format validation

Layer / File(s) Summary
Qualified heading matching
.github/scripts/issue_format.py, templates/consumer-repo/.github/scripts/issue_format.py, tests/scripts/test_issue_format.py
_find() accepts aliases followed by parentheses, hyphens, or slashes. Tests cover spaced hyphen and slash qualifiers.
Guard workflow shell handling
.github/workflows/agents-issue-format-guard.yml, templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml
Workflows enable strict shell options during setup and disable errexit only before capturing validator return codes.

Worker metadata

Layer / File(s) Summary
Worker attempt record
langsmith-fleet-worker-attempt.json
The timestamp is updated, and pr_number changes from 2973 to 2976.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: 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 describes the primary change: preserving setup failures in the issue format guard.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch automation/issue-format-review-followup

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

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

Actionable comments posted: 1

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

Inline comments:
In `@tests/scripts/test_issue_format.py`:
- Around line 54-64: Update
test_heading_with_spaced_trailing_qualifier_matches_required_section and its
validator setup so the test executes both .github/scripts/issue_format.py and
templates/consumer-repo/.github/scripts/issue_format.py, either by
parameterizing the validator path or adding a synchronization test. Preserve the
existing assertions for both validator copies and ensure the changed _find
behavior is covered in each.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8a53bcf3-4258-4a92-b763-ced17bca891b

📥 Commits

Reviewing files that changed from the base of the PR and between e95cc47 and 712791f.

📒 Files selected for processing (5)
  • .github/scripts/issue_format.py
  • .github/workflows/agents-issue-format-guard.yml
  • templates/consumer-repo/.github/scripts/issue_format.py
  • templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml
  • tests/scripts/test_issue_format.py

Comment thread tests/scripts/test_issue_format.py

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 updates the issue-format guard workflow and its validator to (1) fail fast on setup errors while still capturing only the validator’s exit status, and (2) recognize documented heading qualifiers that use spaced - or / separators. The changes are applied source-first and mirrored into the consumer template surfaces.

Changes:

  • Update the issue-format guard workflow to use set -euo pipefail for setup, while temporarily disabling -e only around the validator invocation to capture its exit code.
  • Extend the issue-format validator heading matching to accept "<alias> - …" and "<alias> / …" in addition to the existing "<alias> (…" form.
  • Add regression tests covering spaced trailing qualifiers for both - and /.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/scripts/test_issue_format.py Adds coverage for spaced trailing qualifier headings (- and /).
.github/workflows/agents-issue-format-guard.yml Preserves fail-fast setup while capturing validator exit status reliably.
.github/scripts/issue_format.py Accepts additional trailing qualifier forms in heading detection.
templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml Mirrors the workflow guard changes for consumer template sync.
templates/consumer-repo/.github/scripts/issue_format.py Mirrors the validator heading-matching update for consumers.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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 7, 2026
@stranske

stranske commented Aug 7, 2026

Copy link
Copy Markdown
Owner Author

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

@stranske-keepalive

stranske-keepalive Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🤖 Keepalive Loop Status

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

Current State

Metric Value
Iteration progress [----------] 0/12
Action run (agent-run-failed)
Agent status ❌ AGENT FAILED
Gate success
Tasks 0/7 complete
Timeout 45 min (default)
Timeout usage 5m elapsed (13%, 40m remaining)
Keepalive ✅ enabled
Autofix ❌ disabled

Last Codex Run

Result Value
Status ❌ AGENT FAILED
Reason agent-run-failed
Exit code unknown
Failures 1/3 before pause

To retry immediately:

  • Add the agent:retry label to this PR

Or wait for the next successful Gate run to automatically retry.

🔍 Failure Classification

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

⚠️ Failure Tracking

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

@stranske-keepalive

stranske-keepalive Bot commented Aug 7, 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-07 21:39:06 Codex wait (gate-pending-transient) skipped 0 0/7
0 2026-08-07 21:39:45 Codex wait (gate-cancelled-transient-transient) skipped 0 0/7 cancelled
0 2026-08-07 21:42:20 Codex run (agent-run-failed) failure 2 file(s) 0 0/7 b931d1d cancelled
0 2026-08-07 21:45:36 Codex run (agent-run-failed) failure 2 file(s) 0 0/7 4dce6d0 cancelled
0 2026-08-07 21:49:19 Codex run (agent-run-failed-repeat) failure 2 file(s) 0 0/7 00521f0 cancelled
0 2026-08-07 21:50:03 Codex skip (needs-human) skipped 0 0/7
0 2026-08-07 21:50:42 Codex skip (needs-human) skipped 0 0/7 cancelled
0 2026-08-07 21:51:26 Codex skip (needs-human) skipped 0 0/7 cancelled
0 2026-08-07 21:53:12 Codex skip (needs-human) skipped 0 0/7 cancelled
0 2026-08-07 22:00:40 Codex skip (needs-human) skipped 0 0/7 success
0 2026-08-07 22:30:07 Codex run (agent-run-failed-repeat) failure 2 file(s) 0 0/7 5cc4fd3 success
0 2026-08-07 22:30:46 Codex skip (needs-human) skipped 0 0/7
0 2026-08-07 22:31:23 Codex skip (needs-human) skipped 0 0/7 cancelled
0 2026-08-07 22:32:04 Codex skip (needs-human) skipped 0 0/7 cancelled
0 2026-08-07 22:33:02 Codex skip (needs-human) skipped 0 0/7 cancelled
0 2026-08-07 22:37:15 Codex skip (needs-human) skipped 0 0/7 success
0 2026-08-07 22:40:12 Codex run (agent-run-failed-repeat) retry failure 2 file(s) 0 0/7 91ce3be
0 2026-08-07 22:40:54 Codex skip (needs-human) skipped 0 0/7
0 2026-08-07 22:41:41 Codex skip (needs-human) skipped 0 0/7 cancelled
0 2026-08-07 22:45:55 Codex skip (needs-human) skipped 0 0/7 success
0 2026-08-08 05:37:38 Codex wait (gate-pending-transient) skipped 0 0/7
0 2026-08-08 05:42:38 Codex run (agent-run-failed) failure 1 file(s) 0 0/7 d936465 success

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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

@stranske
stranske temporarily deployed to agent-high-privilege August 7, 2026 21:39 — with GitHub Actions Inactive
@agents-workflows-bot
agents-workflows-bot Bot temporarily deployed to agent-high-privilege August 7, 2026 21:43 Inactive
@agents-workflows-bot
agents-workflows-bot Bot temporarily deployed to agent-high-privilege August 7, 2026 21:46 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 7, 2026
@stranske-keepalive
stranske-keepalive Bot temporarily deployed to agent-high-privilege August 7, 2026 21:50 Inactive
@agents-workflows-bot agents-workflows-bot Bot added the needs-human Requires human intervention or review label Aug 7, 2026
@agents-workflows-bot
agents-workflows-bot Bot temporarily deployed to agent-high-privilege August 7, 2026 22:31 Inactive
@agents-workflows-bot
agents-workflows-bot Bot temporarily deployed to agent-high-privilege August 7, 2026 22:32 Inactive
@stranske stranske added agent:retry Add to trigger agent retry after rate limit or pause and removed needs-human Requires human intervention or review agent:needs-attention Agent needs human review or intervention labels Aug 7, 2026
@stranske stranske removed the agent:retry Add to trigger agent retry after rate limit or pause label Aug 7, 2026
@stranske
stranske temporarily deployed to agent-high-privilege August 7, 2026 22:37 — with GitHub Actions 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 7, 2026
@stranske-keepalive
stranske-keepalive Bot temporarily deployed to agent-high-privilege August 7, 2026 22:41 Inactive
@stranske stranske removed needs-human Requires human intervention or review agent:needs-attention Agent needs human review or intervention labels Aug 7, 2026
@stranske
stranske merged commit bb2342d into main Aug 7, 2026
93 of 95 checks passed
@stranske
stranske deleted the automation/issue-format-review-followup branch August 7, 2026 23:28
@stranske stranske added the verify:compare Compare multiple LLM evaluations label Aug 8, 2026
@stranske
stranske temporarily deployed to agent-high-privilege August 8, 2026 05:37 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Provider Comparison Report

Provider Summary

Provider Model Verdict Confidence Summary
openai gpt-5.6-terra PASS 95% The workflow now begins with set -euo pipefail, so setup failures such as mktemp, file writes, or unexpected variable/pipe failures correctly fail the step. set +e is narrowly scoped to the v...
anthropic claude-sonnet-5 PASS 88% The PR correctly reorders set -euo pipefail / set +e in the workflow so that fail-fast behavior is preserved for setup steps while only the validator's exit code is captured without aborting th...
📋 Full Provider Details (click to expand)

openai

  • Model: gpt-5.6-terra
  • Verdict: PASS
  • Confidence: 95%
  • Scores:
    • Correctness: 10.0/10
    • Completeness: 10.0/10
    • Quality: 9.0/10
    • Testing: 9.0/10
    • Risks: 9.0/10
  • Summary: The workflow now begins with set -euo pipefail, so setup failures such as mktemp, file writes, or unexpected variable/pipe failures correctly fail the step. set +e is narrowly scoped to the validator invocation, preserving capture of its exit status for report handling. Heading matching now accepts the documented spaced qualifiers (, -, and / only after an exact alias prefix, avoiding matches for unrelated headings that merely begin similarly. The same script and workflow changes were applied to both canonical and consumer-template surfaces. Added parametrized tests exercise hyphen and slash qualifiers against both copies of the validator. The implementation is concise, readable, and presents no meaningful security, performance, or compatibility risk.

anthropic

  • Model: claude-sonnet-5
  • Verdict: PASS
  • Confidence: 88%
  • Scores:
    • Correctness: 9.0/10
    • Completeness: 9.0/10
    • Quality: 8.0/10
    • Testing: 8.0/10
    • Risks: 8.0/10
  • Summary: The PR correctly reorders set -euo pipefail / set +e in the workflow so that fail-fast behavior is preserved for setup steps while only the validator's exit code is captured without aborting the script — matching task 1 precisely. The heading matcher was extended to accept ' -' and ' /' qualifiers in addition to ' (' consistently in both the canonical and consumer-template copies of issue_format.py and the workflow file, satisfying tasks 2 and 3 (canonical/template parity). New parametrized tests cover both separators against both validator paths, directly exercising the acceptance-criteria scenario. No functional or security issues are evident; the change is small, focused, and internally consistent. Testing could be marginally strengthened with an explicit negative case for unrelated headings, but this is a minor gap rather than a blocker.
  • Concerns:
    • The heading-matching change only guards separators with a following space (e.g. 'Tasks -something'); no test explicitly asserts unrelated headings (e.g. 'Tasks-Force') remain unmatched, though the space requirement should make this safe in practice.
    • langsmith-fleet-worker-attempt.json change is unrelated bot metadata bundled into the PR, slightly reducing diff cleanliness but not a functional risk.

Agreement

  • Verdict: PASS (all providers)
  • Correctness: scores within 1 point (avg 9.5/10, range 9.0-10.0)
  • Completeness: scores within 1 point (avg 9.5/10, range 9.0-10.0)
  • Quality: scores within 1 point (avg 8.5/10, range 8.0-9.0)
  • Testing: scores within 1 point (avg 8.5/10, range 8.0-9.0)
  • Risks: scores within 1 point (avg 8.5/10, range 8.0-9.0)

Disagreement

No major disagreements detected.

Unique Insights

  • openai: The workflow now begins with set -euo pipefail, so setup failures such as mktemp, file writes, or unexpected variable/pipe failures correctly fail the step. set +e is narrowly scoped to the validator invocation, preserving capture of its exit status for report handling. Heading matching now...
  • anthropic: The heading-matching change only guards separators with a following space (e.g. 'Tasks -something'); no test explicitly asserts unrelated headings (e.g. 'Tasks-Force') remain unmatched, though the space requirement should make this safe in practice.; langsmith-fleet-worker-attempt.json change is unrelated bot metadata bundled into the PR, slightly reducing diff cleanliness but not a functional risk.

🔍 LangSmith Traces

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 Opt-in automated formatting & lint remediation verify:compare Compare multiple LLM evaluations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants