Skip to content

docs: restore the rationale docstring on the fleet issue-format validator - #2962

Merged
stranske merged 1 commit into
mainfrom
docs/restore-issue-format-rationale
Aug 6, 2026
Merged

docs: restore the rationale docstring on the fleet issue-format validator#2962
stranske merged 1 commit into
mainfrom
docs/restore-issue-format-rationale

Conversation

@stranske

@stranske stranske commented Aug 6, 2026

Copy link
Copy Markdown
Owner

#2960 improved this validator's logic and, in doing so, replaced a 22-line docstring with a single summary line. The logic changes were all good and are untouched here — this is a docstring-only change.

Losing the reasoning is a real cost for a file synced verbatim into 13 consumer repos: the next reader can't tell why the contract is what it is, and a well-meaning simplification can silently reintroduce a bug the wording existed to prevent.

One addition that #2960 itself earned

_headings() skipping fenced code blocks is load-bearing, not cosmetic. Without it, a body whose only Tasks and Acceptance Criteria lines sit inside a ```bash fence validates as conforming — a false negative that lets an unactionable issue straight through the guard.

That was live in Fine-Art-Archive until the sync landed there today. Demonstrated with a probe body containing zero real sections:

old validator (pre-#2960):  exit 0   ← judged CONFORMING
this validator:             exit 1   ← "Missing required sections: Tasks, Acceptance Criteria"

Good issues quote commands and expected output in fences constantly, so this is the common case, not an edge one. The docstring now says so and points at tests/scripts/test_issue_format.py, which already covers it via test_fenced_headings_do_not_satisfy_required_sections.

Also

Brings the root .github/scripts copy back into byte-for-byte lockstep with the consumer template — it had drifted to the pre-#2960 text.

Verification

  • AST of both files compared before/after with docstrings stripped — identical. No behaviour change.
  • Fenced-heading probe re-run: still correctly non-conforming.
  • tests/scripts/test_issue_format.py: 10 passed.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Expanded issue-format documentation to clarify required and recommended sections.
    • Documented acceptance criteria, fenced-code heading handling, validation integrations, synchronization guidance, and runtime requirements.
    • No functional behavior or validation rules changed.

…ator

#2960 improved this validator's logic and, in doing so, replaced a 22-line
docstring with a single summary line. The logic changes were all good and are
untouched here. What was lost is the reasoning, and losing it is a real cost for
a file synced verbatim into 13 consumer repos: the next person to read it cannot
tell WHY the contract is what it is, and a well-meaning simplification can
silently reintroduce a bug the wording existed to prevent.

Restored, with one addition that #2960 itself earned. `_headings()` skipping
fenced code blocks is load-bearing, not cosmetic: without it a body whose only
"Tasks" and "Acceptance Criteria" lines sit inside a ```bash fence validates as
CONFORMING. That is a false negative in the guard, and it was live in
Fine-Art-Archive until the sync landed there today -- a probe body with zero
real sections exited 0 against the old validator and 1 against this one. Since
good issues quote commands and expected output in fences constantly, that is
the common case rather than an edge one, so the docstring now says so and points
at tests/scripts/test_issue_format.py, which already covers it via
test_fenced_headings_do_not_satisfy_required_sections.

Also brings the root .github/scripts copy back into byte-for-byte lockstep with
the consumer template; it had drifted to the pre-#2960 text.

No behaviour change: verified by comparing the AST of both files before and
after with docstrings stripped (identical), and by re-running the fenced-heading
probe (still correctly non-conforming). tests/scripts/test_issue_format.py: 10
passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 6, 2026 11:25
@cursor

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

@agents-workflows-bot

Copy link
Copy Markdown
Contributor

Workflow source needed

PR #2962 needs either a linked GitHub issue or one valid non-issue Workflow Source before PR metadata automation can manage it safely.

Please do one of:

  • Add <!-- meta:issue:123 --> or a normal Closes #123 / Related to #123 line.
  • Check one Workflow Source option in the PR body.
  • Add a hidden marker such as <!-- workflow-source:local_request -->, <!-- workflow-source:manual_remote -->, <!-- workflow-source:review_followup -->, <!-- workflow-source:sync_campaign -->, or <!-- workflow-source:dependabot -->.
  • Add a workflow source label such as workflow:source-direct-pr, workflow:source-local-request, workflow:source-review-followup, workflow:source-sync, or workflow:no-automation.

Once a valid source is present, this warning will not be reposted.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR expands the module docstrings for the issue-format validator and its consumer-repository template. It documents the contract, required sections, validation workflows, fenced-code handling, and runtime constraints. Executable behavior remains unchanged.

Changes

Issue format documentation

Layer / File(s) Summary
Document the issue-format contract
.github/scripts/issue_format.py, templates/consumer-repo/.github/scripts/issue_format.py
Both module docstrings now document the issue-format contract, validation usage, fenced-heading handling, and stdlib-only execution requirement.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: copilot

🚥 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 documentation-only change that restores the rationale docstring for the fleet issue-format validator.
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 docs/restore-issue-format-rationale

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

@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: 455ae241f7

ℹ️ 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 on lines +16 to +19
* `agents-issue-format-guard.yml` validates every issue on open/edit and, on
failure, applies `agents:format` — the label the existing Agents Issue
Optimizer already listens for — so a bad issue is ROUTED to the machinery
that repairs it rather than merely flagged;

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 Qualify the issue-routing behavior

