Skip to content

fix: use ModifyIntervals for atomic conflict resolution - #145

Open
schtobia wants to merge 1 commit into
timewarrior-synchronize:mainfrom
schtobia:dev/atomic_conflict_resolution
Open

schtobia wants to merge 1 commit into
timewarrior-synchronize:mainfrom
schtobia:dev/atomic_conflict_resolution

Conversation

@schtobia

Copy link
Copy Markdown
Contributor

SolveConflict now uses ModifyIntervals instead of individual AddInterval/RemoveInterval calls, ensuring atomic updates.

  • Add computeNetDiff helper to remove common entries from added/removed (intermediate results from conflict resolution algorithm)
  • Switch error wrapping to %w for proper error chains
  • Add tests with recordingStorage mock to verify ModifyIntervals usage

SolveConflict now uses ModifyIntervals instead of individual
AddInterval/RemoveInterval calls, ensuring atomic updates.

- Add computeNetDiff helper to remove common entries from added/removed
  (intermediate results from conflict resolution algorithm)
- Switch error wrapping to %w for proper error chains
- Add tests with recordingStorage mock to verify ModifyIntervals usage
@schtobia schtobia closed this Aug 18, 2026
@schtobia
schtobia deleted the dev/atomic_conflict_resolution branch August 18, 2026 13:20
@schtobia
schtobia restored the dev/atomic_conflict_resolution branch August 18, 2026 19:02
@schtobia

Copy link
Copy Markdown
Contributor Author

restoring, deletion was unintended.

@schtobia schtobia reopened this Aug 18, 2026
@schtobia

Copy link
Copy Markdown
Contributor Author

Thanks for merging the others. Is there any work necessary on this one?

@joachimschmidt557

Copy link
Copy Markdown
Member

Sorry for the late reply, as this is a slightly larger change, I haven't had the time to fully review and test the changes, I'll do my best to do that when I have the time :)

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.

2 participants