Repository navigation
fix(install): name the unfetchable locked package under --frozen (#4909) - #4912
Merged
Daniel Meppiel (danielmeppiel) merged 4 commits intoNov 23, 2026
Merged
Conversation
A failed acquire only recorded a diagnostic, rendered after the install, so the frozen MCP-declarations check raised first and blamed restored MCP declarations. Failed acquisitions now feed enforce_frozen_restored, whose [x] line names each package and prints the recorded cause. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 23, 2026 04:31
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change that reports locked-package restoration failures before derived consistency errors.
No open issues 🎉
What changed in this PR
Fixes #4909 by making apm install --frozen report the locked package that could not be restored and its recorded cause before derived MCP consistency errors, without changing frozen-install semantics.
Changes:
- Routes failed acquisitions through the existing frozen-restoration check.
- Includes affected package names in the refusal header.
- Adds unit and lifecycle regression coverage for diagnostics and unchanged durable state, plus a bug-ledger entry and changelog fragment.
| File | Description |
|---|---|
tests/unit/install/test_frozen.py |
Tests failure collection, package naming, and empty failures. |
tests/integration/test_frozen_unfetchable_lock_lifecycle.py |
Tests an unfetchable locked package, clear diagnostics, and unchanged durable state. |
tests/fixtures/lifecycle_bug_ledger/bugs/4909.json |
Records the bug and links its lifecycle regression test. |
src/apm_cli/install/service.py |
Adds package names to the frozen-restoration refusal header. |
src/apm_cli/install/phases/integrate.py |
Passes failed acquisitions and their causes to the restoration check. |
changelog.d/4912.fixed.md |
Documents the improved frozen-install diagnostic. |
Review effort: Balanced
apm-spec-waiver: diagnostics-only fix; the frozen refusal names the unfetchable package; no OpenAPM-observable semantics change Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
deleted the
cloud-4909-frozen-fetch-diag
branch
November 23, 2026 08:07
This was referenced Nov 23, 2026
Abhishek Kapoor (kapoorsunny)
pushed a commit
to kapoorsunny/apm
that referenced
this pull request
Nov 23, 2026
The GATE reference expected --frozen to refuse only without a lockfile. install.md (Frozen mode) refuses any declared direct dependency the lock has no row for, which microsoft#4912 now enforces; the model was stale. Replays the nightly falsifier (declare, update, declare, audit --ci). Co-authored-by: Copilot App <[email protected]>
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
When
apm install --frozencould not re-download a locked package, thesequential acquire recorded the fetch failure only as a diagnostic (rendered
after the install). The frozen MCP-declarations check then raised first and the
[x]line blamedrestored MCP declarations differ from apm.lock.yaml, hidingthe real cause.
Fix (diagnostics only, frozen semantics unchanged):
install/phases/integrate.py: packages whose acquire failed (nomaterialization, no terminal deltas) are passed, with their recorded error
diagnostic, to the existing owner
InstallService.enforce_frozen_restored,which already runs before the hydrated MCP check.
install/service.py: the refusal header now names the packages:[x] --frozen: locked dependencies could not be restored: test/pkg., followedby the cause line (
- Failed to install test/pkg: Failed to clone ...).apm_modulesbyte-identical). Retry policy and the MCP consistency check areuntouched.
Note for #4891: its lifecycle cell carries a strict Known citing #4909.
Whichever of this PR and #4891 lands second must flip that Known to a passing
assertion.
Lifecycle evidence
Issue and approved scope
Issue: Fixes #4909
Human scope-approval comment: #4909 (comment)
Does this PR complete the issue, or what remains? Completes it.
Type of change
Testing
Validation (single process):
APM_E2E_TESTS=1 APM_BINARY_PATH=$(uv run which apm) uv run --extra dev pytest tests/integration/test_frozen_unfetchable_lock_lifecycle.py -n 0-> failed on main (src stashed), 1 passed with fixuv run --extra dev pytest tests/unit/install/ tests/unit/test_install_pipeline_orchestration.py -n 0 --deselect tests/unit/install/test_unix_install_ownership.py-> 3369 passed (the deselected module fails locally only because the sandbox runs as root)uv run --extra dev pytest tests/quality/test_lifecycle_bug_ledger.py-> 2 passedChangelog
changelog.d/<pr>.<section>.md, holdingone line: user-visible effect first, 25 words or fewer, ending with
(#PR); breaking changes only under upgrade notes; no Highlights; nonew lines under
## [Unreleased]. Seechangelog.d/README.mdand.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
CONFORMANCE.{md,json}regeneratedapm-spec-waiver: diagnostics-only fix; the frozen refusal names the unfetchable package; no OpenAPM-observable semantics change