fix(compile): reconcile shared pages after source deletion - #171
fix(compile): reconcile shared pages after source deletion#171TigerOfCountryYao wants to merge 3 commits into
Conversation
|
Hi @TigerOfCountryYao did you mean for these to be draft, or do y ou want to submit them as ready for review? |
Pages that share a deleted source are now rebuilt from the owners that survive, instead of being frozen with the removed source's content forever. `rm` recorded each kept slug in `state.frozenSlugs`, the same marker compile sets when it notices a deleted source, and that marker was terminal. The page kept the removed source's prose and its citations, `lint` reported broken-citation at error severity, and no command could repair it. Deleting the page to force a rebuild lost it for good. Frozen and needs-reconciling are now separate states sharing one field. A slug frozen because this run's extraction failed is still skipped and preserved. A slug carried in persisted state is a reconciliation marker: the page is rebuilt from whatever owners remain, and a page no live source owns is orphaned rather than held. Review before merge found four defects, each fixed with its own regression test: a marker retired despite its replacement failing validation, a partial extraction failure dropping surviving owners' claims, a scoped run scheduling a deleted source its filter excluded (in two separate closure sites), and stale documentation describing the old behaviour. Original implementation by Kai Yao (@TigerOfCountryYao), from #171. Fixes #194.
|
Landed on Thank you for this. The distinction at the centre of it, that a persisted frozen slug is a reconciliation marker rather than a permanent skip, is what made the fix work, and your test suites passed against current What was added before merging: coverage for the Closing as superseded by #199. |
Rebuilds shared pages through a fixed-point owner closure after source deletion, filters non-surviving citations during clean rebuilds, and orphans ownerless frozen slugs. Covers deletion chains, multiple deleted owners, late-discovered owners, unknown citations, ownerless pages, and survivor extraction failure. This branch is stacked on #169 and #170; the intended incremental review is commit 160e2af. Verification: 96 targeted tests, TypeScript, build, changed-scope checks, and diff checks pass.