-
Notifications
You must be signed in to change notification settings - Fork 1
docs: restore the rationale docstring on the fleet issue-format validator #2962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,42 @@ | ||
| """Validate a GitHub issue body against the fleet AGENT_ISSUE_FORMAT contract.""" | ||
| """Validate a GitHub issue body against the fleet's AGENT_ISSUE_FORMAT contract. | ||
|
|
||
| Synced to every consumer repo by `maint-68-sync-consumer-repos.yml`. This is the | ||
| single definition of "agent-processable" for the whole fleet — do not fork it | ||
| per repo. | ||
|
|
||
| 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; | ||
|
Comment on lines
+7
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
📍 Affects 2 files
🤖 Prompt for AI Agents |
||
| * any local script that files issues can pre-flight with | ||
| `python .github/scripts/issue_format.py <body-file>` and refuse to file junk | ||
| (non-zero exit means unfit). | ||
|
|
||
| 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
|
||
|
|
||
| `_headings()` skips fenced code blocks, and that is load-bearing rather than | ||
| 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 through the guard. Well-written issues quote commands and | ||
| expected output in fences constantly, so this is the common case, not an edge | ||
| one. Any change to heading detection must keep a fenced-heading case in | ||
| tests/scripts/test_issue_format.py. | ||
|
|
||
| Pure stdlib on purpose — it must run on a bare runner with no install step. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description is false for several events handled by the named workflow:
.github/workflows/agents-issue-format-guard.yml:42-45,54skips validation for durable/wontfix, bot-authored, and explicitly non-coding issues, while its route step at line 85 suppressesagents:formatand optimizer dispatch for issues carryingagents:auto-pilot-pauseorneeds-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 👍 / 👎.