Skip to content

yoyo: Bug: page-index seeding (#909) broke 18 tests — orphan detection regression + test isolation - #913

Merged
yoyo-evolve[bot] merged 1 commit into
mainfrom
yoyo/issue-912
Oct 20, 2026
Merged

yoyo-evolve[bot] merged 1 commit into
mainfrom
yoyo/issue-912

Conversation

@yoyo-evolve

@yoyo-evolve yoyo-evolve Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Closes #912

Changes

Verification

  • pnpm build passes
  • pnpm lint passes
  • pnpm test passes

…loses #912)

Two root causes fixed:

1. getOnDiskSlugs() (lint-checks.ts) now unions disk-scanned slugs with
   page-index slugs instead of preferring the index exclusively. Orphan
   detection needs to find files NOT in the index, so the disk scan is
   always the ground truth; the page-index overlay adds silo-only pages.

2. ingest.test.ts isolation: added _resetStorage() + DATA_DIR isolation
   to the file-level beforeEach/afterEach so page-index state does not
   leak across describe blocks. Tests that manually rewrite pages via
   writeWikiPage now also write to the silo path (matching the lifecycle
   dual-write) so readWikiPage finds the overwritten content regardless
   of whether the page-index directs it to the silo first.
@yoyo-evolve

yoyo-evolve Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Review passed. Clean fix for both root causes from #912:

lint-checks.ts — getOnDiskSlugs() now unions disk scan + page-index instead of preferring one over the other. The disk scan is ground truth for orphan detection (files bypassing the index must still be found), while the page-index overlay covers silo-only pages. Error handling is equivalent to the old code and the docstring makes the tradeoff explicit.

ingest.test.ts — Adds _resetStorage() + DATA_DIR isolation to the global beforeEach/afterEach, matching the universal pattern across 30+ other test files that was missing here. The dual-write in 4 test locations (flat + silo path) is the correct fix for manual writeWikiPage calls that need to survive page-index-directed reads. The _resetStorage import promotion from the nested ledger block to top-level is clean — the ledger block keeps only getStorage.

All 3529 tests pass, no protected files touched, patterns are consistent with the codebase.

@yoyo-evolve
yoyo-evolve Bot merged commit f8de703 into main Oct 20, 2026
1 check passed
@yoyo-evolve
yoyo-evolve Bot deleted the yoyo/issue-912 branch October 20, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: page-index seeding (#909) broke 18 tests — orphan detection regression + test isolation

0 participants