You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The push hook runs every *.repo.test.ts, so a bug/<n>-repro branch cannot push a failing repo test #1817
`lefthook.yml:58-61` runs `pnpm exec vitest run --project unit .repo.test.ts` on every push, with no exception for `bug/-repro` branches. A triage whose reproduction reads repository files is a `*.repo.test.ts` (toolchain.md, Commit hook / Push hook), and by design it fails, so the push is refused:
🥊 repo-tests: A test of the repository's own files fails (a size cap, the ADR index, a doc's audience)
error: failed to push some refs
`--no-verify` is refused by the tool guard, so the triager has to give the test another name to push it. Either skip the triage's own failing test on a `bug/-repro` push, or say in the triage-bug skill what a repo-file reproduction is named.
Confirmed. src/push-hook.test.ts on bug/1817-repro, "does not run the repo tests on %s, whose reproduction fails by design", for bug/7-repro and wip/7-repro (the skill's fallback branch that pushes to bug/<n>-repro). It runs the real repo-tests job in a scratch repo with a failing stand-in pnpm. The control, "runs every repo test on any other branch and refuses the push when one fails" (task/7), passes. This is a gap: the expectation, skip on those two branches, is a proposal.
pnpm exec vitest run --project unit src/push-hook.test.ts
- "pnpm": null,
- "status": 0,
+ "pnpm": "exec vitest run --project unit .repo.test.ts\n",
+ "status": 1,
❯ src/push-hook.test.ts:61:37
Tests 2 failed | 1 passed (3)
Checked live too: a throwaway failing src/zz-1817-probe.repo.test.ts made lefthook run pre-push --command repo-tests --force print 🥊 repo-tests: A test of the repository's own files fails.
Root cause
Gap. lefthook.yml:58-61 runs every *.repo.test.ts on every push, as toolchain.md (Push hook) describes. Nothing exempts the branch where delivery rule 8 requires a failing test. So a reproduction that reads repository files, named *.repo.test.ts per toolchain.md, can only be pushed under another name, as #1815's was.
Simplest fix
Skip the job on the two triage branches. CI still runs every repo test on every push.
Also change toolchain.md's Push hook line to say the job is skipped there, and rename the test to src/push-hook.repo.test.ts, since it reads lefthook.yml.
pnpm exec vitest run --project unit src/push-hook.test.ts src/commit-msg-check.test.ts .repo.test.ts
Test Files 11 passed (11) Tests 112 passed (112)
Alternatives rejected
Have the triage-bug skill name repo-file reproductions *.test.ts: this breaks toolchain.md's naming, and the fix PR has to rename the test.
Exclude only the test files the branch adds against origin/main: this needs a script for a branch that only adds one test, which is more than the case needs.
Risk
Lefthook matches ref against the checked-out branch, not the ref being pushed. A push from any other local branch to bug/<n>-repro still runs the job.
A triage test that breaks another repo test (a size cap, hygiene) is now caught only by CI.
Fast track
Defect: no — a gap, the skip is a proposal
Fix tried: yes
Nothing public added or broken: yes
No ADR or rule changed: no — toolchain.md's Push hook text changes
One fix: no — the skill-naming alternative is another fix
Activity
V3RON commentedon Nov 24, 2026
Reproduction
Confirmed.
src/push-hook.test.tsonbug/1817-repro, "does not run the repo tests on %s, whose reproduction fails by design", forbug/7-reproandwip/7-repro(the skill's fallback branch that pushes tobug/<n>-repro). It runs the realrepo-testsjob in a scratch repo with a failing stand-inpnpm. The control, "runs every repo test on any other branch and refuses the push when one fails" (task/7), passes. This is a gap: the expectation, skip on those two branches, is a proposal.Checked live too: a throwaway failing
src/zz-1817-probe.repo.test.tsmadelefthook run pre-push --command repo-tests --forceprint🥊 repo-tests: A test of the repository's own files fails.Root cause
Gap.
lefthook.yml:58-61runs every*.repo.test.tson every push, as toolchain.md (Push hook) describes. Nothing exempts the branch where delivery rule 8 requires a failing test. So a reproduction that reads repository files, named*.repo.test.tsper toolchain.md, can only be pushed under another name, as #1815's was.Simplest fix
Skip the job on the two triage branches. CI still runs every repo test on every push.
Also change toolchain.md's Push hook line to say the job is skipped there, and rename the test to
src/push-hook.repo.test.ts, since it readslefthook.yml.Alternatives rejected
*.test.ts: this breaks toolchain.md's naming, and the fix PR has to rename the test.origin/main: this needs a script for a branch that only adds one test, which is more than the case needs.Risk
refagainst the checked-out branch, not the ref being pushed. A push from any other local branch tobug/<n>-reprostill runs the job.Fast track
Written by an agent.
V3RON commentedon Nov 24, 2026
Delivery run
Merged: #1821 (#1817)
Parked: none
Waiting: none
Decided: none
Written by an agent.
fix(hooks): the push hook skips the repo tests on a triage branch (ca…