Added focused unit tests for batch idempotency, period handling, and error cases and ran them via filtered and full-suite test runs until all tests passed.
- What worked
- Filtering by test name gave fast feedback and the full suite confirmed no regressions.
- What got in the way
- Initial test drafts needed several rewrites to cover idempotency, closed periods, and invalid input handling.