fix(FN-1026): normalize formatResetAt to use calendar-day boundaries

- Fix formatResetAt to compute day difference from calendar midnight boundaries instead of raw millisecond division
- Prevents off-by-one day counts that caused inconsistent formatting near 7-day boundary
- Add comprehensive unit tests for formatResetAt boundary conditions (7-day edge, today, beyond 7 days)
- Fix pre-existing scheduler test assertion to use expect.objectContaining for worktree/baseBranch fields
This commit is contained in:
gsxdsm
2026-04-05 21:59:42 -07:00
parent 9a6592e299
commit b21fdc9420
3 changed files with 196 additions and 10 deletions

View File

@@ -616,7 +616,7 @@ describe("Scheduler after restart", () => {
scheduler.stop();
expect(store.moveTask).toHaveBeenCalledWith("FN-070", "in-progress");
expect(store.updateTask).toHaveBeenCalledWith("FN-070", { status: null, blockedBy: null });
expect(store.updateTask).toHaveBeenCalledWith("FN-070", expect.objectContaining({ status: null, blockedBy: null }));
expect(onSchedule).toHaveBeenCalledWith(todoTask);
});