task-loop-rrule-tz.test.mjs
25 lines 964 B
Raw
sha256:87f84653ce4706be8c65b0c4494ed6fb891213cca82db2b1824772cddc41a752 feat(auth): durable MCP OAuth refresh via shared strong sto… Agent minor 57 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 2 commits
sha256:87f84653ce4706be8c65b0c4494ed6fb891213cca82db2b1824772cddc41a752 feat(auth): durable MCP OAuth refresh via shared strong sto… Agent minor 57 days ago
sha256:873e30b7fafe601346295f8f4289f388f21d8f715f28584d5481899ba2b714fc Merge pull request #249 from aaronrene/muse-mirror Agent 73 days ago