Skip to content

fix(roadmap): an ADR rejects a tool that no chosen option names #5082

Closed

Description

@dan-petty

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 nsjail and gVisor. 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

  1. Check out main at 2bd87bc or later.
  2. 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.

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/gvisor and no chosen option names it
  • THEN rejects() returns true for google/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 for Fission-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 chosen and was 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/codeql with 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-sandbox in an option that says This record does not measure it
  • THEN rejects() returns true for kubernetes-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 rejected or not chosen alone

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 rejected verdict?: _is_due makes an item due when its recorded adr_hash differs from HEAD or is absent. The model proposes ADR 0018 for google/gvisor. _confirmed_adr calls rejects(), which returns false under the current marker rule. The job logs dropped ADR 18 and 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_OPTION test?: Invert the test. An ADR rejects a tool when a Considered Options item 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 rejected or not chosen marker. 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 Options section and loses the census cases.
  • 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 chosen or not 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/codeql with 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.md and the rejection requirement in openspec/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

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 12, 2026
  2. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    on Nov 12, 2026
  4. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    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:

    • tool determine which ADR rejected a tool alternatives check roadmap, results: 5
    • Python library parse architecture decision records markdown considered options rejected, results: 5
    • "architecture decision record" considered options parser library github, results: 5
    • adr-tools log4brains decision record markdown superseded parsing, results: 5
    • pypi architecture decision records package parse ADR markdown options chosen rejected, results: 5
    • adr-tools github architecture decision records command line, results: 5

    Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.

  5. added
    status/ready
    and removed
    status/new
    on Nov 17, 2026
  6. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 19bfec3 (see proposed design in issue body).

  7. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 17, 2026
  8. removed
    status/in-review
    on Nov 17, 2026
  9. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor
  10. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-17 16:55 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions