Three installers, two destinations, and only one of them can run - #3185
Merged
Merged
Conversation
…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>
Contributor
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
Contributor
PR DashboardGenerated at: 2026-09-04 16:56:59 UTC
Summary
Seal Status
|
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
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.
The planned sweep dissolved on its first measurement
#3184 left "sweep the tree for
for x in $VAR" as the next step. Measured first:The defect that has cost me four readings is zsh-only, and every script here runs under bash or
shin 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:
Proven in a scratch repository rather than asserted: with
core.hooksPathunset 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-commitis 157 lines andscripts/githooks/pre-commitis 3 — not the same gate. Four hook directories exist.tri hooks statusReports 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.
.gitthere is a FILE and$GIT_DIRis.git/worktrees/<name>, while git resolves hooks from the common directory — soroot.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 asksgit 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.md527–528.Refs #3176