Skip to content

fix(agents): address corrected sync review debt - #3033

Merged
stranske merged 4 commits into
mainfrom
automation/sync-review-wave-7acb98
Aug 10, 2026
Merged

fix(agents): address corrected sync review debt#3033
stranske merged 4 commits into
mainfrom
automation/sync-review-wave-7acb98

Conversation

@stranske

@stranske stranske commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Repairs the active source-owned review findings in the corrected Maint 68 sync wave.

  • fenced examples no longer satisfy an acceptance verification gate
  • path components are excluded from subjective-language checks
  • bare pytest verify hints remain valid while bare unittest remains rejected
  • formatter errors are surfaced safely in both source and consumer optimizer workflows

Validation: python3.12 -m pytest -q tests/scripts/test_issue_format.py tests/scripts/test_issue_formatter.py tests/workflows/test_agents_issue_optimizer_format_trigger.py (132 passed); template completeness/sync; template drift (0 unallowlisted); git diff --check.

This replaces the held consumer sync wave after the source merge and full Maint 68 reconciliation.

Summary by CodeRabbit

  • Bug Fixes

    • Improved acceptance-criteria validation by ignoring fenced code and path-like tokens when checking verification requirements and subjective language.
    • Improved formatting error messages when formatted content is unavailable.
    • Verification checks now recognize direct pytest and python -m pytest commands.
  • Tests

    • Added regression coverage for fenced test commands, path names, and standalone pytest verification commands.
  • Documentation

    • Clarified formatting guidance for acceptance-criteria verification commands.

@cursor

cursor Bot commented Aug 10, 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 10, 2026 17:35 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4cdd5ca8-9246-4d3d-810e-116264f4c378

📥 Commits

Reviewing files that changed from the base of the PR and between 060c3be and b7aae47.

📒 Files selected for processing (1)
  • templates/consumer-repo/docs/AGENT_ISSUE_FORMAT.md

📝 Walkthrough

Walkthrough

The changes refine acceptance validation, expand safe verification command matching, improve formatter error handling, synchronize template fingerprints, and add regression coverage.

Changes

Issue validation and formatting

Layer / File(s) Summary
Acceptance validation and regression coverage
.github/scripts/issue_format.py, templates/consumer-repo/.github/scripts/issue_format.py, tests/scripts/test_issue_format.py, templates/consumer-repo/docs/AGENT_ISSUE_FORMAT.md
Validation ignores fenced code and removes path-like tokens before subjective-word checks. Tests cover fenced commands, test paths, and slash-separated subjective wording. Documentation examples are reformatted.
Safe verification command matching
scripts/langchain/issue_formatter.py, templates/consumer-repo/scripts/langchain/issue_formatter.py, tests/scripts/test_issue_formatter.py
Verification matching accepts direct pytest commands and Python-prefixed pytest forms.
Formatter fallback handling and synchronization
.github/workflows/agents-issue-optimizer.yml, templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml, config/template-drift-allowlist.txt
Formatter workflows handle missing formatted_body values and report returned errors. Template-drift fingerprints are updated.

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

Possibly related PRs

Suggested labels: autofix, autofix:patch, 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies a fix for the agents sync review debt addressed by the changeset.
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/sync-review-wave-7acb98

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

@agents-workflows-bot

agents-workflows-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 18c8116
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.28%
Baseline 85.00%
Delta -8.72%
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

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

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

formatted = result.get('formatted_body', '')
if not formatted:
print('ERROR: No formatted body returned')
print(f"ERROR: {result.get('error') or 'No formatted body returned'}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Escape the nested f-string quotes

In the Phase 3 run block (checked in both the root and consumer workflow copies), the Python program is passed to python -c inside a shell double-quoted string. This added f"..." terminates that shell string; bash -n reports a syntax error near ( at result.get, so every format-phase run fails before the formatter result is inspected. Use quoting that does not terminate the outer shell argument, or move the snippet to a heredoc.

Useful? React with 👍 / 👎.

Comment thread .github/scripts/issue_format.py Outdated
)
prose = re.sub(r"(?<!`)`(?!`)[^`\n]*`", "", _without_fenced_code(acceptance))
prose = re.sub(r"(?<!`)`(?!`)[^`\n]*`", "", acceptance_prose)
prose = re.sub(r"(?<!\w)(?:[\w.-]+/)+[\w.-]+", "", prose)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Do not erase slash-separated subjective prose

When an acceptance criterion uses common slash-separated alternatives—for example, pytest ... passes and the response is fast/performant—this pattern treats fast/performant as a path and deletes it before checking banned adjectives. Both subjective words disappear and validate() returns an OK report, allowing precisely the wording this validator is intended to reject. Restrict the suppression to tokens that are demonstrably paths rather than every slash-separated phrase.

Useful? React with 👍 / 👎.

Comment thread .github/scripts/issue_format.py
@stranske
stranske temporarily deployed to agent-high-privilege August 10, 2026 17:39 — with GitHub Actions Inactive

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

🤖 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/scripts/issue_format.py:
- Line 300: Constrain the path-removal regex used before adjective scanning in
.github/scripts/issue_format.py:300-300 to match only clear filesystem paths,
not arbitrary slash-separated prose such as fast/better, and add a regression
test covering that prose case. Apply the identical constrained filter in
templates/consumer-repo/.github/scripts/issue_format.py:300-300; this sibling
site requires the same direct change.

In `@tests/scripts/test_issue_format.py`:
- Around line 148-166: Parameterize
test_acceptance_gate_inside_fence_does_not_satisfy_validation and
test_acceptance_path_component_is_not_subjective_prose over both validator
script paths: .github/scripts/issue_format.py and
templates/consumer-repo/.github/scripts/issue_format.py. Pass each parameterized
path into the validator setup instead of relying on _validator()’s default,
while preserving the existing assertions and test inputs.
🪄 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: b4c96cd4-41e4-4a1a-a0b6-de6590691c47

📥 Commits

Reviewing files that changed from the base of the PR and between d8d5681 and 4f7798b.

📒 Files selected for processing (9)
  • .github/scripts/issue_format.py
  • .github/workflows/agents-issue-optimizer.yml
  • config/template-drift-allowlist.txt
  • scripts/langchain/issue_formatter.py
  • templates/consumer-repo/.github/scripts/issue_format.py
  • templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml
  • templates/consumer-repo/scripts/langchain/issue_formatter.py
  • tests/scripts/test_issue_format.py
  • tests/scripts/test_issue_formatter.py

Comment thread .github/scripts/issue_format.py Outdated
Comment thread tests/scripts/test_issue_format.py Outdated
@stranske
stranske temporarily deployed to agent-high-privilege August 10, 2026 19:29 — with GitHub Actions Inactive
@stranske
stranske temporarily deployed to agent-high-privilege August 10, 2026 21:28 — with GitHub Actions Inactive
@stranske
stranske merged commit 8e716a4 into main Aug 10, 2026
61 checks passed
@stranske
stranske deleted the automation/sync-review-wave-7acb98 branch August 10, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants