Skip to content

Gate commits behind check.sh + document release pipeline#82

Merged
alexkroman merged 2 commits into
mainfrom
dx-commit-gate-and-release-docs
Jun 11, 2026
Merged

Gate commits behind check.sh + document release pipeline#82
alexkroman merged 2 commits into
mainfrom
dx-commit-gate-and-release-docs

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

Summary

DX improvements surfaced by mining recent agent sessions for friction:

  • Commit gate hook. A PreToolUse(Bash) hook (.claude/hooks/require-gate-before-commit.sh) blocks git commit unless ./scripts/check.sh passed for the current working tree. On success check.sh records a sha256 tree signature via scripts/gate_marker.py record into .git/aai-gate-pass; the hook runs gate_marker.py check and exits 2 (with guidance) unless it still matches. The signature is staging-invariant (a git add between gate and commit is fine) but edit-sensitive (any later edit re-requires the gate). Escape hatch for intentional WIP commits: prefix AAI_ALLOW_COMMIT=1 git commit …. Fails open outside this repo / if the marker tool is missing.
  • Release pipeline docs. AGENTS.md now documents the tag-triggered release.yml → arm64 Homebrew bottle flow, why bottling matters (Rust-backed sdists), the bump_minor.shcut_release.sh (main-only) helpers, and update_check.py. This infra landed in Ship a prebuilt Homebrew bottle on release; drop install.sh #69/Bottle v0.1.0 #70 but was undocumented.

scripts/gate_marker.py is stdlib-only so it runs from the hook and from check.sh without uv; directories (git collapses fully-untracked dirs to one entry) are fingerprinted by stat-walk to avoid reading scratch trees.

Test plan

  • ./scripts/check.shAll checks passed. (ruff, shellcheck, full pytest, build all green; the new files add no covered lines so diff-cover/mutation are no-ops).
  • Hook verified end-to-end: non-commit passes through; no marker → blocked (exit 2); record clean tree → commit allowed (incl. git add -A &&); edit after marker → re-blocked; staging a file present at record time → still allowed; untracked-dir regression fixed; AAI_ALLOW_COMMIT=1 bypasses.

🤖 Generated with Claude Code

alexkroman-assembly and others added 2 commits June 11, 2026 16:28
DX improvements mined from recent sessions:

- Add a PreToolUse(Bash) hook that blocks `git commit` unless ./scripts/check.sh
  passed for the current working tree. check.sh now records a tree signature
  (scripts/gate_marker.py) into .git/aai-gate-pass on success; the hook
  (.claude/hooks/require-gate-before-commit.sh) re-verifies it. The signature is
  staging-invariant but edit-sensitive, so any change after the gate re-requires
  a green run. Escape hatch for deliberate WIP commits: AAI_ALLOW_COMMIT=1.
- Document the tag-triggered release/Homebrew-bottle pipeline in AGENTS.md
  (release.yml, cut_release.sh, bump_minor.sh, update_check.py) — it was
  committed in #69/#70 but undocumented.

gate_marker.py is stdlib-only (runs from the hook and from check.sh without uv);
both new shell paths are added to check.sh's shellcheck list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alexkroman alexkroman merged commit 984c6eb into main Jun 11, 2026
8 checks passed
@alexkroman alexkroman deleted the dx-commit-gate-and-release-docs branch June 11, 2026 23:33
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