task-loop-rrule-tz.test.mjs
sha256:c2dbf04d56308f3bbf2d06e6d2eb022b8948b1e827195fe525a44e5e18d5f9c0
feat(auth): Phase B Connect cloud agent (RFC 8628) + Hermes…
Human
minor
⚠ breaking
11 days ago
| 1 | /** |
| 2 | * Tier 5 — DATA-INTEGRITY: DST boundary occurrence keys remain stable strings. |
| 3 | */ |
| 4 | import { describe, it } from 'node:test'; |
| 5 | import assert from 'node:assert/strict'; |
| 6 | import { projectNextOccurrence } from '../lib/task/task-loop-rrule.mjs'; |
| 7 | |
| 8 | describe('Task loop RRULE — timezone occurrence keys', () => { |
| 9 | it('weekly occurrence key format is stable across projection calls', () => { |
| 10 | const recurrence = { |
| 11 | kind: 'rrule', |
| 12 | rrule: 'FREQ=WEEKLY;BYDAY=MO', |
| 13 | dtstart: '2026-03-02T17:00:00Z', |
| 14 | anchor_tz: 'America/Los_Angeles', |
| 15 | }; |
| 16 | |
| 17 | const first = projectNextOccurrence(recurrence, { until_at: null }, '2026-03-01T00:00:00Z'); |
| 18 | const second = projectNextOccurrence(recurrence, { until_at: null }, '2026-03-01T00:00:00Z'); |
| 19 | assert.ok(first); |
| 20 | assert.ok(second); |
| 21 | if (!first || !second) return; |
| 22 | assert.equal(first.occurrenceKey, second.occurrenceKey); |
| 23 | assert.match(first.occurrenceKey, /^\d{4}-W\d{2}$/); |
| 24 | }); |
| 25 | }); |
File History
1 commit
sha256:93bcf8f9bd56d8c5b9339f4ec73b9ebd66571398d56262d38eedc2cfa9db9882
fix(test): align Band B landing assertion with desktop MCP …
Human
11 days ago