📄 bugs.md
D-OPEN SOVEREIGN
1Gaps / minor
2
3- CACHE_DURATION_MS (loader.ts:20, exported at :577) is never checked — the 24h registry-cache TTL is dead code.
4- DL2_SW_VERSION in keys.ts:26 is a string literal, which esbuild define doesn't rewrite, and the define is only applied to the worker build anyway — the constant exported from
5 downloader/index is literally '__DL2_SW_VERSION__' forever.
6- CancelDownload is a stub (file-worker.ts:85-87) — no AbortController anywhere, so a user navigating away from a 200 MB book keeps downloading.
7- Fixed 90s RPC timeout (worker-client.ts:23) will spuriously fail large PDFs on slow connections while the worker download actually continues and later completes.
8- Patches.calculateLevel re-reads all stored patches from IDB after every debounced sync (patcher.ts:285) — O(history) work on every save.
9- SW's fetchAndCache (sw.ts:117-139) lacks the gzip-payload sniff that fetcher.ts has and hardcodes its own gateway list — the same txId cached via the SW path vs. the worker path can
10 yield different bytes (compressed vs. decompressed), and a gzipped PDF served without application/pdf content-type lands in the preview cache.
11- EvmWriteClient.donateToProject is the only write without the normalizeError try/catch, and (unlike register) doesn't push a Pyth price first — worth confirming that's intentional.
12- syncAccount's cache-hit path (sync.ts:97-107) trusts lastUpdated forever — no TTL, so balances/level never refresh without forceRefresh.
13- EvmClient.ready is created in the constructor with no default catch — constructing a client you never await produces unhandled-rejection noise.
14