Repository navigation
red-check-runs-workspace-members/1: The red run of a workspace member's tests uses the workspace environment - #981
Merged
Conversation
…vironment The tests come first and fail until the implementation. The red check runs a unit's new tests at the tests commit in a throwaway worktree with no installed environment. Unit: red-check-runs-workspace-members/1
…vironment With this in, the tests of the previous commit pass. The red check runs a unit's new tests at the tests commit in a throwaway worktree with no installed environment. Unit: red-check-runs-workspace-members/1
…ironment (review round 1) Unit: red-check-runs-workspace-members/1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Start here
Already verified by the pipeline
Review tier:
full— the reviewer classified it fullWhy
The red check runs a unit's new tests at the tests commit in a throwaway worktree with no installed environment. For a Python project that is the root of a uv workspace's folder tree it works:
uv run pytestresolves the workspace root, whose dev group has pytest. For a project that is itself a workspace member (doc-intelligence-pipelines/document_intelligence,agent-assessment) it does not: from the member's folderuv runsyncs only that member, which does not declare pytest, and fails with `Fai… The full reason is in
openspec/changes/red-check-runs-workspace-members/proposal.md.What this pull request does
The red check now runs a uv workspace member's new tests in the workspace environment, so a member whose dependencies are installed only at the workspace level is no longer rejected because pytest fails to start.
uv run --all-packages --frozenfor a project that a workspace root above it within the checkout lists as a member and whose root has auv.lock. Everything else keeps plainuv run.workspace_lock), so the root's own project, a folder the root does not list, a member with its own lock and a workspace with no lock all keep today's command.Based on
main, with nothing unmerged beneath it — ready to merge whenever the checks look right.Unit
red-check-runs-workspace-members/1of change red-check-runs-workspace-members, task group(s) 1.Spec:
openspec/changes/red-check-runs-workspace-members/in the planning repo.Assumptions
This unit assumes nothing unmerged: everything it builds on is already in
main.Verification
This is a unit-test unit: everything it needs is fakes, fixtures or throwaway containers, so GitHub Actions runs the whole of it. No e2e-test run was required.
Left for later
Approved, with these recorded rather than blocking:
uv run --all-packages --frozen pytestagainst a real uv workspace. The profile tests check the argv shape, and the gate test uses a profile that only tells the member command apart from the plain one. A scenario in tests/integration/test_profile_scenarios.py, with a member whose dependency is installed only at the workspace level, would show the red check reach pytest for real.How this was built
Tests were committed first and seen to fail before any implementation existed; the commit order is checked mechanically; lint, formatting and types pass at the tip.
Opened by the spec-driven pipeline. The build agent never merges. The pipeline merges only
a unit review classified
autoand policy allowed; a person merges any other, after checkingthe stack order above.