docs: re-verify the apm 0.28.0 claims in hook and test comments

Checked against apm 0.39.3 live and in its source. The apm-audit-ci
description and comments now give 15 root checks and 2 plugin checks,
about 70 s through uv run, manifest-parse as a named row, and the new
"nothing to scan" wording. The run-bats copytree note, the #204 git-env
test header and its LESSONS entry say what holds on 0.39.3.

Refs #272

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-12-02 11:49:22 +00:00
1 parent c2ba7f01bf
commit 7e63f22bf8
5 files changed
+45 -28

No files matched your search

+30 -20
View File
@@ -80,41 +80,48 @@ repos:
- id: apm-audit-ci
name: apm audit --ci
description: Run apm's producer-side CI gate over the root manifest AND each plugin package, via scripts/apm-audit-ci.sh. On the root manifest it runs ten checks -- lockfile-exists, ref-consistency, deployment-ledger-owners, deployed-files-present, no-orphaned-packages, skill-subset-consistency, config-consistency, content-integrity, includes-consent, drift -- so it is both a hidden-Unicode scan and a drift gate that replays the install and diffs it. In a plugin package it runs one, lockfile-exists, which the script waives when that package declares dependencies, because a package is not an install root (ADR-0026). The waiver never applies to the root and never covers a second failing check. It does NOT enforce an org policy; see the comment below for why. Reference:plugins/kyberforge/.apm/skills/apm-workflow/references/audit.md
description: Run apm's producer-side CI gate over the root manifest AND each plugin package, via scripts/apm-audit-ci.sh. On the root manifest apm 0.39.3 runs fifteen checks -- lockfile-exists, ref-consistency, deployment-ledger-owners, deployed-files-present, no-orphaned-packages, lockfile-targets-current, skill-subset-consistency, config-consistency, native-mcp-ownership, content-integrity, local-bundle-hooks, hook-approval-pins, exec-status-current, includes-consent, drift -- so it is both a hidden-Unicode scan and a drift gate that replays the install and diffs it. In a plugin package it runs two, lockfile-exists and a content-integrity row that scans no package source; the script waives lockfile-exists when that package declares dependencies, because a package is not an install root (ADR-0026). The waiver never applies to the root and never covers a second failing check. It does NOT enforce an org policy; see the comment below for why. Reference:plugins/kyberforge/.apm/skills/apm-workflow/references/audit.md
entry: scripts/apm-audit-ci.sh
language: system
stages: [pre-push]
pass_filenames: false
always_run: true
# What this hook actually runs, read off apm 0.28.0's own compliance
# What this hook actually runs, read off apm 0.39.3's own compliance
# table by invoking `apm audit --ci` at the repo root and in
# plugins/lint/. Long form in docs/spec/gates.md, "apm-audit-ci".
# plugins/lint/ (holocron#272; first done on 0.28.0, which ran ten
# root checks and one plugin check). Long form in docs/spec/gates.md,
# "apm-audit-ci".
#
# * ROOT MANIFEST -- ten checks: lockfile-exists, ref-consistency,
# * ROOT MANIFEST -- fifteen checks: lockfile-exists, ref-consistency,
# deployment-ledger-owners, deployed-files-present,
# no-orphaned-packages, skill-subset-consistency, config-consistency,
# content-integrity, includes-consent, drift. It is a drift gate: it
# no-orphaned-packages, lockfile-targets-current,
# skill-subset-consistency, config-consistency, native-mcp-ownership,
# content-integrity, local-bundle-hooks, hook-approval-pins,
# exec-status-current, includes-consent, drift. It is a drift gate: it
# replays the install cache-only and diffs the scratch result against
# the working tree. Root lockfile-exists is not vacuous -- the root
# declares dependencies, so it reports `Lockfile present`.
# * PLUGIN MANIFESTS -- one check: lockfile-exists. Conditional, and
# * PLUGIN MANIFESTS -- two checks: lockfile-exists, and a
# content-integrity row that scans no package source (it passed with
# a planted bidi override). lockfile-exists is conditional, and
# vacuous while every plugin apm.yml declares
# `dependencies: {apm: [], mcp: []}`: it reports `No dependencies
# declared -- lockfile not required` and arms itself the moment one
# does not (verified by adding a git dependency to
# plugins/lint/apm.yml). Everything else above is root-only, because
# plugins/lint/apm.yml). Everything else in the root list is
# root-only, because
# only the root install has a lockfile, a deployment ledger and
# deployed files to check. Running every plugin package is what
# makes lockfile-exists reachable for them at all -- the root-only
# invocation audits the root manifest and nothing else.
# THAT ARMING NOW HAPPENS: plugins/mattpocock declares real dependencies,
# and there is no green state for it -- without a package lockfile
# lockfile-exists fails, and with one it passes and arms the other
# nine, where drift then demands the dependency's skills be deployed
# lockfile-exists fails, and with one it passes and arms the rest of
# the root set, where drift then demands the dependency's skills be deployed
# INSIDE the package. A package is not an install root, so
# scripts/apm-audit-ci.sh waives that single check for a package and
# nothing else (ADR-0026). Dropping --ci for packages would have been
# smaller and is wrong: verified on apm 0.28.0, plain `apm audit`
# smaller and is wrong: verified on apm 0.28.0 and 0.39.3, plain `apm audit`
# exits 0 on a dependency entry missing its git/path/registry field
# while --ci exits 1 naming it, and malformed-dependency detection is
# the whole reason packages are audited.
@@ -125,13 +132,14 @@ repos:
# check. Both claims were wrong. What is true is that the STANDALONE
# mode differs: plain `apm audit` (--ci refuses to combine with
# --file/--strip/--dry-run/PACKAGE) run in a plugin directory reports
# `No apm.lock.yaml found -- nothing to scan` and exits 0, because
# only the root has a lockfile.
# * MANIFEST-PARSE IS NOT A CHECK in apm 0.28.0's table, and an earlier
# revision of this comment named it as one. Parsing is still
# enforced -- a dependency entry missing its git/path/registry field
# fails with `Cannot parse apm.yml` -- but it fails the invocation
# before the table is built, so it never appears as a row.
# `No recognized deployed primitives found -- nothing to scan` on
# 0.39.3 (`No apm.lock.yaml found -- nothing to scan` on 0.28.0) and
# exits 0, because only the root has a lockfile.
# * MANIFEST-PARSE IS A ROW ON 0.39.3, not on 0.28.0. A dependency entry
# missing its git/path/registry field now yields a one-row table with
# a failing manifest-parse row (`Cannot parse apm.yml: ...`); 0.28.0
# failed the invocation before building the table. A parsable
# manifest gets no such row.
# * POLICY IS NOT ENFORCED. `apm audit --ci` discovers an org policy
# from the git remote, and apm's discovery only understands
# github.com and Azure DevOps. This repo's remote is a self-hosted
@@ -146,8 +154,10 @@ repos:
# serve one. A gate that can never go green is not a gate. Revisit if
# this repo ever gains a policy source apm can actually reach.
#
# Costs ~0.5s per package. Needs no network ONCE `apm install` has
# populated apm_modules/ -- the root marketplace has no remote package
# Takes about 70 s for the root plus every plugin through `uv run` on
# apm 0.39.3 (about 0.5 s per package on 0.28.0). Needs no network ONCE
# `uv sync --frozen` and `uv run --frozen apm install` have each run
# once -- the root marketplace has no remote package
# entries, so the install replay is cache-only. On a FRESH CLONE there
# is no cache: deployed-files-present fails outright, and drift and
# config-consistency clone from the holocron remote. See README.md's