fix(gate): install the hooks on setup and the daily verbs, and arm pre-push #322
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!322
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/ward-hook-install-on-daily-verbs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #320
Closes #323
Two commits. The first arms the hook on the verbs people actually run. The second makes the pre-push stage real.
1. The installer was wired to the wrong verbs
scripts/ward-command.shhas installed a missing pre-commit hook before every verb it carries since #307. But.ward/ward.yamlroutedtest,vet, andtidystraight to their baregocommands, so none of them ever reached that code. The script's ownvet)andtest)cases were unreachable except throughgate, and notidy)case existed at all.The verbs an engineer runs most often on a fresh clone were exactly the ones that installed nothing. A hookless checkout could run
testgreen and then commit straight past the gate.Measured on a fresh clone at
4f936f3, before any edit:ward exec testgo test ./...ward exec vetgo vet ./...ward exec policy-checkFixed by routing
test,vet, andtidythrough the script, adding thetidy)case that never existed, and adding asetupverb that installs to a verdict rather than silently. Namedsetupto matchagentic-os-kaiandagentic-os-hardware.2. The pre-push stage was inert, and the obvious fix was a trap
trufflehoghas declaredstages: [pre-commit, pre-push]for as long as it has existed here. That second stage never fired, becausepre-commit installwrites only the pre-commit hook.Adding
-t pre-pushalone would have been wrong. The config set nodefault_stages, so under pre-commit 4.6.0 every hook naming no stage ran at every stage:go mod tidy,gofmt,go vet, prompt snapshots, actionlint, shellcheckdefault_stages: [pre-commit]pre-pushin its own definitionSo the naive change would have bought a secret scan and silently paid for a near-complete second suite on every push.
default_stagesgoes above therepos:block, outside the regionapply-agentic-os-hooks.pymanages, so a hook rollout will not clobber it. The silent guard also widened to fire when either hook is missing rather than onlypre-commit, so a half-installed checkout repairs itself.Verification
Driven through the real
ward execinterface on a genuinely fresh clone, not through the script:ward exec testexit 0, hook present afterward. Same forvetandtidyward exec setupinstalls both stages from hookless, and re-runs clean over existing hooks.git/hooks/pre-pushis repaired by the next routed verbsetupunderPATH=/usr/bin:/binexits 1 with its messagego.modandgo.sumuntouched by the routedtidycheck-merge-conflictandmixed-line-ending, which declare no stages, are correctly absent from pre-pushgatepasses all six stepsReviewer note
The second commit changes when
trufflehogruns, which is the part worth a second opinion. Everything else only changes when a hook gets installed.fix(gate): install the commit hook on setup and on the daily verbsto fix(gate): install the hooks on setup and the daily verbs, and arm pre-push