diff --git a/packages/polyfill/test/cold-read-for-document.test.ts b/packages/polyfill/test/cold-read-for-document.test.ts index 0d2edb6..e2eb52d 100644 --- a/packages/polyfill/test/cold-read-for-document.test.ts +++ b/packages/polyfill/test/cold-read-for-document.test.ts @@ -116,14 +116,20 @@ describe("reading the messages left on my note, on a page that has just loaded", // ...because nothing on THIS page ever brought the NOTE into view. The address lives // on it. // - // `"timed-out"`, not `"unknown"`, since 2026-09-24: a registry reset now DOWNGRADES the - // documents it takes subscriptions away from instead of forgetting their state, so - // `"unknown"` means only "no barrier was ever expected here" and can be read as - // authoritative. Note this particular value is a harness artefact and not what a real - // reload produces: `reloadPage` resets the registry inside one process, so the note is - // still in it from the first page, where a browser reload would start with an empty - // module and answer `"unknown"`. Either way it is the safe reading - neither value lets - // a zero-row read be called a definitive absence here. + // `"timed-out"`, not `"unknown"`, since 2026-09-24: a reset DISOWNS the documents it takes + // subscriptions away from rather than forgetting them, so `"unknown"` keeps its one + // meaning - "no barrier was ever expected here". + // + // CORRECTED 2026-09-24, and the reason that used to stand here was FALSE. It said neither + // value lets a zero-row read be called a definitive absence: `unknown` does, and + // deliberately - `emulated-verifier/index-deposit.ts` `noRowsMeansAbsent` returns true for + // it, because where there are no `State` semantics there is no barrier to have missed. The + // two values are not interchangeable, and which one is correct depends on the page. This + // particular one is a harness artefact: `reloadPage` resets the registry inside ONE process, + // so the note is still known to it from the first page, and `"timed-out"` - "opened here, + // and no barrier to show for it" - is the exact truth. A browser reload starts with an empty + // module, where nothing was ever opened and `"unknown"` is the exact truth instead. What + // this line pins in both worlds is the same thing: not `"synced"`. expect(getSyncState(note)).toBe("timed-out"); });