Discovered during W4 live matrix on PR #832
When org policy has enforcement: warn and an apm install triggers a violation, the violation is collected by logger.policy_violation(severity='warn') and pushed to logger.diagnostics, but the user-facing install summary (rendered by apm_diagnostics) does not show it.
Reproduction
DevExpGbb/.github/apm-policy.yml with:
enforcement: warn
dependencies:
deny: ['microsoft/apm-sample-package']
apm.yml with:
dependencies:
apm: ['microsoft/apm-sample-package']
apm install --verbose:
- Verbose log shows
[i] Policy: org:DevExpGbb/.github -- enforcement=warn
- No
[!] Policy violation line is emitted to stdout
- Install proceeds (correct)
- Final summary shows no policy issues (incorrect — should warn)
Expected
Warn-mode violations should surface visibly in the final install summary so a developer notices and pins/aligns or asks for an exemption before CI fails on apm audit --ci.
Notes
Acceptance
Filed as W4-live follow-up alongside #829 and #831.
Discovered during W4 live matrix on PR #832
When org policy has
enforcement: warnand anapm installtriggers a violation, the violation is collected bylogger.policy_violation(severity='warn')and pushed tologger.diagnostics, but the user-facing install summary (rendered byapm_diagnostics) does not show it.Reproduction
DevExpGbb/.github/apm-policy.yml with:
apm.yml with:
apm install --verbose:[i] Policy: org:DevExpGbb/.github -- enforcement=warn[!] Policy violationline is emitted to stdoutExpected
Warn-mode violations should surface visibly in the final install summary so a developer notices and pins/aligns or asks for an exemption before CI fails on
apm audit --ci.Notes
apm installtime, not only inapm audit --ci#827 as pre-existing, NOT introduced by Enforce apm-policy.yml atapm installtime, not only inapm audit --ci#827. C3 fix Add ARM64 Linux support to CI/CD pipeline #4 correctly wiresfail_fast=Falseso all violations are collected; the gap is in the rendering layer (separateDiagnosticCollector).'str' object has no attribute 'get'error onapm install --mcp <allowed-server>(when registry lookup happens for an allowed-by-policy server) is a separate install bug, not policy-related.Acceptance
-- Diagnostics --section ofapm installoutput.Filed as W4-live follow-up alongside #829 and #831.