test(install): align shared-file ownership expectation#2120
Conversation
Bump pyproject.toml and uv.lock to 0.24.1 and move the [Unreleased] CHANGELOG block to [0.24.1] - 2026-07-10. PATCH bump: 13 user-facing fixes since v0.24.0 with no new public surface or BREAKING changes. Lint mirror green locally (ruff check + format, pylint R0801, auth-signals). Post-merge: tag v0.24.1 to trigger the release workflow. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use pytest temporary directories for the four default-policy MCP integration cases so subprocess policy discovery receives a valid working directory on Windows as well as POSIX. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Update the cross-package cleanup integration test for the single last-writer ownership contract introduced by #2052, unblocking tagged release validation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Docs sync advisoryVerdict: no_change * Pages affected: 0 * LLM calls: 0/15 * Took: <1s No docs impact detected. Reason: L0 path gate matched a test-only change under |
There was a problem hiding this comment.
Pull request overview
Updates an integration regression test to match the post-#2052 lockfile contract where cross-package shared deployed paths are reconciled to a single (last-writer) owner, aligning release validation expectations without changing production behavior.
Changes:
- Replace the stale “two packages claim shared file” assertion with an ownership assertion aligned to single-writer reconciliation.
Show a summary per file
| File | Description |
|---|---|
tests/integration/test_intra_package_cleanup.py |
Updates the shared-file ownership assertion to reflect single-owner lockfile reconciliation behavior. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Low
| assert {dep["name"] for dep in shared_claims} == {"pkg-b"}, ( | ||
| "Only the last writer may claim the shared prompt before testing cleanup" | ||
| ) |
|
Release-blocking hotfix: v0.24.1 publication is paused because the tag workflow exposed this stale single-owner assertion. All PR checks are green; requesting code-owner approval so the merge queue can proceed. |
fix(release): align shared-file cleanup test with single-owner lockfiles
TL;DR
The v0.24.1 tag workflow exposed a stale integration assertion: the test still expected two packages to claim one deployed path, although #2052 intentionally made ownership single-writer. This PR requires
pkg-b, the last writer, to be the sole lockfile owner while preserving the existing cleanup behavior checks. The correction unblocks release validation without changing production behavior.Important
This is the deterministic failure from v0.24.1 release run 29093268394; no GitHub Release or PyPI publication occurred.
Problem (WHY)
TestCrossPackageSharedFileCleanuprequired two lockfile entries to claim.github/prompts/shared.prompt.md.Why this matters: release evidence must match the shipped lockfile contract. "Grounding outputs in deterministic tool execution transforms probabilistic generation into verifiable action."
Approach (WHAT)
{"pkg-b"}.test_intra_package_cleanup.pyImplementation (HOW)
tests/integration/test_intra_package_cleanup.py-- replaces the obsolete duplicate-owner count with an exact assertion thatpkg-b, the last writer in the manifest order, is the only package claiming the shared prompt. Production lockfile and cleanup code are deliberately untouched.Diagrams
Legend: the dashed node is the corrected assertion; the install and cleanup flow remains unchanged.
flowchart LR subgraph Install[Initial install] A[pkg-a writes shared prompt] B[pkg-b writes shared prompt] end subgraph Lockfile[Lockfile reconciliation] C[Last writer owns path] end subgraph Test[Integration assertion] D["Owner names equal pkg-b"] E[Remove pkg-a prompts] F[Shared survives and only-a is removed] end A --> C B --> C C --> D D --> E E --> F classDef new stroke-dasharray: 5 5; class D new;Trade-offs
Benefits
pkg-b, rather than only checking a count.only-aprompt is removed.Validation
uv run --extra dev pytest -q tests/integration/test_intra_package_cleanup.py::TestCrossPackageSharedFileCleanup::test_shared_file_survives_when_other_package_still_deploys_it:uv run --extra dev pytest -q tests/integration/test_intra_package_cleanup.py:CI lint mirror
.agents/skills/cut-release/scripts/verify-lint-mirror.sh:Scenario Evidence
tests/integration/test_intra_package_cleanup.py::TestCrossPackageSharedFileCleanup::test_shared_file_survives_when_other_package_still_deploys_it(regression-trap for release run 29093268394)How to test
test_intra_package_cleanup.pyfile; observe three passes.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com