feat(reject-history): finalize sql runtime and archive completed openspec changes

This commit is contained in:
egg
2026-03-04 16:32:00 +08:00
parent 1d2786e7a8
commit 5517f7e85c
36 changed files with 2095 additions and 179 deletions

View File

@@ -0,0 +1,17 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import {
PRIMARY_QUERY_MAX_DAYS,
validateDateRange,
} from '../src/core/reject-history-filters.js';
test('reject-history date range validates half-year max days', () => {
assert.equal(PRIMARY_QUERY_MAX_DAYS, 183);
const ok = validateDateRange('2025-01-01', '2025-07-02');
assert.equal(ok, '');
const over = validateDateRange('2025-01-01', '2025-07-03');
assert.equal(over, '查詢範圍不可超過 183 天(最多半年)');
});