Correct a Task 4 expectation that contradicted its own rule
The "ancient anchor" test expected three occurrences and omitted 31 August. With a daily rule anchored at 09:00 and no stated end, the 31st runs to 09:00 on the 1st — inside a window that opens at midnight on the 1st. The brief's own rule is that an occurrence overlapping either edge is included, so four is right and three was the plan disagreeing with itself. Found by the Task 4 implementer, which corrected the test and left the implementation alone. Verified by running occurrencesOf directly. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
50121602db
commit
dfb00aaa86
@@ -850,6 +850,10 @@ describe("occurrencesOf", () => {
|
|||||||
day("2026-09-04T00:00:00"),
|
day("2026-09-04T00:00:00"),
|
||||||
);
|
);
|
||||||
expect(got.map((o) => o.id)).toEqual([
|
expect(got.map((o) => o.id)).toEqual([
|
||||||
|
// The 31st opens at 09:00 and, having no stated end, runs to 09:00 on the
|
||||||
|
// 1st — which is inside a window that opens at midnight. Half off the
|
||||||
|
// left edge is still on the board, so it counts.
|
||||||
|
"myevent:k3f9qa2m01#2026-08-31",
|
||||||
"myevent:k3f9qa2m01#2026-09-01",
|
"myevent:k3f9qa2m01#2026-09-01",
|
||||||
"myevent:k3f9qa2m01#2026-09-02",
|
"myevent:k3f9qa2m01#2026-09-02",
|
||||||
"myevent:k3f9qa2m01#2026-09-03",
|
"myevent:k3f9qa2m01#2026-09-03",
|
||||||
@@ -1035,7 +1039,7 @@ export function nextOccurrences(
|
|||||||
- [ ] **Step 4: Run tests and typecheck**
|
- [ ] **Step 4: Run tests and typecheck**
|
||||||
|
|
||||||
Run: `bun test test/recurrence.test.ts`
|
Run: `bun test test/recurrence.test.ts`
|
||||||
Expected: PASS, 35 tests.
|
Expected: PASS, 34 tests.
|
||||||
|
|
||||||
Run: `bun run typecheck`
|
Run: `bun run typecheck`
|
||||||
Expected: exit 0.
|
Expected: exit 0.
|
||||||
|
|||||||
Reference in New Issue
Block a user