Skip to content

fix(gate): dedupe in-flight issue formatting - #2981

Merged
stranske merged 9 commits into
mainfrom
automation/issue-format-live-review-followup
Aug 8, 2026
Merged

fix(gate): dedupe in-flight issue formatting#2981
stranske merged 9 commits into
mainfrom
automation/issue-format-live-review-followup

Conversation

@stranske

@stranske stranske commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Fixes the active review findings on the current consumer sync wave. A trusted format-guard marker plus agents:format is now treated as an in-flight lease, preventing duplicate optimizer dispatches; absent labels retry the handoff. Validator calls use python3 in the source and consumer-template optimizers.\n\nValidation: python3 -m pytest tests/workflows/test_agents_issue_optimizer_format_trigger.py -q (4 passed).\n\nThe broader test_workflow_llm_installs.py suite has one unrelated local Python 3.9 incompatibility (dataclass(slots=True)); 32 tests passed and 2 skipped.

Summary by CodeRabbit

  • Bug Fixes

    • Prevented duplicate optimizer runs while formatting is already in progress.
    • Formatting now retries when in-flight status is incomplete.
    • Dispatch is blocked if the formatting lease cannot be acquired.
    • Failed or cancelled formatting runs release the in-flight status for future retries.
    • Improved workflow reliability by explicitly using Python 3 for formatting tasks.
    • Added per-issue concurrency control to prevent conflicting runs.
    • Improved handling of issue updates and transient failures with automatic retries.
  • Tests

    • Expanded validation for dispatch detection, retries, lease handling, cleanup, and workflow variants.

Copilot AI lite review requested due to automatic review settings August 8, 2026 05:29
@cursor

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

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 2 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 34d06c97-dc71-447a-9a16-6d0911d686a0

📥 Commits

Reviewing files that changed from the base of the PR and between 70c8340 and 22e9ef3.

📒 Files selected for processing (8)
  • .github/scripts/github-api-with-retry.js
  • .github/workflows/agents-issue-format-guard.yml
  • .github/workflows/agents-issue-optimizer.yml
  • config/template-drift-allowlist.txt
  • templates/consumer-repo/.github/scripts/github-api-with-retry.js
  • templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml
  • templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml
  • tests/workflows/test_agents_issue_optimizer_format_trigger.py
📝 Walkthrough

Walkthrough

The issue-format workflows now use agents:format as a dispatch lease. They validate trusted markers, require lease acquisition, use local scripts with python3, and release the lease after failed or cancelled formatting. Tests cover both workflow variants.

Changes

Issue format lease handling

Layer / File(s) Summary
Lease-gated optimizer dispatch
.github/workflows/agents-issue-format-guard.yml, templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml
Both guards validate trusted markers, suppress duplicate dispatch only when the lease exists, and stop when lease acquisition fails.
Local optimizer execution and lease cleanup
.github/workflows/agents-issue-optimizer.yml, templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml
The workflows use local scripts, Octokit clients, repository-token authentication, python3 validation, and cleanup after failed or cancelled formatting.
Workflow validation and drift updates
tests/workflows/test_agents_issue_optimizer_format_trigger.py, config/template-drift-allowlist.txt
Tests cover both workflow variants. The allowlist fingerprints and behavior description are updated.

Worker attempt metadata

Layer / File(s) Summary
Worker attempt record update
langsmith-fleet-worker-attempt.json
The recorded timestamp and PR number are updated. Other execution settings remain unchanged.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant FormatGuard
  participant GitHubIssueLabels
  participant OptimizerWorkflow
  participant IssueFormatScript
  FormatGuard->>GitHubIssueLabels: Check trusted marker and agents:format lease
  FormatGuard->>GitHubIssueLabels: Acquire agents:format lease
  FormatGuard->>OptimizerWorkflow: Dispatch optimizer
  OptimizerWorkflow->>IssueFormatScript: Run issue_format.py with python3
  IssueFormatScript-->>OptimizerWorkflow: Return format result
  OptimizerWorkflow->>GitHubIssueLabels: Remove agents:format after failure or cancellation
