Skip to content

Three installers, two destinations, and only one of them can run - #3185

Merged
gHashTag merged 2 commits into
masterfrom
loop/which-hook-is-live
Sep 4, 2026
Merged

gHashTag merged 2 commits into
masterfrom
loop/which-hook-is-live

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 4, 2026

Copy link
Copy Markdown
Owner

The planned sweep dissolved on its first measurement

#3184 left "sweep the tree for for x in $VAR" as the next step. Measured first:

/bin/bash  iterations over "a b c": 3
/bin/sh    iterations over "a b c": 3
/bin/zsh   iterations over "a b c": 1

The defect that has cost me four readings is zsh-only, and every script here runs under bash or sh in CI. A repository gate for it would watch an empty set — the trap lives in my own ad-hoc commands, so its fix is a habit and a memory entry, not code.

Check whether your own defect exists in the subject before sweeping the subject for it.

The adjacent bash-shaped hazard was measured rather than assumed: of 122 for X in ... lines in tracked shell and workflow code — 93 literal lists or globs, 20 quoted, 3 over $(seq …) (numbers, safe), and 3 bare $VAR. Two hold PR numbers and family names; one holds filenames (scripts/install-git-hooks.sh:58), and the population is not empty — 11 tracked paths contain a space, including .trinity/seals/[]const u8.json. It skips a warning, so it is recorded and not fixed: severity is part of the reading.

What the sweep did surface

Three hook installers, writing to two mutually exclusive destinations:

scripts/setup-git-hooks.sh             -> git config core.hooksPath .githooks
scripts/install-git-hooks.sh           -> writes .git/hooks/{pre-commit,pre-push,commit-msg}
scripts/install-constitutional-hook.sh -> writes .git/hooks/pre-commit

Proven in a scratch repository rather than asserted: with core.hooksPath unset a .git/hooks/ hook runs; with it set, that hook is ignored. So running the first installer makes the other two dead letters — they copy files, report success, and install nothing git will execute.

A tool that reports success having done nothing is the class this loop keeps finding; here it is in the installers themselves, three of them, and nothing in the tree said the destinations conflict. Beside it, .githooks/pre-commit is 157 lines and scripts/githooks/pre-commit is 3 — not the same gate. Four hook directories exist.

tri hooks status

Reports what would run: the configured path, the live directory and its hooks, the shadowed directory and its hooks, and per installer whether its output would be live or dead. On this clone it reads "nothing runs at commit time" — the honest state #3184 measured and could not name.

A worktree nearly made it lie. .git there is a FILE and $GIT_DIR is .git/worktrees/<name>, while git resolves hooks from the common directory — so root.join(".git/hooks") reports "none" in every worktree however many hooks are installed. A false clean, in the command whose whole subject is whether anything runs. It asks git rev-parse --git-common-dir; the control is one planted file, seen and then not seen.

It reports what would run and refuses to say what should — the three installers disagree, and choosing between them is a decision, not a measurement.

Mutation: ignoring either input to the verdict turns both tests red. 670 crate tests pass.

SKILL.md 527–528.

Refs #3176

…one runs (#3176)

The planned sweep dissolved on its first measurement. bash and sh iterate 3
times over "a b c"; zsh iterates 1. The trap that has cost me four readings
is zsh-only, and every script here runs under bash or sh in CI, so a gate for
it would watch an empty set. Check whether your own defect exists in the
subject before sweeping the subject for it.

The adjacent bash hazard, measured: of 122 `for X in ...` lines in tracked
shell and workflow code, 93 literal, 20 quoted, 3 over $(seq ...), and 3 a
bare $VAR. One holds filenames, and 11 tracked paths contain a space. It
skips a WARNING, so it is recorded and not fixed.

What the sweep surfaced is larger. Three installers write to two mutually
exclusive destinations: setup-git-hooks.sh sets core.hooksPath=.githooks,
while install-git-hooks.sh and install-constitutional-hook.sh write
.git/hooks/. Proven in a scratch repository rather than asserted: with
core.hooksPath set, .git/hooks is IGNORED. So running the first installer
makes the other two dead letters -- they report success and install nothing
git will execute.

tri hooks status reports what WOULD run: configured path, live directory and
its hooks, shadowed directory and its hooks, and per installer whether its
output is live or dead. On this clone: "nothing runs at commit time" -- the
state #3184 measured and could not name.

A worktree nearly made it lie: .git is a FILE there and hooks resolve from
the COMMON dir, so joining root/.git/hooks reports "none" in every worktree.
Asks `git rev-parse --git-common-dir` instead; control is one planted file.

It refuses to say which installer SHOULD win -- that is a decision, not a
measurement. Mutation: ignoring either input turns both tests red.

670 crate tests pass. SKILL.md 527-528.

Refs #3176

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-04 16:34:55 UTC

Summary

Status Count
Total Open PRs 13
PRs with Failing Checks 10
PRs with All Checks Green 3
READY 1
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

# Conflicts:
#	.claude/skills/ci-gates/SKILL.md
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-04 16:56:59 UTC

Summary

Status Count
Total Open PRs 13
PRs with Failing Checks 11
PRs with All Checks Green 2
READY 0
FAILING 11
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@gHashTag
gHashTag merged commit 9ab0a79 into master Sep 4, 2026
30 checks passed
@gHashTag
gHashTag deleted the loop/which-hook-is-live branch September 4, 2026 16:58
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.

1 participant