Garry Tan and GitHub
61b79e7c99
v0.35.8.0 feat(cycle): phantom-page redirect inside extract_facts ( #1138 )
...
* feat(cycle): phantom-page redirect inside extract_facts (v0.35.8.0)
Drains the existing pile of unprefixed entity pages (alice.md, acme.md)
that pre-PR-#1010 routing left behind. Folds the cleanup into the existing
extract_facts cycle phase via two new lossless engine primitives so the
v0.32.2 reconciliation contract owns drift handling instead of a parallel
implementation duplicating it.
Layers:
- engine: refreshPageBody + migrateFactsToCanonical on Postgres + PGLite
- resolver: resolvePhantomCanonical + findPrefixCandidates (codex #1/#11)
- orchestrator: src/core/cycle/phantom-redirect.ts + phantom-audit JSONL
- cycle: sourceId/brainDir threaded; 3 new totals counters
- tests: 38 unit + 6 parity + 4 E2E (48 total) pinning all 12 codex findings
* fix(test): pin clock in sync_freshness boundary tests (CI flake)
CI test (1) failed: `sync_freshness check > exact 72h boundary → warn`.
The test set `last_sync_at = Date.now() - 72h`, then checkSyncFreshness
called Date.now() again to compute ageMs. Between the two reads the
clock advanced (0.43ms in this CI run, microseconds locally) which
pushed ageMs above the strict 72h fail threshold and flipped the
status from warn to fail.
Same shape latent in the 24h boundary test — fixed both.
Fix:
- checkSyncFreshness gains an optional `opts.nowMs` test-only seam.
Production callers omit it and get live wall-clock semantics.
- Both boundary tests now capture nowMs once and thread it through
both `last_sync_at` and the check, eliminating drift between reads.
Verified deterministic: 10 consecutive runs of the 72h boundary test
pass on this machine (was occasionally failing before).
2026-05-18 06:22:12 -07:00
..
2026-05-15 06:48:36 -07:00
2026-05-11 22:54:35 -07:00
2026-05-14 19:13:14 -07:00
2026-05-14 19:50:50 -04:00
2026-05-18 06:22:12 -07:00
2026-05-17 18:52:38 -07:00
2026-05-12 14:33:29 -07:00
2026-05-17 14:02:45 -07:00
2026-05-17 08:32:03 -07:00
2026-05-17 15:41:43 -07:00
2026-05-10 20:06:31 -07:00
2026-04-29 23:46:36 -07:00
2026-05-07 21:52:58 -07:00
2026-05-10 20:06:31 -07:00
2026-05-11 19:25:48 -07:00
2026-05-02 08:41:11 -07:00
2026-05-11 22:54:35 -07:00
2026-05-06 21:14:34 -07:00
2026-04-18 16:57:38 +08:00
2026-04-21 18:35:45 -07:00
2026-05-14 21:06:42 -07:00
2026-05-08 13:25:48 -07:00
2026-05-08 13:25:48 -07:00
2026-04-11 21:25:44 -10:00
2026-04-14 19:41:34 -10:00
2026-04-22 01:34:22 -07:00
2026-05-14 19:13:14 -07:00
2026-05-14 19:13:14 -07:00
2026-05-07 21:52:58 -07:00
2026-05-14 20:15:29 -07:00
2026-04-30 20:47:32 -07:00
2026-05-07 21:52:58 -07:00
2026-05-10 20:50:40 -07:00
2026-05-02 22:01:05 -07:00
2026-04-20 23:14:38 +08:00
2026-04-29 10:12:10 -07:00
2026-05-10 20:06:31 -07:00
2026-04-21 11:51:32 -07:00
2026-04-25 12:25:34 -07:00
2026-05-10 13:20:07 -07:00
2026-05-02 08:41:11 -07:00
2026-05-11 19:25:48 -07:00
2026-04-09 12:25:04 -10:00
2026-05-14 21:06:42 -07:00
2026-04-25 12:25:34 -07:00
2026-05-14 19:13:14 -07:00
2026-04-25 12:25:34 -07:00
2026-05-11 22:54:35 -07:00
2026-04-29 23:46:36 -07:00
2026-05-09 19:47:56 -07:00
2026-05-07 13:41:46 -07:00
2026-05-09 19:47:56 -07:00
2026-05-02 08:41:11 -07:00
2026-05-07 10:03:38 -07:00
2026-05-09 20:46:34 -07:00
2026-04-25 12:25:34 -07:00
2026-04-25 12:25:34 -07:00
2026-04-25 12:25:34 -07:00
2026-05-14 19:50:50 -04:00
2026-05-13 13:14:58 -04:00
2026-05-09 22:58:19 -07:00
2026-05-13 13:14:58 -04:00
2026-04-06 16:50:15 -07:00
2026-05-08 13:25:48 -07:00
2026-04-26 15:49:48 -07:00
2026-05-17 18:52:38 -07:00
2026-05-11 21:49:57 -07:00
2026-05-06 20:39:56 -07:00
2026-05-06 20:39:56 -07:00
2026-05-06 20:39:56 -07:00
2026-04-29 22:13:05 -07:00
2026-05-09 16:57:47 -07:00
2026-04-30 01:23:29 -07:00
2026-05-08 17:07:51 -07:00
2026-05-09 20:46:34 -07:00
2026-05-11 23:02:03 -07:00
2026-05-09 20:46:34 -07:00
2026-04-14 19:41:34 -10:00
2026-05-08 13:25:48 -07:00
2026-04-22 16:24:23 -07:00
2026-05-03 20:41:39 -07:00
2026-04-29 22:21:07 -07:00
2026-04-20 21:54:36 +08:00
2026-04-26 15:49:48 -07:00
2026-05-10 18:59:11 -07:00
2026-05-07 22:56:22 -07:00
2026-05-13 13:14:58 -04:00
2026-05-18 06:22:12 -07:00
2026-04-30 01:23:29 -07:00
2026-05-02 22:01:05 -07:00
2026-05-13 13:14:58 -04:00
2026-04-20 21:54:36 +08:00
2026-05-14 19:13:14 -07:00
2026-05-07 21:52:58 -07:00
2026-05-14 21:22:10 -07:00
2026-05-06 20:58:19 -07:00
2026-05-15 18:54:36 -07:00
2026-05-07 21:52:58 -07:00
2026-04-11 00:01:09 -10:00
2026-05-17 18:52:38 -07:00
2026-05-07 10:03:38 -07:00
2026-05-10 06:34:40 -07:00
2026-04-14 19:41:34 -10:00
2026-05-11 23:02:03 -07:00
2026-05-17 08:51:33 -07:00
2026-05-17 08:51:33 -07:00
2026-04-25 12:25:34 -07:00
2026-05-01 09:02:43 -07:00
2026-05-01 09:02:43 -07:00
2026-05-01 09:02:43 -07:00
2026-05-13 13:14:58 -04:00
2026-05-17 08:32:03 -07:00
2026-05-17 08:32:03 -07:00
2026-05-11 22:42:54 -07:00
2026-05-17 08:32:03 -07:00
2026-05-11 22:42:54 -07:00
2026-05-17 08:32:03 -07:00
2026-05-17 08:32:03 -07:00
2026-05-17 08:32:03 -07:00
2026-05-11 22:42:54 -07:00
2026-05-17 08:32:03 -07:00
2026-05-11 22:42:54 -07:00
2026-05-17 08:32:03 -07:00
2026-05-17 08:32:03 -07:00
2026-05-17 08:32:03 -07:00
2026-05-17 08:32:03 -07:00
2026-05-01 09:02:43 -07:00
2026-05-16 13:19:04 -07:00
2026-05-01 09:02:43 -07:00
2026-05-01 09:02:43 -07:00
2026-05-13 13:14:58 -04:00
2026-05-10 06:34:40 -07:00
2026-05-10 06:34:40 -07:00
2026-05-10 06:34:40 -07:00
2026-05-10 06:34:40 -07:00
2026-05-10 06:34:40 -07:00
2026-05-10 06:34:40 -07:00
2026-05-10 06:34:40 -07:00
2026-05-10 06:34:40 -07:00
2026-05-10 06:34:40 -07:00
2026-05-10 06:34:40 -07:00
2026-05-10 06:34:40 -07:00
2026-05-10 06:34:40 -07:00
2026-05-17 18:52:38 -07:00
2026-05-12 14:33:29 -07:00
2026-04-13 21:03:40 -10:00
2026-05-17 14:27:31 -07:00
2026-05-02 22:01:05 -07:00
2026-05-11 19:25:48 -07:00
2026-05-11 19:25:48 -07:00
2026-05-09 20:46:34 -07:00
2026-04-29 10:12:10 -07:00
2026-05-10 06:34:40 -07:00
2026-05-06 21:14:34 -07:00
2026-05-09 20:46:34 -07:00
2026-05-10 12:49:14 -07:00
2026-05-09 16:57:47 -07:00
2026-05-09 16:57:47 -07:00
2026-05-10 12:49:14 -07:00
2026-05-17 08:51:33 -07:00
2026-05-09 16:57:47 -07:00
2026-05-10 12:49:14 -07:00
2026-05-09 16:57:47 -07:00
2026-05-10 12:49:14 -07:00
2026-05-09 16:57:47 -07:00
2026-05-10 12:49:14 -07:00
2026-05-10 12:49:14 -07:00
2026-05-10 20:06:31 -07:00
2026-05-10 12:49:14 -07:00
2026-05-10 12:49:14 -07:00
2026-05-17 18:52:38 -07:00
2026-05-11 19:25:48 -07:00
2026-05-11 19:25:48 -07:00
2026-05-09 16:57:47 -07:00
2026-05-09 16:57:47 -07:00
2026-05-09 16:57:47 -07:00
2026-05-09 16:57:47 -07:00
2026-05-09 16:57:47 -07:00
2026-05-09 16:57:47 -07:00
2026-05-09 16:57:47 -07:00
2026-04-20 07:30:00 +08:00
2026-04-14 21:40:48 -10:00
2026-04-25 12:25:34 -07:00
2026-05-17 08:51:33 -07:00
2026-04-09 10:17:13 -07:00
2026-04-13 07:49:13 -10:00
2026-04-16 23:03:15 -07:00
2026-04-13 07:49:13 -10:00
2026-04-23 19:34:27 -07:00
2026-05-12 14:33:29 -07:00
2026-05-17 18:52:38 -07:00
2026-04-29 23:46:36 -07:00
2026-04-29 23:46:36 -07:00
2026-04-26 20:45:05 -07:00
2026-04-29 23:26:25 -07:00
2026-04-26 20:45:05 -07:00
2026-04-29 23:46:36 -07:00
2026-05-14 19:13:14 -07:00
2026-05-17 08:00:29 -07:00
2026-04-18 18:16:18 +08:00
2026-04-29 22:13:05 -07:00
2026-05-09 22:58:19 -07:00
2026-05-01 09:02:43 -07:00
2026-05-13 13:14:58 -04:00
2026-05-14 20:51:11 -07:00
2026-05-11 22:54:35 -07:00
2026-05-07 10:03:38 -07:00
2026-05-14 20:51:11 -07:00
2026-04-12 07:48:47 -10:00
2026-04-25 12:25:34 -07:00
2026-05-07 22:56:22 -07:00
2026-04-18 16:57:38 +08:00
2026-05-13 13:14:58 -04:00
2026-05-11 19:25:48 -07:00
2026-04-16 23:03:15 -07:00
2026-04-22 01:34:22 -07:00
2026-05-13 13:14:58 -04:00
2026-04-25 12:25:34 -07:00
2026-04-25 12:25:34 -07:00
2026-05-11 21:49:57 -07:00
2026-04-26 20:45:05 -07:00
2026-04-11 21:25:44 -10:00
2026-05-07 13:41:46 -07:00
2026-05-07 19:49:46 -07:00
2026-04-26 20:45:05 -07:00
2026-04-24 00:08:54 -07:00
2026-05-09 19:47:56 -07:00
2026-05-07 22:56:22 -07:00
2026-05-04 21:11:15 -07:00
2026-05-01 09:02:43 -07:00
2026-05-17 08:00:29 -07:00
2026-05-13 13:14:58 -04:00
2026-05-08 13:25:48 -07:00
2026-05-17 18:52:38 -07:00
2026-04-26 20:45:05 -07:00
2026-05-10 12:49:14 -07:00
2026-05-09 20:46:34 -07:00
2026-05-09 20:46:34 -07:00
2026-05-11 22:54:35 -07:00
2026-04-18 16:57:38 +08:00
2026-04-18 16:57:38 +08:00
2026-04-18 18:16:18 +08:00
2026-04-19 07:14:24 +08:00
2026-04-22 01:34:22 -07:00
2026-04-20 07:30:00 +08:00
2026-04-29 23:46:36 -07:00
2026-04-22 01:34:22 -07:00
2026-04-25 12:25:34 -07:00
2026-04-25 12:25:34 -07:00
2026-04-26 20:45:05 -07:00
2026-05-07 10:03:38 -07:00
2026-05-11 19:25:48 -07:00
2026-05-10 06:34:40 -07:00
2026-04-22 01:34:22 -07:00
2026-04-24 01:09:28 -07:00
2026-04-29 23:06:16 -07:00
2026-05-10 20:06:31 -07:00
2026-05-02 22:01:05 -07:00
2026-05-02 22:01:05 -07:00
2026-05-10 13:33:05 -07:00
2026-05-03 20:41:39 -07:00
2026-05-10 12:49:14 -07:00
2026-05-09 19:47:56 -07:00
2026-05-14 20:15:29 -07:00
2026-05-14 20:15:29 -07:00
2026-05-14 19:13:14 -07:00
2026-04-30 01:23:29 -07:00
2026-05-07 21:52:58 -07:00
2026-05-17 18:52:38 -07:00
2026-05-17 14:02:45 -07:00
2026-05-06 21:14:34 -07:00
2026-05-07 10:03:38 -07:00
2026-05-03 20:41:39 -07:00
2026-04-25 12:25:34 -07:00
2026-04-08 23:26:11 -10:00
2026-05-09 20:46:34 -07:00
2026-05-14 21:22:10 -07:00
2026-04-12 17:38:48 -07:00
2026-05-18 06:22:12 -07:00
2026-05-18 06:22:12 -07:00
2026-04-23 19:34:27 -07:00
2026-05-02 08:41:11 -07:00
2026-04-20 07:30:00 +08:00
2026-04-21 18:35:45 -07:00
2026-05-09 20:46:34 -07:00
2026-05-03 20:16:15 -07:00
2026-05-11 19:25:48 -07:00
2026-04-29 23:46:36 -07:00
2026-04-30 20:47:32 -07:00
2026-05-15 18:54:36 -07:00
2026-04-12 13:23:55 -10:00
2026-05-14 19:13:14 -07:00
2026-04-25 12:25:34 -07:00
2026-05-13 13:14:58 -04:00
2026-05-13 13:14:58 -04:00
2026-05-07 10:03:38 -07:00
2026-05-07 21:52:58 -07:00
2026-05-07 21:52:58 -07:00
2026-04-16 23:03:15 -07:00
2026-04-22 01:34:22 -07:00
2026-04-22 01:34:22 -07:00
2026-05-11 23:20:17 -07:00
2026-05-11 23:20:17 -07:00
2026-05-07 21:52:58 -07:00
2026-05-07 21:52:58 -07:00
2026-05-03 20:16:15 -07:00
2026-04-23 19:34:27 -07:00
2026-04-25 12:25:34 -07:00
2026-05-11 22:54:35 -07:00
2026-04-19 07:14:24 +08:00
2026-05-10 13:20:07 -07:00
2026-04-11 21:25:44 -10:00
2026-04-25 12:25:34 -07:00
2026-05-15 06:48:36 -07:00
2026-04-21 18:35:45 -07:00
2026-05-10 13:20:07 -07:00
2026-04-24 01:39:58 -07:00
2026-05-17 08:00:29 -07:00
2026-05-06 16:32:11 -07:00
2026-05-08 13:25:48 -07:00
2026-04-30 23:17:54 -07:00
2026-04-23 19:34:27 -07:00
2026-05-07 21:52:58 -07:00
2026-04-29 23:46:36 -07:00
2026-05-17 18:52:38 -07:00
2026-04-27 22:59:08 -07:00
2026-05-06 21:14:34 -07:00
2026-05-07 10:03:38 -07:00
2026-04-25 12:25:34 -07:00
2026-04-16 23:03:15 -07:00
2026-05-17 15:41:43 -07:00
2026-05-13 13:14:58 -04:00
2026-05-12 14:33:29 -07:00
2026-05-17 15:41:43 -07:00
2026-04-29 23:46:36 -07:00
2026-04-30 20:47:32 -07:00
2026-05-07 13:17:27 -07:00
2026-05-14 20:15:29 -07:00
2026-04-09 10:17:13 -07:00
2026-04-23 19:34:27 -07:00
2026-04-22 02:07:00 -07:00
2026-05-06 20:39:56 -07:00
2026-04-18 16:57:38 +08:00
2026-04-30 23:17:54 -07:00
2026-04-23 19:34:27 -07:00
2026-05-02 08:41:11 -07:00
2026-04-14 19:41:34 -10:00
2026-05-11 22:54:35 -07:00
2026-05-14 20:51:11 -07:00
2026-05-14 19:13:14 -07:00
2026-04-29 22:21:07 -07:00
2026-05-14 19:13:14 -07:00
2026-05-06 21:14:34 -07:00
2026-05-06 21:14:34 -07:00
2026-04-22 16:24:23 -07:00
2026-05-06 11:54:06 -07:00
2026-05-09 22:58:19 -07:00
2026-05-03 20:41:39 -07:00
2026-04-22 16:24:23 -07:00
2026-04-29 22:21:07 -07:00
2026-04-29 22:21:07 -07:00
2026-04-29 22:21:07 -07:00
2026-04-29 22:21:07 -07:00
2026-05-17 14:02:45 -07:00
2026-04-13 07:49:13 -10:00
2026-05-17 08:51:33 -07:00
2026-04-21 21:14:17 -07:00
2026-04-21 21:14:17 -07:00
2026-04-22 01:34:22 -07:00
2026-05-08 17:07:51 -07:00
2026-04-22 01:34:22 -07:00
2026-04-09 10:17:13 -07:00
2026-05-17 14:27:31 -07:00
2026-05-06 11:54:06 -07:00
2026-05-14 21:06:42 -07:00
2026-04-25 12:25:34 -07:00
2026-04-29 22:53:41 -07:00
2026-04-25 12:25:34 -07:00
2026-05-09 20:46:34 -07:00
2026-04-29 22:53:41 -07:00
2026-04-25 12:25:34 -07:00
2026-05-09 21:18:53 -07:00
2026-05-17 14:02:45 -07:00
2026-05-10 06:34:40 -07:00
2026-05-07 23:07:00 -07:00
2026-05-09 20:46:34 -07:00
2026-05-07 23:07:00 -07:00
2026-05-10 06:34:40 -07:00
2026-05-10 06:34:40 -07:00
2026-05-09 20:46:34 -07:00
2026-05-07 23:07:00 -07:00
2026-05-10 06:34:40 -07:00
2026-05-11 23:20:17 -07:00
2026-05-10 18:59:11 -07:00
2026-05-17 14:02:45 -07:00
2026-05-06 21:14:34 -07:00
2026-05-13 13:14:58 -04:00
2026-04-29 23:46:36 -07:00
2026-04-14 19:41:34 -10:00
2026-05-07 21:52:58 -07:00
2026-04-20 23:14:38 +08:00
2026-05-04 21:11:15 -07:00
2026-04-25 12:25:34 -07:00
2026-05-08 13:25:48 -07:00
2026-05-11 22:54:35 -07:00
2026-05-09 20:46:34 -07:00
2026-05-08 13:25:48 -07:00
2026-04-19 18:23:02 +08:00
2026-05-07 21:52:58 -07:00
2026-05-08 13:25:48 -07:00
2026-05-07 13:41:46 -07:00
2026-05-13 12:21:21 -04:00
2026-04-22 01:34:22 -07:00
2026-05-06 21:14:34 -07:00
2026-05-12 14:33:29 -07:00
2026-05-12 14:33:29 -07:00
2026-05-14 21:06:42 -07:00
2026-05-06 11:54:06 -07:00
2026-04-20 07:30:00 +08:00
2026-04-09 10:17:13 -07:00
2026-05-06 11:54:06 -07:00