Skip to content

chore: remove shadowed .lefthook.yml - #116

Merged
arcaven merged 1 commit into
developfrom
chore/remove-shadowed-lefthook-config
Aug 7, 2026
Merged

arcaven merged 1 commit into
developfrom
chore/remove-shadowed-lefthook-config

Conversation

@arcaven

@arcaven arcaven commented Aug 7, 2026

Copy link
Copy Markdown
Member

forestage carried two lefthook configs, .lefthook.yml (Apr 1) and
lefthook.yml (Apr 17), each defining a pre-commit fmt command with
different settings. Nothing in the repo said which one lefthook reads, so
anyone tightening the pre-commit hook had even odds of editing a file
that never runs.

lefthook 2.1.10 loads lefthook.yml and ignores .lefthook.yml when
both exist. Verified two ways:

  • lefthook dump in this repo returns lefthook.yml's content exactly:
    glob: '*.rs', stage_fixed: true, a pre-push block, and none of
    .lefthook.yml's glob_matcher: doublestar or its pre-commit clippy.
  • A scratch repo holding both files with distinguishing markers resolved
    to the undotted one; removing it flipped the result to the dotted one,
    confirming precedence rather than coincidence.

Neither run merged the two.

Removing the shadowed file changes no hook behavior: lefthook dump
returns identical output before and after the deletion, and nothing in
the repo references .lefthook.yml by name. The pre-push hook (clippy
plus the full test suite) ran clean on this branch.

Nothing is lost. The removed file's pre-commit clippy already runs at
pre-push in lefthook.yml. Its export PATH="$HOME/.cargo/bin:$PATH"
prepend was a hand-rolled workaround for ambient tool resolution, which
aae-orc-evcp addresses properly. That prepend also turns out to have been
load-bearing: pushing this branch failed with cargo: command not found
until the push was run under mise x rust@1.97.1, so the pre-push hook
in lefthook.yml has the same gap and no workaround.

Refs: aae-orc-9nfg

The repo carried two lefthook configs, .lefthook.yml (Apr 1) and
lefthook.yml (Apr 17), each defining a pre-commit fmt command with
different settings. Nothing in the repo said which one ran, so a
maintainer editing .lefthook.yml would be editing a file lefthook never
reads.

lefthook 2.1.10 loads lefthook.yml and ignores .lefthook.yml when both
are present. Verified two ways: 'lefthook dump' in this repo returned
lefthook.yml's content exactly (glob '*.rs', stage_fixed, a pre-push
block, and none of .lefthook.yml's glob_matcher or pre-commit clippy),
and a scratch repo with both files and distinguishing markers resolved
to the undotted one. Neither run merged the two.

Removing the shadowed file changes no hook behavior: 'lefthook dump'
returns identical output before and after.

The removed file's pre-commit clippy is not lost; lefthook.yml runs
clippy at pre-push. Its 'export PATH=$HOME/.cargo/bin' prepend was a
hand-rolled fix for ambient tool resolution, which aae-orc-evcp covers
properly.

Refs: aae-orc-9nfg
@arcaven
arcaven merged commit 380196c into develop Aug 7, 2026
16 checks passed
@arcaven
arcaven deleted the chore/remove-shadowed-lefthook-config branch August 7, 2026 07:57
@arcaven arcaven added the type.infra CI, workflows, repo settings, tooling, environment label Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type.infra CI, workflows, repo settings, tooling, environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant