Skip to content

fix(roadmap): the alternatives check calls the standard library covers #6347

Done

Description

@dan-petty

Problem

The alternatives check gave the verdict covers with the tool python/cpython on #6328 (2026-11-18). Its reason says that the standard-library keyword module answers the item, and that the issue already names those calls as the fix. Refine then asked the owner: "Adopt the tool, or keep the item and give the reason." The item waited on a person for a question with no real choice: the project already uses Python, and the planned fix already uses the module.

On #5374 (2026-11-17) the same check named python/cpython and gave in-use, which is correct. So the verdict for the standard library of a language that the project uses is not consistent.

Expected

  • A module of the standard library of a language that the project uses gets the verdict in-use, not covers, so refine asks no owner question for it.
  • A test with the model fake shows the rule in the prompt or in the verdict check.

Source: #6328

Alternatives check of 2026-11-25: none.
Tool: none found.
Reason: Searches found no tool that maps a language's standard-library repository to a project's inventory; the only related find, stdlib-list, lists Python module names only, so it cannot supply the in-use rule or the model-fake test.

Lacks:

  • No map from a language to its standard-library repository
  • No detection of a language the repository's inventory uses
  • No ready verdict rule or model-fake test for the alternatives check

Proposed design

Problem statement

The alternatives check gave the verdict covers with the tool python/cpython on #6328. Refine then asked the owner to adopt the tool or to keep the item with a reason. That question has no real choice, because the project uses Python. The same check gave in-use for the standard library on #5374, so the verdict is not consistent. The change makes the check give in-use for the standard library of a language that the repository uses, and it adds a test with the model fake.

Acceptance criteria

Requirement: Standard library of a used language gets in-use

The alternatives verdict check SHALL record the verdict in-use when the tool of the model reply is the standard library of a language that the inventory of the repository shows.

Scenario: The model fake names the Python standard library

  • WHEN the verdict check runs with the model fake returning a covers reply for the tool python/cpython, and the inventory holds the package URL pkg:pypi/httpx
  • THEN the check records the verdict in-use for the item.

Requirement: A third-party tool keeps covers

The verdict check SHALL keep the verdict covers for a tool that is no standard library of a language that the inventory shows.

Scenario: The model fake names a third-party tool

  • WHEN the verdict check runs with the model fake returning a covers reply for the tool sqlalchemy/sqlalchemy, and the inventory holds only the package URL pkg:pypi/httpx
  • THEN the check records the verdict covers for the item.

Requirement: No standard-library rule without a language signal

The verdict check MUST keep the verdict of the model reply when the inventory shows no language of the standard library of the tool.

Scenario: The inventory holds no package URL and no deployed path

  • WHEN the verdict check runs with the model fake returning a covers reply for the tool python/cpython, and the inventory holds no package URL and no deployed path
  • THEN the check records the verdict covers for the item.

Existing Tool Considered

The alternatives check of 2026-11-19 in the issue body gives the verdict none and names no tool. Its searches found only stdlib-list, a list of Python standard-library module names. That package cannot supply the in-use verdict rule or the test with the model fake; the Lacks: list of the block says so. The change builds its own code. Written cost: about 40 lines in src/devops_cli/roadmap/alternatives.py and one test with the model fake; about 60k tokens to build and fix, about 15k tokens a year to keep, and about 2 hours of elapsed time.

Key questions

  • Where does the standard-library rule live: the model prompt of the alternatives check or the deterministic verdict check?: The deterministic verdict check in src/devops_cli/roadmap/alternatives.py. The job gives each verdict that the text confirms, and the model proposes only rejected and in-use. A rule in the prompt would make the verdict depend on one model answer. The same tool got covers on fix(roadmap): Skip Python keywords in stage removal names #6328 and in-use on fix(cli): install-tools advice loops when PATH finds another openspec #5374, which shows the need for a fixed rule. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/alternatives.py]
    • Chosen: Deterministic rule in the verdict check. One place holds the rule, an offline test shows it, and no model answer decides it.
    • Rejected: Instruction in the alternatives prompt. The model answer stays a sample, and the prompt still produced covers on fix(roadmap): Skip Python keywords in stage removal names #6328.
    • Rejected: Both the prompt and the check. Two places hold one rule, and they drift.
  • How does the check tell the standard library of a language that the repository uses from a third-party tool, when origin/main has no project profile with languages?: A fixed map holds one entry for each language: the repository of its standard library, the type of its package URLs and its file extension. Python is python/cpython, pypi and .py. The check gives in-use only when the inventory of the repository holds a package URL of that type or a deployed path with that extension. It reads no project profile and adds no language detector. When the inventory shows neither, the verdict of the model stays. (best practice) [sources: src/devops_cli/roadmap/inventory.py:221, src/devops_cli/roadmap/alternatives.py, CONTEXT.md]
    • Chosen: Fixed language map plus the inventory of the repository. The inventory already holds the package URLs and the deployed paths, and the check reads it for the in-use verdict.
    • Rejected: Wait on feat(roadmap): track one project profile for all repositories #4627 for a project profile with languages. feat(roadmap): track one project profile for all repositories #4627 is open in status/new, so the item would wait with no date, and the inventory already shows the language.
    • Rejected: sys.stdlib_module_names of the running interpreter. It names Python modules only, and its answer depends on the interpreter that runs the job.
    • Rejected: The model prompt alone. The verdict then depends on a model answer, and the check stays inconsistent.
  • Which files hold the verdict check, the in-use verdict and the model fake?: The verdict check and the in-use verdict are in src/devops_cli/roadmap/alternatives.py. The inventory is src/devops_cli/roadmap/inventory.py. The model fake is tests/support/fakes/model.py. The tests of the covers check are in tests/roadmap/refine/test_roadmap_refine_covers_check.py. [sources: src/devops_cli/roadmap/alternatives.py, src/devops_cli/roadmap/inventory.py:221, tests/support/fakes/model.py, tests/roadmap/refine/test_roadmap_refine_covers_check.py]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @dan-petty
    OwnerAuthor
    • Related: fix(roadmap): the alternatives check reads the tools in use #4661, which asks for a different change. Both fix the alternatives check giving covers instead of in-use for tools the project already uses; #4661 reads tool usage from the project, the candidate adds a rule that a standard library module of the project's language is in-use.
  3. added
    priority/p2-medium
    on Nov 19, 2026
  4. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    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 (8)

    Tools considered:

    Searches run:

    • python package list of standard library modules stdlib-list, results: 5
    • sys.stdlib_module_names detect whether a module is in the Python standard library, results: 5
    • stdlib-list PyPI, results: 5
    • check if python module name is part of standard library programmatically, results: 5
    • github "stdlib-list" python standard library modules list, results: 5
    • sys.stdlib_module_names Python documentation, results: 5
    • python-standards "stdlib_list" package module names per version, results: 5
    • pypi.org stdlib-list 0.12.0 standard library modules, results: 5

    Sources:

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

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  7. dan-petty commented on Nov 25, 2026

    @dan-petty
    OwnerAuthor

    Returned to New: the design specifies limiting the standard-library rule to the languages named by the project profile, which does not exist on origin/main yet.

    Evidence from origin/main:

    • src/devops_cli/project/profile.py:44-79 (ProjectProfile, extra="forbid"): holds only extends (ansible-k8s), ansible, and kubernetes; it has no languages field or language detection.
    • src/devops_cli/roadmap/project_profile.py:55-101 (ProjectProfile, extra="forbid") and src/devops_cli/roadmap/toolchains.py:17-78: hold only preset (devops-cli or neutral) and hold no languages list.
    • src/devops_cli/roadmap/inventory.py:221-253 (Inventory, read_inventory) and src/devops_cli/roadmap/alternatives.py:1544-1548: read dependency SBOM package URLs and inventory_paths, not a project profile; source is optional (None in CLI runs without --source and in existing tests).
    • #4627 ("track one project profile for all repositories", adding detected languages from manifests and file extensions) and #4648 ("toolchain presets and runner tools for each language") are still open in status/new.

    Per AGENTS.md Rule 2, no compensating language detector was added here. Next step in refine: either mark #4627 as a dependency or specify how _verdict_of / Inventory should detect a project's languages from existing inputs when source is absent.

  8. 2 remaining items

  9. added
    status/ready
    and removed
    status/new
    on Nov 25, 2026
  10. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  11. added
    owner/agent
    status/in-progress
    and removed
    status/ready
    on Nov 25, 2026
  12. added
    status/in-review
    and removed
    status/in-progress
    on Nov 25, 2026
  13. removed
    status/in-review
    owner/agent
    on Nov 25, 2026
  14. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor
  15. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-25 17:09 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