This PR is stacked on #275 (the #271 cutover). Merge #275 first. Until then, this diff also contains #275's commits. Only the 6 commits after c2ba7f0 belong to this PR.
What changed
Setup and invocation. README, the AGENTS.md session rules and gates.md now describe a one-time online setup per checkout: uv sync --frozen, then uv run --frozen apm install. After that, every pre-push hook works offline, because the guarantee rests on a synced .venv/ and a populated apm_modules/. Every apm command in this repo now runs through uv run --frozen apm. A bare apm reaches whatever is on PATH, which may be an older apm that refuses the v4 lock.
Migrating a checkout from 0.28.
Move .claude/{skills,agents,commands} aside before the first 0.39 install. Otherwise apm refuses with "no trustworthy local deployment baseline".
Move apm_modules/ aside before any 0.39 command that writes the lock. kyberforge's SessionStart apm update writes it too. If you skip this, apm reuses the 0.28-era third-party copies and writes a lock without their carried_licenses.
The recovery is documented.
0.28.0 claims re-verified on 0.39.3, by live runs where cheap and otherwise from the research set:
Root audit --ci now runs 15 checks, not 10. Plugins run 2, not 1; the new one is content-integrity.
The hook takes 70-90 s through uv run, not about 0.5 s per package.
The waiver strings still hold, but manifest-parse is now a named row.
ADRs 0017, 0019, 0021, 0026, 0029 and 0033 each get a dated forward note, not a rewrite. ADR-0019's note also covers the full-identity allow keys and the gated_* check from #271.
LESSONS.md, the pre-commit config comments and the version comments in the scripts and tests now cite 0.39.3 or say what changed.
Bare-apm instructions removed. No bare-apm instructions are left outside plugin-owned content. Plugin content is #273.
Checks and review
pre-commit passes, and all 11 pre-push hooks pass. The pre-push run included the strict test suite, apm audit --ci and apm pack --check-clean.
Vale does not cover these paths.
One clean-context review round found nothing blocking. All 12 of its non-blocking notes are applied.
Not re-run on 0.39.3
These are recorded as not re-run:
the fresh-clone missing-file count, which is now generalised to <N>;
the #204GIT_DIR leak, which is not re-tested; 0.39.3 provides git_subprocess_env, and the repo's scrub stays as a backup;
Closes #272. Part of spec #268 and milestone 18.
**This PR is stacked on #275 (the #271 cutover). Merge #275 first.** Until then, this diff also contains #275's commits. Only the 6 commits after c2ba7f0 belong to this PR.
## What changed
- **Setup and invocation.** README, the AGENTS.md session rules and gates.md now describe a one-time online setup per checkout: `uv sync --frozen`, then `uv run --frozen apm install`. After that, every pre-push hook works offline, because the guarantee rests on a synced `.venv/` and a populated `apm_modules/`. Every apm command in this repo now runs through `uv run --frozen apm`. A bare `apm` reaches whatever is on PATH, which may be an older apm that refuses the v4 lock.
- **Migrating a checkout from 0.28.**
- Move `.claude/{skills,agents,commands}` aside before the first 0.39 install. Otherwise apm refuses with "no trustworthy local deployment baseline".
- Move `apm_modules/` aside before any 0.39 command that writes the lock. kyberforge's SessionStart `apm update` writes it too. If you skip this, apm reuses the 0.28-era third-party copies and writes a lock without their `carried_licenses`.
- The recovery is documented.
- **0.28.0 claims re-verified on 0.39.3**, by live runs where cheap and otherwise from the research set:
- Root `audit --ci` now runs 15 checks, not 10. Plugins run 2, not 1; the new one is `content-integrity`.
- The hook takes 70-90 s through `uv run`, not about 0.5 s per package.
- The waiver strings still hold, but `manifest-parse` is now a named row.
- ADRs 0017, 0019, 0021, 0026, 0029 and 0033 each get a dated forward note, not a rewrite. ADR-0019's note also covers the full-identity allow keys and the `gated_*` check from #271.
- LESSONS.md, the pre-commit config comments and the version comments in the scripts and tests now cite 0.39.3 or say what changed.
- **Bare-`apm` instructions removed.** No bare-`apm` instructions are left outside plugin-owned content. Plugin content is #273.
## Checks and review
- pre-commit passes, and all 11 pre-push hooks pass. The pre-push run included the strict test suite, `apm audit --ci` and `apm pack --check-clean`.
- Vale does not cover these paths.
- One clean-context review round found nothing blocking. All 12 of its non-blocking notes are applied.
## Not re-run on 0.39.3
These are recorded as not re-run:
- the fresh-clone missing-file count, which is now generalised to `<N>`;
- the #204 `GIT_DIR` leak, which is not re-tested; 0.39.3 provides `git_subprocess_env`, and the repo's scrub stays as a backup;
- the ADR-0019 sidecar reproduction.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
Claude
added this to the Spec: Upgrade apm to 0.39.3 and pin it per repo with uv milestone 2026-12-02 13:06:36 +00:00
Claude
added 20 commits 2026-12-02 13:06:36 +00:00
apm 0.39.3 matches executable grants on the package identity
<host>/<owner>/<repo>/<path>. The bare kyberforge#<version> and
delivery#<version> keys that 0.28.0 matched no longer match, so the first
0.39 install parks both hooks and rewrites .claude/settings.json without
them, while root apm audit --ci stays green (spike #269, on #268).
Rename both keys to git.rkdr.net/Mortis/Holocron/plugins/<name>#<version>
with type-level grants, as `apm approve --list` names them on 0.39.3. Keep
the version suffix convention; apm strips it before matching. Do not use
`apm approve`, which would content-pin, strip the block's comments and
park the hook on every script edit.
check-executables-allow-sync now derives each expected key from root
apm.yml's git + path dependency entry for the plugin, fails a bare key with
a message saying why, and fails a shipping plugin with no such entry. Both
readers carry the change, and the test covers URL and path spellings.
Refs: #271
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
Add a root pyproject.toml with no build system, uv package mode off,
Python 3.11 or later, and a dev dependency group pinning apm-cli==0.39.3,
as ADR-0034 decides. Commit the uv.lock that hashes apm-cli and its
transitive dependencies, and ignore uv's .venv/.
Refs: #271
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
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
need_apm now runs apm through scripts/lib/apm.sh, so the suite exercises
the repo-pinned 0.39.3 and never a PATH apm. In this repo a missing uv or
an apm below 0.39.2 fails rather than skips, so run-tests.sh --strict
cannot pass without running these tests. Outside the repo it still falls
back to PATH apm and skips without one.
Three assertions pinned 0.28.0 behaviour and are updated to 0.39.3's:
compile --target claude writes a CLAUDE.md that imports AGENTS.md, an
unquoted applyTo fails install closed and deploys nothing, and compile
warns when applyTo matches no file. The skill's own text still describes
the 0.28.0 behaviour; that is left for a skill update.
Refs: #271
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
Written by `uv run --frozen apm update --yes` on apm 0.39.3: lockfile
version 4, apm_version 0.39.3, and every dependency resolved to main at
feef6d8, which records kyberforge 2.3.0 from #270. This is the one
sanctioned exception to discarding lock churn on a feature branch
(ADR-0034, ADR-0019).
With the full-identity approvals both hooks stay deployed (exec_status
deployed). .claude/settings.json and .claude/apm-hooks.json keep the
PreToolUse guard and SessionStart entries; their only change is
kyberforge 2.3.0's hook timeout, 380 to 400. No apm-owned file was edited
by hand.
Refs: #271
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
README: uv replaces the global apm as a prerequisite, setup starts with
`uv sync --frozen`, and the offline note names both one-time steps.
gates.md: the apm hooks run through scripts/lib/apm.sh with plain
--frozen (and why the gates, unlike the SessionStart hook, keep the
sync), and check-executables-allow-sync expects the full package
identity apm 0.39 matches on.
Refs: #271
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
require_apm_version merged stderr into the --version output and took the
first X.Y.Z. When `uv run --frozen` syncs first, uv prints
`Using CPython 3.14.6` on stderr, so the check parsed 3.14.6 and passed
whatever apm reported. It now reads stdout only, matches apm's
`version X.Y.Z` banner, and shows the captured stderr only on failure.
The fake uv in the seam B test now writes that line to stderr, so the
regression stays pinned. Resolve the repo root with CDPATH cleared.
Refs: #271
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
How apm 0.39 writes a port into a package identity is unverified, so a
key derived from a git: URL with a port could be wrong while looking
right. The gate now fails clearly on one, naming `apm approve --list` as
the way to read the real identity. The script and gates.md record that
only an https URL on a lowercase host was checked against apm.
The test drops its GNU-only `sed -i` for a python3 rewrite, and covers
ssh:// and https URLs with a port under both readers.
Refs: #271
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
The probe moves HOME to an empty dir, which also moved uv's cache and its
managed Pythons, leaving uv cold. Pin UV_CACHE_DIR and
UV_PYTHON_INSTALL_DIR to the real ones resolved beforehand, and set
UV_OFFLINE so the probe runs the synced pin and never fetches. Verified
under `unshare -rn`.
Refs: #271
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
Match `CLI version X.Y.Z`, the banner apm prints, instead of any
`version X.Y.Z`, so other version-like text on stdout is not taken for
apm's version. Fail clearly when APM holds only whitespace, instead of
running an empty command.
The seam B test now pins both properties. The fake uv also writes a
banner-shaped `uv CLI version 0.0.1` to stderr, so a parser reading the
merged stream fails it (23 failures with the round-1 bug restored). A
stub that prints `version 0.40.0` before a 0.28.0 banner must still fail.
The git-env test's stub prints the real banner.
Refs: #271
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
A comment and the name-mismatch message still described the bare
<name>#<version> key. Both now say <identity>#<version>, and that the
directory name is what finds the identity, through the root dependency
entry's `path: plugins/<dir>`.
Refs: #271
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
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
The helper now seeds APM_CMD empty, and a bare "${APM_CMD[@]}" on an
array that can be empty fails under `set -u` on bash 3.2. The bash-4
construct scan in tests/test-vale-wrap.sh caught it at pre-push. Use the
guarded expansion that run_apm already uses.
Refs: #271
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
The lock committed in e87bd67 was written by `apm update` over an
apm_modules/ that apm 0.28.0 had populated. The 22 pinned third-party
dependencies (fluxcd gitops skills and mattpocock skills) were reused
from that cache, so the lock lacked their carried_licenses and LICENSE
deployment records. A fresh install writes them, which left the
committed lock out of step with every new checkout and failed
apm-pack-check-clean there on a content-hash mismatch.
Regenerated with `uv run --frozen apm install` after moving apm_modules/
aside: +331/-1, only carried_licenses for those 22 dependencies, their 22
LICENSE deployment records, and generated_at. A second fresh install into
another empty apm_modules/ left the lock byte-identical. Still the
sanctioned lock rewrite (ADR-0034); no tracked .claude/ file changed.
Refs: #271
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
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
README, the AGENTS.md session rules, architecture.md and the .gitignore
comments now give the pinned `uv run --frozen apm` form for every apm
command in this repo and the two one-time online setup steps. A new
session rule says a bare `apm` reaches the global 0.28.0, which this repo
does not use. README and AGENTS.md add the setup note for a checkout
deployed by apm 0.28: move .claude/skills, agents and commands aside
before the first 0.39 install, or apm refuses with "no trustworthy local
deployment baseline".
Refs #272
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
The apm-audit-ci section now records 15 root checks and 2 plugin checks,
a run of about 70 s through uv run, manifest-parse as a named row, the
new plain-audit wording, and the waiver re-verified in a scratch copy of
plugins/mattpocock. The setup note and "Pushing without a network" give
the two one-time online steps, the pinned invocation, and the
first-0.39-install refusal on a 0.28-deployed checkout.
Refs #272
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
ADRs 0017, 0019, 0021, 0026, 0029 and 0033 get 2026-12-02 forward notes
recording each 0.28.0 claim's result on apm 0.39.3: held, changed, or
not re-run. ADR-0019 gains a note that the executables.allow key is now
the full package identity (#271), not the bare kyberforge#<version>
form it describes. ADR-0034 consequence 4 records the re-check as done.
Refs #272
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
apm 0.39 reuses the 0.28-era third-party copies in apm_modules/ and
writes a lock without their carried_licenses entries, which a fresh
install contradicts and apm-pack-check-clean then fails on. README
setup, gates.md and the AGENTS.md lock-churn rule now say to move
apm_modules/ aside and reinstall before any 0.39 command that writes
the lock. Consuming the committed lock is unaffected.
Refs #272
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
- Name kyberforge's SessionStart hook as a lock writer that can write
the bad lock in a 0.28-populated checkout, with the recovery steps
(README, AGENTS.md, gates.md).
- AGENTS.md: put the pinned-invocation rule above the lock-churn rule,
make the bare-apm remark conditional on what PATH holds, and replace
the two 0.28 migration notes with one pointer to gates.md
"apm-audit-ci".
- Use one wording for the offline guarantee: a synced .venv/ and a
populated apm_modules/.
- Say the #204 leak was not re-tested on 0.39.3, and narrow the claim to
git_subprocess_env (gates.md, LESSONS.md, git-env test header).
- State the apm-audit-ci timing as 70-90 s, drop a duplicate README
sentence, give the 0.39.3 shorthand error, reflow gates.md to about
100 columns, and move the ADR-0033 note into amendment blockquote form.
Refs #272
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #272. Part of spec #268 and milestone 18.
This PR is stacked on #275 (the #271 cutover). Merge #275 first. Until then, this diff also contains #275's commits. Only the 6 commits after
c2ba7f0belong to this PR.What changed
uv sync --frozen, thenuv run --frozen apm install. After that, every pre-push hook works offline, because the guarantee rests on a synced.venv/and a populatedapm_modules/. Every apm command in this repo now runs throughuv run --frozen apm. A bareapmreaches whatever is on PATH, which may be an older apm that refuses the v4 lock..claude/{skills,agents,commands}aside before the first 0.39 install. Otherwise apm refuses with "no trustworthy local deployment baseline".apm_modules/aside before any 0.39 command that writes the lock. kyberforge's SessionStartapm updatewrites it too. If you skip this, apm reuses the 0.28-era third-party copies and writes a lock without theircarried_licenses.audit --cinow runs 15 checks, not 10. Plugins run 2, not 1; the new one iscontent-integrity.uv run, not about 0.5 s per package.manifest-parseis now a named row.gated_*check from #271.apminstructions removed. No bare-apminstructions are left outside plugin-owned content. Plugin content is #273.Checks and review
apm audit --ciandapm pack --check-clean.Not re-run on 0.39.3
These are recorded as not re-run:
<N>;GIT_DIRleak, which is not re-tested; 0.39.3 providesgit_subprocess_env, and the repo's scrub stays as a backup;🤖 Generated with Claude Code
https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
The helper now seeds APM_CMD empty, and a bare "${APM_CMD[@]}" on an array that can be empty fails under `set -u` on bash 3.2. The bash-4 construct scan in tests/test-vale-wrap.sh caught it at pre-push. Use the guarded expansion that run_apm already uses. Refs: #271 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi