Skip to content

[fix] Improve error handling across operations#90

Merged
lugassawan merged 1 commit intomainfrom
fix/silent-error-handling
Feb 24, 2026
Merged

[fix] Improve error handling across operations#90
lugassawan merged 1 commit intomainfrom
fix/silent-error-handling

Conversation

@lugassawan
Copy link
Owner

@lugassawan lugassawan commented Feb 24, 2026

Summary

  • Propagate ListWorktrees error in PostCreateSetup instead of silently discarding — affects add, duplicate, and restore commands
  • Add max iteration cap (1000) to duplicate command suffix loop to prevent unbounded git rev-parse calls
  • Surface squash-merge and stale-check errors as warnings in clean operations via new MergedResult/StaleResult types with Warnings []string
  • Add Error field to CleanedItem for per-item failure visibility in RemoveCandidates
  • Improve AheadBehind variable naming from cryptic a, b to using named returns ahead, behind directly

N/A

Test Plan

  • make fmt — clean
  • make lint — 0 issues
  • make test — 1081/1081 pass
  • Verify rimba duplicate with --as and auto-suffix
  • Verify rimba clean --merged and rimba clean --stale show warnings when branches are skipped

…bounds

- Propagate ListWorktrees error in PostCreateSetup instead of silently discarding
- Add max iteration cap (1000) to duplicate command suffix loop
- Surface squash-merge and stale-check errors as warnings in clean operations
- Add Error field to CleanedItem for per-item failure visibility
- Improve AheadBehind variable naming for maintainability
@lugassawan lugassawan merged commit 26ba1c7 into main Feb 24, 2026
5 of 6 checks passed
@lugassawan lugassawan deleted the fix/silent-error-handling branch February 24, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant