Repository navigation
feat(pre-push): load the shared push-content gate - #160
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RMRWKJ7P5L99pNgDqK3B8t
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RMRWKJ7P5L99pNgDqK3B8t
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RMRWKJ7P5L99pNgDqK3B8t
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RMRWKJ7P5L99pNgDqK3B8t
This was referenced Nov 1, 2026
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 2, 2026
The shared template is now clean under shellcheck enable=all (ai-config#346, e6c3fecc), so the file-wide SC2249,SC2310,SC2311 disable this hook needed for the block alone (#160) is removed and the hook's own code is linted at full strength again. Block sha256 repinned to 554c1385. No behaviour change. Claude-Session: https://claude.ai/code/session_01RMRWKJ7P5L99pNgDqK3B8t Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
scripts/pre-pushnow loads ai-config's shared push-content gate for every push to master or main. This is PR4 of ai-config spec2026-10-30-shared-push-content-gate-design.md(ADR-0091).#!/usr/bin/env -S bash -p.${_pcg_refs}.tests/pre_push.bats(16 tests, no network) runs inmake testthrough a newtest-hookstarget, and in two new steps of CI's existingtestjob.auto-merge'sneeds:is unchanged, becausetestis already in it.Changes
scripts/pre-push:d556979b…from ai-config34cf3bee, and thebash -pshebang.${_pcg_refs}behind a non-empty check.^scripts/, so a change to the hook or toscripts/*.pynow runsmake test.# shellcheck disable=SC2249,SC2310,SC2311, explained in a comment. This repo's.shellcheckrcsetsenable=all, and the byte-identical block trips those three info-level checks. A directive placed just above the block does not reach its later commands: measured, 7 findings remain. Editing the block would break the pin.tests/pre_push.bats: a throwaway git repo per test, withHOME/XDG_CONFIG_HOMEredirected andgh/makestubbed first onPATH. It covers:origin/main;REPO_ROOTfallback, with the hook run from.git;awkandcatonPATH;make test-hooksitself, with the tools missing, both with and withoutCI.Makefile:test: lint test-hooks.test-hooksruns shellcheck on the suite at warning level, then bats;make lintalready shellchecks the hook. A missing tool prints its remedy and skips locally, and fails underCI..github/workflows/ci.yml: in thetestjob,Install bats(apt) andRun hook tests(make test-hooks). The pinned shellcheck install already precedes them.CLAUDE.mdandREADME.md: the trigger-gap note, the pre-push line, themake testandmake test-hooksentries, the CI table row, and the prerequisites. Also the plan.Test Plan
make test </dev/nullat4340578: lint and shellcheck OK, bats 16/16, nextest 1185/1185, pytest 197 passed.^Cargo, unanchored;continue, changed;_diff_rcfail-closed branch, disabled;|| :;make -C, removed;REPO_ROOTfallback, broken;CIcheck, removed;-nchanged to-zon the_pcg_refsguard.scripts/pre-pushinstalled and pushing to a local bare remote. Expected: code to main is refused with[file rule R2], docs to main is permitted, and a feature push is permitted.Risk
gh authis unavailable. Feature pushes make no network call.enable=allis the real fix, and is an ai-config Backlog row.Code review
reviewed-sha: 4340578
diff-hash: a8f16b273038420e748789a7dc262d5d6e2e93f1695c003bddb45f9d642cd31f
reviewers: 5/5
The lenses read the diff at
6f768a1. Lenses 3 (history) and 4 (earlier PRs) ran inline:Lens 2 found no bug.
Lens 5 found four stale docs, all fixed in
4340578:make testline;make testline and prerequisites;SC2034comment.It also found the ai-config knowledge note on the trigger gap stale. That note is updated after merge, as an ai-config docs commit.
Lens 1 raised one finding, kept: the file-wide shellcheck disable also covers the hook's own code. The narrower form it suggested, a directive just above the block, was measured and leaves 7 findings. Fixing it needs the template made clean under
enable=all, which is an ai-config Backlog row.test-quality-review held on cycle 1 and passed on cycle 2 after
4340578. The session took the CLAUDE.md paths and the summary itself. Findings were not scored. The fix commit was verified by test-quality-review and bymake testat4340578, not by a new 5-lens round.Required
Informational
Kept
# shellcheck disable=SC2249,SC2310,SC2311covers the hook's own logic too. Kept because the scoped alternative leaves 7 findings and the block is hash-pinned (lens 1).RESOLVED: 4 fixed, 1 kept
Spec alignment
SKIP: the spec lives in ai-config, and the tooling reads only a spec in the same repo (operator decision, 2026-10-31). R13 as amended on 2026-10-31 is copied into the plan. The plan-time non-goal check found N1–N6 CLEAR.
🤖 Generated with Claude Code
https://claude.ai/code/session_01RMRWKJ7P5L99pNgDqK3B8t