Repository navigation
Description
Current Behavior
uv run devops ci --check --only git fails in a devcontainer environment that does not have the review extra. The row records the git transcripts again with the real git and compares them with tests/fixtures/git/review_window.json. The recorded fact lizard.complexity changes from "status": "ok" with numbers to "status": "skipped" with the reason lizard is not installed: install the extra review, for example with uv sync --extra review. The row then fails with The committed git transcripts differ from git version 2.55.0.
The CI toolchain runs uv sync --locked --all-groups --all-extras (.github/actions/setup-toolchain/action.yml:55), so CI has lizard. The .venv of the devcontainer and of a new worktree do not have it. Thus each local full gate fails its git row with no change to the code that the row checks.
Expected Behavior
The local git row gives the same result as CI for the same tree. One of these:
- the devcontainer and
uv runenvironments install thereviewextra, or - the transcript of
lizard.complexitydoes not depend on an optional extra, or - the row tells the operator to install the extra before it compares the transcripts.
Steps to Reproduce
- Make a new worktree from
origin/mainand runuv run devops ci --check --only gitin it. - See the failure and the diff on
lizard.complexity.
Evidence
Found while building #4673 on 2026-11-12. ls .venv/bin/lizard gives "No such file or directory" in the main checkout and in the worktree. lizard comes from the extra review = ["lizard==1.24.3"] of pyproject.toml, added for devops roadmap review run (#4686).
Alternatives check of 2026-11-21: none.
Tool: none found.
Reason: Searches returned only unrelated pages; no open tool installs the pinned lizard dependency, decouples the transcript from the review extra, or guards the row, so this stays a project pyproject, devcontainer and fixture change.
Lacks:
- Default uv environment installs the pinned lizard dependency
- Devcontainer setup matches the CI toolchain extras
- Clear missing-extra message before the transcript comparison
- Review window transcripts stable across optional extras
Proposed design
Problem statement
The local git row and three tests assume the optional review extra, but a new worktree and the devcontainer do not install it. The row then fails on the lizard.complexity fact and reports a transcript diff. The fix makes the default local uv environment install the pinned lizard dependency and gives a clear message when it is missing.
Acceptance criteria
Requirement: Default uv environment includes lizard
The default local uv environment SHALL install the pinned lizard dependency.
Scenario: Fresh worktree imports lizard
- WHEN A developer syncs the default uv environment from the lock file in a fresh worktree.
- THEN The command uv run --no-sync python -c "import lizard" exits 0.
Requirement: Devcontainer includes lizard
The devcontainer environment SHALL install the pinned lizard dependency during setup.
Scenario: Devcontainer import check
- WHEN The devcontainer setup completes.
- THEN The command uv run --no-sync python -c "import lizard" exits 0.
Requirement: Local git row matches CI
The local git row SHALL give the same result as CI for a synced default environment.
Scenario: Git row in a fresh worktree
- WHEN A fresh worktree runs uv run devops ci --check --only git.
- THEN The command exits 0 and prints no transcript diff for lizard.complexity.
Requirement: Review facts test passes without manual extra
The review facts test SHALL pass in the default local environment.
Scenario: Version window facts test
- WHEN A developer runs uv run devops ci test tests/roadmap/project_review/test_review_facts.py::test_the_facts_of_a_version_window.
- THEN The test passes and the lizard.complexity fact has status ok.
Requirement: Git contract tests pass without manual extra
The review_window git contract tests SHALL pass in the default local environment.
Scenario: Review window git contract
- WHEN A developer runs the three review_window tests in tests/core/test_git_contract.py.
- THEN All three tests pass and no lizard.complexity diff appears.
Requirement: Missing lizard message
The git row SHALL name the missing review extra before it compares transcripts when lizard is absent.
Scenario: Git row without lizard
- WHEN The git row runs in an environment where import lizard fails.
- THEN The row exits 1 with a message that names uv sync --extra review and prints no transcript diff.
Existing Tool Considered
No open, maintained tool covers the need. The alternatives check on 2026-11-15 returned none. The change edits pyproject.toml and the devcontainer setup and updates tests; it builds no new code.
Key questions
- Why does the git row fail when the review extra is absent?: The review fact code returns status skipped when import lizard fails, and tests/fixtures/git/review_window.json expects status ok with numbers. [sources: src/devops_cli/roadmap/project_review/facts.py:213, tests/fixtures/git/review_window.json]
- How should the default local uv environment get lizard so the git row and tests match CI?: Add the pinned lizard dependency to the default dev dependency group in pyproject.toml. uv run includes the dev group by default, so a fresh worktree installs lizard without a manual extra. Keep the review extra for installed users. (best practice) [sources: pyproject.toml, .github/actions/setup-toolchain/action.yml:55, src/devops_cli/roadmap/project_review/facts.py:213]
- Chosen: Add lizard to the default dev dependency group. uv run installs the default dev group, so a new worktree gets lizard and the review extra stays optional for installed users.
- Rejected: Skip the tests when lizard is missing. The git row still fails and the local result differs from CI.
- Rejected: Compute complexity without lizard. This builds and maintains a second complexity implementation.
- Rejected: Tell the operator to install the extra as the only fix. The local gate and the tests still fail until the operator acts.
- What should the git row do when lizard is absent?: The row SHALL stop before the transcript comparison and name uv sync --extra review in its error. It SHALL not print a transcript diff. (best practice) [sources: src/devops_cli/roadmap/project_review/facts.py:213, tests/fixtures/git/review_window.json, tests/core/test_git_contract.py]
- Chosen: Stop with a clear install instruction. The operator gets the cause and the command, not a misleading transcript diff.
- Rejected: Skip the comparison with no error. A silent skip hides that the environment differs from CI.
- Rejected: Compare and fail on the diff. This is the current behavior and it hides the missing extra.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 12, 2026
Both touch the review_window.json transcript and the git row of devops ci, but #4865 fixes the transcript content while the candidate fixes the missing lizard dependency that changes the recording.dan-petty commentedon Nov 12, 2026
The same cause also fails a test, not only the
gitrow. In a new worktree fromorigin/main(050a6ef), with noreviewextra,uv run devops ci test tests/roadmap -n 6gives one failure:tests/roadmap/project_review/test_review_facts.py::test_the_facts_of_a_version_window: the factlizard.complexityisskipped(importlib.util.find_spec("lizard")is None,src/devops_cli/roadmap/project_review/facts.py:213), and the test expectsokwith numbers./workspaces/devops-cli/.venv/bin/python -c "import lizard"givesModuleNotFoundErrorin the main checkout too. Found while building #5205 on 2026-11-12. A fix of this issue must also cover the test: install the extra in the local environments, or skip the test where lizard is missing.dan-petty commentedon Nov 13, 2026
The same cause also fails three tests of
uv run devops ci testin a new worktree, not only thegitrow. Found while building #5341 on 2026-11-13, in a worktree at4ef7c6f11:tests/core/test_git_contract.py::test_a_scenario_over_the_process_fake_starts_the_recorded_commands_and_gives_the_result[review_window]tests/core/test_git_contract.py::test_a_scenario_over_the_git_fake_gives_the_recorded_result[review_window]tests/roadmap/project_review/test_review_facts.py::test_the_facts_of_a_version_windowThe diff is the same:
lizard.complexityisskipped, and the test expectsok. Afteruv pip install lizard==1.26.0in the worktree venv, the three tests pass. So a fix of this issue must also cover the test run, for example a skip when the extra is missing.dan-petty commentedon Nov 13, 2026
One more symptom of the same cause, found while building #4851 on 2026-11-13 at origin/main 4ef7c6f: in a new worktree with a plain
uv runenvironment,uv run devops ci test tests/roadmapfails one test,tests/roadmap/project_review/test_review_facts.py::test_the_facts_of_a_version_window. The factlizard.complexityisskippedand notok, becauseimport lizardraisesModuleNotFoundError(the extrareviewis not installed). The test passes in CI, which runsuv sync --all-extras.devops-cli-service commentedon Nov 15, 2026
Alternatives check: none
Reason: Searches for a way to skip tests when an optional dependency is missing, and for installing a uv extra automatically in a devcontainer, returned only unrelated documentation pages, so no open tool or library covers the need. The fix is in the project's own code and configuration: install the
reviewextra in the local devcontainer/uv runenvironments, or make thelizard.complexityfact and the recorded git transcripts independent of it, and cover the tests that expectok.Tool: none found
Lacks:
gitrow and thereview_window.jsontranscript match CI when the optionalreviewextra is missingreviewextra in the devcontainer anduv runenvironmentslizard.complexityindependent of the extratest_review_facts.py,test_git_contract.py) that expectlizard.complexityto beokSearches run:
Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 16, 2026
Status set to Ready at 181f85e (see proposed design in issue body).