This description is false for several events handled by the named workflow: .github/workflows/agents-issue-format-guard.yml:42-45,54 skips validation for durable/wontfix, bot-authored, and explicitly non-coding issues, while its route step at line 85 suppresses agents:format and optimizer dispatch for issues carrying agents:auto-pilot-pause or needs-human. Because this docstring is intended to preserve the workflow rationale across consumers, saying that every issue is validated and every failure is routed obscures the hold/exemption contract added by the preceding change; qualify this as non-exempt, unheld issues.

Useful? React with 👍 / 👎.

@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 @.github/scripts/issue_format.py:
- Around line 7-19: Update the module docstring wording at
`.github/scripts/issue_format.py` lines 7-19 to distinguish issue validation
from downstream pipeline routing, so it no longer claims unlabeled issues are
unvalidated; apply the identical wording at
`templates/consumer-repo/.github/scripts/issue_format.py` lines 7-19 to keep
both synchronized.
🪄 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: 9b59ae5e-9c3a-443c-883d-c6e4d131a090

📥 Commits

Reviewing files that changed from the base of the PR and between ebc3f8c and 455ae24.

📒 Files selected for processing (2)
  • .github/scripts/issue_format.py
  • templates/consumer-repo/.github/scripts/issue_format.py

Comment on lines +7 to +19
Why it exists: every automated lane reaches an issue through a LABEL. An issue
filed with no label and no Tasks/Acceptance block is invisible to the entire
pipeline — nothing validates it, nothing optimises it, nothing claims it. Local
automation that files *findings* rather than *work orders* therefore produces
issues no agent can ever pick up: good evidence, permanently unactionable.
(Observed in Fine-Art-Archive #406-409: four well-evidenced audit findings, zero
labels, no Tasks section between them.)

Used at both ends:
* `agents-issue-format-guard.yml` validates every issue on open/edit and, on
failure, applies `agents:format` — the label the existing Agents Issue
Optimizer already listens for — so a bad issue is ROUTED to the machinery
that repairs it rather than merely flagged;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep the validation and routing claims consistent in both module docstrings.

The docstring says at Line 16 that agents-issue-format-guard.yml validates every issue, but at Line 8 it says that nothing validates an unlabeled issue. Clarify that the missing behavior is downstream routing, or narrow the scope of “pipeline.”

  • .github/scripts/issue_format.py#L7-L19: update the authoritative wording.
  • templates/consumer-repo/.github/scripts/issue_format.py#L7-L19: apply the identical wording to preserve synchronization.
📍 Affects 2 files
  • .github/scripts/issue_format.py#L7-L19 (this comment)
  • templates/consumer-repo/.github/scripts/issue_format.py#L7-L19
🤖 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/scripts/issue_format.py around lines 7 - 19, Update the module
docstring wording at `.github/scripts/issue_format.py` lines 7-19 to distinguish
issue validation from downstream pipeline routing, so it no longer claims
unlabeled issues are unvalidated; apply the identical wording at
`templates/consumer-repo/.github/scripts/issue_format.py` lines 7-19 to keep
both synchronized.

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

Restores the previously removed, long-form module docstring for the fleet issue-format validator, preserving the rationale and operational context for a script that is synced verbatim into consumer repositories.

Changes:

  • Replaced the one-line module docstring with a detailed rationale covering why the validator exists, how it’s used, and why fenced-code heading skipping is required.
  • Re-established docstring parity between the Workflows source copy and the consumer template copy.

Reviewed changes

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

File Description
templates/consumer-repo/.github/scripts/issue_format.py Restores the detailed module docstring explaining validator rationale and load-bearing behaviors.
.github/scripts/issue_format.py Mirrors the same restored module docstring to keep source and template copies aligned.

Comment on lines +24 to +28
Rules mirror docs/AGENT_ISSUE_FORMAT.md rather than inventing a parallel
standard: Tasks and Acceptance Criteria are REQUIRED; Why / Scope /
Implementation Notes / Non-Goals are recommended; and at least one acceptance
criterion must name a real test, runnable command, or observable verification
gate.
Comment on lines +24 to +28
Rules mirror docs/AGENT_ISSUE_FORMAT.md rather than inventing a parallel
standard: Tasks and Acceptance Criteria are REQUIRED; Why / Scope /
Implementation Notes / Non-Goals are recommended; and at least one acceptance
criterion must name a real test, runnable command, or observable verification
gate.
@stranske-keepalive

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: f5e6b71
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.22%
Baseline 85.00%
Delta -8.78%
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 merged commit 79dd283 into main Aug 6, 2026
58 checks passed
@stranske
stranske deleted the docs/restore-issue-format-rationale branch August 6, 2026 11:35
stranske added a commit that referenced this pull request Aug 6, 2026
…hanges

#2962 restored a 22-line rationale docstring to the fleet issue-format
validator; this branch had replaced it with a one-line summary and added a
shebang. Conflict resolved by keeping both: #2963's shebang and logic, and the
docstring.

The docstring's description of the contract needed one correction to stay
truthful against this branch's behaviour. `Report.ok` now requires
`not missing_recommended`, so a missing "recommended" section fails the run and
causes the guard to apply `agents:format` -- while the message still calls it an
advisory. The docstring now records that tension rather than repeating the old
required/recommended split as if it still held.

Both copies remain byte-for-byte in lockstep.
tests/scripts/test_issue_format.py: 13 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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