Add the Claude Code web SessionStart hook and bump the drift pin to v5 - #3
Open
tap wants to merge 1 commit into
Open
Add the Claude Code web SessionStart hook and bump the drift pin to v5#3tap wants to merge 1 commit into
tap wants to merge 1 commit into
Conversation
PythonTap was one of three repos in the family without the canonical SessionStart hook. Fresh Claude Code web containers clone bare -- no submodules, no pre-commit hook -- so agent commits could bypass the local format layer entirely and fail the clang-format gate on code a local clone would have fixed at commit time. The hook initializes source/min-api recursively, installs the pinned pre-commit hook, and warms its clang-format. The drift pin moves v4 -> v5 in the same commit because that is what makes the hook guarded rather than merely present: v4 does not carry .claude/hooks/session-start.sh, so the drift job's conditional guard would skip it silently. At v5 the guard becomes active. Verified this cannot break the gate: v4 and v5 carry byte-identical .clang-format, .clang-tidy, STYLE.md, .pre-commit-config.yaml and scripts/tidy.sh -- the tags differ only by the addition of the hook -- and every file the v5 drift job will compare here matches its canonical blob exactly, including the new hook at b7c2a49. .claude/settings.json is the canonical copy, created because none existed; it stays unguarded by design. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JhhQ93r2E1QTnCx46YfX8j
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.
What this changes
.claude/hooks/session-start.sh(canonical TapHouse copy) and.claude/settings.jsonto register itv4→v5in.github/workflows/style.ymlWhy
PythonTap was one of three repos in the family without the canonical SessionStart hook. Fresh Claude Code web containers clone bare — no submodules, no pre-commit hook — so agent commits run unformatted and fail the clang-format gate on code a local clone would have fixed at commit time. The hook initializes
source/min-apirecursively, installs the pinned pre-commit hook, and warms its clang-format.The pin bump is what makes the hook guarded rather than merely present: v4 does not carry
.claude/hooks/session-start.sh, so the drift job's conditional guard would skip it silently. At v5 the guard becomes active.Verification
Pre-flighted the drift gate: v4 and v5 carry byte-identical
.clang-format,.clang-tidy,STYLE.md,.pre-commit-config.yamlandscripts/tidy.sh— the tags differ only by the addition of the hook — so the bump cannot change what the core comparisons expect.Every file the v5 job will compare here already matches its canonical blob:
.clang-formataedca32,.clang-tidybb253e0,STYLE.mdebfcf54,.pre-commit-config.yamlb392057,scripts/tidy.sh45fc009, and the new hook atb7c2a49— which is identical at TapHousev5,main, and in all nine consumers that already carry it.Notes for the reviewer
.claude/settings.jsonis the canonical copy, created because none existed; it stays unguarded by design.Two things from the same sweep that this PR does not address, both worth knowing:
_testtarget stays at min-api's C++17 and the clang-tidy job is hardcoded to-std=c++17. The other Min-based packages force C++20 centrally in the rootCMakeLists.txt.package-info.json.inand the README badges still point attap/Python-Max— the pre-rename identity.Credit where due: this repo is also the only one in the family running
cteston both macOS and Windows, and the only one with theotool -L | grep @rpath/libpythoncheck.Generated by Claude Code