Repository navigation
Description
Problem Description
Pull request #5062 (#4661) changed rejects() in src/devops_cli/roadmap/adr.py. Now an ADR rejects a tool only when each Considered Options item that names the tool holds the word rejected or not chosen (_REJECTED_OPTION). Some ADRs in force list options that the decision did not take, and these options do not use these words:
- ADR 0018: the options
nsjailandgVisor. The decision is the container boundary. - ADR 0024: all four options (IBM Carbon, GitHub Primer, a DTCG resolver file, values copied by hand). The title names the chosen tool.
Thus the alternatives job drops correct rejections. The census of #4661 has 4 true rejections, and the change loses one of them:
| Item | Tool | ADR | Marker in the option | rejects() on main |
|---|---|---|---|---|
| #3827 | google/gvisor |
0018 | none | false |
| #4098 | containers/bubblewrap |
0018 | "The owner rejected it" | true |
| #3908 | APScheduler | 0008 | not chosen |
true |
| #3416 | github/codeql |
0005 | "rejected by their licences" | true |
#3827 has the block "Alternatives check of 2026-11-08: rejected. Rejected by ADR 0018." for google/gvisor. Its record has no adr_hash, so _is_due makes the item due. The model proposes adr 18 again, _confirmed_adr returns false, the job logs "dropped ADR 18" and keeps the covers or partly verdict of the reply. ADR 0018 did not choose gVisor.
The premise of the change is false. The design.md of the archived change says: "the options of the ADRs of the repository say rejected or not chosen in plain words." docs/roadmap/alternatives.md and the requirement in openspec/specs/roadmap-alternatives/spec.md state the same rule.
No test covers the true rejections of the census. The tests cover only #3258 (ADR 0010 adopts OpenSpec) and synthetic options.
Reproduction Steps
- Check out
mainat 2bd87bc or later. - In the repository root, run this script with the project environment. It compares the old test (the title and the options name the tool) with
rejects()for each ADR in force.
from pathlib import Path
from devops_cli.roadmap.adr import _superseded, adr_of, names, rejects
adrs = [a for p in sorted(Path("docs/adr").glob("*.md")) if (a := adr_of(f"docs/adr/{p.name}", p.read_text()))]
in_force = [a for a in adrs if a.number not in _superseded(adrs)]
for tool in ("google/gvisor", "google/nsjail", "IBM Carbon", "GitHub Primer", "containers/bubblewrap", "Fission-AI/OpenSpec"):
old = [a.number for a in in_force if names(f"{a.title}\n{a.options}", tool)]
new = [a.number for a in in_force if rejects(a, tool)]
print(tool, "old", old, "new", new)Expected vs Actual Behavior
Expected: ADR 0018 rejects gVisor and nsjail, and ADR 0024 rejects IBM Carbon and GitHub Primer. ADR 0010 does not reject OpenSpec.
Actual:
google/gvisor old [18] new []
google/nsjail old [18] new []
IBM Carbon old [24] new []
GitHub Primer old [24] new []
containers/bubblewrap old [18] new [18]
Fission-AI/OpenSpec old [10] new []
Proposed fix
Invert the test. An ADR rejects a tool when a Considered Options item names the tool, the title does not name it, and no option that is marked as chosen or adopted names it. The words not chosen and not adopted do not mark an option as chosen. Under this rule, ADR 0010 does not reject OpenSpec, because its chosen option names OpenSpec.
- An option can hold the two markers. ADR 0011 (superseded) option D says
chosen, and also says thatchangie"was not chosen". Count such an option as chosen. Then a tool that it names is not rejected, which is the safe result. - Open point: ADR 0018 lists
kubernetes-sigs/agent-sandboxas a candidate that feat(roadmap): run the implement agent shell in a real sandbox #2695 measures ("This record does not measure it"). The inverted rule rejects it. Decide if an option that the ADR defers counts as rejected. The comment of the check already says "A newer fact can change an ADR." - Add replay cases that must stay rejected: feat(roadmap): devops review runs in the runner shell #3827 (gVisor, ADR 0018), feat(roadmap): wire sandboxed run tool into stage toolbox and prompt #4098 (bubblewrap, ADR 0018), feat(roadmap): run the research sweep on a schedule #3908 (APScheduler, ADR 0008) and feat(roadmap): Verify a claimed missing check in helpers and base #3416 (
github/codeql, ADR 0005). Keep the feat(roadmap): Add failure classes and runner facts to stage context #3258 case, which must not be rejected. - Correct the rule text in
docs/roadmap/alternatives.mdand in the spec requirement ofroadmap-alternatives.
Environment Diagnostics
main at 2bd87bc. The defect is in the code rule. It does not depend on the host.
Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate.
Source: #5062
Alternatives check of 2026-11-15: none.
Tool: none found.
Proposed design
Problem statement
rejects() drops correct ADR rejections. It accepts only options that say rejected or not chosen. ADR 0018 and ADR 0024 list rejected tools without those words. The alternatives job then loses a true rejected verdict. The fix inverts the rule: an ADR rejects a tool when an option names it and no chosen or adopted option names it. Tests, docs/roadmap/alternatives.md and the roadmap-alternatives spec must follow the corrected rule.
Acceptance criteria
Requirement: Inverted rejection rule
rejects() SHALL return true when a Considered Options item names a tool and no chosen or adopted option names it.
Scenario: An unmarked rejected option
- WHEN ADR 0018 has an option that names
google/gvisorand no chosen option names it - THEN
rejects()returns true forgoogle/gvisor
Requirement: Chosen option excludes rejection
rejects() SHALL return false when the ADR title or a chosen or adopted option names the tool.
Scenario: ADR 0010 chooses OpenSpec
- WHEN ADR 0010 has a chosen option that names
Fission-AI/OpenSpec - THEN
rejects()returns false forFission-AI/OpenSpec
Requirement: Mixed markers count as chosen
rejects() SHALL treat an option as chosen when it holds chosen or adopted, even if it also holds not chosen or not adopted.
Scenario: Option with both markers
- WHEN an option names a tool and holds
chosenandwas not chosen - THEN
rejects()returns false for that tool
Requirement: Census rejections replay
The test suite SHALL replay each true rejection of the #4661 census and assert that rejects() returns true.
Scenario: Four true rejections
- WHEN the test replays gVisor, bubblewrap, APScheduler and
github/codeqlwith ADR 0018, 0018, 0008 and 0005 - THEN
rejects()returns true for each tool
Requirement: Deferred option counts as rejected
rejects() SHALL return true when only an option that the ADR does not measure names the tool.
Scenario: ADR 0018 defers agent-sandbox
- WHEN ADR 0018 lists
kubernetes-sigs/agent-sandboxin an option that saysThis record does not measure it - THEN
rejects()returns true forkubernetes-sigs/agent-sandbox
Requirement: Alternatives page states the rule
docs/roadmap/alternatives.md SHALL state that an ADR rejects a tool when an option names it and no chosen or adopted option names it.
Scenario: Reader checks the confirmation section
- WHEN a reader opens the confirmation section of
docs/roadmap/alternatives.md - THEN the text gives the inverted rule and no longer defines a rejected option by
rejectedornot chosenalone
Requirement: Spec states the rule
openspec/specs/roadmap-alternatives/spec.md SHALL state the inverted rejection rule and the chosen or adopted exclusion.
Scenario: Spec requirement is read
- WHEN a reader opens the rejection requirement of the roadmap-alternatives spec
- THEN the requirement gives the inverted rule and the chosen or adopted exclusion
Existing Tool Considered
No open, maintained tool or library covers this need. The alternatives check of 2026-11-15 returned none with no tool; it found only generic ADR authoring and parsing projects. The change corrects the project's own rule in src/devops_cli/roadmap/adr.py. No external tool exists to match. Estimated written cost: about 1,500 tokens to build, 300 tokens to keep, 800 tokens to fix, and about 2 hours elapsed.
Key questions
- Why does feat(roadmap): devops review runs in the runner shell #3827 lose its
rejectedverdict?:_is_duemakes an item due when its recordedadr_hashdiffers from HEAD or is absent. The model proposes ADR 0018 forgoogle/gvisor._confirmed_adrcallsrejects(), which returns false under the current marker rule. The job logsdropped ADR 18and keeps the reply verdict. [sources: src/devops_cli/roadmap/alternatives.py:530, src/devops_cli/roadmap/alternatives.py:650, src/devops_cli/roadmap/alternatives.py:1030, src/devops_cli/roadmap/adr.py:59] - Which rule should replace the
_REJECTED_OPTIONtest?: Invert the test. An ADR rejects a tool when aConsidered Optionsitem names it and no chosen or adopted option names it. Keep the title as an exclusion. ADR 0010 stays safe because its chosen option names OpenSpec. (best practice) [sources: src/devops_cli/roadmap/adr.py:59, docs/roadmap/alternatives.md, openspec/specs/roadmap-alternatives/spec.md]- Rejected: Keep the
rejectedornot chosenmarker. It drops correct rejections from ADR 0018 and ADR 0024. - Chosen: Invert the test with chosen or adopted options. It matches ADR semantics and keeps ADR 0010 safe.
- Rejected: Reject only when the title names the tool. It ignores the
Considered Optionssection and loses the census cases.
- Rejected: Keep the
- How should an option that holds both a chosen marker and a not-chosen phrase be treated?: Treat it as chosen. A chosen or adopted marker wins over
not chosenornot adopted. A tool that the option names is not rejected. This is the safe result. (best practice) [sources: docs/roadmap/alternatives.md, src/devops_cli/roadmap/adr.py]- Chosen: Treat it as chosen. It prevents a false rejection and follows the safe result.
- Rejected: Treat it as rejected. It can reject a tool that the ADR adopted.
- Does an option that the ADR defers count as rejected?: Yes. The rule rejects a tool that no chosen or adopted option names. ADR 0018 does not measure
kubernetes-sigs/agent-sandbox, so it is not chosen. The check runs again when the ADR changes, so a later measurement can change the verdict. (best practice) [sources: docs/roadmap/alternatives.md, src/devops_cli/roadmap/adr.py]- Chosen: Count a deferred option as rejected. It keeps the rule simple and reversible when the ADR changes.
- Rejected: Exclude deferred options. It needs a fragile phrase list and delays a correct rejection.
- Which tests must protect the corrected rule?: Add replay cases for feat(roadmap): devops review runs in the runner shell #3827 gVisor with ADR 0018, feat(roadmap): wire sandboxed run tool into stage toolbox and prompt #4098 bubblewrap with ADR 0018, feat(roadmap): run the research sweep on a schedule #3908 APScheduler with ADR 0008 and feat(roadmap): Verify a claimed missing check in helpers and base #3416
github/codeqlwith ADR 0005. Keep the feat(roadmap): Add failure classes and runner facts to stage context #3258 OpenSpec case with ADR 0010. Add a mixed-marker case and a deferred-option case. (best practice) [sources: tests/roadmap/test_roadmap_adr.py, tests/roadmap/test_roadmap_alternatives.py]- Chosen: Replay census and edge cases. It covers the regression and the safe mixed-marker result.
- Rejected: Keep synthetic options only. It does not cover the true rejections that the census holds.
- Which documents must change?: Change
docs/roadmap/alternatives.mdand the rejection requirement inopenspec/specs/roadmap-alternatives/spec.md. Both must state the inverted rule and the chosen or adopted exclusion. (best practice) [sources: docs/roadmap/alternatives.md, openspec/specs/roadmap-alternatives/spec.md]- Chosen: Update both documents. The page and the spec are the recorded rule.
- Rejected: Update only the code. The documents would keep the false premise.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 12, 2026
Both concern the rejects() logic in adr.py, but #4661 delivered the change that introduced this regression, while the candidate fixes that regression.devops-cli-service commentedon Nov 15, 2026
Alternatives check: none
Reason: The searches returned only generic ADR authoring/parsing material (adr-tools, log4brains-style projects) and nothing that decides which tools an ADR's Considered Options rejected. The need is a correction to the project's own rule in
src/devops_cli/roadmap/adr.py, with replay tests and updated rule text, so no external tool or library covers it.Tool: none found
Lacks:
Searches run:
Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 17, 2026
Status set to Ready at 19bfec3 (see proposed design in issue body).
devops-cli-service commentedon Nov 17, 2026
Released in v0.173.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.173.2
devops-cli-service commentedon Nov 17, 2026
Live since 2026-11-17 16:55 UTC