Skip to content

chore: drop Entire hooks from the init template - #90

Merged
N4M3Z merged 2 commits into
mainfrom
chore/remove-entire
Nov 24, 2026
Merged

N4M3Z merged 2 commits into
mainfrom
chore/remove-entire

Conversation

@N4M3Z

@N4M3Z N4M3Z commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Note

Remove Entire Git hooks from the init template

  • Deletes the Entire hook templates (commit-msg, post-commit, post-rewrite, prepare-commit-msg, pre-push.pre-entire) from both the repository's .githooks and templates/init/.githooks
  • Replaces the Entire pre-push wrapper in templates/init/.githooks/pre-push with the validation logic: prek when available, forge validate otherwise, then a SHA-256-checked validate.sh download fallback
  • Removes the Entire Claude Code hook config in rune-docs/.claude/settings.json and marks CLI-0009 as superseded in docs/decisions/CLI-0009 Entire Git-Hook Coexistence.md
  • Updates tests in src/cli/init/tests.rs to assert init ships no Entire hooks and that pre-push contains validate.sh with a substituted SHA
  • Behavioral Change: newly initialized projects run pre-push validation directly via prek, forge validate, or the validate.sh fallback instead of invoking Entire; the pre-push chain to pre-push.pre-entire is gone

Macroscope summarized 1e2244e.

Plan

Changes

Testing

Release Notes

  • N/A

Entire is retired on every machine and project. Sessions, not git
commits, are the artifact worth keeping, and the agentsview session
archive keeps them. Commit-anchored checkpoints did not survive jj
rewrites and squash merges.

The init template restores its original pre-push hook and drops the
Entire capture hooks, so new projects no longer inherit Entire. The
repository hooks drop the same capture hooks, the Entire-only
pre-push.local, and the unused pre-push.pre-entire backup. CLI-0009
is marked superseded.

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
@github-actions github-actions Bot added area:docs auto: documentation and markdown area:hooks auto: git hooks size:med auto: changed-lines bucket labels Nov 23, 2026
@runeseer

runeseer Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

review/correctness round 1 started on 73674369 at ledger generation 1.

@runeseer

runeseer Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @N4M3Z's task in 2m 58s —— View job


Review

  • Read lane inputs, ledger, and previous verdict
  • Review the diff (736743698033d870be93fb82fc0ed498f3fedeaa, 14 files)
  • Judge other lanes' findings
  • Write verdict, findings, and summary files

Request changes. The template pre-push that now runs the validation check directly still names the wrong project, so its download fallback checks a forge-cli script against rune's embedded hash and always fails.

Medium — scaffolded pre-push fallback can never pass its hash check

templates/init/.githooks/pre-push:7 fetches validate.sh from N4M3Z/forge-cli, while line 8's SCRIPT_SHA resolves to rune::VALIDATE_SH_SHA — the sha256 of this repository's scripts/validate.sh (build.rs:30, src/cli/validate/templates.rs:16). A successful download therefore mismatches and the hook exits 1 with update SCRIPT_SHA after verifying the new script. Line 12 probes forge rather than rune, so a machine with rune installed but no prek drops into that dead fallback instead of running rune validate. The sibling templates/init/.githooks/pre-commit:7 uses runedeck/rune and rune.

The wrong-project text is carried over verbatim from the deleted pre-push.pre-entire, not introduced here — but it now sits on the hook every scaffolded module invokes. Fix this →

Checked and clean

  • Hook removals are safe: rune init enumerates the template directory through rust_embed (src/cli/validate/templates.rs:3-5) with no hardcoded hook list, so the deleted files simply stop shipping.
  • Deleting .githooks/pre-push.local does not break this repo's own hook — .githooks/pre-push:41 guards the extension point with -x.
  • ${VALIDATE_SH_SHA} substitution is path-independent, so moving the placeholder from pre-push.pre-entire to pre-push keeps init_pre_push_is_validation_check sound.
  • ADR status: superseded is a valid enum value in schemas/rune-adr.schema.json:61, with no conditional superseded-by requirement.

No findings from other reviewers to adjudicate and no open review threads.
· branch chore/remove-entire

@github-actions github-actions Bot added the issue:rune Review lane requires intervention label Nov 23, 2026
rune-docs/.claude/settings.json held only Entire hook commands and the
.entire deny rule. The session-start hook printed "Entire CLI is enabled
but not installed" in every Claude session there.

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
@runeseer

runeseer Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

