Skip to content

fix(roadmap): keep no tool versions in runner_tools.py #5585

Closed

Description

@dan-petty

Problem

The Fail-to-Pass Check runs for a fix pull request that only bumps a tool pin in src/devops_cli/tools_lock/tools.lock, and it fails there for a reason that is not in the fix.

CONTRIBUTING.md ("Fail-to-Pass Evidence") says: "A fix that changes only other tests, manifests, documents or dependencies gets no check." But the path filter of .github/workflows/fail-to-pass.yml is src/** minus the knowledge base. tools.lock is a dependency pin file under src/, so a pin bump starts the check.

On #5584 (#5573: bump helm, renew Trivy ignores), the replay ran tests/invariants/test_mcp_server_image.py on the base. Two tests failed on the base:

  • test_the_kubectl_and_helm_pins_hold_the_go_builds_that_fix_the_stdlib_findings: the fix changes it, so it proves the fix.
  • test_every_mcp_server_trivyignore_entry_has_a_reason_and_an_exp_date_that_is_not_past: the fix does not change the function, but changes the file that it reads (.trivyignore-mcp-server, whose entries expired on 2026-11-14).

The check printed: A test that the fix does not change fails on base (tests.invariants.test_mcp_server_image::test_every_mcp_server_trivyignore_entry_has_a_reason_and_an_exp_date_that_is_not_past). A test that fails on base must be one that the fix adds or changes. and exited 1.

So each urgent renewal of an expired ignore entry that also bumps a pin gets a failed check that a person must read and accept.

Update of 2026-11-19: the path filter of .github/workflows/fail-to-pass.yml is now src/**/*.py, so a tools.lock edit alone no longer starts the check. The cause that is left is a tool version in a .py file: on #6370 the gh pin GH_VERSION in src/devops_cli/roadmap/runner_tools.py made the title check ask for a fix title, which starts Fail-to-Pass, and a test of a pin is not allowed (owner rule of 2026-11-16). The owner rule of 2026-11-19 ('we are not a package manager') says to remove such copies.

Fix

Delete UV_VERSION, GH_VERSION, NODE_MAJOR and ACTIONLINT_VERSION (runner_tools.py:42-46), the RunnerTool.pin field, the IMAGE_PIN and TOOLS_LOCK branches of expected_text (:269-283), _pin_failure with its 'devops install-tools --check' call (:286-305), the python pin at :115 and the imports of DEFAULT_PYTHON_VERSION (:31) and load_tools_lock (:35). Rename runner_tool_off_pin and runner_tool_version, and change 'at their pins' in runner_tools_ready (messages.py:3462-3467). The check stays a presence table: the program is on PATH and ' --version' exits 0 (tool_failure); DEV_GROUP and PROJECT rows keep their importlib.metadata compare. Tests: delete test_roadmap_runner_tools.py:157-161, :210-215, :244-278, :288-299 and :364-411; rewrite :325-362 with a DEV_GROUP tool; keep :218-226. Write the OpenSpec delta for openspec/specs/roadmap-implement-runner/spec.md:204-216 ('the version command exits 0', no pin scenario). Fix docs/CLUSTER.md:68 and the RunnerTool docstring (:62-66). Leave the ci.yml:729-730 and release.yml:666-667 MCP '--check' lines to order 11. Until order 11, gh in Dockerfile:37-56 stays a manual bump, but with one copy only.

Renovate: Remove customManagers[1] (uv into runner_tools.py) and customManagers[2] (node major into runner_tools.py). Rewrite the descriptions of packageRules 15 (uv), 16 (cli/cli) and 17 (node) and the src rule text that name 'the runner tools table'. Keep the defaults.py pattern of customManagers[5] until order 7 removes DEFAULT_PYTHON_VERSION.

