Repository navigation
Closed
Labels
effort/lowEffort Low: little workpriority/p2-mediumPriority P2: standard worksource/agentFiled by an agenttype/refactorType refactor: a new structure, same behaviorvalue/lowValue Low: the delivery of the item matters little
Description
Friction
Product code holds a switch that exists only for tests, which docs/TESTING.md rules out: "Product code holds nothing for tests". The switch is DEVOPS_CLI_SKIP_TOOL_BOOTSTRAP.
Evidence
_bootstrap_managed_toolsinsrc/devops_cli/commands/devcontainer.pyreturns early whenDEVOPS_CLI_SKIP_TOOL_BOOTSTRAPis1,trueoryes.- Its only callers are tests:
- the autouse
isolate_devcontainer_envfixture intests/test_devcontainer.py; - the unit test that checks the switch.
- the autouse
- Its task file (DevContainer Post-Create Automatically Bootstraps Missing DevOps Tools #620) says it was added "for fast hermetic test isolation".
- The public
--skip-toolsoption ofdevops devcontainer post-createdoes the same thing for a person. No documentation, image or workflow sets the variable.
Remedy
- Remove the environment check and its unit-test case.
- Tests that run post-create pass
--skip-tools, orskip_tools=Trueto_run_post_create_lifecycle. Tests that check managed tools answerinstall_managed_tools' process edge through the shared fake. - Every assertion stays.
Acceptance criteria
-
DEVOPS_CLI_SKIP_TOOL_BOOTSTRAPno longer appears insrc/ortests/. - No test that runs post-create starts uv, an installer or a download.
-
uv run devops cipasses.
Proposed design
Problem statement
Product code in src/devops_cli/commands/devcontainer.py holds an environment variable check (DEVOPS_CLI_SKIP_TOOL_BOOTSTRAP) that exists only for tests. This violates the rule in docs/TESTING.md that product code holds nothing for tests. The existing skip parameter and the public --skip-tools flag already provide the same behavior, so the env var check is redundant.
Acceptance criteria
- Criterion 1: DEVOPS_CLI_SKIP_TOOL_BOOTSTRAP no longer appears in src/ or tests/
Verification: grep -r "DEVOPS_CLI_SKIP_TOOL_BOOTSTRAP" src/ tests/ returns no matches and exits non-zero - Criterion 2: No test that runs post-create starts uv, an installer, or a download
Verification: uv run pytest tests/test_devcontainer.py passes with the hermetic floor active and no process refusal is raised - Criterion 3: uv run devops ci passes
Verification: uv run devops ci exits with code 0
Key questions
- Where is the DEVOPS_CLI_SKIP_TOOL_BOOTSTRAP check in product code?: In _bootstrap_managed_tools in src/devops_cli/commands/devcontainer.py, the line if os.environ.get("DEVOPS_CLI_SKIP_TOOL_BOOTSTRAP", "").strip().lower() in ("1", "true", "yes"): return [] [sources: src/devops_cli/commands/devcontainer.py]
- Does the skip parameter already provide the same early-return behavior?: Yes. The first check in _bootstrap_managed_tools is if dry_run or skip: return [], and the skip parameter is wired from skip_tools in _run_post_create_lifecycle and from the --skip-tools CLI flag in the post_create command. [sources: src/devops_cli/commands/devcontainer.py]
- What do tests currently use to skip tool bootstrap?: The autouse isolate_devcontainer_env fixture in tests/test_devcontainer.py sets the DEVOPS_CLI_SKIP_TOOL_BOOTSTRAP environment variable. [sources: tests/test_devcontainer.py]
- What should tests use instead of the env var?: Tests that run post-create pass skip_tools=True to _run_post_create_lifecycle, or pass --skip-tools through the CLI. Tests that check managed tools answer install_managed_tools' process edge through the shared fake. (proposed)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
effort/lowEffort Low: little workpriority/p2-mediumPriority P2: standard worksource/agentFiled by an agenttype/refactorType refactor: a new structure, same behaviorvalue/lowValue Low: the delivery of the item matters little
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 20, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
The candidate proposes a refactor to remove test-specific code from product code, which aligns with the type/refactor category.This change improves code hygiene and adherence to project guidelines but does not address a critical issue or introduce new functionality.The change improves code quality but has minimal impact on end-user experience or project functionality.The task involves removing a simple environment check and updating tests, which is straightforward.dan-petty commentedon Oct 28, 2026
Status set to Ready at 4da1e34 (see proposed design in issue body).