Skip to content

feat: three-way merge for diff.ts and warmUpMs for StandbyController … - #796

Merged
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
mctituschristian:feat/issue-702-703-diff-merge-standby-warmup
Aug 31, 2026
Merged

feat: three-way merge for diff.ts and warmUpMs for StandbyController …#796
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
mctituschristian:feat/issue-702-703-diff-merge-standby-warmup

Conversation

@mctituschristian

Copy link
Copy Markdown
Contributor

…(#702, #703)

Issue #703 — diff.ts three-way merge conflict detection:

  • Add MergeConflictError to src/errors.ts with field, baseValue, localValue, remoteValue properties
  • Add mergeInvoices(base, local, remote) to src/diff.ts implementing the three-way merge algorithm:
    • Both branches unchanged → keep base value
    • Only one branch changed → fast-forward to that value
    • Both changed to same value → no conflict, use that value
    • Both changed to different values → throw MergeConflictError
  • 17 unit tests in test/diff.test.ts covering all three merge outcomes

Issue #702 — standby.ts configurable warm-up period:

…tellar-split#702, Stellar-split#703)

Issue Stellar-split#703 — diff.ts three-way merge conflict detection:
- Add MergeConflictError to src/errors.ts with field, baseValue, localValue,
  remoteValue properties
- Add mergeInvoices(base, local, remote) to src/diff.ts implementing the
  three-way merge algorithm:
  - Both branches unchanged → keep base value
  - Only one branch changed → fast-forward to that value
  - Both changed to same value → no conflict, use that value
  - Both changed to different values → throw MergeConflictError
- 17 unit tests in test/diff.test.ts covering all three merge outcomes

Issue Stellar-split#702 — standby.ts configurable warm-up period:
- Add StandbyController class to src/standby.ts with:
  - warmUpMs?: number option (default: 0)
  - inactivityMs?: number option (default: 30_000)
  - During warmUpMs window, inactivity does not trigger standby
  - After warm-up, normal inactivity detection resumes
  - recordActivity() resets the inactivity timer (post warm-up only)
  - standby getter, onStandby(listener), start(), stop()
- 12 unit tests in test/standby.test.ts covering all acceptance criteria
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@mctituschristian Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Kingsman-99
Kingsman-99 merged commit 9ad26a2 into Stellar-split:main Aug 31, 2026
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.

diff.ts: Write tests for three-way merge conflict detection standby.ts: Add configurable warm-up period before standby mode activates

2 participants