Repository navigation
session: regenerate the SessionStart hook from the updated canonical - #184
Merged
Merged
Conversation
Generated file — `PyAutoMind/policy/session_start_hook.sh` is the source and `repos_sync.py --write` installs it. PyAutoMind#341 changes that source; this is the resulting copy, produced by the tool, not hand-edited. What the source gained: - the repo is derived from the hook's own path rather than $CLAUDE_PROJECT_DIR, which is the session's project directory and equals the repo only when the session holds exactly ONE repo. A session holding several organs clones them side by side *under* that directory, so no repo's hook was registered at all and the session ran on the container's Python 3.11 — below this organism's floor and below every CI leg; - a workspace-root fan-out is self-installed in that layout, so the next session in the container starts correctly; - shallow session clones are unshallowed, because `merge-base --is-ancestor` reports "not an ancestor" for a commit whose ancestry is merely absent; - the git and hook-reachability legs run before, and independently of, the interpreter legs, with PYAUTO_SESSION_SKIP_PYTHON=1 as the tests' seam. Caught by PyAutoMind's `firewall_gate.yml`, which checks all four organ mains against the canonical: this repo's copy was stale the moment the source changed. Nothing else here is touched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012PDoeCuecjutdnwkxsTqg7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated file, one file changed.
PyAutoMind/policy/session_start_hook.shis the source;repos_sync.py --writeinstalls it here. PyAutoLabs/PyAutoMind#341 changes that source, so this copy went stale the moment it landed — this is the tool's output, not a hand edit.Why the source changed
Claude Code registers project hooks from the session's project directory. That equals the repo only when a session holds exactly one repo. A session scoped to several organs clones them side by side under that directory, so the project directory is their parent — not a repo, no
.claude/, and no repo's hook registered at all. Those sessions ran on the container's Python 3.11: one minor below this organism's floor and below every CI leg, with mypy and flake8 reading the interpreter and judging code against 3.11 rules. It surfaced as local-green/CI-red, with nothing pointing at the cause.The canonical hook now:
$CLAUDE_PROJECT_DIR;git merge-base --is-ancestorreport "not an ancestor" for a commit whose ancestry is merely absent, and the ship/close-out procedures act on that answer;PYAUTO_SESSION_SKIP_PYTHON=1is the documented seam its tests use.How this was caught
PyAutoMind's
firewall_gate.ymlchecks all four organ mains against the canonical. The Mind PR's own run went red naming this repo and PyAutoHands — the drift check doing exactly its job. Merging this (and the Hands counterpart) is what turns that leg green.Nothing in this repo is touched beyond the generated hook.
🤖 Generated with Claude Code
https://claude.ai/code/session_012PDoeCuecjutdnwkxsTqg7
Generated by Claude Code