feat(union): overlay-aware resolution (WP-0008 T5)

resolve() layers open overlays onto canonical pages (overlay_state=DRAFT always
surfaced; overlaid body projected when policy.show_drafts); draft-only edits make
a not-yet-existing page resolvable. Never hides an unapplied overlay (I-4). Policy
gains show_drafts. 4 tests green, pyflakes clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 13:29:06 +02:00
parent 7d00ae758e
commit 4be2f190a0
4 changed files with 96 additions and 7 deletions

View File

@@ -31,6 +31,9 @@ class Policy:
canonical_source: CanonicalSource = CanonicalSource.CHORUS
designated_shard: str | None = None
# Whether an unapplied overlay's body is projected over its canonical page on read. Either
# way the overlay is never *hidden* — overlay_state is always surfaced in provenance.
show_drafts: bool = True
DEFAULT_POLICY = Policy()