chore(lock): deploy delivery 0.3.0 and its PreToolUse guard hook #214

Merged
Defame1297 merged 2 commits from chore/deploy-delivery-guard-hook into main 2026-11-23 19:07:58 +00:00
Owner

What

  • apm.lock.yaml: all first-party packages resolve to cbd6033; delivery goes 0.1.0 → 0.3.0
    (adds the guard.py PreToolUse hook and the delivery-handoff / delivery-repo-doc skills).
  • .claude/settings.json + .claude/apm-hooks.json: apm's merged hook config, now carrying
    the delivery guard (matcher: "*", onFailure: "block", timeout 10s) alongside
    kyberforge's SessionStart hook. Committed per ADR-0019 — this is apm output.

Why two commits

The first push failed apm-audit-ci drift. The session-start install merged into the existing
settings.json and appended PreToolUse after SessionStart. The audit replays into an empty
tree in lockfile order, which puts PreToolUse first. The hooks were the same and only the key
order differed, but the check is byte-for-byte. 64b52ab regenerates both files from empty; the
result is byte-identical to the replay and stable across reinstalls. Squash on merge.

Verified

  • apm audit --ci: all 10 checks pass; full pre-push suite green.
  • The guard denies reads of secret paths and fails closed on unparseable input; ordinary
    tool calls pass. onFailure: block needs Claude Code ≥ 2.1.295 (local: 2.1.330).
  • Overhead is about 100–150 ms per tool call, mostly Python recompiling the 76 KB script.

Follow-up

apm's hook merge order depends on what the file held before, so any future plugin that adds a hook
will hit the same drift. Worth a LESSONS.md entry and/or an upstream apm issue.

🤖 Generated with Claude Code

https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi

### What - `apm.lock.yaml`: all first-party packages resolve to `cbd6033`; delivery goes 0.1.0 → 0.3.0 (adds the `guard.py` PreToolUse hook and the `delivery-handoff` / `delivery-repo-doc` skills). - `.claude/settings.json` + `.claude/apm-hooks.json`: apm's merged hook config, now carrying the delivery guard (`matcher: "*"`, `onFailure: "block"`, timeout 10s) alongside kyberforge's SessionStart hook. Committed per ADR-0019 — this is apm output. ### Why two commits The first push failed `apm-audit-ci` drift. The session-start install merged into the existing `settings.json` and appended `PreToolUse` after `SessionStart`. The audit replays into an empty tree in lockfile order, which puts `PreToolUse` first. The hooks were the same and only the key order differed, but the check is byte-for-byte. `64b52ab` regenerates both files from empty; the result is byte-identical to the replay and stable across reinstalls. Squash on merge. ### Verified - `apm audit --ci`: all 10 checks pass; full pre-push suite green. - The guard denies reads of secret paths and fails closed on unparseable input; ordinary tool calls pass. `onFailure: block` needs Claude Code ≥ 2.1.295 (local: 2.1.330). - Overhead is about 100–150 ms per tool call, mostly Python recompiling the 76 KB script. ### Follow-up apm's hook merge order depends on what the file held before, so any future plugin that adds a hook will hit the same drift. Worth a LESSONS.md entry and/or an upstream apm issue. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
Claude added 2 commits 2026-11-23 18:50:58 +00:00
Why: apm install resolved every first-party package to cbd6033, which brings
delivery from 0.1.0 to 0.3.0. That release ships the ADR-0032 guard as a
PreToolUse hook, so apm merged it into .claude/settings.json and
.claude/apm-hooks.json. These are apm's own output; leaving them uncommitted
is drift that fails the apm-audit-ci pre-push hook (ADR-0019).

Impact: every tool call in this repo now runs the delivery guard. It fails
closed via onFailure: block (Claude Code >= 2.1.295).

ADR: 0032
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
Why: apm-audit-ci replays the install into an empty tree, where packages
integrate in lockfile order and delivery's PreToolUse lands before
kyberforge's SessionStart. The session-start install merged into the
existing settings.json instead and appended PreToolUse after it. Same
hooks, different key order, so the byte-for-byte drift check failed.

Implementation Notes: deleted both files and reran apm install; the result
is byte-identical to the replay scratch and stable across reinstalls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
Defame1297 merged commit 29b5bfea5a into main 2026-11-23 19:07:58 +00:00
Defame1297 deleted branch chore/deploy-delivery-guard-hook 2026-11-23 19:07:58 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Holocron#214