Repository navigation
Description
Problem
In the devcontainer, devops roadmap plan-check <n> fails with Required dependency 'openspec' is not installed or not available in PATH.
Post-create installs the locked tools into ~/.local/bin, which is not on PATH. Post-create also installs files at each container creation, so a tool is not part of the image.
Expected
The devcontainer image holds every tool of tools.lock at its locked version, in standard locations: commands in /usr/local/bin, which is on PATH, and the files of a Python or Node tool in /usr/local/share/devops-cli. Post-create installs no locked tool. A rebuild of the image changes a tool.
Evidence
devops roadmap plan-check 4351in the devcontainer prints the error above.~/.local/bin/openspecexists after post-create, and~/.local/binis not in$PATH.
Proposed design
Problem statement
In the devcontainer, devops roadmap plan-check <n> fails because openspec is not on PATH. Post-create installs the locked tools into ~/.local/bin, and that directory is not on PATH. Post-create also installs the tools at each container creation, so the image does not hold them. A rebuild of the image does not change a tool.
Acceptance criteria
Requirement: Commands in a standard location
The devcontainer image SHALL hold the command of every tool of tools.lock in /usr/local/bin.
Scenario: Command on PATH
- WHEN a test reads the Dockerfile and the install step of the image for each tool of
tools.lock - THEN the test finds the command installed in
/usr/local/bin, and no command in~/.local/bin
Requirement: Tool files in a standard location
The devcontainer image SHALL hold the files of each Python or Node tool in /usr/local/share/devops-cli.
Scenario: Files of a Python or Node tool
- WHEN a test reads the install step of the image for a Python tool and a Node tool
- THEN the test finds the tool files under
/usr/local/share/devops-cliand a command in/usr/local/binthat starts the tool
Requirement: Locked versions in the image
The image build SHALL install each tool at the version and the checksum that tools.lock states.
Scenario: Version of a tool
- WHEN a test compares the version of each tool in the install step with
tools.lock - THEN every tool has the locked version, and a tool with no locked version fails the test
Requirement: No locked tool in post-create
Post-create MUST NOT install a tool of tools.lock.
Scenario: Post-create command
- WHEN a test reads the post-create command of
.devcontainer/devcontainer.json - THEN the command runs no install of a locked tool and does not write to
~/.local/bin
Requirement: Rebuild changes a tool
A change of a locked version SHALL change the layer of the image that installs that tool.
Scenario: Changed lock entry
- WHEN a test changes the locked version of one tool and reads the Dockerfile build input
- THEN the install layer of that tool takes the new version from the lock, so a rebuild installs it
Requirement: Commands resolve without a local path
The CI actions that build and smoke-test the devcontainer image MUST NOT need $HOME/.local/bin on PATH to find a locked tool.
Scenario: Smoke test of the image
- WHEN a test reads
.github/actions/devcontainer-image/action.ymland.github/actions/devcontainer-smoke/action.yml - THEN neither action exports
$HOME/.local/binto find a locked tool, and the smoke step runsopenspec --versionfromPATH
Existing Tool Considered
No open tool installs the locked tools of this project with its checksums into an image layer. The project already has its own install code (devops install-tools) that reads tools.lock. The plan reuses that code at image build time with a system prefix, so it adds little new code. The cost is a small change of the Dockerfile and the install code, about one pull request, and a few hours of elapsed time. No check of alternatives has run.
Key questions
- Which Dockerfile step installs the locked tools?: Run the existing locked-tool installer in a Dockerfile layer, with
/usr/local/binas the command directory and/usr/local/share/devops-clias the tool file directory. Pass the lock file into the layer, so that a change of the lock invalidates the layer. (best practice) [sources: tests/commands/test_install_tools.py, docs/adr/0005-review-findings-come-from-tools-not-models.md]- Chosen: Run the project installer in the Dockerfile with a system prefix. It reuses the lock, the checksums and the tests of the project, and the lock change rebuilds the layer.
- Rejected: Add a
~/.local/binentry toPATH. It leaves the tools out of the image and keeps the install at each container creation, which the issue rejects. - Rejected: Write a separate shell install step for each tool in the Dockerfile. It duplicates the versions and the checksums of the lock, and the two copies can differ.
- Which files does the change touch besides the Dockerfile?: The change touches
.devcontainer/devcontainer.jsonfor post-create, the two CI actions that export$HOME/.local/bin, and the tests of the devcontainer. [sources: .devcontainer/devcontainer.json, .github/actions/devcontainer-image/action.yml, .github/actions/devcontainer-smoke/action.yml, tests/invariants/test_devcontainer_config.py, tests/commands/test_devcontainer.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 10, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(devcontainer)scope of the title gives the scope.A command fails in the devcontainer, blocking a workflow, but a manual PATH fix is a workaround.Developers cannot run plan-check in the devcontainer until the fix lands.Requires Dockerfile changes, post-create script edits, and verification of standard install paths.Both deal with tools in the devcontainer, but #620 adds post-create bootstrapping while the candidate removes post-create installs and puts tools in the image at build time.devops-cli-service commentedon Nov 10, 2026
Status set to Ready at 273e4c9 (see proposed design in issue body).
devops-cli-service commentedon Nov 10, 2026
Released in v0.108.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.108.0
devops-cli-service commentedon Nov 10, 2026
Live since 2026-11-10 16:07 UTC