Repository navigation
test: pin cwd for deep-coverage CLI fixtures - #3274
Merged
Daniel Meppiel (danielmeppiel) merged 1 commit intoOct 19, 2026
Merged
Conversation
The deep-coverage CLI tests passed the project via `obj={"cwd": ...}`, which
no command reads, so `apm deps list` ran in whatever directory the xdist
worker was left in. When an earlier test removed that directory,
`deps list` exited 1 ("No such file or directory"), failing the v0.34.0
tag run on macOS arm64. The project fixtures now chdir into the project.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 761bf207-57da-41d0-bd3f-ffecbb97b83a
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
October 19, 2026 10:26
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrow fixture changes correctly isolate CLI execution and restore the working directory automatically, with no unresolved findings.
No open issues 🎉
What changed in this PR
Fixes working-directory isolation in deep-coverage CLI tests, addressing a release-gate flake without changing production behavior.
Changes:
- Both project fixtures enter their temporary project directory using
monkeypatch.chdir. - Comments explain why passing
obj["cwd"]does not select the CLI project.
| File | Description |
|---|---|
| tests/integration/test_commands_deep_coverage.py | Pins both project fixtures to the intended working directory. |
Review effort: Balanced
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel/fix-deps-list-flake
branch
October 19, 2026 10:36
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.
Description
tests/integration/test_commands_deep_coverage.pypassed the project to the CLI throughobj={"cwd": ...}, which no command reads, soapm deps listran in whatever directory the xdist worker was left in. When an earlier test had removed that directory,deps listexited 1 ([x] Error listing dependencies: [Errno 2] No such file or directory). This failedtest_deps_list_no_apm_moduleson macOS arm64 in the v0.34.0 tag run (39231396347) and in the 2026-10-14 nightly.The
project_with_deps/project_no_depsfixtures nowmonkeypatch.chdirinto the project, so every test in the file runs against the project it builds.Issue and approved scope
Issue: N/A -- maintainer-directed release-gate repair for v0.34.0 (#3250); follow-up to #3251, #3253, #3262.
Human scope-approval comment: Daniel Meppiel (@danielmeppiel) directed in-session to bypass-merge release-gate fixes "until we can guarantee the release will go through".
Does this PR complete the issue, or what remains? Completes this flake.
Type of change
Testing
Tested locally
All existing tests pass
Added tests for new functionality (if applicable)
Reproduced the cause:
apm deps listfrom a deleted cwd -> exit 1 with the error above.uv run --extra dev pytest tests/integration/test_commands_deep_coverage.py-- 28 passed.ruff check/ruff format --checkon the file -- pass.Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.