Audit the remaining golangci-lint autofix changes in 6d4e0be #890

Closed
opened 2026-10-27 13:38:10 +00:00 by sam · 0 comments
Owner

Commit 6d4e0be applied a golangci-lint --fix batch across 8 files. One of the eight was a behaviour regression: the errorlint fix in internal/tools/builtin/grep.go rewrote 'if exitErr, ok := err.(*exec.ExitError); ok && exitErr.ExitCode() == 1' into 'errors.As(err, &exitErr)' and dropped the exit-code check, so any ripgrep failure (bad pattern, unreadable path) was reported to the model as 'no matches found' -- the agent would state a file contains nothing on the strength of a search that never ran. Fixed in 782510d. The other seven changes were eyeballed as benign (naked return expanded, err != ctx.Err() -> errors.Is) but were never verified individually. A one-in-eight regression rate does not justify trusting the remainder on inspection alone.

Acceptance Criteria

Each remaining changed hunk in 6d4e0be is reviewed against its pre-fix behaviour, specifically for predicates that were narrowed or widened. internal/channels/telegram/model.go, internal/infrastructure/configuration/discovery.go, internal/tools/builtin/find.go, internal/tools/builtin/shell.go and the touched test files are covered. Any behaviour change found gets a regression test in the style of TestGrepReportsSearchFailureRatherThanNoMatches.


Imported from beads archie-core-1786637499227-359-c3682a55 · GitHub #380 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-08

Commit 6d4e0be applied a golangci-lint --fix batch across 8 files. One of the eight was a behaviour regression: the errorlint fix in internal/tools/builtin/grep.go rewrote 'if exitErr, ok := err.(*exec.ExitError); ok && exitErr.ExitCode() == 1' into 'errors.As(err, &exitErr)' and dropped the exit-code check, so any ripgrep failure (bad pattern, unreadable path) was reported to the model as 'no matches found' -- the agent would state a file contains nothing on the strength of a search that never ran. Fixed in 782510d. The other seven changes were eyeballed as benign (naked return expanded, err != ctx.Err() -> errors.Is) but were never verified individually. A one-in-eight regression rate does not justify trusting the remainder on inspection alone. ### Acceptance Criteria Each remaining changed hunk in 6d4e0be is reviewed against its pre-fix behaviour, specifically for predicates that were narrowed or widened. internal/channels/telegram/model.go, internal/infrastructure/configuration/discovery.go, internal/tools/builtin/find.go, internal/tools/builtin/shell.go and the touched test files are covered. Any behaviour change found gets a regression test in the style of TestGrepReportsSearchFailureRatherThanNoMatches. --- _Imported from beads `archie-core-1786637499227-359-c3682a55` · GitHub #380 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam added the mediumbug labels 2026-10-27 13:38:10 +00:00
sam self-assigned this 2026-10-27 13:38:10 +00:00
sam closed this issue 2026-10-27 13:38:10 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#890