Repository navigation
Description
Context & Rationale
AGENTS.md says every change must be grounded in an issue and recorded in a task file. Nothing checks either rule:
AGENTS.md:167-172grounds every change in an issue.AGENTS.md:121and:174-175give each item a task file,docs/agent/tasks/task-<issue>-<slug>.md.AGENTS.md:72and:185require two things in the delivering commit: every box in that file ticked (- [x]) and "verification results recorded".tests/test_agent_task_files.py:31-35checks only three things: the issue link, that there is no**PR**field, and the status value._evaluate_pr_blockers(commands/pr.py:1422-1466) checks mergeability, draft state, check runs and review threads. It never reads the PR body's issue link, and it never checks whether the PR carries a task file. The changed-file read (_fetch_pr_changed_files,:1392) only feeds a warning (:1404), and it returns[]on any failure.- GitHub acts on a closing keyword only when a PR targets the default branch (
github/issue_closure.py:1-11). Item PRs targetrelease/*, so the body'sCloses #Nis the only link.extract_linked_issues(:100) parses it exactly asgh issues close-mergedacts on it (:241-299). It strips code and quoted lines (strip_non_prose,:88-97), but not HTML comments. devops pr check-readinessis what agents run before they merge. No workflow runs it, and GitHub does not require it.run_ghpages a--paginaterequest itself (github/rate_limiter.py:1580-1624). It stops at the first page shorter than the endpoint'sper_page, and assumes 100 when the URL sets none (:1499-1506,:1575).pulls/{n}/filesreturns 30 per page by default, so without?per_page=100the read ends after 30 files. PR fix(k8s): restore kubernetes cpu metrics and align monitoring dashboards to homelab-k3s (#737) #738 changed 51.
Measured over the 41 PRs merged into release/v0.2.24. Method: gh pr list --state merged --base release/v0.2.24 --limit 100 --json number,body,files,mergeCommit, with bodies scored by extract_linked_issues and task files read at each merge commit.
- 26 close exactly one issue and change its task file, with no unchecked box.
- 8 close no issue:
- Five are partial deliveries: feat(github): fail-closed pr check verdicts from one bucket classifier (part 1) (#707) #715 (part 1 of feat(github): fail-closed pr check verdicts from one bucket classifier #707), fix(sandbox): emit full-length prefix and parse ipv6 endpoints in network policy (#701) #759 and fix(security): unify cloud metadata predicate and harden path validation (#701) #760 (parts of feat(cli): ipv6 egress cidr fix and deny-class property tests for sandbox policy #701), and fix(security): default dependency severity to unchecked and avoid caching failed lookups (#708) #762 and feat(security): report scanner outcome status and enforce gating checks (#708) #763 (parts of feat(cli): scanner outcome status unavailable, failed or unqueried is not clean #708).
- chore(release): bootstrap v0.2.24 milestone and synchronize roadmap deliverables (#299) #712, fix(ai): treat 4xx/5xx as http errors, add incremental backoff retries, and suppress invalid regex escape warnings #713 and feat(k8s): modernize monitoring stack, llm profiles, traefik routing, and remove squid proxy #734 name no item.
- 2 close several issues (chore(k8s): update jaeger, ollama, and valkey versions #731, feat(k8s): auto-mint and synchronize argocd.token and grafana.token in deploy-stack (#764, #765) #766).
- 3 close an issue without changing its task file (fix(k8s): cloudflared egress NetworkPolicy silently blocks Traefik traffic #725, chore(ai): remove unused lightllm inference backend #727, chore(k8s): update litellm to v1.103.0 #733).
- 2 leave a
- [ ]for a check only a person can run: feat(grafana): devops-cli dashboards chart the metrics the cli sends and the sidecar provisions them (#692) #831 (task-692-*.md:28) and feat(k8s): stack dashboards query only the series their exporters serve (#693) #833 (task-693-*.md:31).
At ef21785, 16 task files hold - [ ] outside code fences:
- 15 marked Done: task-111, -112, -113, -115, -121, -122, -169, -170, -180, -199, -205, -207, -557, -692 and -693.
- task-593, marked Ready. Its item, feat(review): branch and pr reviews compute their own base-vs-head symbol delta #593, is planned for v0.2.25.
Most of these lines are stale process steps (for example "Open Draft Pull Request targeting release/v0.2.17") or criteria nobody ticked. Fixing them means editing other items' files. AGENTS.md:175 and docs/agent/tasks/README.md:9 let a topic branch edit only its own task file. AGENTS.md:177 allows task-file edits only in the PR that delivers that item.
The PR template asks authors to tick things they cannot verify:
.github/pull_request_template.md:23-39is a 15-box "quality gate" checklist.:26asks for "10/10 green quality gates", butdevops ciruns 13 checks.:29asks for complexity ≤ 10 project-wide, which no check enforces until feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586.- Of the last 40 merged PRs (chore(release): bootstrap v0.2.24 milestone and synchronize roadmap deliverables (#299) #712-fix(cli): the finding detail pane scrolls to the top before the next refresh (#834) #835), 5 used the template, and all 5 ticked the complexity box (fix(k8s): cloudflared egress NetworkPolicy silently blocks Traefik traffic #725, chore(ai): remove unused lightllm inference backend #727, chore(k8s): update jaeger, ollama, and valkey versions #731, chore(k8s): update litellm to v1.103.0 #733, fix(ai): keep a reply's structured output when its prose contains brackets (#786) #802).
- The comment at
:44reads "e.g. Closes feat(ai): llm structured output retry and json schema repair engine #123".extract_linked_issuesparses that as closing feat(ai): llm structured output retry and json schema repair engine #123 in any body that keeps the comment.
The release PR body does the same: _build_quality_checklist (commands/release.py:922-934) ticks all seven of its boxes on every non-draft release PR without reading anything.
Scope & Deliverables
Deliverable:
- Readiness blocker.
_evaluate_pr_blockersgains one grounding check, on by default. It runs in this order:- The release PR is exempt: head
release/vX.Y.Zfrom the same repository, base the repository's default branch. All three come from the REST payload readiness already fetches (_fetch_pr_details,commands/pr.py:212). There is no--allow-ungroundedflag. - One
run_ghread ofrepos/{owner}/{repo}/contents/docs/agent/tasksat the base SHA:- A 404 means the repository does not use task files, and the check reports nothing.
- Any other error is a blocker that names it.
- The PR body names exactly one issue, as parsed by
extract_linked_issues(body, "<owner>/<repo>"). - The PR's changed files include
docs/agent/tasks/task-<N>-*.mdfor that issue. The file must be added, modified or renamed, not removed. The number is parsed as an integer, sotask-089-*.mdmatches feat(k8s): centralized kubernetes logging stack and LogQL integration #89.
- Each failure is one blocker that says what is missing.
- The
check-readinessdocstring names the new blocker. The generated docs are refreshed withdevops docs generate.
- The release PR is exempt: head
- Changed-file reader. One fail-closed reader:
- It calls
gh api --paginate repos/{owner}/{repo}/pulls/{n}/files?per_page=100throughrun_gh, and returns each filename with its status. Theper_page=100is required: without itrun_gh's pager stops after 30 files. - When the grounding check applies, a failed read is a blocker that names the failure. When it does not (the release PR, or a base without
docs/agent/tasks/), a failed read prints a warning and does not block. - It replaces
_fetch_pr_changed_files. The perimeter warning uses the same list, so readiness reads the files once per run.
- It calls
- Completed task file.
tests/test_agent_task_files.pyalso asserts that a task file holds no unchecked box (- [ ]or* [ ], at any indent) outside fenced code blocks. The test owns this rule. It does not import the task parser ingithub/projects.py.- Work that was not done is a plain bullet naming its follow-up issue.
- A check only a person can run is a plain bullet starting "Pending a person:", followed by the exact commands.
- Fix every task file the new assertion fails on at the PR's base: the 16 listed above at ef21785, plus any merged since.
- Rule text.
AGENTS.md:72,:175and:185, anddocs/agent/tasks/README.md:9and:49-55, all say the same thing:- A box is ticked only for work that is done.
- Unfinished work and person-run checks are plain bullets.
- Verification is the PR's passing checks, which readiness reads. Typed pass counts and coverage figures are not required.
- A PR that changes a rule every task file follows brings the existing files into line. This is the one exception to editing only your own task file.
- PR template. Cut
.github/pull_request_template.mddown to what no check decides: summary, type of change, base branch, aCloses #<issue>placeholder and the task-file path. Remove the whole quality-gate checklist (:23-39) and the:44example. No example issue number appears anywhere in the template, comments included. - Release PR body. Remove
_build_quality_checklistand its call (commands/release.py:949). - Write this item's task file in its final form. Today
task-704-*.mdis a stale Backlog stub that namesv0.2.24. If feat(github): github-sourced roadmap, migration and generated roadmap view (devops roadmap migrate,render) #739's task-file split-off has already deleted it, create it.
Acceptance criteria:
- Grounding blocker tests live in
tests/test_pr_cmd.py, stubrun_gh, and are verified byuv run pytest tests/test_pr_cmd.py -k grounding:- A PR into
release/v0.2.25whose body saysCloses #704, and whose files include a modifieddocs/agent/tasks/task-704-x.md, gets no grounding blocker. - Each of these cases gets exactly one grounding blocker that names the cause:
- no closing reference;
Closes #1andCloses #2;- only a
Part 1 of #704line; - only
Closes other/repo#704; - no task file for feat(github): pr readiness requires an issue-linked, completed task file #704 (a task file for another number doesn't count);
- the task file is only removed;
- the file read fails.
task-089-x.mdsatisfiesCloses #89.- These get no grounding blocker:
- head
release/v0.2.25intomain, the default branch; - the same with a failing file read, which prints one warning.
- head
- These are blocked:
- head
feat/xintomain; - head
release/foointomain; - head
release/v0.2.25from another repository intomain.
- head
- A base branch without
docs/agent/tasks/(a stubbed 404) gets no grounding blocker, even when the file read also fails. Any other error from that lookup blocks. - The reader's argv is exactly
gh api --paginate repos/<owner>/<repo>/pulls/<n>/files?per_page=100.
- A PR into
- A pager test drives
run_gh's own pagination, withrun_subprocessstubbed as attests/test_github_rate_limiter.py:611:- Page 1 returns 100 files, and page 2 returns
docs/agent/tasks/task-704-x.md. - The reader returns all 101 entries, and the PR gets no grounding blocker.
- Page 1 returns 100 files, and page 2 returns
- The existing readiness tests (the
_blockershelper attests/test_pr_cmd.py:1655and the CLI cases from:940) stub the new reads and still pass. tests/test_agent_task_files.pypasses over every task file. Cases built from literal text show:- [ ], an indented- [ ]and* [ ]outside a fence each fail;- a
- [ ]inside a fence passes.
- Template tests:
- The checkbox lines of
.github/pull_request_template.mdare pinned to the six type-of-change lines. - The template contains
Closes #anddocs/agent/tasks/task-. extract_linked_issuesover the template text returns nothing.rg -n -i 'complexity|coverage|quality gate|10/10' .github/pull_request_template.mdreturns nothing.
- The checkbox lines of
tests/test_release.py(:882-890,:918-920) asserts that the release PR body has no checkbox line.rg -n 'verification results recorded' AGENTS.md docs/agent/tasks/README.mdreturns nothing.uv run devops cipasses. The new and changed tests run offline and add at most 1 s in total, shown byuv run pytest tests/test_pr_cmd.py tests/test_agent_task_files.py tests/test_release.py tests/test_github_rate_limiter.py --durations=0.- Person-run check, read-only against live GitHub, once the PR is open:
uv run devops pr check-readiness <this PR>shows no grounding blocker.uv run devops pr check-readiness <an open PR that closes no issue>shows exactly one.
Key questions:
- Which PRs does the blocker apply to? (proposed) Every PR except the release PR, in any repository whose base branch has
docs/agent/tasks/.- The owner's revision (comment on this issue, 2026-09-30) made the release PR the only exemption. A critical fix or a planning change gets an item of its own.
- None of the 19 other repositories devops-cli manages here has a task-file directory, so they are unaffected. A failed file read does not block them either.
- A flag or detection for the release PR? (proposed) Detection.
- The payload already carries head, base, head repository and default branch.
- Agents never merge the release PR (feat(release): item closure summaries, generated changelog and automatic release cut (
devops roadmap close) #743). - feat(github): current release admission, cap, descoping and stall rules (
devops roadmap reprioritize) #740 words its extension as "unless it is the release PR". - If the owner wants
--allow-ungroundedanyway, the command refuses it on any PR that is not the release PR.
- How many issues may a PR close, and do "Part N of #M" lines count? (proposed) Exactly one, and no.
- CONTEXT.md defines an item as delivered by exactly one PR that delivers nothing else, and an item too big for one PR is split. That definition (a720a6b) was written after the 2026-09-30 revision that kept partials.
- In v0.2.24, feat(cli): ipv6 egress cidr fix and deny-class property tests for sandbox policy #701, feat(github): fail-closed pr check verdicts from one bucket classifier #707 and feat(cli): scanner outcome status unavailable, failed or unqueried is not clean #708 each shipped over three PRs. Under this rule each part would have been its own item.
- Does readiness read the task file at the head SHA to check that it is complete? (proposed) No.
tests/test_agent_task_files.pyruns in CI on the PR head, and readiness already blocks on a failing check. A second read would duplicate it.- A head with no check runs at all is a gap for every check. refactor(github): read a pull request's checks once, fail-closed, for wait, monitor and readiness #769, in the backlog, closes it by treating zero runs as pending. Until it lands, the local
devops cipre-push gate is the only other guard.
- How does a task file record what is not done? (proposed) As a plain bullet.
- Deferred work names its follow-up issue.
- A person-run check starts "Pending a person:" and gives the exact commands, as
task-692-*.md:28andtask-693-*.md:31already do, minus the box.
- How are the existing files fixed? (proposed)
- Delete lines that only describe PR process (open, monitor, merge). The merged PR records those.
- Turn every other unchecked line into a plain bullet starting "Not checked when merged:". In task-593, use "Planned:".
- Never tick a box without checking it.
- May this PR edit other items' task files, given
AGENTS.md:175and:177? (proposed) Yes.- 15 of the 16 files belong to closed items with no open branch.
- task-593 belongs to feat(review): branch and pr reviews compute their own base-vs-head symbol delta #593, also in v0.2.25. Whichever of feat(review): branch and pr reviews compute their own base-vs-head symbol delta #593 and feat(github): pr readiness requires an issue-linked, completed task file #704 lands second rebases.
- The rule text records the exception: a PR that changes a rule every task file follows brings existing files into line.
- Which file list? (proposed) REST
pulls/{n}/files?per_page=100with--paginate, which returns up to 3,000 files.gh pr view --json filesstops at 100: for release PR feat(release): v0.2.23 #681 it returns 100 of 705 files._fetch_pr_changed_fileshides any failure as[].run_gh's pager needsper_page=100in the URL, or it stops after GitHub's default page of 30.- feat(github): defect prs carry their hardening readiness blocker and post-merge audit #697 reuses this reader.
- What happens when a read fails? (proposed) Where the grounding check applies, it blocks and names the read, as feat(github): fail-closed pr check verdicts from one bucket classifier #707 did for checks and as fix(github): pr readiness passes when review threads can't be read #797 asks for review threads. Elsewhere it warns.
- Tick the release checklist from check runs, or drop it? (proposed) Drop it. GitHub already shows the PR's checks, and boxes copied from them add nothing.
- Does MCP
pr_check_readinesschange? (proposed) No. No flag is added, soai/mcp/server.py, which fix(mcp): mcp tools and resources call commands and options that exist #836 is changing, is not touched. - Are Dependabot PRs exempt? (proposed) No; the release PR is the only exemption.
- Dependabot has never opened a PR, and fix(github): supply-chain claims made true — live Dependabot, zizmor and workflow invocation contracts #861 retargets it.
- Readiness binds agents only. GitHub does not require it, so a person can still merge a bump directly.
- Order against feat(github): github-sourced roadmap, migration and generated roadmap view (
devops roadmap migrate,render) #739? (proposed) Independent.- feat(github): github-sourced roadmap, migration and generated roadmap view (
devops roadmap migrate,render) #739 no longer touches task files. Its task-file split-off (backlog) editstests/test_agent_task_files.pyanddocs/agent/tasks/README.md, so whichever of it and this item lands second rebases. - The blocker reads no
**Status**line, so that split-off removing the line changes nothing here.
- feat(github): github-sourced roadmap, migration and generated roadmap view (
- Is there a maintained package for this? (proposed) None is needed. The closing-keyword parser already exists, and the rest is a filename match.
Constraint:
- Gate on
extract_linked_issues, the parser that issue closure acts on. Do not use_extract_linked_issue_numbers(github/projects.py:1194): it skips PRs that are not open, reads a trailing(#N)title (the squash PR number on main) and scans code blocks. - Never require or cross-check a pasted verification log, and leave numeric criteria unjudged. CI keeps nothing to compare against:
ci.yml:97writes.data/coverage.xml, and nothing uploads it or emits JUnit. chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842, in the backlog, will record this policy in ADR 0004. - Do not import
_ITEM_REGEXor any other part of the task parser ingithub/projects.py:128-282. The project-sync split-off deletes them. - Tests stub
run_gh(orrun_subprocessbeneath it, for the pager test) and never touch the network. They use structural tuple assertions until test(cli): retire the tuple-assert mandate and detect opaque tuple asserts and presence-only tests #851 settles that. - Gate-count wording in AGENTS.md, CONTRIBUTING.md and docs belongs to docs(agents): instruction surfaces state only what is true, and
devops ai agentsnever overwrites AGENTS.md #840.
Strategic Alignment
- Milestone: v0.2.25
- Design: CONTEXT.md (Item, Task file), ADR 0001
- Depends on: none
- Related:
- feat(github): current release admission, cap, descoping and stall rules (
devops roadmap reprioritize) #740 depends on this item and extends the blocker: the closed item must belong to the release the base branch names. - feat(github): defect prs carry their hardening readiness blocker and post-merge audit #697 adds a blocker to the same list and reuses the changed-file reader.
- feat(github): github-sourced roadmap, migration and generated roadmap view (
devops roadmap migrate,render) #739's task-file split-off (backlog), not feat(github): github-sourced roadmap, migration and generated roadmap view (devops roadmap migrate,render) #739, edits the same test and README and deletes Backlog task-file stubs, this item's among them. - feat(review): branch and pr reviews compute their own base-vs-head symbol delta #593 owns task-593, which this item edits.
- feat(release): item closure summaries, generated changelog and automatic release cut (
devops roadmap close) #743 also edits_build_release_pr_body. - refactor(github): read a pull request's checks once, fail-closed, for wait, monitor and readiness #769 (backlog) treats zero check runs as pending.
- fix(github): pr readiness passes when review threads can't be read #797 makes readiness fail closed when review threads can't be read.
- chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842 (backlog) records the verification policy.
- docs(agents): instruction surfaces state only what is true, and
devops ai agentsnever overwrites AGENTS.md #840 owns gate-count wording. - feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 enforces complexity.
- fix(mcp): mcp tools and resources call commands and options that exist #836 (in flight) owns
ai/mcp/server.py. - Split off: fix(github):
gh project syncstops parsing task files and reports only what it wrote #878 (gh project syncstops parsing task files and reports only what it wrote).
- feat(github): current release admission, cap, descoping and stall rules (
- Split off (backlog): fix(github):
gh project syncstops parsing task files and reports only what it wrote #878 (gh project syncstops parsing task files and reports only what it wrote).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Sep 30, 2026
Revised for the roadmap design (#739-#746): the only
--allow-ungroundedexemption is the release PR; the completed-file check reads unchecked boxes instead of a Done status, because #739 removes the**Status**line; theroadmap_syncclause and the #699 coordination note are gone. #740 extends this blocker so a PR's item must belong to the release its base branch names.chore(docs): record roadmap planning glossary and github-source adr (#…
feat(release): v0.2.24 (#905)
feat(pr): readiness requires a pr to close one issue and change its t…
dan-petty commentedon Oct 2, 2026
Closed by #929, merged into
release/v0.2.25.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.feat(release): v0.2.25 (#1089)