No is_source_code guard. After this fix, no .py file under src/ holds only a tool version, so the guard of the refine requirement "A pin-only Python module is no source code" would match no module (AGENTS.md rule 2). That requirement is dropped (coordinator decision of 2026-11-19; the evidence is in design.md of the archived change of PR #6403).

Proof

docker buildx build --target runner . passes, including the smoke step at Dockerfile:166 (python -m devops_cli.roadmap.runner_tools). uv run pytest tests/roadmap/test_roadmap_runner_tools.py passes. git grep -nE '^(UV|GH|ACTIONLINT)_VERSION|NODE_MAJOR' origin/main -- src returns nothing. The next Renovate kjanat/actionlint or ghcr.io/astral-sh/uv PR builds the image with no .py edit, and a gh bump PR edits no file under src/, so Fail-to-Pass does not start.

Evidence

Source: #5584

Proposed design

Problem statement

The Fail-to-Pass Check starts for a pull request that changes only a tool version pin in src/devops_cli/roadmap/runner_tools.py. The title check counts the file as runtime code, so it demands a fix title, and the check then fails because no test of a pin is allowed. The check is not required on main, so this fix removes noise and adds no gate. The fix removes the duplicate version constants and the pin-specific branches, keeps tools.lock as the one pin store, and makes is_source_code agree that a pin-only Python module is no source code.

Acceptance criteria

Requirement: The runner tools table holds no version pin

The RunnerTool table in src/devops_cli/roadmap/runner_tools.py SHALL hold no UV_VERSION, GH_VERSION, NODE_MAJOR or ACTIONLINT_VERSION constant and no pin field.

Scenario: No pin attribute remains

  • WHEN uv run pytest tests/roadmap/test_roadmap_runner_tools.py runs
  • THEN the test passes and RunnerTool has no pin field and the module has no tool version constant.

Requirement: The runner tool check is a presence check

The runner tool check SHALL pass a tool when the program is on PATH and <tool> --version exits 0, and SHALL report tool_failure when it is not.

Scenario: A missing tool reports a tool failure

  • WHEN uv run pytest tests/roadmap/test_roadmap_runner_tools.py runs with a tool absent from PATH
  • THEN the check returns tool_failure and calls no devops install-tools --check.

Requirement: Python tool rows keep the metadata compare

The DEV_GROUP and PROJECT rows SHALL keep their importlib.metadata version compare.

Scenario: A metadata mismatch is reported

  • WHEN uv run pytest tests/roadmap/test_roadmap_runner_tools.py runs with a DEV_GROUP tool whose installed metadata version differs from its output
  • THEN the check reports the mismatch from importlib.metadata.

Requirement: A pin-only Python module is no source code

The is_source_code function in src/devops_cli/ci/fail_to_pass.py SHALL return false for a Python file under src/ that holds only a tool version constant and no runtime statement.

Scenario: A pin-only module starts no replay

  • WHEN uv run pytest tests/ci/test_fail_to_pass.py runs on a fixture module with only a GH_VERSION assignment
  • THEN is_source_code returns false and the Fail-to-Pass check starts no replay.

Requirement: The readiness text names the PATH check

The runner_tools_ready message SHALL say that the tools are on PATH and SHALL not say at their pins.

Scenario: The readiness message has no pin wording

  • WHEN uv run pytest tests/roadmap/test_roadmap_runner_tools.py runs
  • THEN the test passes and the message contains no at their pins.

Requirement: Renovate stops managing the runner tool pins

The Renovate configuration SHALL have no custom manager that writes a uv or node version into src/devops_cli/roadmap/runner_tools.py, and its package rule descriptions SHALL no longer name the runner tools table.

Scenario: The Renovate config passes static analysis

  • WHEN uv run devops ci --check runs
  • THEN the command exits 0 and reports no finding for the Renovate configuration.

Requirement: The cluster document describes the presence check

docs/CLUSTER.md SHALL describe the runner tool presence check and SHALL not name a tool pin.

Scenario: The docs check passes

  • WHEN uv run devops ci --check runs
  • THEN the command exits 0 and reports no finding for docs/CLUSTER.md.

Requirement: The runner spec states the presence check

The openspec/specs/roadmap-implement-runner/spec.md SHALL state that the version command exits 0 and SHALL hold no pin scenario.

Scenario: The OpenSpec check passes

  • WHEN uv run devops openspec check runs
  • THEN the command exits 0 and the runner spec has no pin scenario.

Requirement: The runner image builds with the presence check

The runner image target SHALL build and its smoke step SHALL run python -m devops_cli.roadmap.runner_tools with no pin.

Scenario: The runner target builds

  • WHEN docker buildx build --target runner . runs
  • THEN the build exits 0 and the smoke step at Dockerfile:166 passes.

Existing Tool Considered

No alternatives check has run. The need is to keep one source of tool versions and to stop a pin-only Python file from counting as source. Renovate is an open, maintained tool already in use for dependency updates. It covers the uv and node bumps, but it does not cover the runner tool presence check or the is_source_code classifier. The existing pin store is src/devops_cli/tools_lock/tools.lock with devops install-tools, so the change removes duplicate code and adds no package manager. The only new code is a small AST guard in is_source_code: about 40 lines and one test, an estimated 15k tokens to build and test, 3k tokens a year to keep, and 45 minutes of elapsed time.

Key questions

  • Should the fix remove the tool version constants or change the Fail-to-Pass path filter?: Remove the constants. The path filter now covers src/**/*.py. The duplicate GH_VERSION in runner_tools.py makes the title check count the file as runtime code. The owner rule of 2026-11-19 says the project is not a package manager. tools.lock stays the one pin store. (best practice) [sources: src/devops_cli/roadmap/runner_tools.py, src/devops_cli/tools_lock/tools.lock, CONTRIBUTING.md, .github/workflows/fail-to-pass.yml]
    • Chosen: Remove the version constants and the pin-specific branches. The duplicate pin is the cause, and tools.lock already holds the version. The owner rule forbids a package-manager copy.
    • Rejected: Expand the workflow path filter to skip runner_tools.py. The file holds runtime code, so a skip would hide a real source change.
    • Rejected: Change the replay to accept an unchanged test. The owner rule refuses an escape, and the replay rule protects the proof that a fix changes a test.
  • Should is_source_code treat a pin-only Python module under src/ as no source code?: Yes. The docstring of is_source_code already says that a tool pin under src/ is no code. The function SHALL read the Python module and return false when it holds only a tool version constant and no runtime statement. A module with a function or a class stays source code. (best practice) [sources: src/devops_cli/ci/fail_to_pass.py, src/devops_cli/roadmap/runner_tools.py]
    • Chosen: Parse the module and return false for a pin-only module. It makes the function agree with its docstring and keeps the replay for real code.
    • Rejected: Keep the file-type rule. It contradicts the docstring and the reply, and it counts a pin constant as runtime code.
    • Rejected: Hard-code runner_tools.py as no code. It hides real code changes in a module that holds runtime code.
  • Which pin store holds the tool versions after the change?: src/devops_cli/tools_lock/tools.lock holds the binary, Python and Node pins that devops install-tools reads. The gh pin in Dockerfile:37-56 stays a manual bump with one copy until order 11. [sources: src/devops_cli/tools_lock/tools.lock]
  • Should the DEV_GROUP and PROJECT rows keep the importlib.metadata compare?: Yes. The presence check is for a binary tool on PATH. A Python tool in DEV_GROUP or PROJECT is installed as a package, and importlib.metadata.version is the installed distribution version. The change SHALL keep that compare. (best practice) [sources: src/devops_cli/roadmap/runner_tools.py, src/devops_cli/tools_lock/tools.lock]
    • Chosen: Keep importlib.metadata for DEV_GROUP and PROJECT. The installed package metadata is the authoritative version for a Python tool.
    • Rejected: Replace it with <tool> --version. Not every Python package has a stable CLI, and the CLI text is not the installed distribution version.
    • Rejected: Remove the version compare. It would drop the version check for Python tools.
  • Is the Fail-to-Pass Check a required check of main?: No. The main ruleset requires Static Analysis, Tests & Coverage and Semantic PR title. A failed Fail-to-Pass Check does not block a merge. [sources: docs/adr/0004-ci-is-the-authoritative-gate.md]
  • Should the MCP --check lines in ci.yml and release.yml change in this issue?: No. The issue leaves them to order 11. This change keeps them as they are. Until order 11, the gh pin in Dockerfile stays a manual bump with one copy. (best practice) [sources: .github/workflows/ci.yml, .github/workflows/release.yml]
    • Chosen: Leave the MCP --check lines to order 11. The issue sets that order, and the MCP lines are outside this fix.
    • Rejected: Change the MCP --check lines now. It adds work that the issue assigns to order 11.
  • Does the runner spec need a delta?: Yes. The spec at openspec/specs/roadmap-implement-runner/spec.md:204-216 SHALL state that the version command exits 0 and SHALL hold no pin scenario. The stage job writes the delta from the acceptance criteria. (best practice) [sources: openspec/specs/roadmap-implement-runner/spec.md]
    • Chosen: Write the spec delta. The behavior changes, and the spec must state the presence check.
    • Rejected: Leave the spec as it is. The spec would keep a pin scenario that the code removes.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @dan-petty
    OwnerAuthor
    • Priority: P2-Medium. The check is not required on main per ADR 0012, so it does not block merges, but it causes recurring manual triage on every pin bump. The failed run 43535866392 does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 with the label priority/p0-critical.
    • Related: ci(fail-to-pass): the check runs only for fix pull requests and the body-line escape is deleted #1879, which asks for a different change. Both scope the trigger of the same fail-to-pass workflow, but #1879 scoped it to fix PRs and removed the escape, while the candidate asks to exclude lock-file-only changes from the path filter.
  3. added
    priority/p2-medium
    on Nov 14, 2026
  4. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor

    Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.

  5. dan-petty commented on Nov 19, 2026

    @dan-petty
    OwnerAuthor

    The same false alarm happens for a tool pin inside a .py file under src/. Pull request #6370 (for #6352, CVE-2026-97054) bumps gh in Dockerfile, and so also GH_VERSION in src/devops_cli/roadmap/runner_tools.py. It changes no other code under src/.

    The Fail-to-Pass Check ran (title fix(security): ...) and failed: https://github.com/dan-petty/devops-cli/actions/runs/44449800602/job/135310672074

    0 failed on base (0 failed and 0 passed in no changed test files; 0 errored).
    The fix changes no tests/**/test_*.py file and no module of tests/gate/*_checks/. A fix adds or changes a test or a gate check that fails on its base.
    

    The docstring of is_source_code (src/devops_cli/ci/fail_to_pass.py) says that a tool pin under src/ is no code and that no test reads its value. But the rule and the path filter of .github/workflows/fail-to-pass.yml read the file type only, so a pin constant in a .py file counts as code. The pins UV_VERSION, GH_VERSION, NODE_MAJOR and ACTIONLINT_VERSION of runner_tools.py are such constants. The owner rule forbids a test of a pin value, so such a fix pull request cannot pass the check. The check is not required, but devops pr ready refuses a pull request with a failed check.

  6. dan-petty commented on Nov 19, 2026

    @dan-petty
    OwnerAuthor

    A build(deps) title does not avoid this false alarm when the pin is in a .py file under src/. On pull request #6370 (head 606c8c6) the title build(deps): bump gh and ignore CVE-2026-97054 in unfixed tools skipped the Fail-to-Pass job, but the required check Semantic PR title failed:

    The title type `build` is hidden in release-please-config.json, so it ships no release, but this pull request changes runtime code: `src/devops_cli/roadmap/runner_tools.py`. Use one of `feat`, `fix`, `perf`, `refactor`, `revert`.
    

    So a pin bump in a .py file of src/ must have a fix title, and then the Fail-to-Pass job runs and fails, because no test of a pin value is allowed. The two checks read "runtime code" in different ways: release_title counts the pin as runtime code, and the header of fail-to-pass.yml says that a pin under src/ is no code. The fix of this issue must make is_source_code agree with that header for such a change. #6370 keeps the fix(security) title.

  7. changed the title [-]fix(ci): fail-to-pass runs for a tools.lock pin bump[/-] [+]fix(roadmap): keep no tool versions in runner_tools.py[/+] on Nov 19, 2026
  8. added
    owner/agent
    on Nov 19, 2026
  9. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  10. added
    status/in-progress
    and removed
    status/new
    on Nov 19, 2026
  11. added
    status/in-review
    and removed
    status/in-progress
    on Nov 19, 2026
  12. removed
    status/in-review
    owner/agent
    on Nov 19, 2026
  13. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-19 17:17 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/cisource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions