mirror of
https://github.com/garrytan/gbrain.git
synced 2026-08-14 00:48:18 +00:00
fix(wave): revert extractor watermark to merge-day midnight — a future watermark masks concurrent edits (D4)
CI caught what the composite review's watermark 'fix' actually did: the stamp path clamps links_extracted_at up to the watermark (GREATEST(updated_at, versionTs), extract.ts:1835), so a future watermark stamps every page at 2026-08-02 and masks any concurrent edit until then — the exact race D4 guards — and makes the doctor lag check warn on fresh brains. The limitation the future date tried to cover (stamps written by pre-wave code after the watermark) is inherent: no fixed watermark covers code that keeps running past it. Documented instead.
This commit is contained in:
@@ -35,10 +35,15 @@ import { slugifyPath } from './sync.ts';
|
||||
// whitelist no longer drops markdown links / bare-slug refs / slash-shaped
|
||||
// wikilinks in non-whitelisted directories). Pages stamped by earlier sweeps
|
||||
// are re-flagged so the next --stale sweep re-extracts under both fixes.
|
||||
// The watermark is the day AFTER the wave ships: the staleness predicate is
|
||||
// strict `<`, so a same-day stamp written by pre-wave code would otherwise
|
||||
// read as fresh and never re-extract.
|
||||
export const LINK_EXTRACTOR_VERSION_TS = '2026-08-02T00:00:00Z';
|
||||
// The watermark MUST NOT be in the future: the stamp path clamps
|
||||
// links_extracted_at up to the watermark (so a fresh extraction isn't
|
||||
// immediately re-listed), which means a future watermark masks concurrent
|
||||
// edits until that date — the exact race D4 guards (test/extract-stale.test.ts).
|
||||
// The converse limitation is inherent and accepted: a stamp written by
|
||||
// PRE-wave code after this date reads as fresh and won't re-extract until
|
||||
// the page is next edited; no fixed watermark can cover code that keeps
|
||||
// running past it.
|
||||
export const LINK_EXTRACTOR_VERSION_TS = '2026-08-01T00:00:00Z';
|
||||
|
||||
// ─── Entity references ──────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user