chore: code-comments sweep slice 5/5 - cmd/coily test files (non-ops/gh) + integration test #91

Open
opened 2026-05-26 05:22:47 +00:00 by coilysiren · 0 comments
Owner

Problem

Subset of #334. 176 violations across 14 test files that aren't ops_*_test.go or gh_*_test.go:

  • cmd/coily/brew_test.go
  • cmd/coily/cfg_test.go
  • cmd/coily/denial_reason_test.go
  • cmd/coily/main_test.go
  • cmd/coily/mcporter_rewrite_test.go
  • cmd/coily/passthroughs_test.go
  • cmd/coily/runner_test.go
  • cmd/coily/runtime_test.go
  • cmd/coily/runtime_wrapverb_test.go
  • cmd/coily/scoop_test.go
  • cmd/coily/security_claims_test.go (119 violations - biggest single file in this slice)
  • cmd/coily/upgrade_test.go
  • test/integration/whoami_test.go (18 violations, has //go:build integration directive at line 1)

Directive lines (block-aware fix needed):

  • cmd/coily/security_claims_test.go:509 - //nolint:unused inside a godoc block
  • test/integration/whoami_test.go:1 - //go:build integration (standalone, fine)

Sequencing

Recommend sweeping after the prod-side godoc shape settles (#334 slices 1-4). Tests often paraphrase production godocs and sweeping the prod side first means the test-side rewrite has a stable target to mirror.

Fix

Per #334's rules. Test setup blocks usually collapse aggressively - test names already document intent.

Verify:

pre-commit run code-comments --files cmd/coily/*_test.go test/integration/whoami_test.go
make test

Refs


Ported from coilysiren/coily#342.

**Problem** Subset of #334. 176 violations across 14 test files that aren't `ops_*_test.go` or `gh_*_test.go`: - `cmd/coily/brew_test.go` - `cmd/coily/cfg_test.go` - `cmd/coily/denial_reason_test.go` - `cmd/coily/main_test.go` - `cmd/coily/mcporter_rewrite_test.go` - `cmd/coily/passthroughs_test.go` - `cmd/coily/runner_test.go` - `cmd/coily/runtime_test.go` - `cmd/coily/runtime_wrapverb_test.go` - `cmd/coily/scoop_test.go` - `cmd/coily/security_claims_test.go` (119 violations - biggest single file in this slice) - `cmd/coily/upgrade_test.go` - `test/integration/whoami_test.go` (18 violations, has `//go:build integration` directive at line 1) **Directive lines** (block-aware fix needed): - `cmd/coily/security_claims_test.go:509` - `//nolint:unused` inside a godoc block - `test/integration/whoami_test.go:1` - `//go:build integration` (standalone, fine) **Sequencing** Recommend sweeping after the prod-side godoc shape settles (#334 slices 1-4). Tests often paraphrase production godocs and sweeping the prod side first means the test-side rewrite has a stable target to mirror. **Fix** Per #334's rules. Test setup blocks usually collapse aggressively - test names already document intent. Verify: ``` pre-commit run code-comments --files cmd/coily/*_test.go test/integration/whoami_test.go make test ``` **Refs** - Parent: #334 - Dispatch survey: https://github.com/coilysiren/coily/issues/334#issuecomment-4539785886 --- _Ported from coilysiren/coily#342._
coilysiren added
P4
and removed
P3
labels 2026-05-31 06:59:44 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
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-bridge/coily#91
No description provided.