docs: apply the #272 review notes on the apm 0.39 docs

- 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
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-12-02 12:25:51 +00:00
1 parent 66443e7458
commit db34dfa728
7 files changed
+71 -64

No files matched your search

+4 -4
View File
@@ -7,10 +7,10 @@
# drift replay runs `git init` / `git checkout` in a temp dir with an env copied
# from os.environ, so the inherited GIT_DIR wins: `git init` wrote
# core.bare=true into the shared .git/config, and a later checkout moved the
# worktree's HEAD to the lock-pinned commit. apm 0.39.3 strips GIT_DIR from
# its own git calls (git_subprocess_env, apm_cli/utils/git_env.py); the leak
# was not reproduced again there, and this suite keeps the hooks' own scrub
# pinned as defence in depth (#272).
# worktree's HEAD to the lock-pinned commit. apm 0.39.3's
# apm_cli/utils/git_env.py provides git_subprocess_env, which strips GIT_DIR
# and the other repo-locating vars; the leak was not re-tested on 0.39.3, and
# this suite keeps the hooks' own scrub pinned as defence in depth (#272).
#
# The stub `apm` below reproduces that pattern -- record GIT_DIR, then `git init`
# and `git checkout` inside a fresh `mktemp -d` -- and each hook script is run