main fails pre-commit, blocking any commit including a two-file deletion #1678

Closed
opened 2026-08-20 09:19:18 +00:00 by coilyco-ops · 0 comments
Owner

main does not pass its own pre-commit suite, so no commit can land here without --no-verify, which house rules forbid. Found while running the fleet CODEOWNERS removal (coilyco-bridge/agentic-os-kai#889): deleting two files was enough to trip whole-repo always_run hooks on violations in files the change never touched.

Clean checkout of main, staging only the deletion of .forgejo/CODEOWNERS and .github/CODEOWNERS:

golangci-lint

cmd/ward/audit_test.go:1:1: File is not properly formatted (gofmt)
cmd/ward/repocfg_test.go:1:1: File is not properly formatted (gofmt)
internal/agents/claude/smoke.go:279-296: SA4023 the lhs of the comparison is the 3rd return value of this function call, comparison is always true (staticcheck, 4 findings)

The staticcheck findings look real rather than cosmetic. diskFreeBytes appears to return three values while the call sites bind free, _, err and free, total, err and then test err != nil, which staticcheck reads as always true.

code-comments

cmd/ward/agent.go:1338: comment block of 3 lines starting at 1336
cmd/ward/agent_flags_test.go:38: comment block of 3 lines starting at 36

source-doc-refs

cmd/ward/agent.go:1338: dead source doc reference docs/ward-agent-dispatch.md
cmd/ward/agent.go:1386: dead source doc reference docs/ward-agent-dispatch.md
cmd/ward/agent_flags.go:44: dead source doc reference docs/documentation-bands.md

Both referenced docs are absent from docs/, so either they were removed without updating the pointers or they never landed.

Why this matters beyond the lint

Every one of these hooks is always_run: true and scans the whole tree, so the repo is in a state where an unrelated one-line change cannot be committed. That converts a red main into a hard block on all work here, not a warning.

Left undone

ward is the only repo in the fleet still carrying * @coilysiren in .forgejo/CODEOWNERS and .github/CODEOWNERS for this reason. Every other active repo has had them removed. Re-run the deletion once main is green:

git rm .forgejo/CODEOWNERS .github/CODEOWNERS

Filed rather than fixed because fixing gofmt and staticcheck in internal/agents/claude is not a CODEOWNERS sweep, and the staticcheck finding deserves someone who knows what diskFreeBytes is supposed to return.

`main` does not pass its own pre-commit suite, so no commit can land here without `--no-verify`, which house rules forbid. Found while running the fleet CODEOWNERS removal (coilyco-bridge/agentic-os-kai#889): deleting two files was enough to trip whole-repo `always_run` hooks on violations in files the change never touched. Clean checkout of `main`, staging only the deletion of `.forgejo/CODEOWNERS` and `.github/CODEOWNERS`: **golangci-lint** ``` cmd/ward/audit_test.go:1:1: File is not properly formatted (gofmt) cmd/ward/repocfg_test.go:1:1: File is not properly formatted (gofmt) internal/agents/claude/smoke.go:279-296: SA4023 the lhs of the comparison is the 3rd return value of this function call, comparison is always true (staticcheck, 4 findings) ``` The staticcheck findings look real rather than cosmetic. `diskFreeBytes` appears to return three values while the call sites bind `free, _, err` and `free, total, err` and then test `err != nil`, which staticcheck reads as always true. **code-comments** ``` cmd/ward/agent.go:1338: comment block of 3 lines starting at 1336 cmd/ward/agent_flags_test.go:38: comment block of 3 lines starting at 36 ``` **source-doc-refs** ``` cmd/ward/agent.go:1338: dead source doc reference docs/ward-agent-dispatch.md cmd/ward/agent.go:1386: dead source doc reference docs/ward-agent-dispatch.md cmd/ward/agent_flags.go:44: dead source doc reference docs/documentation-bands.md ``` Both referenced docs are absent from `docs/`, so either they were removed without updating the pointers or they never landed. ## Why this matters beyond the lint Every one of these hooks is `always_run: true` and scans the whole tree, so the repo is in a state where an unrelated one-line change cannot be committed. That converts a red `main` into a hard block on all work here, not a warning. ## Left undone ward is the only repo in the fleet still carrying `* @coilysiren` in `.forgejo/CODEOWNERS` and `.github/CODEOWNERS` for this reason. Every other active repo has had them removed. Re-run the deletion once `main` is green: ```sh git rm .forgejo/CODEOWNERS .github/CODEOWNERS ``` Filed rather than fixed because fixing gofmt and staticcheck in `internal/agents/claude` is not a CODEOWNERS sweep, and the staticcheck finding deserves someone who knows what `diskFreeBytes` is supposed to return.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/ward#1678
No description provided.