Loading

Possibly related PRs

Suggested labels: verify:compare

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: deduplicating in-flight issue-formatting dispatches.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch automation/issue-format-live-review-followup

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

@stranske
stranske temporarily deployed to agent-high-privilege August 8, 2026 05:29 — with GitHub Actions Inactive
@stranske
stranske force-pushed the automation/issue-format-live-review-followup branch from a6a3d9d to 3317cb2 Compare August 8, 2026 05:30

@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: a6a3d9d647

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

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 adjusts the issue-format guard/optimizer handoff to prevent duplicate optimizer dispatches while a prior dispatch is still “in flight”, and standardizes validator execution to python3 for the issue_format.py contract checks in both the source workflows and the consumer templates.

Changes:

  • Treat a trusted format-guard marker + agents:format as an in-flight lease (skip duplicate optimizer dispatches while the label is still present).
  • Retry optimizer dispatch when the trusted marker exists but the agents:format label is absent.
  • Run issue_format.py validators via python3 in both source and template optimizer workflows, and update tests accordingly.

Reviewed changes

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

Show a summary per file
File Description
tests/workflows/test_agents_issue_optimizer_format_trigger.py Updates assertions to cover python3 validator usage and new in-flight dedupe behavior.
templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml Switches issue_format.py validator calls from python to python3.
templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml Changes dispatch dedupe logic to treat label presence as the in-flight lease and adjusts label-add ordering.
.github/workflows/agents-issue-optimizer.yml Switches issue_format.py validator calls from python to python3.
.github/workflows/agents-issue-format-guard.yml Changes dispatch dedupe logic to treat label presence as the in-flight lease and adjusts label-add ordering.

💡 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 Outdated
Comment thread templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml Outdated
@agents-workflows-bot

agents-workflows-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: b284230
Latest Runs: ⏳ pending — Gate
Required contexts: summary
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ 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 76.21%
Baseline 85.00%
Delta -8.79%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Low Coverage Files (<50.0%)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

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 temporarily deployed to agent-high-privilege August 8, 2026 05:33 — with GitHub Actions Inactive
@stranske
stranske temporarily deployed to agent-high-privilege August 8, 2026 07:35 — with GitHub Actions Inactive
@stranske

stranske commented Aug 8, 2026

Copy link
Copy Markdown
Owner Author

Closer review disposition (head 12b5decc)

Active Codex P1 + outdated Copilot threads were already addressed on this head; resolving threads with evidence:

  1. Expire lease after failed optimizer runsagents-issue-optimizer.yml (source + consumer template) now has Release failed format lease with if: failure() && … phase == 'format' that removes agents:format, so a later guard pass can retry (see test_format_lease_is_required_and_released_after_failure).
  2. Label acquisition before dispatch — both format-guard copies hard-stop with could not acquire agents:format lease; refusing optimizer dispatch before gh workflow run, and only write the trusted marker after successful dispatch.

Validation already on PR: pytest tests/workflows/test_agents_issue_optimizer_format_trigger.py (asserted by PR body / Gate green). Checks green on exact head; ≥7m post-push window satisfied (committed 2026-08-08T07:35:28Z).

@stranske
stranske force-pushed the automation/issue-format-live-review-followup branch from 12b5dec to c47b48b Compare August 8, 2026 09:38
@stranske
stranske temporarily deployed to agent-high-privilege August 8, 2026 09:39 — with GitHub Actions Inactive
@stranske

stranske commented Aug 8, 2026

Copy link
Copy Markdown
Owner Author

Closer advance — rebased onto current main

Previous head: 12b5decc (behind main by release #2983 + #2982 bridge-guard).
New head: c47b48b6 (force-pushed after clean rebase onto origin/main).

Review threads were resolved against the pre-rebase head with lease-failure evidence; rebase preserved:

  • format-guard hard-stop on failed agents:format lease acquire
  • optimizer Release failed format lease on failure() for format phase
  • matching consumer-template copies + test_format_lease_is_required_and_released_after_failure

Validation: python3 -m pytest -q tests/workflows/test_agents_issue_optimizer_format_trigger.py5 passed.

Do not merge until ≥7 minutes from this exact head push and a fresh green/zero-thread re-read.

@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: 5

🤖 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 @.github/workflows/agents-issue-format-guard.yml:
- Around line 151-155: Tighten the trusted_marker identity check so only the
exact login github-actions[bot] is accepted, and validate the immutable account
ID when that field is available. Apply the same change to the trusted_marker
logic in both .github/workflows/agents-issue-format-guard.yml (lines 151-155)
and templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml
(lines 151-155), preserving the existing dispatch behavior for trusted versus
untrusted markers.

In @.github/workflows/agents-issue-optimizer.yml:
- Around line 722-731: Update the cleanup step containing “Release failed format
lease” in .github/workflows/agents-issue-optimizer.yml lines 722-731 so its if
condition uses failure() || cancelled() while preserving the existing step and
phase checks. Apply the same cancellation-safe condition to the corresponding
cleanup step in
templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml lines
540-550.

In `@tests/workflows/test_agents_issue_optimizer_format_trigger.py`:
- Around line 35-36: Update the assertions in the test covering both workflow
files to match each complete issue_format.py command, including python3, the
script path, and the corresponding /tmp/formatted_body.md or
/tmp/updated_body.md argument. Ensure both commands are independently asserted
for each workflow so interpreter, script, and input/output paths cannot vary
without failing the test.
- Around line 39-50: Extend
test_format_guard_deduplicates_inflight_optimizer_dispatch to assert the
consumer guard contains the marker literal and duplicate-dispatch skip message,
matching the root guard checks. For both workflow contents, verify the trusted
marker write occurs after the successful gh workflow run command, ensuring
failed dispatches cannot write the marker.
- Around line 58-62: Strengthen the assertions in the lease-control tests for
guard and consumer_guard so they validate control flow rather than substring
order: require failed lease acquisition to exit before dispatch, dispatch to
occur only in the successful branch, and cleanup to include the agents:format
phase and gh issue edit --remove-label "agents:format" command. Apply the same
checks to both workflow implementations.
🪄 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: aa1a12b3-1211-4f77-b036-d8e28ad9f5dd

📥 Commits

Reviewing files that changed from the base of the PR and between 31bfa1f and c47b48b.

📒 Files selected for processing (6)
  • .github/workflows/agents-issue-format-guard.yml
  • .github/workflows/agents-issue-optimizer.yml
  • config/template-drift-allowlist.txt
  • templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml
  • templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml
  • tests/workflows/test_agents_issue_optimizer_format_trigger.py

Comment thread .github/workflows/agents-issue-format-guard.yml
Comment thread .github/workflows/agents-issue-optimizer.yml
Comment thread tests/workflows/test_agents_issue_optimizer_format_trigger.py Outdated
Comment thread tests/workflows/test_agents_issue_optimizer_format_trigger.py Outdated
Comment thread tests/workflows/test_agents_issue_optimizer_format_trigger.py Outdated
Require exact github-actions[bot] identity (id 41898282) for trusted
markers, release agents:format on failure or cancellation, and harden
format-trigger assertions for both workflow copies.

Co-authored-by: Cursor <cursoragent@cursor.com>
@stranske

stranske commented Aug 8, 2026

Copy link
Copy Markdown
Owner Author

Closer disposition — CodeRabbit threads on 1b121b75

Addressed the five post-rebase CodeRabbit findings on exact head 1b121b75:

  1. Trusted marker identity — both format-guard copies now require exact github-actions[bot] login and account id 41898282 when present (REST comments API), instead of a broad [bot]|github-actions regex.
  2. Cancel-safe lease release — both optimizer copies use (failure() || cancelled()) on Release failed format lease so a canceled format run cannot strand agents:format.
  3. Complete issue_format.py command asserts — tests now require interpreter + script path + /tmp/{formatted,updated}_body.md for root and consumer workflows.
  4. Marker/skip coverage on both guards — consumer guard assertions match root (marker literal, skip message) and assert marker write occurs only after successful gh workflow run.
  5. Lease control-flow asserts — lease failure must exit 1 before dispatch; cleanup must include format-phase condition and --remove-label "agents:format".

Validation: python3 -m pytest tests/workflows/test_agents_issue_optimizer_format_trigger.py -q5 passed.

Do not merge until ≥7 minutes after this exact-head push and a fresh green/zero-thread re-read.

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

stranske commented Aug 8, 2026

Copy link
Copy Markdown
Owner Author

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

@github-actions github-actions Bot added the autofix Opt-in automated formatting & lint remediation label Aug 8, 2026
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Autofix updated these files:

  • tests/workflows/test_agents_issue_optimizer_format_trigger.py

@stranske
stranske temporarily deployed to agent-high-privilege August 8, 2026 11:26 — with GitHub Actions Inactive
Comment thread .github/workflows/agents-issue-format-guard.yml Fixed

@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: 4

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)

