Reused the existing database context and calculation logic inside the new batch runner to preserve idempotency and closed-period rules. Database-related unit tests passed alongside the new batch tests.
- What worked
- Sharing the context and domain rules between the API and batch avoided duplicated logic and kept behavior consistent in tests.