-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Context
This follow-up task was identified during the review of PR #173.
Source PR: #173
PR Title: refactor: extract shared slug package; add ParseFile warning integration test
Suggested by: @claude[bot] (across 3 review rounds)
Task Description
The TestParseFileDuplicateAnchorWarning test captures warnings by swapping the global os.Stderr with a pipe. This works but is fragile — it's not parallel-safe and mutates global state.
A cleaner approach is to thread an io.Writer parameter through ParseFile (or preprocessAutoTasks) so the test can pass a bytes.Buffer directly. This would:
- Make the warning output testable without global state mutation
- Allow parallel test execution
- Follow Go best practices for dependency injection
Original Comment
A safer pattern is to thread an
io.WriterthroughParseFile(orpreprocessAutoTasks), so the test can pass abytes.Bufferdirectly. If the API surface is not worth changing, the test should at minimum add a comment explaining why it must not run in parallel with other tests that write to stderr.
This issue was automatically created by prmonitor from PR review comments.