chore: fix unchecked errors in test setup and assertions
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start by reading internal/agentkit/agentkit_test.go for the error-checking pattern, then review the listed test files and run their Go tests. Check every listed setup and assertion error, strengthen TestRunInit_ForceOverwrites to assert the expected content, and add coverage for WorktreeCleanup with cleanupAll=true; done means those cases are checked and the affected tests pass.
Written by the indexing model from the issue text.
Description
Context
Review council on PR #61 flagged systematic unchecked errors in test setup and assertion code across multiple test files. These are pre-existing issues, not regressions from #61.
Files
cmd/replicator/init_test.go—os.MkdirAll,os.WriteFile,os.ReadFileerrors discardedcmd/replicator/serve_test.go—os.MkdirAll,os.WriteFileerrors discardedinternal/gitutil/git_test.go—WorktreeAdd,os.WriteFile,Runerrors discardedinternal/forge/worktree_test.go—WorktreeCreate,os.WriteFile,Runerrors discardedinternal/forge/init_test.go,spawn_test.go,review_test.go,progress_test.go,insights_test.go—DB.Exec,DB.QueryRow().Scan()errors discardedinternal/mcp/server_test.go—json.Unmarshalerrors discarded in assertionstest/parity/parity_test.go—json.Unmarshalerrors discarded in setup
Pattern
Replace os.WriteFile(path, data, 0o644) with:
if err := os.WriteFile(path, data, 0o644); err != nil {
t.Fatalf("setup WriteFile: %v", err)
}
The fix in internal/agentkit/agentkit_test.go (PR #61) shows the correct pattern.
Additional items
cmd/replicator/init_test.go:TestRunInit_ForceOverwritesuses a negative-only assertion (checks content is different but not what it should be). Should assert equality with embedded content.internal/forge/worktree_test.gohas no test for thecleanupAll=truebranch ofWorktreeCleanup, contributing to CRAP score 65.9.
- Dominant language
- Go
- Stars
- 0
- Forks
- 9
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 18
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from unbound-force/replicator
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
unbound-force/replicator#95 ·
Maintainers usually reply within 1 day
-
bug github_actions
Difficulty 2/5 Under an hour Newbie friendliness 80/100
unbound-force/replicator#89 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
unbound-force/replicator#85 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
unbound-force/replicator#77 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
unbound-force/replicator#63 ·
Maintainers usually reply within 1 day
All issues in unbound-force/replicator
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
unbound-force/gaze#353 ·
Maintainers usually reply within 1 day
-
bug cross-seed ready-for-human
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
OneBusAway/maglev#2102 ·
Maintainers usually reply within 2 days
-
affects-8.5 component/session severity/moderate sig/transaction type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area: client enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
opensro-dev/opensro#3681 ·
Maintainers usually reply within 1 day