Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix: pre-landing review fixes (a pinned clock is reset after every test; the red-since time matches the watermark)
garrytan72ff4355977b
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex ebb2456f10..65d6f80773 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -12,7 +12,7 @@ identifiers and attribution are available in the pre-removal Git revision## [Unreleased]-**Master's fence-census suite passes again after the 2026 DST fallback.** The test 'the incremental pass in batches of one reads every page across a DST fallback in the session time zone' wrote fixed `updated_at` values in the 2026-11-01 New York fallback hour. The census only reads pages updated at or after its watermark (the database clock minus two minutes), so once the clock passed about 05:18Z on 2026-11-01 those pages fell behind the watermark, and the test has failed on every run since. It now uses the next fallback that is still ahead of the database clock and asserts that the four instants read 01:20-04, 01:40-04, 01:10-05 and 01:30-05 in the session time zone, so the DST coverage can't quietly disappear. It also runs with the clock pinned inside the 2026 and 2027 fallback hours.+**Master's fence-census suite passes again after the 2026 DST fallback.** The test 'the incremental pass in batches of one reads every page across a DST fallback in the session time zone' wrote fixed `updated_at` values in the 2026-11-01 New York fallback hour. The census only reads pages updated at or after its watermark (the database clock minus two minutes), so once the clock passed about 05:22Z on 2026-11-01 those pages began falling behind the watermark, and the test has failed on every run since. It now uses the next fallback that is still ahead of the database clock and asserts that the four instants read 01:20-04, 01:40-04, 01:10-05 and 01:30-05 in the session time zone, so the DST coverage can't quietly disappear. It also runs with the clock pinned inside the 2026 and 2027 fallback hours.### Itemized changesdiff --git a/test/fence-census.test.ts b/test/fence-census.test.tsindex 5da6af9e18..3b8b98cf55 100644--- a/test/fence-census.test.ts+++ b/test/fence-census.test.ts@@ -18,7 +18,7 @@* test/e2e/fence-census-postgres.test.ts (a second session holds a real open* transaction). Synthetic content only.*/-import { afterAll, beforeAll, describe, expect, setSystemTime, test } from 'bun:test';+import { afterAll, afterEach, beforeAll, describe, expect, setSystemTime, test } from 'bun:test';import { execFileSync } from 'node:child_process';import { randomUUID } from 'node:crypto';import { mkdirSync, mkdtempSync, rmSync, unlinkSync, writeFileSync } from 'node:fs';@@ -90,6 +90,7 @@ for (const backend of backends) {}, 120_000);afterAll(async () => { await close(); for (const root of roots.splice(0)) rmSync(root, { recursive: true, force: true }); });+ afterEach(() => { setSystemTime(); });async function source(files: Record<string, string> | null, opts: { git?: boolean } = {}) {const id = `cen-${randomUUID().replace(/-/g, '').slice(0, 12)}`;