195-208: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Both format guards keep the agents:format lease after a failed dispatch. Each guard acquires the lease before gh workflow run and exits on dispatch failure. No optimizer run starts, so the optimizer cleanup step never releases the label, and the issue keeps a lease with no in-flight work.

  • .github/workflows/agents-issue-format-guard.yml#L195-L208: remove the agents:format label in the dispatch-failure branch before exit 1, and warn if the removal fails.
  • templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml#L195-L208: apply the identical failure-path release so the template stays in sync.

As per coding guidelines: "Any change to workflows that consumers use must be reflected in BOTH .github/workflows/ (main workflow) and templates/consumer-repo/.github/workflows/ (template)".

🤖 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 195 - 208, Both
format guards must release the agents:format lease when optimizer dispatch
fails: in .github/workflows/agents-issue-format-guard.yml lines 195-208 and
templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml lines
195-208, remove the label in the gh workflow run failure branch before exit 1
and emit a warning if label removal fails, keeping both workflow files
identical.

Source: Coding guidelines

🤖 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 @.github/workflows/agents-issue-format-guard.yml:
- Around line 143-172: Update the retry handling used by the trusted_marker
lookup so retry diagnostics are written to stderr instead of stdout, including
the logging path in createTokenAwareRetry or its configured core logger. Keep
stdout limited to the final true/false value emitted by the Node script,
preserving dispatch behavior after successful retries.

In `@templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml`:
- Around line 109-121: Remove the “Install load balancer dependencies” step
because the subsequent setup-api-client action already installs both
`@octokit/rest` and `@octokit/auth-app` at pinned versions. Keep the existing “Setup
API client” step and its configuration unchanged.
- Around line 21-27: Update the concurrency group expression in the workflow’s
concurrency configuration to include inputs.issue_number before falling back to
github.run_id, ensuring workflow_dispatch runs for the same issue share a
concurrency group while preserving existing issue-event behavior.
- Around line 357-391: Fix the Python heredoc block around issue_dedup by
normalizing all statements to consistent module-level indentation so it parses
and can write /tmp/dedup_comment.md. Remove the unconditional || true from the
heredoc invocation and explicitly capture the Python exit status, emitting a
GitHub Actions ::warning:: while preserving the workflow’s intended continuation
behavior when execution fails.

---

Outside diff comments:
In @.github/workflows/agents-issue-format-guard.yml:
- Around line 195-208: Both format guards must release the agents:format lease
when optimizer dispatch fails: in
.github/workflows/agents-issue-format-guard.yml lines 195-208 and
templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml lines
195-208, remove the label in the gh workflow run failure branch before exit 1
and emit a warning if label removal fails, keeping both workflow files
identical.
🪄 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: 386f3b2c-0575-4303-b903-771f75be5cf4

📥 Commits

Reviewing files that changed from the base of the PR and between b7f8e7f and 1391adf.

