A failed entry stamped ahead of the clock (host clock stepped forward then corrected) is eligible now instead of waiting out the skew; the next attempt rewrites the stamp. The WATCHDOG_NOTICE_NOW_MS env var is deleted: the reader reads Date.now(), and tests fix it with a --import preload (tests/fake-clock.mjs). The unknown-entry tests now rerun far past the backoff so a retried unknown fails. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
5 lines
178 B
JavaScript
5 lines
178 B
JavaScript
// Test preload: fixes Date.now() to FAKE_NOW_MS when a test sets it.
|
|
if (process.env.FAKE_NOW_MS) {
|
|
const fixed = Number(process.env.FAKE_NOW_MS);
|
|
Date.now = () => fixed;
|
|
}
|