Skip to content

Add the Claude Code web SessionStart hook and bump the drift pin to v5 - #3

Open
tap wants to merge 1 commit into
mainfrom
claude/repository-inconsistencies-nkocvd
Open

Add the Claude Code web SessionStart hook and bump the drift pin to v5#3
tap wants to merge 1 commit into
mainfrom
claude/repository-inconsistencies-nkocvd

Conversation

@tap

@tap tap commented Jul 27, 2026

Copy link
Copy Markdown
Owner

What this changes

  • Adds .claude/hooks/session-start.sh (canonical TapHouse copy) and .claude/settings.json to register it
  • Bumps the TapHouse drift pin v4v5 in .github/workflows/style.yml

Why

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-api recursively, 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.yaml and scripts/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-format aedca32, .clang-tidy bb253e0, STYLE.md ebfcf54, .pre-commit-config.yaml b392057, scripts/tidy.sh 45fc009, and the new hook at b7c2a49 — which is identical at TapHouse v5, main, and in all nine consumers that already carry it.

Notes for the reviewer

.claude/settings.json is 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:

  1. This is the only repo in the family with no central C++20 policy. C++20 is set per-object on the external only, so the _test target 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 root CMakeLists.txt.
  2. package-info.json.in and the README badges still point at tap/Python-Max — the pre-rename identity.

Credit where due: this repo is also the only one in the family running ctest on both macOS and Windows, and the only one with the otool -L | grep @rpath/libpython check.


Generated by Claude Code

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants