Repository navigation
fix(exec): canvas skip diagnostic reports a deny (#4052) - #4064
Merged
Daniel Meppiel (danielmeppiel) merged 9 commits intoNov 20, 2026
Merged
Daniel Meppiel (danielmeppiel) merged 9 commits into
Daniel Meppiel (danielmeppiel) merged 9 commits into
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
#3290 moved the canvas skip warning to install/target_warnings.py; the deny-aware wording moves with it. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
#3290 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]>
Merged
6 of 10 tasks
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
marked this pull request as ready for review
November 20, 2026 10:35
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 10:35
apm-spec-waiver: canvas skip diagnostic wording only; no allow, deny, deployment or lockfile change Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The remediation command suggested for denied globally installed canvas dependencies inspects the current project instead, requiring a scope-aware explanation path and global lifecycle test coverage.
1 open issue
What changed in this PR
This PR corrects denied-canvas diagnostics in apm install, extending the hooks diagnostic behavior from #4055 to address #4052 without changing admission or deployment decisions.
Changes:
- Adds a shared skip-message helper that distinguishes hard denies from missing approval.
- Passes install context into canvas and bin diagnostics while preserving hooks wording.
- Adds lifecycle coverage for denied and unapproved canvases, a native-plugin control, and a changelog entry.
| File | Description |
|---|---|
tests/integration/test_bin_canvas_deny_diagnostics_lifecycle.py |
Adds canvas diagnostic regression cases and a native-plugin control. |
src/apm_cli/install/target_warnings.py |
Uses recorded deny state for canvas skip messages. |
src/apm_cli/install/services.py |
Passes install context to canvas and bin diagnostics. |
src/apm_cli/install/exec_gate.py |
Shares deny-aware wording across executable skip messages. |
CHANGELOG.md |
Records the denied-canvas diagnostic correction. |
Review effort: Balanced
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-exec-bin-canvas-deny-4052
branch
November 20, 2026 11:50
Closed
5 of 10 tasks
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…cope contract User scope is not governed by org policy (#4087), so the native bin/ deny control now denies through the user store instead of an org policy discovered from a git checkout at HOME. Bundle admission manifest reads route through core.scope.manifest_file. Co-authored-by: copilot-swe-agent[bot] <[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
TL;DR — When a dependency's canvas extension is hard-denied (org policy or
apm deny),apm installnow says… skipped (denied). Run 'apm policy explain <pkg>' to see which deny applies.instead ofnot approved … Run 'apm approve <pkg>'. The bin/ and canvas skip diagnostics now read the denied-type set the gate already records, as the hooks line does (#4044). Admission, deployment,--trust-bin, lockfileexec_statusand the approval prompt are unchanged.Important
Stacked on #4055 (base
danielmeppiel-exec-pinned-deny-4044, which stacks on #4025). CI does not run on a non-mainbase, so the evidence below is the local CI mirror.Note
Narrowed to canvas (pending the amended #4052 record). Since #3290 a Claude plugin with
bin/at user scope loads natively and its deny is already reported by the native-plugin owner (Parked native plugin X: denied/apm policy explain X); the bin test is now a native-denied control.log_bin_statusstays deny-aware as a defensive branch.Problem (WHY)
check_executable_approval(install/exec_gate.py) already records type-level bin/canvas denies inctx.package_denied_exec_types(viadenied_exec_types, the executable-trust-context owner).log_bin_status(install/exec_gate.py) and_log_canvas_skip(install/services.py) never read it, so a denied package was told to runapm approve, which cannot lift a deny.Approach (WHAT)
One diagnostic helper,
executable_skip_reason(ctx, package, label, exec_type, kind)ininstall/exec_gate.py, picks the denied or approvable wording from the gate-recorded set. The hooks, bin/ and canvas lines all use it; nothing re-derives a deny. The skip reason (not_approved) and its source (resolve_bin_skip, the canvas gate) are untouched.Implementation (HOW)
src/apm_cli/install/exec_gate.pyexecutable_skip_reason;log_bin_statustakesctxand uses it for thenot_approvedline;log_hooks_skipuses it too (byte-identical output).src/apm_cli/install/services.py_log_canvas_skiptakesctxand uses the helper;integrate_package_primitivespassesctxto both diagnostics.tests/integration/test_bin_canvas_deny_diagnostics_lifecycle.pylifecycle_smoke.CHANGELOG.mdFixedline (separate commit).No docs: no page quotes these skip lines.
Trade-offs
log_hooks_skipis refactored onto the shared helper so the three lines cannot drift; its output is unchanged (fix(exec): pinned hooks denied by policy report the deny, not apm approve (#4044) #4055's lifecycle tests pass).ctxparameter is optional on both diagnostics (as onlog_hooks_skip); without a context the line stays approvable, which is the pre-existing wording.Validation
Installed-CLI lifecycle tests (
APM_BINARY_PATH=.venv/bin/apm), before and after the fix:f4024c85d)-g, then orgdeny_all→Parked native plugin X: denied/apm policy explain X(native owner, #3290)apm deny→ denied canvas line, noapm approve, extension removed,exec_status: deniedtests/unit/install,tests/unit/integration,tests/unit/security, the bin trust/hardening, executables-gate, Org-denied hooks report the wrong reason and remediation #4044 and hook-retire lifecycle tests): the only difference is the two target cases going from fail to pass; no new failures (the remaining ~248 sandbox failures — git signing, installer ownership — are identical both ways).ruff check/ruff format --check(src, tests, architecture linter): clean. pylint R0801: 10.00/10.scripts/lint-auth-signals.sh: clean.scripts/lint-architecture-boundaries.sh: exit 0.tests/quality/test_ci_topology.py: 189 passed.How to test
APM_BINARY_PATH=.venv/bin/apm uv run --extra dev pytest tests/integration/test_bin_canvas_deny_diagnostics_lifecycle.py -qsrc/to the base and rerun: only[org-deny](bin) and[deny](canvas) fail.Issue and approved scope
Issue: Fixes #4052
Human scope-approval comment: #4052 (comment) (amended, canvas-only)
Completes the issue. Out of scope (untouched): hooks diagnostics (#4044), allow/deny decisions,
--trust-binsemantics, the legacybin_deploypolicy path, local-bundle canvas/bin messages, native-plugin parked messages, MCP and LSP diagnostics, the approval prompt.Pre-merge
mainafter plan/apply P5a: ExecDecision, one executable trust owner (#4018) #4025 and fix(exec): pinned hooks denied by policy report the deny, not apm approve (#4044) #4055 landed.install/target_warnings.log_canvas_skip.Type of change
Testing
Changelog
## [Unreleased]inCHANGELOG.md.Spec conformance (OpenAPM v0.1)
apm-spec-waiver: canvas skip diagnostic wording only; no allow, deny, deployment or lockfile change
Co-authored-by: Copilot [email protected]