chore(lint): clear remaining code-comments debt in feature files (residue of #53) #68

Closed
opened 2026-06-04 10:19:19 +00:00 by coilysiren · 2 comments
Owner

The code-comments pre-commit hook (always_run, pass_filenames: false,
whole-repo) currently reports 65 violations across five feature files,
all 3+ line contiguous comment blocks over the 2-line cap. A normal
git commit is blocked by these until they are cleared.

This is the residue of #53. When #53 was filed only dispatch.go and
sudo.go failed (now fixed in 9128157). The remaining debt was
introduced by later feature commits and was deliberately kept out of the
#53 chore to avoid scope-creep into in-flight feature work.

Violation counts by file (pre-commit run code-comments --all-files):

  • hookcfg/hookcfg.go - 16
  • allowlist/allowlist.go - 14
  • repocfg/security.go - 13
  • cmd/cli-guard-hook/main.go - 13
  • hook/hook.go - 9

These are security-relevant files (repocfg/security.go, hookcfg.go),
so the comment trims deserve a real pass that preserves the documentation
intent rather than a mechanical truncation. Move longer explanations to
docs/ where a comment block is genuinely load-bearing.

Done when pre-commit run code-comments --all-files is green.

The `code-comments` pre-commit hook (`always_run`, `pass_filenames: false`, whole-repo) currently reports **65 violations** across five feature files, all 3+ line contiguous comment blocks over the 2-line cap. A normal `git commit` is blocked by these until they are cleared. This is the residue of #53. When #53 was filed only `dispatch.go` and `sudo.go` failed (now fixed in `9128157`). The remaining debt was introduced by later feature commits and was deliberately kept out of the #53 chore to avoid scope-creep into in-flight feature work. Violation counts by file (`pre-commit run code-comments --all-files`): - `hookcfg/hookcfg.go` - 16 - `allowlist/allowlist.go` - 14 - `repocfg/security.go` - 13 - `cmd/cli-guard-hook/main.go` - 13 - `hook/hook.go` - 9 These are security-relevant files (`repocfg/security.go`, `hookcfg.go`), so the comment trims deserve a real pass that preserves the documentation intent rather than a mechanical truncation. Move longer explanations to `docs/` where a comment block is genuinely load-bearing. Done when `pre-commit run code-comments --all-files` is green.
coilysiren added
P2
and removed
P1
labels 2026-06-17 08:39:58 +00:00
Author
Owner

🔒 Reserved by ward agent claude — container ward-cli-guard-issue-68-claude-6a467a66 on host kais-macbook-pro.local is carrying this issue (reserved 2026-06-18T07:30:30Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); --force overrides.

— Claude (she/her), via ward agent

<!-- ward-agent-reservation --> 🔒 Reserved by `ward agent claude` — container `ward-cli-guard-issue-68-claude-6a467a66` on host `kais-macbook-pro.local` is carrying this issue (reserved 2026-06-18T07:30:30Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); `--force` overrides. <!-- ward-agent-signature --> — Claude (she/her), via `ward agent`
Author
Owner

Already resolved on main — no code change required.

The five files named here no longer carry comment-discipline debt:

  • The four feature files (hookcfg/hookcfg.go, allowlist/allowlist.go, repocfg/security.go, hook/hook.go) were relocated under cli/ by 5d09088 (refactor!: reorganize package tree around the three guarded surfaces) — successors are cli/hookcfg/hookcfg.go, cli/allowlist/allowlist.go, cli/repocfg/security.go, cli/hook/hook.go.
  • The remaining comment-discipline violations were cleaned by 71a8b94 (chore(code-comments): clean comment-discipline violations).

Both commits are already on origin/main. Verification of the success criterion against current main:

$ pre-commit run code-comments --all-files
code comment discipline..................................................Passed

Per-successor-file scan (named files + every current *hook*.go) reports 0 violations each. The debt from #53 is gone, so there is nothing left to implement, commit, or merge. Closing.

Already resolved on `main` — no code change required. The five files named here no longer carry comment-discipline debt: - The four feature files (`hookcfg/hookcfg.go`, `allowlist/allowlist.go`, `repocfg/security.go`, `hook/hook.go`) were relocated under `cli/` by `5d09088` (*refactor!: reorganize package tree around the three guarded surfaces*) — successors are `cli/hookcfg/hookcfg.go`, `cli/allowlist/allowlist.go`, `cli/repocfg/security.go`, `cli/hook/hook.go`. - The remaining comment-discipline violations were cleaned by `71a8b94` (*chore(code-comments): clean comment-discipline violations*). Both commits are already on `origin/main`. Verification of the success criterion against current `main`: ``` $ pre-commit run code-comments --all-files code comment discipline..................................................Passed ``` Per-successor-file scan (named files + every current `*hook*.go`) reports 0 violations each. The debt from #53 is gone, so there is nothing left to implement, commit, or merge. Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
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/cli-guard#68
No description provided.