Skip to content

fix(install): a positional install reports only denials inside its selection - #4542

Merged
Daniel Meppiel (danielmeppiel) merged 1 commit into
train/0.37-final-2from
danielmeppiel-s42-prefetch-selection
Nov 21, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 1 commit into
train/0.37-final-2from
danielmeppiel-s42-prefetch-selection

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Description

Follow-up to #4534. A positional install (apm install ./pkg, with or without --dry-run) reported, and was blocked by, denied manifest dependencies it did not select: the pre-fetch policy refusal recorded every dependency the resolver walked, and the policy gate appended all of them after the positional selection. install/phases/policy_gate._with_prefetch_denials now applies the same selection filter (selected_subtree_dependencies over ctx.only_packages) to those refusals. A selected denied package, or a dependency it brings in, is still refused.

Issue and approved scope

Issue: Refs #4092

Human scope-approval comment: private release coordination with the 0.37 steward.

Does this PR complete the issue, or what remains? One hardening item under the 0.37 trust and integrity umbrella; the umbrella stays open.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

tests/integration/test_policy_install_e2e.py::TestI10DryRunDenied: the existing positional dry-run cell and a new positional real-install cell both fail on the parent (e3d6977) and pass here. Through the host guard, no xdist: test_policy_install_e2e.py, tests/lifecycle/security/test_policy_deny_before_fetch.py, test_replacement_source_consumers.py, tests/unit/install/phases: 317 passed. ruff 0.15.12, complexity ratchet and assertion-quality check: clean.

…lection

Dependencies refused before fetch are filtered to the install's selection
(the same subtree filter the resolved dependencies get), so a denied
manifest dependency the command did not select neither appears in a
dry-run preview nor blocks the install. A selected denied package, or one
it brings in, is still refused.

apm-spec-waiver: selection scoping of an existing refusal; verdict unchanged for selected deps

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 1efae51 into train/0.37-final-2 Nov 21, 2026
3 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-s42-prefetch-selection branch November 21, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant