CLI recurrent transfer changes after HF

Summary

Closes #491

Updates transfer-schedule commands to handle recurrent transfer changes after HF28. When --pair-id is not specified, the CLI now auto-selects a single transfer with pair_id=0, improving user experience for simple cases while maintaining safety for complex scenarios.

Changes

  • Updated help texts to clarify auto-selection behavior
  • Improved error messages with actionable suggestions and context
  • Modified validation logic to auto-select single transfers with pair_id=0
  • Added unit tests for validation logic (10 tests, all passing)

New logic for modify/remove

modify/remove --to bob [--pair-id X]


        ┌───────────────┐
        │ --pair-id     │
        │ specified?    │
        └───────┬───────┘

      ┌─────────┴─────────┐
      │ YES               │ NO
      ▼                   ▼
 use specified      ┌─────────────────┐
 pair_id            │ How many        │
      │             │ transfers to    │
      │             │ 'bob'?          │
      │             └────────┬────────┘
      │                      │
      │         ┌────────────┼────────────┐
      │         │ 0          │ 1          │ >1
      │         ▼            ▼            ▼
      │      (existence   ┌──────┐     ERROR:
      │       check       │pair_id│    "specify
      │       fail)       │= 0?  │    --pair-id"
      │                   └──┬───┘
      │                      │
      │            ┌─────────┴─────────┐
      │            │ YES               │ NO
      │            ▼                   ▼
      │        use that            ERROR:
      │        transfer           "specify
      │                           --pair-id"
      │                               │
      └───────────────┬───────────────┘

              normal validation
              and execution

Test plan

Unit tests added in tests/unit/cli/test_process_transfer_schedule_validation.py cover:

  • Validation passes when --pair-id is explicitly provided
  • Auto-selection works for single transfer with pair_id=0
  • Error raised for single transfer with non-zero pair_id
  • Error raised for multiple transfers without --pair-id
  • Identity check correctly matches transfers

🤖 Generated with Claude Code

Merge request reports

Loading