Add scripts/lib/apm.sh, the one place the repo spells its apm command:
`uv run --project <repo root> --frozen apm`. --project comes from the
helper's own location, so it names the repo root even when apm runs inside
plugins/<name>/. Sourcing it keeps the git-env scrub (#204), and
require_apm_version fails with a clear message, naming `uv sync --frozen`,
when the resolved apm is below 0.39.2, unreadable, or uv is missing. APM
overrides the command, as ADR-0034 provides.
apm-audit-ci.sh and apm-pack-check-clean.sh use it. The audit script's
matching logic is unchanged; only its verified-against note now records
0.39.3.
tests/test-apm-gate-invocation.sh is seam B: a fake uv and a stub apm
first on a PATH without the real ones. It proves the command shape,
--project from a plugin directory, the scrub, and the version floor.
test-apm-hooks-git-env.sh reaches its stub through a fake uv, and the
real-apm probe in test-apm-current-hook.sh now runs the pinned apm.
Refs: #271
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi