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
@@ -71,7 +71,7 @@ repos:
|
||||
|
||||
- id: check-executables-allow-sync
|
||||
name: Check executables allow keys sync
|
||||
description: Verify root apm.yml's executables.allow carries a "<host>/<owner>/<repo>/plugins/<name>#<version>" key -- the full package identity apm 0.39 matches on, derived from root apm.yml's git+path dependency entry for the plugin, plus the plugin's apm.yml version -- for every plugin that ships executables (plugins/<name>/.apm/hooks/ or bin/), reporting every out-of-sync package in one run. A bare "<name>#<version>" key fails, because apm 0.39 parks the hooks under it while root `apm audit --ci` stays green (spike #269). The version half is version-blind to apm, so a stale version still deploys; that half is a record-keeping gate that fails a version bump made without the matching key edit (see ADR-0019's 2026-09-19 correction and docs/spec/gates.md)
|
||||
description: Verify root apm.yml's executables.allow carries a "<host>/<owner>/<repo>/plugins/<name>#<version>" key -- the full package identity apm 0.39 matches on, derived from root apm.yml's git+path dependency entry for the plugin, plus the plugin's apm.yml version -- for every plugin that ships executables (plugins/<name>/.apm/hooks/ or bin/), reporting every out-of-sync package in one run. A bare "<name>#<version>" key fails, because apm 0.39 parks the hooks under it while root `apm audit --ci` stays green (spike #269). The version half is version-blind to apm, so a stale version still deploys; that half is a record-keeping gate that fails a version bump made without the matching key edit (see ADR-0019's 2026-09-19 correction and docs/spec/gates.md). It also fails when apm.lock.yaml records any gated_* exec_status, a parked executable that root `apm audit --ci` lets through
|
||||
entry: bash scripts/check-executables-allow-sync.sh
|
||||
language: system
|
||||
stages: [pre-push]
|
||||
|
||||
Reference in new issue
Block a user