Skip to content

chore(tools): remove devops install-tools and tools.lock #4363

Description

@dan-petty

Problem

devops install-tools and src/devops_cli/tools_lock/ (tools.lock, the semgrep, bandit and ansible-core requirement files, and the npm package folders) make devops-cli a second package manager: each tool version is a copy that custom Renovate managers keep. Owner decisions of 2026-11-19: every tool moves into the devtools image (dan-petty/devtools#1: apt where sid is current, else mise with mise.lock; Python tools through uv; Node tools from one package.json and lock), and devops-cli is not a package manager. After the earlier items of this program, no reader of the command or the lock stays.

Change

  • Delete commands/install_tools.py, its main.py:52 registration and HELP.install, the src/devops_cli/tools_lock package (tools.lock, __init__.py, versions.py, the semgrep, bandit and ansible-core .in and .txt files and the devcontainers-cli package folder; build(npm): make openspec and style-dictionary devDependencies #6409 moves openspec and style-dictionary), plan_install_tools (devcontainer_plans.py:66-110), CONST_TOOLS_LOCK_REPO_DIR (constants.py:240), the tools_lock audit rows (ci.py:893-910; the devtools CI audits those locks now), the research/python_pins.py:22 path, the install-tools messages and errors (messages.py:449,511,1339-1344,1573, errors.py:163,482), the hint at argocd_gate.py:236 and Makefile:4.
  • Keep the RUNNER_TOOLS presence table, and rename its TOOLS_LOCK source.
  • Tests: delete tests/commands/test_install_tools.py, test_devcontainer_install_tools_dry_run.py, tests/tools_lock/, tests/support/tools.py, test_release_download_retries.py:42-65 and test_mcp_server_image.py:114-127. Rewrite test_scanner_contract.py:94-125 (a scanner is on PATH). Add no grep test for the removed names: after the deletion it has nothing to guard (owner rule of 2026-11-16).
  • Owner decisions of 2026-11-19 on copy and floor tests: delete tests/tools_lock/test_k8s_cloudflared.py with its tag floor (:16-35), and add the cluster cloudflared image to third-party-image-scan.yml (the image-scan action of ci(security): scan each image with one Trivy action and SARIF #6405) in its place. Delete the vendored gh-dash schema (tests/fixtures/gh_dash_schema/), its test and Renovate packageRule 25. The resolve_devops_argv checks stay.
  • Docs: docs/commands/install-tools.md, CLI_REFERENCE.md:14,88, README.md:141, CONTRIBUTING.md:186, DESIGN.md:45-52, CLUSTER.md:172, k8s/README.md:861,1339 and ROUTINE_TASKS.md:191. The docs say: use the devtools image. On another host, such as macOS, run mise install with the mise.toml of the devtools repository. Owner decision of 2026-11-19: this replaces the darwin path of tools.lock. chore(tools): update semgrep past 1.182.0 when an Intel-Mac wheel returns #6100 (semgrep held for an Intel-Mac wheel) then moves to dan-petty/devtools.
  • Specs: remove tools-lock-install.
  • homelab must not bump k8s/devops-cli-copy.json past this release before dan-petty/homelab#70 merges.

The earlier refined design of this issue kept the repin command of #4902 and a grep invariant test. Both go: #4902 is closed as not planned, and the owner rule of 2026-11-16 forbids such file-content tests. The requirement and npm files move to the devtools repository, not to .devcontainer/tools/.

Renovate. Remove the tools.lock pattern of customManagers[5], customManagers[6] and [12]-[15], the pip-compile block, packageRule 1 (tools lock group) and the semgrep held-fix rules 29-30 (now in the devtools repository). Rewrite packageRules 3 (lock file maintenance), 13 and 14 (drop 'the tools lock'), 20 (bandit: pyproject only) and 23 (openspec, if #6409 has not), and remove every prBodyNote that says 'devops install-tools'. Keep packageRule 2 for the shipped harbor Dockerfile with a new description.

Risk. Medium. A large deletion of a public command (pre-1.0). The install path for a plain host is mise install with the devtools mise.toml.

Proof

  • git grep -lE 'install-tools|install_tools|tools_lock|tools\.lock' origin/main -- . ':!docs/adr' ':!openspec/changes/archive' ':!docs/agent/archive' ':!CHANGELOG.md' returns nothing.
  • devops install-tools exits with an unknown-command error.
  • renovate-config-validator passes on .github/renovate.json.
  • Scoped pytest and the CI run are green, and third-party-image-scan.yml scans the cloudflared image.

Depends on: #5585, dan-petty/homelab#70, #4362, #4388, #6409, #6414, #4361, #6416

Alternatives check of 2026-11-19: not-applicable.
Class: chore, no search.
Tool: none found.

Proposed design

Problem statement

devops-cli keeps a second package manager: devops install-tools and src/devops_cli/tools_lock/ copy each tool version that custom Renovate managers update. The owner decided on 2026-11-19 that every tool moves into the devtools image and that devops-cli is not a package manager. This item deletes the command, the lock, its readers, its tests and its docs, and sends a reader to the devtools image.

Acceptance criteria

Requirement: No install-tools command

The CLI SHALL expose no command named install-tools.

Scenario: Unknown command

  • WHEN uv run devops install-tools runs on the change.
  • THEN The command exits with code 2 and prints No such command.

Requirement: No tools_lock package

The repository MUST hold no src/devops_cli/tools_lock package.

Scenario: The package is gone

  • WHEN git ls-files src/devops_cli/tools_lock runs on the change.
  • THEN The command prints no path.

Requirement: No reader of the removed names

The repository MUST hold no reference to install-tools, install_tools, tools_lock or tools.lock outside the archived records.

Scenario: The grep finds no path

  • WHEN git grep -lE 'install-tools|install_tools|tools_lock|tools\.lock' -- . ':!docs/adr' ':!openspec/changes/archive' ':!docs/agent/archive' ':!CHANGELOG.md' runs on the change.
  • THEN The command prints no path and exits 1.

Requirement: No tools-lock constant

The source MUST hold no CONST_TOOLS_LOCK_REPO_DIR.

Scenario: The constant is gone

  • WHEN git grep -n 'CONST_TOOLS_LOCK_REPO_DIR' -- src runs on the change.
  • THEN The command prints no path and exits 1.

Requirement: Runner tools name the devtools image

The RUNNER_TOOLS table SHALL keep every tool and name its source DEVTOOLS_IMAGE.

Scenario: The source is renamed

  • WHEN uv run pytest tests/roadmap/test_roadmap_runner_tools.py runs on the change.
  • THEN The test exits 0 and each entry names DEVTOOLS_IMAGE, with no entry naming TOOLS_LOCK.

Requirement: The generated docs are current

The change MUST regenerate the docs after it removes the install-tools page.

Scenario: The docs row passes

  • WHEN uv run devops ci docs runs on the change.
  • THEN The command exits 0 and reports that the generated docs are current.

Requirement: The tools-lock-install capability is gone

The change MUST remove the tools-lock-install capability and its spec delta.

Scenario: The capability is gone

  • WHEN git grep -n 'tools-lock-install' -- openspec ':!openspec/changes/archive' runs on the change.
  • THEN The command prints no path and exits 1.

Requirement: The Renovate config is valid

The Renovate config MUST pass its validator and name no manager for tools.lock.

Scenario: The config validates

  • WHEN renovate-config-validator .github/renovate.json runs on the change.
  • THEN The command exits 0 and reports no error.

Requirement: The image scan covers cloudflared

The third-party image scan MUST scan the cluster cloudflared image.

Scenario: The scan runs

  • WHEN The third-party-image-scan workflow runs.
  • THEN The run reports a result for cloudflare/cloudflared.

Requirement: The CI gate passes

The change MUST pass the CI gate with the deleted tests and fixtures.

Scenario: CI runs

  • WHEN uv run devops ci runs on the change.
  • THEN The command exits 0.

Existing Tool Considered

The alternatives check of 2026-11-11 recorded not-applicable for this chore and made no search; its block is in the issue body. The open, maintained tool that covers the need is mise (MIT), through the devtools image at dan-petty/devtools. The devtools mise.toml holds the versions and mise.lock the checksum of each platform, and Renovate has a mise manager. mise installs no apt package, so a tool that sid carries current comes from apt in that image. This item writes no code: it deletes the command, the lock and their readers, so it has no build cost.

Key questions

  • Which files hold the command, the plan, the constant, the table and the audit rows that this item deletes or renames?: The command is src/devops_cli/commands/install_tools.py, and src/devops_cli/main.py registers it with HELP.install. The plan is plan_install_tools at src/devops_cli/devcontainer/devcontainer_plans.py:66-110. The lock path is CONST_TOOLS_LOCK_REPO_DIR at src/devops_cli/config/constants.py:240, and src/devops_cli/commands/ci.py reads it for the audit rows. The presence table is RUNNER_TOOLS at src/devops_cli/roadmap/runner_tools.py:78, and its TOOLS_LOCK source is the name to rename. The cloudflared floor test is tests/tools_lock/test_k8s_cloudflared.py. [sources: src/devops_cli/commands/install_tools.py, src/devops_cli/main.py, src/devops_cli/devcontainer/devcontainer_plans.py:66, src/devops_cli/config/constants.py:240, src/devops_cli/commands/ci.py, src/devops_cli/roadmap/runner_tools.py:78, tests/tools_lock/test_k8s_cloudflared.py]
  • What name does the TOOLS_LOCK source of the RUNNER_TOOLS table take?: DEVTOOLS_IMAGE. The table keeps every tool, and the source states that the devtools image holds it. (best practice) [sources: src/devops_cli/roadmap/runner_tools.py:78]
    • Chosen: DEVTOOLS_IMAGE. The tools come from the devtools image after this change, and the name states that origin.
    • Rejected: Keep TOOLS_LOCK. The name points at the lock that this item deletes.
    • Rejected: IMAGE. It does not say which image, and the runner uses more than one.
  • How does a plain host install the tools after the removal?: Run mise install with the mise.toml and mise.lock of the devtools repository. On another host, such as macOS, the same command replaces the darwin path of tools.lock. chore(tools): update semgrep past 1.182.0 when an Intel-Mac wheel returns #6100 (semgrep held for an Intel-Mac wheel) moves to dan-petty/devtools. (best practice) [sources: CONTRIBUTING.md]
    • Chosen: mise with the devtools mise.toml and mise.lock. The owner decision of 2026-11-19 puts each tool in the devtools image, and mise is MIT, maintained and checks each checksum.
    • Rejected: Keep devops install-tools. The owner decision of 2026-11-19 says that devops-cli is not a package manager.
    • Rejected: Hand-written download and sha256 lines in each Dockerfile. Each line is a copy that no manager updates, which is the problem this item solves.
  • Does the change add a test that greps for the removed names?: No. The deletion gets no test, and the proof commands show it. The owner rule of 2026-11-16 forbids a test of file content, and the removed names have no reader to guard. (best practice) [sources: CONTRIBUTING.md, docs/TESTING.md]
    • Chosen: No grep test. A deletion gets no test, and the proof commands show the result.
    • Rejected: Add a grep test. It guards nothing after the deletion, and the owner rule forbids a test of file content.
  • How does the cloudflared version floor stay guarded after tests/tools_lock/test_k8s_cloudflared.py goes?: Add the cluster cloudflared image to third-party-image-scan.yml. The cluster image is cloudflare/cloudflared in k8s/cloudflared/deployment.yaml. The image scan reports a newer release, and no test reads the manifest. (best practice) [sources: tests/tools_lock/test_k8s_cloudflared.py, k8s/cloudflared/deployment.yaml]
  • Does the vendored gh-dash schema stay?: No. Delete tests/fixtures/gh_dash_schema/, its test and Renovate packageRule 25. (best practice) [sources: .github/renovate.json]
    • Chosen: Delete the schema, its test and packageRule 25. It is a hand-kept copy that a custom Renovate rule must update, and the owner decision of 2026-11-19 chose the deletion.
    • Rejected: Keep the vendored schema. It keeps a hand-kept copy that a custom Renovate rule must update.
  • Does a deprecated alias keep devops install-tools working?: No. The CLI removes the command with no shim. The project is pre-1.0 and keeps no backwards compatibility. (best practice) [sources: README.md, CONTRIBUTING.md]
    • Chosen: Remove the command with no alias. The pre-1.0 policy removes a legacy shim at once.
    • Rejected: Keep a deprecated alias. It keeps the second package manager that this item deletes.
  • Which command proves that the generated docs are current?: uv run devops ci docs. [sources: CONTRIBUTING.md]

Fit

Fits in one pull request.

Suspected block

dan-petty/homelab#70 must merge before homelab bumps k8s/devops-cli-copy.json past this release.

Dependencies

#5585, #4362, #4388, #6409, #6414, #4361, #6416, #6405

Activity

  1. added
    source/agent
    type/chore
    status/new
    value/medium
    effort/high
    on Nov 10, 2026
  2. dan-petty commented on Nov 10, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/chore. The chore prefix of the title gives the type.
    • Scope: none. The title has the scope tools, and .github/labels.yml declares no scope/tools label. Add the label to the file to give the scope to this item.
    • Priority: P3-Low. This is dead-code cleanup that depends on other items landing first and has no user-facing impact.
    • Value: Medium. Removing 169 files of dead code reduces maintenance burden and confusion.
    • Effort: High. 169 files must be updated or deleted, including tests, documents, and Renovate rules.
    • Related: build(docker): build the runner image FROM devtools with no tool install #4361, which asks for a different change. Both remove usage of devops install-tools, but #4361 removes the callers in Docker and CI while the candidate removes the command, the package, and the lock file after callers are gone.
  3. added
    priority/p3-low
    on Nov 10, 2026
  4. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 1ca0133 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

    The next refine round also looks at the item again when a commit on the default branch changes one of these files: .github/workflows/ci.yml, .github/workflows/copilot-setup-steps.yml, .github/workflows/pr-title.yml, .github/workflows/release.yml, .github/actions/devcontainer-image/action.yml.

  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Alternatives check: not-applicable

    Class: chore. The check makes no search and no model call for an item of this class.

    Tool: none found

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

  6. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Measured evidence for this item: devops install-tools --check and devops install-tools status report a corrupted install as at pin.

    What happened. On 2026-11-09 at 19:18:52 UTC, a helper of the tests wrote the 22-byte stub #!/bin/sh\necho mytool\n into the real user data root /home/vscode/.local/share/devops-cli/tools/ (cause and fix: #4739). On 2026-11-11, 18 files are still stubs: 14 binaries (k9s, argocd, cloudflared, gh-dash, gitleaks, golangci-lint, kube-linter, kubeconform, kubectl-argo-rollouts, osv-scanner, pluto, popeye, tflint, tuicr), semgrep and pysemgrep, bandit and devcontainer.js.

    The defect. devops install-tools --check and status report each of these tools as at pin. _at_pin in src/devops_cli/commands/install_tools.py checks only that the link in the target directory resolves to a file in the version directory. It does not check the content of that file. The installer records no digest of the file that it installed, so no later check can find a changed file.

    Effects that we saw.

    • In another worktree, devops openspec archive reported "Archived" at 19:21:23 and 19:21:47 UTC and moved nothing. openspec was the stub, and the stub exits 0.
    • devops openspec check failed with not JSON: mytool. An agent repaired openspec.js by hand at 19:22:01 UTC.
    • .github/workflows/ci.yml and release.yml check the image with install-tools --check --tool kubectl and --tool helm. That check also accepts a changed file.

    Why no separate bug. A digest check would add code to a command that this item removes. This item removes devops install-tools, tools.lock and the user-level installs, so the removal also removes this defect. The image puts its tools in /usr/local/bin, which root owns. Until this item merges, do not use --check or status as proof that a tool is intact.

  7. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    Scope from the Renovate plan (2026-11-11)

    The owner chose self-hosted Renovate for the 7 Service repositories on 2026-11-11. #4893 tracks it.

    Measured. This issue says that after the removal "Renovate updates the pins in the Dockerfile". Renovate's native digest support (the github-release-attachments datasource) fits only 11 of the 20 Dockerfile download pins:

    • 7 put the version without v in the file name or use a tag prefix: trivy, pluto, tuicr, gitleaks, golangci-lint, promtool, kustomize.
    • 2 are not on GitHub: kubectl (dl.k8s.io) and helm (get.helm.sh).

    What must stay. #4902 adds a repin command (for example devops tools repin <tool> <version>) and Renovate regex managers with postUpgradeTasks that run it. The command writes every platform url and sha256 again in tools.lock, .devcontainer/Dockerfile, Dockerfile and runner_tools.py.

    When this issue removes tools.lock:

    • Move the repin command and its Renovate managers with the pins. Keep them working on .devcontainer/Dockerfile, Dockerfile and runner_tools.py.
    • Remove only the tools.lock managers.
    • Keep the anchored allowedCommands entry of the Renovate CronJob (feat(k8s): run self-hosted Renovate as a CronJob in devops #4905) equal to the command name.
  8. dan-petty commented on Nov 17, 2026

    @dan-petty
    OwnerAuthor

    Owner, 2026-11-17: "what are these tools lock flies? I don't think I need any of that. I don't need to reinvent package management inside of my own src".

    Recommendation for the chain #4361 → #4362 → #4363: hold the tool pins in mise, not in hand-written download and sha256 lines in each Dockerfile.

    • mise (MIT, maintained) reads mise.toml (versions) and mise.lock (the checksum of each platform). Its aqua backend checks checksums and, where the publisher signs, signatures and provenance. Renovate has a mise manager, and GitHub Actions has jdx/mise-action. Python tools (semgrep, bandit, ansible-core) install with uv through mise, and Node tools (openspec, devcontainers-cli, style-dictionary) through its npm: backend.
    • This closes the gap that the 2026-11-12 comment measured: Renovate's own digest support fits only 11 of the 20 Dockerfile download pins, and feat(deps): repin tool downloads and their sha256 for Renovate #4902 found 11 of 20 binaries behind.
    • Dockerfile, the devcontainer image, CI and the runner images run mise install from the same two files, so no pin repeats.
    • Feasibility to confirm first: each of the 31 tools at its pin in the mise/aqua registry for linux-amd64, linux-arm64, darwin-amd64 and darwin-arm64; name any gap and its fallback.

    git grep -lE "install-tools|install_tools|tools_lock|tools\.lock" lists 422 files on 2026-11-17 (169 on 2026-11-10). #6212 repeated this item and is closed as a duplicate.

  9. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.

  10. 14 remaining items

  11. added
    status/in-review
    and removed
    status/in-progress
    on Nov 20, 2026
  12. removed
    status/in-review
    owner/agent
    on Nov 20, 2026
  13. added a commit that references this issue on Nov 20, 2026
  14. devops-cli-service commented on Nov 20, 2026

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

    @devops-cli-service
    Contributor

    Live since 2026-11-21 00:01 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/highpriority/p3-lowsource/agenttype/chorevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions