Skip to content

Warn-mode policy violations not surfaced in install output (silent) #834

@danielmeppiel

Description

@danielmeppiel

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

  • Warn-mode policy violations appear in the -- Diagnostics -- section of apm install output.
  • Same per-violation formatting as block mode (denied-by-pattern, allow-list, etc.).
  • No regression in block-mode behavior.

Filed as W4-live follow-up alongside #829 and #831.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions