Skip to content

feat(k8s): add the rust-cargo toolchain preset and runner rows #7341

Not planned

Description

@devops-cli-service

Split from #4648.

dreamscaper uses Rust. An implement run cannot run cargo test, cargo clippy or cargo fmt --check, because cargo and rustc are in neither RUNNER_TOOLS nor NOT_IN_RUNNER. The rust-cargo preset cannot join PRESETS until the devtools image holds these programs: the image smoke test checks every RUNNER_TOOLS row. This part waits on dan-petty/devtools#97, which adds the Rust tools to the devtools image. Acceptance criteria: the toolchain registry holds a rust-cargo preset whose static_check names cargo clippy and cargo fmt --check and whose test_command is cargo test; RUNNER_TOOLS holds cargo and rustc with a non-empty check command; a test reads the first word of each command in each preset and fails when a word is in NOT_IN_RUNNER or in neither table; the image smoke test runs python -m devops_cli.roadmap.runner_tools and proves cargo and rustc; the runner image scan passes with no lowered threshold.

Proposed design

Problem statement

dreamscaper uses Rust. An implement run cannot run cargo test, cargo clippy or cargo fmt --check, because cargo and rustc are in neither RUNNER_TOOLS nor NOT_IN_RUNNER. The rust-cargo preset cannot join PRESETS until the devtools image holds both programs. The image smoke test checks every RUNNER_TOOLS row. This work waits on dan-petty/devtools#97.

Acceptance criteria

Requirement: Rust cargo preset

The toolchain registry SHALL hold a rust-cargo preset whose static_check names cargo clippy and cargo fmt --check and whose test_command is cargo test.

Scenario: Rust preset fields

  • WHEN the toolchain registry test loads PRESETS from src/devops_cli/roadmap/toolchains.py
  • THEN the rust-cargo entry has static_check equal to cargo clippy and cargo fmt --check and test_command equal to cargo test.

Requirement: Rust runner rows

RUNNER_TOOLS SHALL hold cargo and rustc rows, and each row SHALL have a non-empty check command.

Scenario: Rust rows in the runner table

  • WHEN the runner tools test reads RUNNER_TOOLS in src/devops_cli/roadmap/runner_tools.py
  • THEN the cargo and rustc entries exist and each check command is non-empty.

Requirement: Preset command words are runner tools

A test SHALL read the first word of each command in each preset and SHALL fail when that word is in NOT_IN_RUNNER or in neither table.

Scenario: Preset command word check

  • WHEN the test in tests/roadmap/test_roadmap_runner_tools.py reads the first word of each command in each preset
  • THEN the test asserts that each first word is in RUNNER_TOOLS, and it names the preset and the word when the assertion fails.

Requirement: Image smoke test proves Rust tools

The runner image smoke test SHALL prove cargo and rustc through python -m devops_cli.roadmap.runner_tools.

Scenario: Rust tools in the image smoke test

  • WHEN the runner image builds from a devtools image that holds cargo and rustc and the smoke test runs python -m devops_cli.roadmap.runner_tools
  • THEN the command exits 0 and prints the version of cargo and the version of rustc.

Requirement: Runner image scan threshold

The runner image scan SHALL pass with no lowered threshold.

Scenario: Runner image scan

  • WHEN the Runner Image job runs the image scan action on the built runner image
  • THEN the job passes, the action keeps exit-code: "0", and the change lowers no threshold.

Existing Tool Considered

No alternatives check has run. The open, maintained tools that cover the need are cargo and rustc from the Rust toolchain. The change adds registry rows and no code of its own.

Key questions

  • Which table holds cargo and rustc?: RUNNER_TOOLS holds both rows. The implement job needs both commands, and the image smoke test checks every row in that table. (best practice) [sources: src/devops_cli/roadmap/runner_tools.py:119, src/devops_cli/roadmap/runner_tools.py:234, docs/CLUSTER.md:78]
    • Chosen: Add cargo and rustc to RUNNER_TOOLS. The implement job runs cargo commands, and the smoke test checks each row in this table.
    • Rejected: Add both to NOT_IN_RUNNER. That table lists programs that a step does not count on, so the smoke test would not prove them.
  • Which check command should each Rust row use?: Use cargo --version and rustc --version. Each command is short, exits 0, and prints the version that the smoke test needs. (best practice) [sources: src/devops_cli/roadmap/runner_tools.py:119, docs/CLUSTER.md:78]
    • Chosen: cargo --version and rustc --version. The standard version command is fast and prints the installed version.
    • Rejected: cargo test and cargo clippy. A test command needs a Cargo project and takes time; the smoke test needs a version check.
  • Should the runner image scan threshold change?: No. The scan keeps exit-code: "0", and the change lowers no threshold. SECURITY.md records the exception for fixed findings in the devtools binaries. (best practice) [sources: docs/CLUSTER.md:78, AGENTS.md]
    • Chosen: Keep the scan threshold. The exception is recorded, and AGENTS.md rule 5 forbids a lower threshold without the owner.
    • Rejected: Lower the scan threshold. Only the owner can allow a lower threshold, and the issue gives no such decision.
  • Where should the preset command-word test live?: Add the test to tests/roadmap/test_roadmap_runner_tools.py. That module already tests RUNNER_TOOLS and NOT_IN_RUNNER. (best practice) [sources: tests/roadmap/test_roadmap_runner_tools.py, src/devops_cli/roadmap/toolchains.py:75, src/devops_cli/roadmap/runner_tools.py:119]
    • Chosen: Add the test to tests/roadmap/test_roadmap_runner_tools.py. The module already holds the table tests and imports both tables.
    • Rejected: Add a new test module for the preset check. A new module adds a file for one test and duplicates the table fixtures.

Fit

Fits in one pull request.

Suspected block

dan-petty/devtools#97 adds cargo and rustc to the devtools image.

Dependencies

None.

Activity

  1. added
    type/feature
    scope/k8s
    source/agent
    status/new
    value/medium
    effort/medium
    on Nov 26, 2026
  2. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    ContributorAuthor
  3. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See Suspected block in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  4. dan-petty commented on Dec 1, 2026

    @dan-petty
    Owner

    Superseded by the owner decisions of 2026-12-01: the Service jobs give the agent a project-neutral prompt, and the pre-commit hooks of the repository and its pull request CI are the only checks. The toolchain presets and the devops ci command are deleted. See #8040 (implement and fix jobs) and #8039 (stage job). This item extends the toolchain presets.

  5. removed
    status/new
    on Dec 1, 2026
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/mediumpriority/p2-mediumscope/k8ssource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions