task-loop-rrule-tz.test.mjs
25 lines 964 B
Raw
sha256:e4c529f14a0bb908c1caaaeb3f95f3623a1a82e636e7e3722ca2cd3dc9821263 security: npm audit fix pre-bridge 2026-07-29 Human 39 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 3 commits
sha256:e4c529f14a0bb908c1caaaeb3f95f3623a1a82e636e7e3722ca2cd3dc9821263 security: npm audit fix pre-bridge 2026-07-29 Human 39 days ago
sha256:b5f647cb9c409f563d4671fe3fc05ddea01fabfed9b41fc11cb923588e1c1baf mirror: GitHub Phase A durable MCP OAuth (#270) Human minor 56 days ago
sha256:873e30b7fafe601346295f8f4289f388f21d8f715f28584d5481899ba2b714fc Merge pull request #249 from aaronrene/muse-mirror Agent 73 days ago