Document intentional error suppressions with comments (gt-zn9m)

All 156 instances of _ = error suppression in non-test code now have
explanatory comments documenting why the error is intentionally ignored.

Categories of intentional suppressions:
- non-fatal: session works without these - tmux environment setup
- non-fatal: theming failure does not affect operation - visual styling
- best-effort cleanup - defer cleanup on failure paths
- best-effort notification - mail/notifications that should not block
- best-effort interrupt - graceful shutdown attempts
- crypto/rand.Read only fails on broken system - random ID generation
- output errors non-actionable - fmt.Fprint to io.Writer

This addresses the silent failure and debugging concerns raised in the
issue by making the intentionality explicit in the code.

Generated with Claude Code https://claude.com/claude-code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-25 23:14:13 -08:00
parent 99b1a11cbd
commit 34b5a3bb8d
41 changed files with 134 additions and 133 deletions

View File

@@ -155,7 +155,7 @@ func init() {
swarmCreateCmd.Flags().StringSliceVar(&swarmWorkers, "worker", nil, "Polecat names to assign (repeatable)")
swarmCreateCmd.Flags().BoolVar(&swarmStart, "start", false, "Start swarm immediately after creation")
swarmCreateCmd.Flags().StringVar(&swarmTarget, "target", "main", "Target branch for landing")
_ = swarmCreateCmd.MarkFlagRequired("epic")
_ = swarmCreateCmd.MarkFlagRequired("epic") // cobra flags: error only at runtime if missing
// Status flags
swarmStatusCmd.Flags().BoolVar(&swarmStatusJSON, "json", false, "Output as JSON")
@@ -300,7 +300,7 @@ func runSwarmCreate(cmd *cobra.Command, args []string) error {
}
}
// Get the updated swarm
// Get the updated swarm (just created, error would be surprising)
sw, _ = mgr.GetSwarm(swarmEpic)
// Save to store
@@ -640,7 +640,7 @@ func runSwarmLand(cmd *cobra.Command, args []string) error {
// Create manager and land
mgr := swarm.NewManager(foundRig)
// Reload swarm into manager
// Reload swarm into manager (recreates from store, errors non-fatal)
_, _ = mgr.Create(sw.EpicID, sw.Workers, sw.TargetBranch)
_ = mgr.UpdateState(sw.ID, sw.State)