Context
Depends on #905 (syncPageIndexForPage seeds the page index on first write).
Once #905 lands, readWikiPage() can find pages via the silo path because the page index is seeded by the first lifecycle write. The flat-path fallback still works but is no longer the only read path.
The flat-copy writes in lifecycle.ts (lines 236–239, 264–272, 638–639) and the wikiRelPath import (line 15) can then be safely removed because every lifecycle write also calls syncPageIndexForPage, which (after #905) seeds the index, which makes the silo-primary read work.
Requirements
Delete these four blocks from src/lib/lifecycle.ts:
- Line 15 — remove
wikiRelPath from the import (it's only used by the flat-copy code)
- Lines 236–239 — the flat-copy write in the create/update path (
writeWikiPage without tenant)
- Lines 264–272 — the flat-copy delete (the
try/catch block that calls getStorage().deleteFile(wikiRelPath(...)))
- Lines 638–639 — the flat-copy write in the backlink-strip path
Important: line numbers refer to the current file (728 lines). Verify with grep -n before deleting. Use sed or edit_file — either is fine once #905 has landed.
Files Involved
src/lib/lifecycle.ts — the only file to modify
Acceptance Criteria
Size Estimate
XS — 1 file, ~16 lines deleted, 0 added
Blocked-By: #905
Blocker-Type: dependency
Unblock-To: ready
Context
Depends on #905 (syncPageIndexForPage seeds the page index on first write).
Once #905 lands,
readWikiPage()can find pages via the silo path because the page index is seeded by the first lifecycle write. The flat-path fallback still works but is no longer the only read path.The flat-copy writes in
lifecycle.ts(lines 236–239, 264–272, 638–639) and thewikiRelPathimport (line 15) can then be safely removed because every lifecycle write also callssyncPageIndexForPage, which (after #905) seeds the index, which makes the silo-primary read work.Requirements
Delete these four blocks from
src/lib/lifecycle.ts:wikiRelPathfrom the import (it's only used by the flat-copy code)writeWikiPagewithout tenant)try/catchblock that callsgetStorage().deleteFile(wikiRelPath(...)))Important: line numbers refer to the current file (728 lines). Verify with
grep -nbefore deleting. Usesedoredit_file— either is fine once #905 has landed.Files Involved
src/lib/lifecycle.ts— the only file to modifyAcceptance Criteria
grep -c 'wikiRelPath' src/lib/lifecycle.tsprints 0grep -c 'removable after' src/lib/lifecycle.tsprints 0grep -c 'Also write flat copy' src/lib/lifecycle.tsprints 0grep -c 'Also delete flat copy' src/lib/lifecycle.tsprints 0pnpm buildpassesnpx vitest run src/lib/__tests__/lifecycle.test.tspasses — all testssrc/lib/lifecycle.tsis modifiedSize Estimate
XS — 1 file, ~16 lines deleted, 0 added
Blocked-By: #905
Blocker-Type: dependency
Unblock-To: ready