review/correctness round 2 started on 1e2244e0 at ledger generation 1.

@runeseer

runeseer Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @N4M3Z's task in 1m 49s —— View job


Review

  • Read lane inputs, ledger, and previous verdict
  • Review the diff (1e2244e0f3f24053a94b8f0ac06a55c37c002d05, 15 files)
  • Recheck the open ledger finding against HEAD
  • Judge other lanes' findings
  • Write verdict, findings, and summary files

Request changes. The scaffolded pre-push still points at N4M3Z/forge-cli while its SHA comes from this repository, so the finding from the previous round is still open.

Medium — scaffolded pre-push fallback can never pass its hash check

templates/init/.githooks/pre-push:7 fetches validate.sh from N4M3Z/forge-cli, while line 8's SCRIPT_SHA resolves to rune::VALIDATE_SH_SHA — the sha256 of this repository's scripts/validate.sh (src/cli/validate/templates.rs:16). A successful download therefore mismatches and the hook exits 1 with update SCRIPT_SHA after verifying the new script. Line 12 probes forge rather than rune, so a machine with rune installed but no prek drops into that dead fallback instead of running rune validate. The sibling templates/init/.githooks/pre-commit:7 uses runedeck/rune and rune.

The only commit added this round (1e2244e) deletes rune-docs/.claude/settings.json and does not touch the template hook. Fix this →

Checked and clean

  • No dangling references to the deleted hooks remain anywhere in src/, tests/, build.rs, or schemas/ — only the new negative assertions in src/cli/init/tests.rs:362-376.
  • This repository's own .githooks/pre-push is the real validation hook, not an Entire wrapper, and line 41 guards the pre-push.local extension point with -x, so deleting pre-push.local and pre-push.pre-entire breaks nothing.
  • rune init enumerates templates through rust_embed (src/cli/validate/templates.rs:3-5) with no hardcoded hook list, so the deleted template files simply stop shipping.
  • ${VALIDATE_SH_SHA} substitution is path-independent, so moving the placeholder onto pre-push keeps init_pre_push_is_validation_check sound.
  • ADR status: superseded with the dated supersession note is consistent with the schema enum.

No findings from other reviewers to adjudicate: all lane inputs are empty this round.
· branch chore/remove-entire

Comment on lines +4 to +24
# forge module pre-push hook — runs the pre-push-staged gates (gitleaks, semgrep).
# Canonical source: https://github.com/N4M3Z/forge-cli/blob/main/templates/init/.githooks/pre-push

SCRIPT_URL="https://raw.githubusercontent.com/N4M3Z/forge-cli/main/scripts/validate.sh"
SCRIPT_SHA="${VALIDATE_SH_SHA}"

if command -v prek >/dev/null 2>&1; then
prek run --all-files --stage pre-push
elif command -v forge >/dev/null 2>&1; then
forge validate
else
echo ""
echo " ⚠ Neither prek nor forge found — using validate.sh fallback"
echo " Install: cargo install --locked forge-cli or cargo binstall prek"
echo ""

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT

curl --max-time 30 -sfL "$SCRIPT_URL" -o "$tmpdir/validate.sh" 2>/dev/null \
|| { echo "validate.sh unreachable — install forge-cli or check connectivity"; exit 1; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [runeseer] reported by reviewdog 🐶
Medium — The scaffolded pre-push fallback fetches validate.sh from N4M3Z/forge-cli and checks it against this repository's embedded SHA, so the hash comparison can never pass and every push from a scaffolded module without prek aborts with a misleading "update SCRIPT_SHA" message.

  • templates/init/.githooks/pre-push:8 SCRIPT_SHA resolves to rune::VALIDATE_SH_SHA, the sha256 of this repository's scripts/validate.sh.
  • templates/init/.githooks/pre-commit:7 the sibling template fetches the same script from runedeck/rune and probes rune, not forge.
Suggested change
# forge module pre-push hook — runs the pre-push-staged gates (gitleaks, semgrep).
# Canonical source: https://github.com/N4M3Z/forge-cli/blob/main/templates/init/.githooks/pre-push
SCRIPT_URL="https://raw.githubusercontent.com/N4M3Z/forge-cli/main/scripts/validate.sh"
SCRIPT_SHA="${VALIDATE_SH_SHA}"
if command -v prek >/dev/null 2>&1; then
prek run --all-files --stage pre-push
elif command -v forge >/dev/null 2>&1; then
forge validate
else
echo ""
echo " ⚠ Neither prek nor forge found — using validate.sh fallback"
echo " Install: cargo install --locked forge-cli or cargo binstall prek"
echo ""
tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
curl --max-time 30 -sfL "$SCRIPT_URL" -o "$tmpdir/validate.sh" 2>/dev/null \
|| { echo "validate.sh unreachable — install forge-cli or check connectivity"; exit 1; }
# rune module pre-push hook — runs the pre-push-staged gates (gitleaks, semgrep).
# Canonical source: https://github.com/runedeck/rune/blob/main/templates/init/.githooks/pre-push
SCRIPT_URL="https://raw.githubusercontent.com/runedeck/rune/main/scripts/validate.sh"
SCRIPT_SHA="${VALIDATE_SH_SHA}"
if command -v prek >/dev/null 2>&1; then
prek run --all-files --stage pre-push
elif command -v rune >/dev/null 2>&1; then
rune validate
else
echo ""
echo " ⚠ Neither prek nor rune found — using validate.sh fallback"
echo " Install: cargo install --locked rune-cli or cargo binstall prek"
echo ""
tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
curl --max-time 30 -sfL "$SCRIPT_URL" -o "$tmpdir/validate.sh" 2>/dev/null \
|| { echo "validate.sh unreachable — install rune-cli or check connectivity"; exit 1; }

@runeseer

runeseer Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Runeseer review — 1 open finding

Risk Finding Location
Medium Scaffolded pre-push fallback checks forge-cli script against rune SHA templates/init/.githooks/pre-push:24

Request changes. The commit under review is the same one as last round, so the scaffolded pre-push still fetches its validation script from N4M3Z/forge-cli while checking it against this repository's hash — the finding is still open.

  • The template's rune/prek probe also still names forge, so a machine with rune installed falls into the dead download path.
  • No other reviewer raised anything this round; Codex's review is still running.

1 open · Reviewed 1e2244e0 · review run · $0.82 · 1m33s · 24 turns

@runeseer

runeseer Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

@N4M3Z, the following findings block this head:

  • templates/init/.githooks/pre-push:24: Scaffolded pre-push fallback checks forge-cli script against rune SHA

Choose one action:

  • Fix all findings. Then apply review:runeseer to review the new head.
  • Apply ignore:runeseer to accept the complete current verdict.

@github-actions github-actions Bot removed the issue:rune Review lane requires intervention label Nov 24, 2026
@N4M3Z
N4M3Z marked this pull request as ready for review November 24, 2026 01:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T01:09:14.819374Z 1e2244e Draft marked ready
🔒 Security Review ✅ Completed 2026-11-24T01:10:33.519703Z 1e2244e Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@runeseer

runeseer Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

review/correctness round 3 started on 1e2244e0 at ledger generation 2.

@runeseer

runeseer Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @N4M3Z's task in 1m 33s —— View job


Review

  • Read lane inputs, ledger, and previous verdict
  • Recheck the open ledger finding against HEAD
  • Judge other lanes' findings
  • Write verdict, findings, and summary files

Request changes. 1e2244e0 is the same commit reviewed last round — no new commits landed — and the scaffolded pre-push defect is unchanged.

Medium — scaffolded pre-push fallback can never pass its hash check

templates/init/.githooks/pre-push:7 fetches validate.sh from N4M3Z/forge-cli, while line 8's SCRIPT_SHA is substituted with rune::VALIDATE_SH_SHA (src/cli/validate/templates.rs:16), the sha256 of this repository's scripts/validate.sh (build.rs:30). The comparison at line 29 always mismatches, so the hook exits 1 with update SCRIPT_SHA after verifying the new script. Line 12 probes forge rather than rune, so a machine with rune installed but no prek drops into that dead fallback instead of running rune validate. The sibling templates/init/.githooks/pre-commit:7 uses runedeck/rune and probes rune.

Fix this →

Other lanes

No inline findings and no submitted review bodies bound to this head. Codex's code and security reviews are still running; their absence does not block this review.
· branch chore/remove-entire

@N4M3Z
N4M3Z merged commit 8506188 into main Nov 24, 2026
32 of 40 checks passed
@N4M3Z
N4M3Z deleted the chore/remove-entire branch November 24, 2026 01:09
@github-actions

Copy link
Copy Markdown

review/correctness stood down on 1e2244e0: free lanes only: the work item pull/90 has spent 3 paid rounds. The pull request waits for the owner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs auto: documentation and markdown area:hooks auto: git hooks size:med auto: changed-lines bucket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant