Repository navigation
fix(install): policy-blocked install names a runnable next step - #4418
Merged
Daniel Meppiel (danielmeppiel) merged 678 commits intoNov 21, 2026
Merged
Daniel Meppiel (danielmeppiel) merged 678 commits into
Daniel Meppiel (danielmeppiel) merged 678 commits into
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]> # Conflicts: # scripts/architecture_linter/checks/install_trust_integrity.py # src/apm_cli/install/services.py # tests/fixtures/lifecycle_bug_ledger.json
…4370 Co-authored-by: Copilot App <[email protected]>
… so --skill '*' reaches APM Co-authored-by: Copilot App <[email protected]>
…configured width Co-authored-by: Copilot App <[email protected]>
… later (req-lk-002) Co-authored-by: Copilot App <[email protected]> # Conflicts: # src/apm_cli/deps/lockfile.py # tests/fixtures/lifecycle_bug_ledger.json
When apm deny or org policy tightening changes the executables gate's decision for a locked package, install --frozen and audit --ci now exit 1 naming the package with its recorded and current status and the repair. Both route through the exec_gate staleness owner apm update uses (stale_exec_decisions; lock_exec_decisions_stale delegates to it), and never re-derive trust. Covers merged-config targets (claude settings.json) where no recorded file goes missing. Frozen never writes the lock; deny still wins. The frozen guard requires the owner, with mutation cases. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]> # Conflicts: # src/apm_cli/deps/lockfile.py # tests/fixtures/lifecycle_bug_ledger.json
Install reference (frozen mode), baseline-checks reference (exec-status-current), and the deny retirement note. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
A dependency denied by org policy ended apm install --frozen with "Install blocked by org policy -- see violations above" and no next step. The refusal now says to remove or replace the blocked dependencies in apm.yml, points at apm policy status, and says to re-run the install. The troubleshooting pages quote the new line. The native audit-ci policy-dep-deny gate row, whose last failure was this missing step, loses its strict #4154 mark. Fixes #4404 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
#4417 (#4110) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
A nested copy staged before its parent no longer occupies the parent's backup path; both staging orders roll back byte for byte. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Five Ev() citations in tests/lifecycle/generator/rules.py pointed at lines that moved (three already stale on main, two shifted by train merges); obligations regenerated with python -m tests.lifecycle.generator. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 16:38
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/fixtures/lifecycle_bug_ledger.json
Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/fixtures/lifecycle_bug_ledger.json
…ozen-verified-copy-4389 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ential tried (#4322) - A requested package that validation rejects withdraws the ref pins it staged, so a partly successful install records pins only for the plugins it installs (extends #4194). - AuthResolver records each secondary credential source sent (gh auth token, git credential helper, ADO chain steps) and the not-found diagnostic names every source tried, in order, never values (extends #4174). Item 3 (cleanup scan cost) landed in #4284 (66032cf). Co-authored-by: copilot-swe-agent[bot] <[email protected]>
… the reconciler (#4230) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]> # Conflicts: # src/apm_cli/install/local_bundle_handler.py # src/apm_cli/integration/mcp_integrator_install.py # tests/fixtures/lifecycle_bug_ledger.json # tests/lifecycle/generator/rules.py # tests/quality/lifecycle_obligations.json # tests/unit/core/test_auth_phase3.py
…ead of re-recording it Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/fixtures/lifecycle_bug_ledger.json
…N_INTERACTIVE and CI Co-authored-by: Copilot App <[email protected]>
… cell Each user-scope negative cell now runs a project-scope install from the same HOME checkout, which the published policy blocks, so the negatives cannot pass vacuously. An installed-CLI cell asserts the user manifest's pre-install script runs once with no project script reported as skipped. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/fixtures/lifecycle_bug_ledger.json
This was referenced Nov 20, 2026
…ries keys validated under both contracts Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/fixtures/lifecycle_bug_ledger.json
Co-authored-by: Copilot App <[email protected]>
cli.py defined its lazy _check_and_notify_updates wrapper, so tests that patch apm_cli.cli._check_and_notify_updates patched an owner they import (AQ004). The wrapper now lives in apm_cli/update_notice.py; cli.py imports it under the same name, so the patch target and startup budget are kept. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/fixtures/lifecycle_bug_ledger.json # tests/lifecycle/scenarios/test_concurrency.py
…dius slice, lazy CLI imports, linter cache, shard file lists, mutation floors, receipts gate) Co-authored-by: Copilot App <[email protected]>
… probe, not owner patches (#4407) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
The row cited an issue-less pending reason; it fails the same I4 as the other uninstall-rebuild native rows, tracked by #4446. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
… so --skill '*' reaches APM Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…names unhashed rows Under require_hashes both readers refuse and name the row; by default both accept it alike. The dependency-content-hashes audit check names the rows. apm-spec-waiver: aligns which local package copy install, --frozen, update and audit --ci read; req-lk-015 refusal and diagnostic unchanged Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…rity-4356' into danielmeppiel-frozen-verified-copy-4389
… against its pin before use Co-authored-by: Copilot App <[email protected]> # Conflicts: # scripts/architecture_linter/checks/install_deployment_analyzers.py # tests/fixtures/lifecycle_bug_ledger.json
…--ci, install, --frozen and update Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/integration/test_trust_integrity_consistency_lifecycle.py
…pies that match the lock Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]> # Conflicts: # src/apm_cli/commands/install.py # src/apm_cli/install/phases/resolve.py # tests/fixtures/lifecycle_bug_ledger.json # tests/lifecycle/generator/rules.py # tests/quality/lifecycle_obligations.json # tests/utils/lifecycle_evidence.py
Co-authored-by: Copilot App <[email protected]>
native.py keeps every strict cell still failing on the merged tree: the re-keyed #4444/#4445/#4446/#4447 rows and the train #3703 native-plugin rows; the #4154 and #4225 cells whose fixes are in are dropped (35 native rows: 23 pass, 12 strict xfail). Co-authored-by: copilot-swe-agent[bot] <[email protected]>
6 of 10 tasks
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…ent owner now covers
Required now: G|update|definition-changed|hook, G|update|policy-dep-deny|{hook,lsp,mcp},
G|uninstall-prune-rebuild|definition-changed|mcp and
G|uninstall-prune-rebuild|org-enables-gate|native. Verified with --runxfail on
#4418 merged with this branch; the update and uninstall rows fail there without it.
Co-authored-by: Copilot App <[email protected]>
5 of 14 tasks
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-frozen-policy-next-step
branch
November 21, 2026 05:24
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 org policy denies a dependency,
apm install --frozenended with:The line gave no next step. It now reads:
src/apm_cli/install/phases/policy_gate.pyPolicyViolationErrormessage appends the runnable next step. The prefix is unchanged, so existing troubleshooting anchors still match.docs/src/content/docs/troubleshooting/common-errors.md,troubleshooting/index.mdtests/lifecycle/security/gate_slices/native.py,tests/quality/generated_obligations.json#4154marks (Refs #4154). The 17 rows that pass on this head become required witnesses. The 8 that still fail are keyed to open issues, one per exact failure (list below)._NOT_APPROVABLEand the issue-less_UNINSTALL_SIBLINGreason are removed._PLUGIN_UNLOCKEDand the `GFailing before (I3: "install --frozen exited 1 without a remediation"), passing after:
G|audit-ci|policy-dep-deny|hook,G|audit-ci|policy-dep-deny|lsp,G|audit-ci|policy-dep-deny|mcpG|audit-ci|policy-dep-deny|native.Native rows now required (pass on head 5b9c304):
G|{install,frozen,audit-ci}|{definition-changed,local-deny,org-deny,policy-dep-deny,revoke-approval}|native(exceptG|audit-ci|definition-changed|native), plusG|update|{local-deny,org-deny,revoke-approval}|native.Native rows still failing, re-keyed (from runs on heads 5b9c304 and 0d87573; the train-2 merge kept them unchanged):
G|update|definition-changed|native-> apm update keeps a native Claude plugin's executables deployed after their definition changed since approval #4444 -> I4:p-native-claude/native/claude still deployed but not allowedafterapm update --yesG|update|policy-dep-deny|native-> apm update exits 0 under an org policy that denies an installed native Claude plugin #4445 -> exit:'apm update --yes' exited 0, model expects [1]G|uninstall-prune-rebuild|definition-changed|native-> apm uninstall of another package leaves a native Claude plugin deployed after it is no longer allowed #4446 -> I4:p-native-claude/native/claude still deployed but not allowedafterapm uninstall <p-skill>G|uninstall-prune-rebuild|local-deny|native-> apm uninstall of another package leaves a native Claude plugin deployed after it is no longer allowed #4446 -> I4: sameG|uninstall-prune-rebuild|org-deny|native-> apm uninstall of another package leaves a native Claude plugin deployed after it is no longer allowed #4446 -> I4: sameG|uninstall-prune-rebuild|policy-dep-deny|native-> apm uninstall of another package leaves a native Claude plugin deployed after it is no longer allowed #4446 -> I4: sameG|uninstall-prune-rebuild|revoke-approval|native-> apm uninstall of another package leaves a native Claude plugin deployed after it is no longer allowed #4446 -> I4: sameG|uninstall-prune-rebuild|org-enables-gate|native-> apm uninstall of another package leaves a native Claude plugin deployed after it is no longer allowed #4446 -> I4 (was an issue-less S-pending reason)G|audit-ci|definition-changed|native-> audit --ci passes a local dependency whose content changed since the lock, which install --frozen refuses #4447 -> I3:audit --ci exited 0 but install --frozen exited 1audit --ciandinstall --frozenalready agreed on the verdict; only the next step was missing.No owner id touched.
Issue and approved scope
Fixes #4404
Refs #4154
Human scope-approval comment: posted on #4404 by the PM.
Does this PR complete the issue? Yes.
Type of change
Testing
Verification (own venv):
pytest tests/lifecycle/security/test_gate_removal.py -k "audit-ci and policy-dep-deny"(APM_E2E_TESTS=1): 4 passed. On main: 3 failed and 1 xfailed.pytest tests/lifecycle/security/test_gate_removal.py -k "native and not native-plugin": 21 passed, 9 xfailed.python -m tests.lifecycle.witnesses: the native rows match. Remaining drift is pre-existing journey (J|...) entries on main and is not part of this PR.pytest tests/unit -k "policy_gate or policy and install": 297 passed.pytest tests/quality/test_lifecycle_bug_ledger.py tests/quality/test_promise_obligations.py tests/quality/test_gate_cell_obligations.py: 34 passed.python -m tests.lifecycle.generator --check: up to date.Changelog
## [Unreleased]inCHANGELOG.mdSpec conformance (OpenAPM v0.1)
Co-authored-by: Copilot [email protected]