Repository navigation
Description
Problem or Motivation
The owner asked on 2026-11-12 for docs and GitHub Pages jobs that "manage github issues for common documentation issues and missing functionailty/implementation". A job that files a finding each run floods the repository with duplicates. The code has no helper that updates an issue when its finding changes or closes it when the finding is gone:
- The review filer (
src/devops_cli/review/filed_findings.py:40) has a marker and a search, but it never edits or closes an issue. - The research sweep (
src/devops_cli/research/sweep.py:9) never closes an issue. - The Trivy alert filer (
src/devops_cli/security/alert_filer.py:160) matches on the title and closes nothing.
Proposed Solution & Architectural Design
Add one module, src/devops_cli/roadmap/finding_issues.py, that turns finding groups into issues.
- A
FindingGrouphas the repository, the job, the check, the key (a page path or a key such aspages:deploy-paths), the kind (docs,featorci) and the findings (file:line, rule, text, proposed fix). - Marker in the body:
<!-- devops-docs-finding: v1 job=<job> check=<check> key=<sha256 of repo, check and key> findings=<sha256 of the sorted findings> -->. - One search for each run reads the open and recently closed issues with the marker.
- For each group:
- No issue: file a candidate through
intake_candidate(src/devops_cli/roadmap/intake/intake.py:1521) withfiled_by="agent". The title isdocs(<area>): ...,feat(<area>): ...orci(pages): .... - An open issue and a changed
findingshash: edit the body (the checklist of findings). - An open issue and the same hash: do nothing.
- An open issue and no findings for 2 runs: close it as completed with one comment that names the clean commit.
- An issue closed as not planned: keep it closed until the
findingshash changes.
- No issue: file a candidate through
- Cap: at most 3 new issues for each repository each run, each with at most 20 findings (the lane limits of feat(docs): track current content and brain-fed reference docs #4880). Edits and closes have no cap. The order is Pages faults, links, missing functionality, stale docs, lint, then style.
- Soft cap: a rule adds 3 to the cap when an issue of the job closed as completed since the last run, up to 10 new issues a week. Jev decides only when the rule cannot (an open linked pull request, no close).
--dry-runsends 0 requests and returns the planned requests (roadmap/request_plan.py). Modeplanreads GitHub, logs each would-be create, edit and close, and writes nothing.- The session is the paced
devops ghsession (ADR 0006).
Target Subsystem
SDLC, Git & PR Governance (src/devops_cli/roadmap/).
Existing Tool Considered
GitHub code scanning alerts track fingerprints and close fixed alerts, but they are not issues, they skip intake, and private repositories need GitHub Advanced Security. Actions such as create-an-issue key on the title and do not close. The intake path (in use) gives the labels and the triage. No open tool updates and closes issues by a fingerprint marker. Custom code: about 250 lines with tests. Cost (estimate): about 300,000 tokens and 1 day elapsed.
Acceptance Criteria
- Two runs with the same findings make 1 issue and 0 edits on the second run (fake GitHub session).
- A changed finding edits the body once. A group with no findings for 2 runs closes the issue once.
- An issue closed as not planned stays closed while its findings hash stays the same.
- A run with 10 new groups files 3 issues, and the plan lists the other 7.
--dry-runsends 0 requests.
Dependencies
None. In the tracker order, it comes after child 1.
Source: #5151
Alternatives check of 2026-11-19: none.
Tool: none found.
Reason: Searches surfaced only PR-diff reporters such as reviewdog and title-keyed issue Actions; no open tool files, edits and closes issues by a fingerprint marker, nor routes them through intake.
Lacks:
- No fingerprint marker stored in an issue body
- No edit of the body when the findings hash changes
- No close after two clean runs or not-planned handling
- No per-repository cap or dry-run request plan
- No filing through the project's intake candidate path
Proposed design
Problem statement
The owner asked for docs and GitHub Pages jobs that manage GitHub issues for common documentation defects and missing functionality. A job that files a finding issue each run fills the repository with duplicates. No helper files, updates or closes an issue by a fingerprint. This item adds src/devops_cli/roadmap/finding_issues.py, which does that with one hidden marker, and a later item calls it from the jobs.
Acceptance criteria
Requirement: Same findings file no second issue
The module SHALL file one issue for a finding group and SHALL send no create and no edit on a later run with the same findings hash.
Scenario: Two runs with the same findings
- WHEN A test runs the module two times with one group, the same findings and a fake GitHub session
- THEN The first run creates 1 issue, and the second run creates 0 issues and sends 0 body edits
Requirement: A changed finding edits the body one time
The module SHALL edit the body of the open issue one time when the findings hash of its group changes.
Scenario: A finding changes between two runs
- WHEN A test runs the module with a group whose findings hash differs from the hash in the marker of its open issue
- THEN The run sends 1 body edit that holds the new checklist and the new findings hash
Requirement: One clean run records the miss
The module SHALL add 1 to the miss count of an open issue when a run reads no finding for its group and SHALL not close that issue.
Scenario: The first run with no finding for the group
- WHEN A test runs the module one time and the run reads no group for the key of an open finding issue with
misses=0 - THEN The run sends 1 body edit that holds
misses=1and 0 state changes
Requirement: Two clean runs close the issue
The module SHALL close an open finding issue as completed after two runs in a row report no finding for its group.
Scenario: The second run with no finding for the group
- WHEN A test runs the module and the run reads no group for the key of an open finding issue with
misses=1 - THEN The run closes the issue 1 time with 1 comment that names the commit that the run read
Requirement: A not-planned issue stays closed
The module MUST keep an issue that a person closed as not planned closed while the findings hash of its group stays the same.
Scenario: A not-planned issue with the same findings
- WHEN A test runs the module with a group whose findings hash equals the hash in the marker of an issue closed as not planned
- THEN The run sends 0 creates, 0 edits and 0 state changes for that group
Requirement: A changed hash edits a not-planned issue
The module SHALL edit the body of a not-planned issue one time when the findings hash changes and SHALL keep it closed.
Scenario: A not-planned issue with new findings
- WHEN A test runs the module with a group whose findings hash differs from the hash in the marker of an issue closed as not planned
- THEN The run sends 1 body edit and 0 state changes
Requirement: The cap limits the new issues
The module SHALL file at most 3 new issues for each repository in one run and SHALL list each group that it leaves for the next run.
Scenario: Ten new groups in one run
- WHEN A test runs the module with 10 new groups that have no issue and a fake GitHub session
- THEN The run creates 3 issues, and the returned plan lists the other 7 in the order Pages faults, links, missing functionality, stale docs, lint, then style
Requirement: A close raises the cap
The module SHALL add 3 to the cap of a repository when an issue of its job closed as completed since the last run and SHALL file at most 10 new issues for that repository in 7 days.
Scenario: A close since the last run and 8 issues in 7 days
- WHEN A test runs the module with 6 new groups, 8 issues that carry the marker and were created in the last 7 days, and 1 issue of the job that closed as completed after the last run
- THEN The run creates 2 issues and the returned plan lists the other 4
Requirement: One issue holds at most 20 findings
The module SHALL put at most 20 findings in one issue and SHALL leave the rest for the next run.
Scenario: A group with 25 findings
- WHEN A test runs the module with one new group that holds 25 findings
- THEN The run creates 1 issue with 20 findings, and the plan lists 5 findings for the next run
Requirement: A new issue goes through intake
The module SHALL file each new finding issue through intake_candidate with filed_by="agent".
Scenario: A new group becomes an intake candidate
- WHEN A test runs the module with one new group and a fake intake that records each call
- THEN The fake intake receives 1 candidate with
filed_by="agent"
Requirement: A filed issue carries its marker
The module SHALL write one hidden marker in each filed body with the job, the check, the key hash and the findings hash.
Scenario: A filed issue carries its marker
- WHEN A test runs the module with one new group and reads the candidate that the fake intake records
- THEN The body holds
<!-- devops-finding-issue: v1 job=<job> check=<check> key=<sha256> findings=<sha256> misses=0 -->with the hashes of the group
Requirement: One search for each run
The module SHALL read the marked issues with one search for each run and SHALL send each write through the same GitHub session.
Scenario: One run over a new group and an open group
- WHEN A test runs the module with one new group and one open group and a fake GitHub session that records each request
- THEN The fake session records 1 search and no second search
Requirement: A dry run sends no request
The module SHALL send no request to GitHub when the dry-run flag is set.
Scenario: A dry run over a new, a changed and a clean group
- WHEN A test runs the module with
--dry-runover a new group, a changed group and a clean group and a fake GitHub session - THEN The fake session records 0 requests, and the module returns the planned create, edit and close
Requirement: Plan mode writes nothing
The module SHALL write nothing to GitHub in mode plan and SHALL report each would-be create, edit and close.
Scenario: Plan mode over a new group
- WHEN A test runs the module in mode
planwith a new group and a fake GitHub session - THEN The fake session records 0 writes, and the run reports the planned create
Existing Tool Considered
No tool covers the need in full. The closest open, maintained tool is ossf/allstar (https://github.com/ossf/allstar): it creates, updates and closes an issue when a security policy is fixed, but it keys on the policy and the repository, not on a fingerprint marker in the issue body; it covers security policies only, not docs or Pages findings; it does not file through intake_candidate, cap new issues per repository, or return a dry-run request plan. The change builds its own module: about 250 lines with tests, at an estimated 300,000 tokens to build, keep and fix that code, and 1 day elapsed.
Key questions
- Where is the entry point that files an intake candidate?: The entry point is
intake_candidateatsrc/devops_cli/roadmap/intake/intake.py:1601. The review hand-off calls it atsrc/devops_cli/review/handoff.py:226. The body cites line 1521, which is wrong; this proposal cites line 1601. [sources: src/devops_cli/roadmap/intake/intake.py:1601, src/devops_cli/review/handoff.py:226, CONTEXT.md] - Does intake accept a candidate that an agent files?: Yes. The review hand-off builds a candidate with
filed_by=Filer.AGENT(src/devops_cli/review/handoff.py:95) and callsintake_candidateatsrc/devops_cli/review/handoff.py:226. The research sweep does the same atsrc/devops_cli/research/sweep.py:269.NewCandidate.filed_bydefaults toFiler.AGENTatsrc/devops_cli/roadmap/intake/intake.py:223, and intake takes that candidate through the same entry point as a candidate from a person. [sources: src/devops_cli/review/handoff.py:95, src/devops_cli/review/handoff.py:226, src/devops_cli/research/sweep.py:269, src/devops_cli/roadmap/intake/intake.py:223, CONTEXT.md] - Does a marker helper already exist that this module can follow?: Yes.
finding_markerwrites a hidden marker for a fingerprint atsrc/devops_cli/review/filed_findings.py:40, andsrc/devops_cli/research/sweep.py:76defines the same name for a research finding. The review filer reads the marked issues with one search atsrc/devops_cli/review/filed_findings.py:93. The new module follows that pattern for the findings of the docs and Pages checks. [sources: src/devops_cli/review/filed_findings.py:40, src/devops_cli/review/filed_findings.py:93, src/devops_cli/research/sweep.py:76, tests/github/test_review_filed_findings.py] - Which type holds the identity of one finding group?: A new
FindingIssueGroupinsrc/devops_cli/roadmap/finding_issues.py, with the repository, the job, the check, the key, the kind and the findings. (best practice) [sources: src/devops_cli/ai/agent_audit/grouping.py:80, src/devops_cli/review/analysis.py:100]- Chosen: A new
FindingIssueGroupin the module. The existingFindingGroupholds a report group (name,findings) or a code-region group (group_id,kind,key,findings), and neither has the repository, job or check field. - Rejected: Reuse
FindingGroup. It holds no repository, job or check field, so the marker has no source for them. - Rejected: Extend
FindingGroup. It changes a class that the agent audit and the review share.
- Chosen: A new
- Which name and fields does the hidden marker take?:
<!-- devops-finding-issue: v1 job=<job> check=<check> key=<sha256 of the repository, the check and the key> findings=<sha256 of the sorted findings> misses=<n> -->. The namedevops-docs-findingis wrong because a group can have the kindfeatorci. (best practice) [sources: src/devops_cli/review/filed_findings.py:40, CONTEXT.md]- Chosen:
devops-finding-issuewith the five fields. It names the module, not one kind of finding, and it holds the miss count. - Rejected:
devops-docs-finding. It names docs for afeatorcifinding. - Rejected: One marker for every producer, with a
producer=field. The review filer already has its own marker, and this module files roadmap issues.
- Chosen:
- How does the module know that a group had no finding for 2 runs?: The marker holds
misses=<n>. A run that reads no group for a marked issue adds 1 to the count and edits the body. A run that readsmisses=1closes the issue as completed with one comment that names the commit that the run read. (best practice) [sources: src/devops_cli/review/filed_findings.py, docs/adr/0001-github-is-the-roadmap-source.md]- Chosen: A miss counter in the marker. The issue body is the first record, and it survives a restart of the job.
- Rejected: Close on the first clean run. One failed tool run would close an issue whose finding is still there.
- Rejected: A counter in Valkey. Valkey is a cache, and the record of an issue must stay in GitHub.
- Which closed issues does the search read?: One search for each run reads the open issues and the issues that closed in the last 30 days that carry the marker. (best practice) [sources: src/devops_cli/review/filed_findings.py, tests/github/test_review_filed_findings.py]
- Chosen: Open issues and the issues closed in the last 30 days. The close rule and the not-planned rule need only the closed issues of recent runs, so the search stays bounded.
- Rejected: Open issues only. The not-planned rule cannot see its issue.
- Rejected: Every closed issue. The search grows without bound.
- What does the module do with a not-planned issue whose findings hash changes?: It edits the body one time and keeps the issue closed. The person sees the new finding, and the module does not revert the decision of the person. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/intake/intake.py]
- Chosen: Edit the body and keep it closed. The issue stays on record and the person sees the new finding.
- Rejected: Reopen the issue. It reverts a decision that a person made.
- Rejected: File a new issue. Intake recognises the closed item as a duplicate, because a not-planned item stays on record for that purpose.
- What does
--dry-runreturn?: The planned create, edit and close requests as data, and 0 requests to GitHub, as a roadmap step must with--dry-run. (best practice) [sources: src/devops_cli/dry_run/requests.py, ARCHITECTURE.md:170, src/devops_cli/roadmap/request_plan.py:1]- Chosen: The planned requests as data. A test can assert the plan, and a roadmap step sends no request with
--dry-run. - Rejected: Log lines only. A test cannot assert the plan.
- Chosen: The planned requests as data. A test can assert the plan, and a roadmap step sends no request with
- Which scope does a filed title take?: A scope that the repository declares, taken from the group:
docsfor a docs fault and for a Pages fault, and the area of the finding for a feat fault when.github/labels.ymldeclares it.pagesis not a declared scope, so the body'sci(pages)title becomesci(docs). An undeclared area is reported by intake and gets no scope label. (best practice) [sources: CONTRIBUTING.md:159, openspec/specs/pr-title-labels/spec.md, .github/labels.yml:52, .github/labels.yml:64]- Chosen: A declared scope from the group, with
docsfor a Pages fault. The title check requires a declared scope, andscope/docscovers the docs site that the Pages workflow deploys. - Rejected:
pagesfor a Pages fault..github/labels.ymldeclares noscope/pages, so intake reports the scope as undeclared and adds no scope label. - Rejected: The directory of the page. A path is no scope, and the title check refuses it.
- Rejected: No scope. The title check requires a scope.
- Chosen: A declared scope from the group, with
- Does this item implement the soft cap and the
Jevmodel call?: The soft cap is a pure rule. The cap of a repository is 3 new issues for each run, plus 3 when an issue of its job closed as completed since the last run, and never more than 10 new issues for that repository in 7 days. The search that the run already makes gives the issues of the last 7 days. No model call runs: a rule goes before a decision model (ADR 0020), and a cap is a guardrail that no model raises; when the rule cannot decide, the cap stays at 3. (best practice) [sources: CONTEXT.md, docs/adr/0020-a-decision-point-is-a-unit-of-a-workflow-with-a-resolver-chain-and-a-rule-goes-before-a-decision-model.md]- Chosen: A pure soft-cap rule, with no model call. The search gives the counts, an offline test can assert each limit, and a cap is a guardrail that no model raises.
- Rejected: A
Jevdecision-model call when the rule cannot decide. A cap is a guardrail; a model must not raise it, and ADR 0020 puts a rule before a decision model. - Rejected: No soft cap. The body asks for it, and the rule is deterministic.
- In which order does one run file the new groups?: Pages faults, links, missing functionality, stale docs, lint, then style. The issue body sets this order, and the run keeps it when the cap leaves groups for the next run. (best practice) [sources: https://github.com/feat(docs): track the docs site upgrade and the docs and Pages jobs #5151]
- Chosen: The order of the body. The body sets it, and a stable order makes the plan of the next run the same.
- Rejected: The order of the search result. The search result has no stable order, so two runs would plan different groups.
- Does this item wire the module into the three existing filers?: No. This item adds the module, its command and its tests. The review filer, the research sweep and the Trivy alert filer keep their own paths, and a later item wires each one to the module. (best practice) [sources: src/devops_cli/review/filed_findings.py, src/devops_cli/research/sweep.py, src/devops_cli/security/alert_filer.py]
- Chosen: The module, its command and its tests only. The body scopes the change to one module and its tests, and the three filers hold different finding types.
- Rejected: Migrate all three filers in this item. It changes three subsystems, and the change no longer fits one pull request.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 12, 2026
devops roadmap intake) #742, which asks for a different change.Both work in the roadmap intake path, but #742 delivers the intake command itself while the candidate adds a separate finding_issues module that uses intake and manages the full issue lifecycle by fingerprint.devops-cli-service commentedon Nov 17, 2026
Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.
devops-cli-service commentedon Nov 19, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (10)
Searches run:
Sources:
devops-cli-service commentedon Nov 19, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
dan-petty commentedon Nov 26, 2026
Evidence from the issue sort of 2026-11-26: the alert filer files the same finding again.
AlertGroup.titleinsrc/devops_cli/security/alert_filer.pyis the only key that tellsplan_filingthat an open issue already holds a group (group.title not in open_titles). Open issues fork8s/gpu-feature-discovery/daemonset.yamlhave titles that differ from that form, because intake or a job shortened or reworded them, and the same rule and path were filed again (for example #5370 and #5639 for KSV-0014). Four open issues also share one exact title for KSV-0001 (#6271, #6386, #6972, #7104), so an exact-title match does not stop every repeat either.A fingerprint in the issue body (rule and path), as this item describes, would not depend on the title.