Drop unused defaultOperationMode name param, lock in planner copy

main

Commit

Soph5mo ago

Two small cleanups flagged during review:

  • defaultOperationMode took a 'name' argument that was only used by a redundant branch (plan-vs-other that resolved to the same default). The function's real input is the pinned mode, so drop the name parameter and add a comment explaining why an empty defaultMode falls through to ModeSync: that case is 'plan', which accepts --mode.

  • BuildReplicationPlans already defensively copies the caller's managed map before adding prune-eligible orphans, but nothing tested the non-mutation guarantee. Add TestBuildReplicationPlansDoesNotMutate- Managed so a future refactor can't regress the footgun by dropping the copy.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com Entire-Checkpoint: dd63b36b9c0d

Checkpoints

can you review the changes in this branch

Claude CodeOpus 4.6[1m]
View session
Checkpoint 1