From c8dbe9b5731dfdf910d5083d04bb4f2c5d8c21d5 Mon Sep 17 00:00:00 2001 From: tegwick Date: Mon, 15 Jun 2026 01:07:37 +0200 Subject: [PATCH] spec(SHARD-WP-0005 T2): split page identity / placement / content equivalence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes bug B-1: page identity is a stable assigned handle (survives edits), not a content fingerprint; fingerprints identify versions/content for the equivalence mechanism. Chain: identity -> placements -> equivalence. (§7.2) Co-Authored-By: Claude Opus 4.8 --- spec/CoreArchitectureBlueprint.md | 35 +++++++++++++------ .../SHARD-WP-0005-architecture-hardening.md | 2 +- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/spec/CoreArchitectureBlueprint.md b/spec/CoreArchitectureBlueprint.md index 4073650..b68b716 100644 --- a/spec/CoreArchitectureBlueprint.md +++ b/spec/CoreArchitectureBlueprint.md @@ -288,17 +288,32 @@ All shapes reduce to a common skeleton: **`(content | source, structure, provena [derivation rule])`**. The page model stores the richest faithful form as canonical and treats any Markdown rendering of a non-Markdown shape as a *lossy projection* (I-4 + fidelity report). -### 7.2 Identity, placement, addressing +### 7.2 Identity, placement, addressing — three distinct concepts -- **Identity** is a content-derived or native-id-wrapped key, *shard-scoped* so native UUIDs - survive projection and don't collide. -- **Placement** is separate: one identity → N placements (paths/shards) = a DAG. No single - canonical path (I-9). -- **Span addressing** — adopt native span IDs where minted (Roam `:block/uid`, Logseq `id::`, - Notion/CRDT UUID); else content fingerprint or path+range. The Xanadu tumbler is the ideal - the scheme aims at without requiring. -- **Provenance envelope** rides on every page and span (source shard, freshness, liveness, - overlay status, authz context, divergence, derivation lineage). +The earlier draft used "identity" for two different things and (worse) suggested deriving page +identity from a content fingerprint — which would make *editing a page change its identity* and +break every reference to it (review bug B-1). They are pulled apart here: + +- **Page identity — a *stable handle*.** A shard-scoped, durable key that **survives edits**: + the backend's native page/note id where one exists (Roam/Notion/Trilium uid, a git path + treated as a name, a wiki page name), wrapped in a shard scope so it survives projection and + never collides across shards. Identity is *assigned/minted, not computed from content*. + References, placement, transclusion targets, and overlays all key on identity. +- **Placement — *where* an identity sits.** One identity → N placements (paths/shards) = a DAG; + no single canonical path (I-9). Placement can change without changing identity. +- **Content equivalence — *detecting sameness*, never identity.** A **content fingerprint** (or + span-set overlap) identifies a *version / a piece of content*, used to detect that two + *distinct identities* hold the same or derived content (the equivalence/chorus mechanism, + §8.4). A fingerprint is never a page's identity: same page, edited → new fingerprint, **same + identity**; two pages, identical content → same fingerprint, **different identities**. +- **Span addressing** — a sub-page address within an identity: adopt native span IDs where + minted (Roam `:block/uid`, Logseq `id::`, Notion/CRDT UUID); else a *position* address + (path+range) or a *content-fingerprint* address for equivalence/transclusion. The Xanadu + tumbler is the portable ideal the scheme aims at without requiring. +- **Provenance envelope** rides on pages and spans (see §7.3 for its layered, low-cost form). + +So the chain is: **identity (stable) → placements (N, mutable) → equivalence (cross-identity +sameness, fingerprint-based)** — three concepts, three mechanisms, never conflated. --- diff --git a/workplans/SHARD-WP-0005-architecture-hardening.md b/workplans/SHARD-WP-0005-architecture-hardening.md index caab29c..e7469e0 100644 --- a/workplans/SHARD-WP-0005-architecture-hardening.md +++ b/workplans/SHARD-WP-0005-architecture-hardening.md @@ -52,7 +52,7 @@ folded in) plus a new **"Known scaling risks & open problems"** section. ```task id: SHARD-WP-0005-T1 -status: todo +status: done priority: high state_hub_task_id: "0bb17223-b458-41a4-b86c-c36b2689cf81" ```