Repository navigation
test(policy): pin the -g explain hint for user-scope bin, hook and canvas denies - #4498
Merged
Daniel Meppiel (danielmeppiel) merged 2 commits intoNov 21, 2026
Merged
Conversation
… hint (#4296) 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 19:52
This was referenced Nov 20, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the user-scope deny diagnostic regression check.
No open issues 🎉
What changed in this PR
Adds a regression check for the user-scope deny diagnostics delivered in #4275, supporting the resolution of #4296 without changing CLI behavior.
Changes:
- Assert that user-scope deny output omits the project-only
apm policy explain <package>hint, complementing the existing assertion that the-gform is present.
| File | Description |
|---|---|
tests/integration/test_bin_canvas_deny_diagnostics_lifecycle.py |
Adds the negative hint assertion and a comment explaining why it is required. |
Review effort: Balanced
…denies (#4296) Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…4464/#4490/#4494/#4498 Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-h-4296-scope-hint-assert
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
Pins the single contract for user-scope deny hints. For a
-gdeny of a native bin plugin, a hook, or a canvas extension, the output namesapm policy explain -g <package>and never the project-onlyapm policy explain <package>. The hook and canvas cells reuse #4297's fixtures, with the assertions inverted to match this contract. Run from the user scope, the project-only form fails, so this negative assert pins the behaviour #4275 delivered.Issue and approved scope
Issue: Refs #4296
Human scope-approval comment: the maintainer-run 0.37 PM decided this disposition (option b: pin it with a negative assert, close #4296 as fixed by #4275, and close #4297 as superseded).
Does this PR complete the issue, or what remains? The behaviour shipped in #4275. This PR adds only the regression pin, and #4296 is closed by hand.
Type of change
Testing
Evidence:
tests/integration/test_bin_canvas_deny_diagnostics_lifecycle.py -k "global_explain or user_scope_names"passed (3 passed: native bin plugin, canvas, hooks) against the main source tree.ruff checkandruff format --check(0.15.12) are clean.Changelog
## [Unreleased]inCHANGELOG.md.Spec conformance (OpenAPM v0.1)