feat(scripts): fail the push on a parked executable in apm.lock.yaml
apm records each dependency's executables decision as `exec_status:` in the lock. A gated_* value means the trust gate parked that package's hooks, bin or MCP servers. Root `apm audit --ci` still passes in that state, so a wrong key would leave the SessionStart hook or the delivery guard uninstalled with every gate green (spike #269, section 7.3). check-executables-allow-sync now scans the lock's dependencies and fails on any gated_* entry, naming its identity and status, with a Why/Fix block that starts from `apm approve --list`. It runs even when no plugin here ships executables. The test covers deployed, two gated_* values under both readers, the no-plugin case, and that neither the next dependency nor the deployments: section is misreported. gates.md and the hook description note it. Refs: #271 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
This commit is contained in:
1 parent
045e43f0f8
commit
b0977d4073
4 files changed
+130
-6
No files matched your search
@@ -1282,6 +1282,15 @@ version half stays a repo-level record. The grants are type-level (`hooks: true`
|
||||
content-pinned: `apm approve` would pin content, strip the block's comments, and park the hook on
|
||||
every script edit until someone approves again.
|
||||
|
||||
**It also fails on a parked executable in `apm.lock.yaml`** (spike #269, section 7.3). apm records
|
||||
each dependency's executables decision as `exec_status:` in the lock, `deployed` or a `gated_*`
|
||||
value such as `gated_pending_approval`. Root `apm audit --ci` passes with executables parked,
|
||||
because `exec-status-current` only checks that the lock agrees with the gate. So the gate scans the
|
||||
lock's `dependencies:` and fails on any `gated_*` entry, naming its identity and status, with
|
||||
`apm approve --list` as the first step of the fix. It runs even when no plugin here ships
|
||||
executables, since a third-party dependency can be parked too. A missing lock is left to
|
||||
`apm-audit-ci`'s `lockfile-exists`. It is a line scan of the shape apm writes, not a YAML parse.
|
||||
|
||||
The rest of this section describes the 0.28.0 matching that the version-blind behaviour comes from.
|
||||
|
||||
apm gates a package's `hooks/` and `bin/` on root `apm.yml`'s `executables.allow`
|
||||
|
||||
Reference in new issue
Block a user