Why: on apm 0.39.3 a failing ref-consistency stops the root run after
three checks, so while the unlanded-plugin waiver applied, the other twelve
root checks (content-integrity, hook-approval-pins, local-bundle-hooks,
exec-status-current, deployed-files-present, ...) never ran.
Implementation notes: once the waiver's conditions hold, the hook copies
the working tree (minus .git and .venv) into a mktemp dir. There it drops
only the waived plugins' dependencies.apm items, checks the diff is
deletions only, and runs git init with the same origin. It then runs
apm audit --ci in the copy, and passes only on exit 0 with
"All 15 check(s) passed". A copy was chosen over a trap-guarded in-place
swap of apm.yml: it never writes the working tree, so the tree stays
byte-identical even after SIGKILL. The plugin name must now start
alphanumeric and contain no "..".
Impact: tests cover a failing, short, or non-zero re-run; a one-of-three
failure on another row; a duplicated details header; and dotted names.
Each guard was mutation-checked. On this branch the re-run reports all 15
checks passing.
Refs: #179
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
A first-landing hook- or bin-shipping plugin could not be pushed.
check-executables-allow-sync requires its git+path entry in root apm.yml,
but root dependencies resolve from the remote's main (ADR-0019), so the
lock cannot record the plugin until it lands and root `apm audit --ci`
fails ref-consistency with `<identity>/plugins/<name>: not found in
lockfile`. No state of the branch satisfied both gates.
scripts/apm-audit-ci.sh now waives the root audit only when the sole
failure is ref-consistency (`1 of 3 check(s) failed`, as apm 0.39.3
prints it), every detail line is that form for the identity root
apm.yml's own git+path entry yields, plugins/<name>/apm.yml exists in
the working tree, and the plugin is absent from the local origin/main.
No fetch; a missing origin/main or unrecognised output fails closed. The
waiver lapses for a plugin once it is on origin/main, when the follow-up
lock PR must record it.
Refs: #179
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi