Repository navigation
Description
Problem
Generated files hold copies of tool versions that drift:
- osv_scanner.py writes the CycloneDX
metadata.tools[].version(:213) and seeds the digest of the empty database with a version (:103). - devcontainer.json.j2:10-37 adds a features block to the
devops devcontainer init --imagepath. It has drifted (node:1 against node:2), and its python else-branch is never reached. - The knowledge base holds 27
name==versionpins in devops_cli/python_packages.md (3 already differ from uv.lock) and one pin each in libraries/bandit_actionlint.md, httpx2.md, pydantic_ai_harness.md and ruff_mypy_pytest.md.
Change
- osv_scanner.py: omit the optional CycloneDX
metadata.tools[].version(:213), seed the empty-database digest with a fixed string with no version (:103), and fix the docstring (:3). - devcontainer.json.j2:10-37: delete the features block of the
init --imagepath and the unreachable python else-branch. The published image owns the tools. Change test_devcontainer.py:758-780. - Knowledge base: remove the 27 pins of devops_cli/python_packages.md and the one pin in each of the four library articles. Say that pyproject.toml and uv.lock own them. If refactor(ai): drop the knowledge base copies of project docs #3917 deletes python_packages.md first, only the library articles remain.
Renovate. None.
Risk. Low. The osv cache digest changes once. devops devcontainer init --image <other> no longer adds tool features.
Proof
- Scoped pytest of the security, devcontainer and knowledge base tests passes.
git grep -nE '2\.6\.0' origin/main -- src/devops_cli/security/osv_scanner.pyandgit grep -nE '[a-z0-9-]+==[0-9]' origin/main -- src/devops_cli/ai/knowledge_basereturn nothing.
Depends on: none
Proposed design
Problem statement
Remove the copied tool versions from the OSV scanner, the devcontainer template and the knowledge base. These copies go out of date with the real sources. pyproject.toml and uv.lock stay the owners of the package versions.
Acceptance criteria
Requirement: CycloneDX tool metadata has no version
The CycloneDX writer SHALL omit the optional metadata.tools[].version field.
Scenario: Tool entry has no version key
- WHEN A test calls the CycloneDX writer with a fixed scanner name.
- THEN The output has a
metadata.toolsentry withnameand noversionkey.
Requirement: Empty OSV database seed is fixed
The OSV scanner MUST seed the empty-database digest with a fixed string that holds no tool version.
Scenario: Empty database seed has no version
- WHEN A test calls the empty-database seed with no database file.
- THEN The seed equals the fixed string and holds no version number.
Requirement: OSV scanner holds no copied version
The OSV scanner SHALL hold no copied 2.6.0 version string.
Scenario: No copied version in scanner
- WHEN The proof command runs
git grep -nE '2\.6\.0' -- src/devops_cli/security/osv_scanner.py. - THEN The command returns no match.
Requirement: Image init has no features block
The devcontainer template SHALL render the init --image path with no features block.
Scenario: Image path renders no features
- WHEN
tests/test_devcontainer.pyrendersdevcontainer.json.j2withinit --imageand a sample image. - THEN The test passes and the rendered JSON holds no
featureskey and no unreachable Python else-branch content.
Requirement: Image init test checks the image tools
The devcontainer test MUST assert that the init --image path adds no tool features.
Scenario: Updated devcontainer test
- WHEN
tests/test_devcontainer.pyruns theinit --imagecase. - THEN The test passes and asserts that the published image owns the tools.
Requirement: Knowledge-base package pins are gone
The knowledge-base files SHALL NOT hold name==version pins for packages that pyproject.toml and uv.lock own.
Scenario: No package pin remains
- WHEN The proof command runs
git grep -nE '[a-z0-9-]+==[0-9]' -- src/devops_cli/ai/knowledge_base. - THEN The command returns no match.
Requirement: Knowledge base names the version owners
The edited knowledge-base articles SHALL state that pyproject.toml and uv.lock own the package versions.
Scenario: Version owners are named
- WHEN The proof command runs
git grep -nE 'pyproject[.]toml|uv[.]lock' -- src/devops_cli/ai/knowledge_base. - THEN The command returns at least one match for each owner.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this cleanup: the change removes copied version strings and a template block. It builds no code, so the build cost is zero tokens and zero elapsed time. The edit touches the scanner, the template, the knowledge-base files and their tests.
Key questions
- Which files own the package versions after the copied pins go?:
pyproject.tomlanduv.lockown the package versions. The knowledge-base articles SHALL point to them and SHALL NOT repeat aname==versionpin. [sources: pyproject.toml, uv.lock] - Should the knowledge-base articles keep
name==versionpins?: No. The articles SHALL remove the pins and SHALL state thatpyproject.tomlanduv.lockown the versions. (best practice) [sources: pyproject.toml, uv.lock]- Chosen: Remove the pins and point to the lock files. One source owns each version, so the articles cannot drift.
- Rejected: Keep the pins and update them by hand. The body reports that three pins already differ from
uv.lock. - Rejected: Keep the pins and add a drift check. A check adds work and still keeps two sources.
- Should the devcontainer
init --imagepath keep a features block?: No. The published image owns the tools, so the template SHALL delete the features block and the unreachable Python else-branch. (best practice) [sources: src/devops_cli/templates/devcontainer.json.j2:10-37]- Chosen: Delete the features block. The published image owns the tools, and the block already drifts from the image.
- Rejected: Update the features block. It copies tool versions again and will drift.
- Rejected: Keep the Python branch only. The body says the Python else-branch is never reached.
- Should the CycloneDX writer keep
metadata.tools[].version?: No. The writer SHALL omit the optional version field. (best practice) [sources: src/devops_cli/security/osv_scanner.py:213]- Chosen: Omit the optional version field. The field is optional and copies a tool version that drifts.
- Rejected: Keep the version and update it with the lock. It adds a second source for the same version.
- What seed does the empty OSV database use?: A fixed string with no tool version. (best practice) [sources: src/devops_cli/security/osv_scanner.py:103]
- Chosen: Fixed string with no version. The digest identifies the empty database, not the scanner version.
- Rejected: Scanner version string. It copies a version and changes the digest at each scanner release.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 19, 2026
Both address drifted versions in the knowledge base, but 3904 generates a digest from code at run time while this candidate deletes specific hardcoded version pins from five files.devops-cli-service commentedon Nov 19, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
dan-petty commentedon Nov 19, 2026
Scope note from #6414 (PR #6472), owner rules of 2026-11-19 ("podman should replace docker"; no Docker CLI in the devops-cli container): the template
src/devops_cli/templates/devcontainer.json.j2must follow the devops-cli devcontainer once PR #6472 merges.init --imagepath goes (this item already plans it), and with itdocker-in-docker:2.publishedpath usesghcr.io/dan-petty/devops-cli/devcontainer, which then holds podman-in-podman withdockerCompatand no Docker CLI. Give that path the sameremoteEnvvalue as.devcontainer/devcontainer.json:"DOCKER_HOST": "unix:///var/run/docker.sock". The reason is in feat(podman-in-podman): add the podman-in-podman Feature 1.0.0 devcontainer-features#5 (thepodman-dockerprofile script points a bash login shell at a socket where no service runs).DOCKER_CLI_HINTSincontainerEnvhas no effect without the Docker CLI: remove it..devcontainer/devcontainer.jsonafter fix(devcontainer): build the devcontainer image FROM devtools #6414.docs(openspec): plan #6412 drop copied tool versions
devops-cli-service commentedon Nov 20, 2026
Released in v0.182.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.182.2
devops-cli-service commentedon Nov 20, 2026
Live since 2026-11-20 02:10 UTC