mirror of
https://github.com/boshu2/agentops.git
synced 2026-09-14 15:08:13 +08:00
e442a414a8
Add comprehensive error-path tests across all internal packages and cmd/ao. 14 packages now at 100% statement coverage; 4 remaining packages at 98-99% ceiling (provably unreachable defensive code). Key changes: - Add injectable test hooks (getwdFunc, marshalJSON, openFileFunc, etc.) to cover OS-level error branches unreachable on macOS - Cover deferred f.Close() errors, json.Marshal failures on typed structs, filepath.Walk errors, and crypto/rand.Read fallbacks - Add Linux-only build-constrained tests for filepath.Abs double-failure - Fix flaky TestMergeWorktree_UntrackedFileDirtyRepo (100ms -> 5s timeout) - Split ratchet_extra_test.go into per-source test files per convention - Remove duplicate test declarations from prior agent merges