📒 Files selected for processing (4)
  • .github/workflows/agents-issue-format-guard.yml
  • templates/consumer-repo/.github/workflows/agents-issue-format-guard.yml
  • templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml
  • tests/workflows/test_agents_issue_optimizer_format_trigger.py

Comment thread .github/workflows/agents-issue-format-guard.yml
Comment thread templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml Outdated
Comment thread templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml Outdated
Restore the consumer issue-optimizer sparse-checkout contract after a
root-copy sync broke LLM-client discovery, and share concurrency,
cancel-safe lease release, dedup indentation, and stderr retry logging.

Co-authored-by: Cursor <cursoragent@cursor.com>
@stranske

stranske commented Aug 8, 2026

Copy link
Copy Markdown
Owner Author

Closer recovery (2026-08-08T11:39Z)

Exact head: 30908dfcbe37c9c65e0c4a7062621bfb8ee45eec

Root cause

Prior closer sync replaced templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml with the root in-tree copy. That dropped the consumer Workflows sparse-checkout (tools + scripts/langchain), so test_llm_client_workflow_discovery_covers_the_known_verifier_surfaces failed in Selftest Python Tests.

Fixes on this head

  • Restored consumer optimizer from main’s sparse-checkout contract; ported shared concurrency (inputs.issue_number), cancel-safe (failure()||cancelled()) format-lease release, and fixed issue_dedup indentation + visible dedup_rc warning.
  • Root: concurrency + dedup indent/|| true repair; removed unpinned npm install in favor of setup-api-client.
  • Retry helper (root + template): retry/logWithCore diagnostics go to stderr so format-guard trusted_marker stdout stays clean.
  • Re-baselined template-drift allowlist fingerprints for the intentional root/consumer optimizer divergence; format-trigger test now asserts consumer workflows-scripts/.../issue_format.py paths.

Validation

  • pytest focused: discovery + format-trigger + template-drift tests → 30 passed
  • check_api_wrapper_guard.py: no violations
  • check_template_drift.py: 0 unallowlisted

Merge gate

Do not merge until ≥7 minutes after this exact head push and a re-read shows required checks green with active non-outdated review threads = 0. Zizmor “secrets: inherit” threads on format-guard are standing pattern noise, not fixed here.

@stranske
stranske temporarily deployed to agent-high-privilege August 8, 2026 11:40 — with GitHub Actions Inactive
@stranske

stranske commented Aug 8, 2026

Copy link
Copy Markdown
Owner Author

Resolved the two active zizmor secrets findings on the current head: both source and consumer format guards now pass only github.token to setup-api-client, rather than toJSON(secrets). Added a focused regression assertion and validated tests/workflows/test_agents_issue_optimizer_format_trigger.py (5 passed), template completeness, template drift (0 unallowlisted), API-wrapper guard, and git diff --check. Fresh head: 22e9ef34.

@stranske
stranske temporarily deployed to agent-high-privilege August 8, 2026 12:24 — with GitHub Actions Inactive
@stranske
stranske merged commit b284230 into main Aug 8, 2026
54 checks passed
@stranske
stranske deleted the automation/issue-format-live-review-followup branch August 8, 2026 12:37
@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 12:37 — with GitHub Actions Inactive
@stranske

stranske commented Aug 8, 2026

Copy link
Copy Markdown
Owner Author

Closer verifier disposition — skipped (no acceptance criteria)

Agents Verifier run 31257653500 completed after verify:compare on merged head 22e9ef34c2c2715de67c776273a49d808968ce8b (merge commit b28423026654c3d57bc0c34217dee0e836b47e6e).

Skip reason (durable): No acceptance criteria found in PR or linked issues; skipping verifier.

Evidence:

  • PR has no closingIssuesReferences / source issue.
  • Compare path correctly stopped after context build (Stop when verifier is skipped); no Provider Comparison report is expected.
  • No follow-up issue or reopen path — there is nothing for checkbox/compare to score.

Closer treats this as terminal verifier disposition for #2981 (skip ≠ pending).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autofix:escalated autofix:patch 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.

4 participants