Repository navigation
Description
Problem
The alternatives check can give a covers verdict for a tool that the project already rejected, or for a tool that the item already uses. Refine then asks "Adopt the tool, or keep the item and give the reason" (src/devops_cli/lang/en/messages.py:2132, CoversQuestion at src/devops_cli/roadmap/refine.py:439). A person must answer a question that the repository already answers.
The cause: _request (src/devops_cli/roadmap/alternatives.py:535) gives the model the issue, the replies and a budget, and no ADR. No code compares the tool in the reply with the tools that the item names.
Evidence: 5 covers verdicts, and each one got the refine question.
- feat(roadmap): durable runs: a step survives an eviction, an OOM or a restart #3062,
temporalio/temporal, 2026-11-04T15:15:51Z. ADR 0008 line 20 says: "Temporal and Hatchet: rejected. Each needs a new Postgres and 3-6 pods." - fix(tests): a devcontainer dry-run test reads the tools of the host #3025,
pytest-dev/pytest, 2026-11-04T15:13:57Z. The item changes a pytest test. - feat(k8s): Add warnings and errors above logs, narrow both by pod #1357,
grafana/grafana, 2026-11-01T03:31:40Z. The item changes a Grafana dashboard. - feat(k8s): argo cd records each single-source github application's deploy outcome as a github deployment on the synced commit, through its own deployments-only github app #1387,
argoproj/notifications-engine, 2026-11-01T23:31:18Z. Its refine block says that the plan already configures the notifier, but the question still waits for a person. - dan-petty/homelab#330,
argoproj/notifications-engine, 2026-11-02T02:41:47Z. The item configures the same notifier.
3 of these verdicts came before the window 2026-11-03T15:05Z to 2026-11-04T15:05Z, and 2 came just after it. In the window the check gave none 7, not-applicable 6, partly 6 and covers 0.
#2951 makes a verdict a condition of Ready, so more verdicts reach a person. This item should land before #2951 (inferred).
A failed check is not part of this item: _in_retry_delay (alternatives.py:479) takes it again after roadmap.alternatives.retry_days, default 3.
Expected
- The check gets the titles and decisions of the ADRs in
docs/adr/. - A tool that an ADR rejected reads as rejected, and refine asks no "adopt or keep" question. The comment keeps the tool URL and the ADR number, because a newer fact can change an ADR.
- A tool that the item already names reads as in use, and refine asks no question. Where possible, code decides this without the model:
validate_reply(alternatives.py:757) compares the tool URL or package name in the reply with the item text. The comparison reads the text outside the job's block, as_requestdoes, because the block of an earlier check names the tool.
Acceptance criteria
- A scripted-model test: a reply names
temporalio/temporal, and an ADR fixture rejects Temporal. The comment names the tool URL and the ADR number, andcovers_questiongives no question. - A scripted-model test: a reply names a tool that the item body names. The verdict reads as in use, and
covers_questiongives no question. - A test: a tool name that only the job's block holds does not count as in use.
- A test: a tool that no ADR rejects and that the item does not name keeps
coversand its question. - A test: a repository with no
docs/adr/gives the same verdict as before this change. - A test: the request holds the ADR titles and decisions, cut to a token cap.
devops roadmap eval has no alternatives set (src/devops_cli/commands/roadmap_eval.py:20-23), so these tests use a scripted model.
Existing tool considered
docs/adr/ as data, and markdown-it-py, which refine.py already uses. validate_reply holds the comparison. The Firecrawl search stays. The change adds no library.
Related
Proposed design
Problem statement
The alternatives check can give a covers verdict for a tool that an ADR rejected or that the item already uses. Refine then asks a person to adopt the tool or to keep the item with a reason, and the repository already answers that question. The check reads no ADR and compares no tool name with the item, so 5 covers verdicts each asked the question. The change gives the check the ADR titles and decisions and compares the reply tool with the item text, so these cases give no question.
Acceptance criteria
Requirement: ADR titles and decisions in the request
The alternatives request SHALL hold the title and the decision of each ADR in docs/adr/, cut to a token cap.
Scenario: The request holds the ADR titles and decisions
- WHEN a repository holds ADR files and the check builds its request
- THEN the request text holds each ADR title and decision, and its length stays inside the token cap
Requirement: A rejected tool names its ADR
The check SHALL record a tool that an ADR rejects as rejected, with the tool URL and the ADR number.
Scenario: A reply names a tool that an ADR rejects
- WHEN the model reply names
temporalio/temporaland an ADR rejects Temporal - THEN the comment names the tool URL and the ADR number, and
covers_questionreturns no question
Requirement: A tool the item names is in use
The check MUST record a tool that the item text names as in use, and MUST give no covers question.
Scenario: A reply names a tool that the item body names
- WHEN the model reply names a tool and the item text outside the job's block names the same URL or package
- THEN the recorded check reads in use and
covers_questionreturns no question
Requirement: The job's block does not count as item text
The comparison MUST read only the item text outside the job's block.
Scenario: A tool name that only the job's block holds
- WHEN the tool name appears only inside the job's block of an earlier check
- THEN the check records the tool as not in use and keeps its covers question
Requirement: No ADR and no item name keeps covers
The check SHALL keep the covers verdict and its question when no ADR rejects the tool and the item does not name it.
Scenario: A covering tool that no ADR rejects and the item does not name
- WHEN the model reply names a tool, no ADR rejects it and the item text does not name it
- THEN the check records
coversandcovers_questionreturns the adopt-or-keep question
Requirement: A repository without ADRs is unchanged
The check MUST give the same verdict as before this change when the repository has no docs/adr/ directory.
Scenario: A repository with no docs/adr/
- WHEN the check runs on a repository with no
docs/adr/directory - THEN the verdict and the question equal the values before this change
Existing Tool Considered
No alternatives check has run on this item. markdown-it-py covers the markdown parse of docs/adr/, and src/devops_cli/roadmap/refine.py already imports it. No open, maintained library covers the ADR-rejection or in-use decision, because that is a rule over this repository's own ADR files and item text, so the change builds that comparison. Written cost: about 3,000 tokens of new code, about 60,000 tokens to build, test and fix it, and about one day of elapsed time.
Key questions
- How does the check read the titles and decisions of the ADRs?: Parse each
docs/adr/*.mdwithmarkdown-it-py, whichrefine.pyalready imports. Take the first heading as the title and the prose after it as the decision, and sort by file name. (best practice) [sources: src/devops_cli/roadmap/refine.py, docs/adr/0001-github-is-the-roadmap-source.md]- Chosen:
markdown-it-pyparse. It is already a dependency, it handles the ADR markdown, and it gives the heading and the prose text. - Rejected: Regex on the first heading and the first paragraph. It breaks on setext headings and fenced code, and the repository already has a markdown parser.
- Rejected: A new front-matter convention in each ADR. It changes every ADR file and adds a format that no ADR uses today.
- Chosen:
- Where does the check compare the reply tool with the ADR decisions and the item text?: In
validate_replyinsrc/devops_cli/roadmap/alternatives.py, which already checks the reply against the item and its sources. (best practice) [sources: src/devops_cli/roadmap/alternatives.py:757, src/devops_cli/roadmap/alternatives.py:535]- Chosen:
validate_reply. It holds the reply checks and already reads the item, so one place decides the reply. - Rejected: A new function after
validate_reply. It adds a second pass and a second place that knows the reply shape. - Rejected: The prompt only. A model gives no deterministic answer, and the issue asks for code where possible.
- Chosen:
- How does the record keep the rejected or in-use state?: Add a
dispositionfield to the recorded check block, withrejectedand the ADR number, orin-use. The verdict stayscovers.covers_questionreturns None whendispositionis set, and an old block parses withdisposition = None. (best practice) [sources: src/devops_cli/roadmap/refine.py, src/devops_cli/roadmap/alternatives.py]- Chosen: A
dispositionfield on the record. The four verdicts stay stable for the metrics and the eval, and an old block parses unchanged. - Rejected: Two new verdict values,
rejectedandin-use. It changes the verdict enum, the metrics and the eval for a state that no metric needs. - Rejected: The comment only, with no record.
covers_questionreads the record, so a comment alone cannot stop the question.
- Chosen: A
- How does the comparison match a tool in the item text?: Normalize the reply's tool URL to its
owner/nameslug and its last segment, then look for the slug, the last segment and the package name in the item text outside the job's block. Match on a word boundary and ignore case. (best practice) [sources: src/devops_cli/roadmap/alternatives.py:757, src/devops_cli/roadmap/alternatives.py:535]- Chosen: Normalized slug and package-name match. It finds
temporalio/temporalandtemporalin the item text, and it needs no model. - Rejected: Exact URL match. The item text names
Temporal, not the full URL, so an exact match misses it. - Rejected: Model comparison. It is not deterministic, and the issue asks for code where possible.
- Chosen: Normalized slug and package-name match. It finds
- How large is the token cap for the ADR text?: Cut the ADR text to the tokens that remain in the request budget after the item and the replies, so the request stays inside the context window. The cut keeps each ADR title and the first sentence of its decision. (best practice) [sources: src/devops_cli/roadmap/alternatives.py:535]
- Chosen: Cut to the remaining request budget. It adapts to the item size and keeps the request inside the context window.
- Rejected: A fixed module constant. A large item would still overflow, and a small item would waste budget.
- Rejected: No cap. A repository with many ADRs pushes the item and the replies out of the window.
- Does the item body already have a helper that removes the job's block?: Yes. The body hash leaves out the job's block, and
_requestreads the item text outside it. The comparison reuses the same block-stripping. [sources: src/devops_cli/roadmap/body_hash.py, src/devops_cli/roadmap/alternatives.py:535]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 4, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.It prevents real wrong questions (5 documented cases) and should land before dan-petty/devops-cli#2951 increases their volume.It removes a recurring source of wasted human answers and prevents growth of that waste after dan-petty/devops-cli#2951.It modifies _request, adds ADR reading, adds URL comparison in validate_reply, and requires five scripted-model tests.Both concern the alternatives check and refine interaction, but this item fixes the check to suppress covers verdicts for rejected or in-use tools, while dan-petty/devops-cli#2951 gates Ready status on having a verdict.devops-cli-service commentedon Nov 5, 2026
Status set to Ready at f481be8 (see proposed design in issue body).
devops-cli-service commentedon Nov 6, 2026
Released in v0.64.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.64.2
devops-cli-service commentedon Nov 6, 2026
Live since 2026-11-06 04:26 UTC