Beacon: The Index Fabric
1,084 wordsA design document: it describes the 1.0 target, not what runs today.
Every index generation exposes IndexSnapshot { identity: DerivedIdentity, root_oid, answer_contract: AnswerContract }; an index definition normally has one canonical advancing source role. A query separately supplies target CoordinateSchemaBinding[]. A root is direct only at exact binding/frontier equality; it may tail only when each advancing DerivedSourceCoverage.base_binding.selected_head is a proved ancestor on that exact branch and a contiguous delta path reaches every target under the shared frontier. Fork overlays and squash-merge deltas follow their explicit branch rules. A newer/nonancestor root is unusable except through a retained matching historical generation or separately proved inverse/recompute path. Definition/topology/authority/profile mismatch is not “close enough.” No path silently omits a tail. Authorization applies during statistics, candidates, traversal, scoring, and result construction—not as a final filter.
Canonical versioned IndexDefinition is not opaque DDL text. Common fields bind source graph predicate/bound expressions, branch policy, authority mode, semantic/scalar/collation profiles, null/duplicate/missing-value laws, a definition-time ApproximationProfile?, and update/deletion regime. Kind profiles bind: B-tree/hash key encoding/comparator; FTS Unicode/tokenizer/normalizer/stemmer/stopword/scorer artifact OIDs; vector dtype/dimension/metric/normalization plus HNSW/IVF/PQ and recall-population contract; adjacency order/projection; or path edge/label/cost projection and deletion semantics. Every parameter that can change membership, score, order, recall population, or stopping—including approximate topology seed/generation, candidate/search depth, quantizer, rerank count, and early-stop rule—is semantic and appears in definition_oid, DerivedIdentity, the ApproximationProfile, or the consuming realized AnswerContract; only proved answer-preserving layout/scheduling knobs may live in a physical build profile. Independent rebuilds may claim equivalence only when they reproduce the same exact contents or the same pinned approximate generation/answer contract; a rebuilt ANN topology is a new semantic generation even when configured from the same DDL.
Indexes expose IndexAuthority = ConstraintCriticalSynchronous | DerivedRebuildable. ConstraintCriticalSynchronous is the branch/head/schema-scoped canonical state owned by Chronicle/Txn's fgdb-constraints; Beacon may provide its access implementation but never asynchronous ownership or a second truth. Derived indexes may be discarded. If constraint state is missing/corrupt, affected writes block until a verified base-state rebuild; recovery never accepts a constraint-affecting write while enforcement is unavailable.
-
Property B-trees and hash indexes operate over stable constraint domains and label-membership projections. Unique/key/cardinality maps are
ConstraintCriticalSynchronous; optimizer indexes and filters areDerivedRebuildable. Composite keys, canonical scalar encoding, range gaps for SSI, watermarks, and authority domains are part of the access contract.Point(2D/3D)values sit outside every registered comparator and index-kind profile in 1.0: a declared index over aPointproperty fails closed as a typed error, and the canonicalPointbyte encoding serves digests and equality only, never a spatial order — the registered §3.4 non-goal, with the Z/Hilbert-curve-over-B-tree route recorded as the post-1.0 path. -
Adjacency views (A+-style): user-declared alternative sort orders / partitionings of an edge type's runs — e.g.
INDEX ON :RATED ORDER BY (dst, rating DESC)— giving Graphflow-style tunable secondary adjacency for query shapes the primary run order can't serve. These are just extra run families; the whole Strata machinery is reused. The same mechanism hosts dense projections: bitmap or dense-tile adjacency views over selected (label, type, label) subgraphs — derived, Ripple-maintained, snapshot-cursored — feeding the semiring kernels (§8.7) and set-intersection fast paths without ever becoming a storage-tier citizen. -
Full-text: segment-based inverted index, in-house tokenization (Unicode word-boundary + language-pluggable stemmers), BM25 with positions/phrase/fuzzy(edit≤2 via Levenshtein automata over the term ART); frankensqlite's FTS5 module is the in-family behavioral reference.
-
Vector ANN with historical topology. HNSW uses mutable delta plus immutable generation roots, but each query pins one
IndexSnapshot. Nodes newer than the requested snapshot cannot participate as routing bridges. A capability-hidden node may never affect candidate membership, routing hops, scores, stopping, timing class, resource/error metadata, or any other observable in any answer mode unless a formally verified authority-partitioned/filter-aware topology proves the declared noninterference law;Approximatemay weaken recall, never confidentiality. Deleted-but-authorized nodes are a separate temporal question and may participate only when the pinned snapshot/answer contract explicitly includes their historical visibility. Rebuild creates a new root and never changes replay pinned to a retained old root. A coverage base older than a target is usable only with the exact per-coordinate ancestry and contiguous-tail proof above; otherwise the query waits or selects an exact scan—never output-filters an incompatible topology into a false claim of snapshot completeness. Exact reranking is exact only within the candidate set.SQ8/PQ/IVF-PQ are physical codecs with versioned reconstruction-error evidence. A JL projection may carry a probabilistic multiplicative bound with dataset size, dimension, and failure probability; PQ generally carries residual/additive or empirical distance-error bounds, not a universal
(1±ε)guarantee. Recall sampling is keyed and names the query population, exact baseline, snapshot/authority domain, sample design, and alpha; e-processes are health evidence and rebuild triggers, not proof of per-query recall. STRICT queries may request an exact fallback. -
Path/reachability indexes (adaptive): 2-hop/pruned-landmark labeling is built on demand for an explicit graph/authority projection when repeated reachability or shortest-path load justifies it, then maintained by Ripple or rebuilt/dropped under its declared update regime. Landmark and portfolio selection may use lazy greedy. A
(1−1/e)badge is legal only when the registered measured-benefit objective is proved nonnegative, monotone, and submodular under the actual cardinality budget; other byte, dependency, or matroid constraints use the theorem matching that constraint or label the choiceHEURISTIC. Every decision still publishes objective samples, marginal-gain trace, feasibility checks, uncertainty, deterministic fallback, and any valid upper bound—never a generic “optimality certificate.” -
Hybrid retrieval operator.
HybridSearchSpecpins targetGraphReferenceBinding[], an explicit input-role→IndexSnapshot { identity:DerivedIdentity, root_oid, answer_contract }mapping, every snapshot's coordinate coverage/global frontier, text/vector candidate depths, expansion budget/path semantics, fusion build/profile ObjectIds, duplicate aggregation, tie policy, authority domain, outputAnswerRequirement, and exact fallback. RRF fixes positive integerk0, one-based rank, missing-modality zero, and canonical per-source ties; STRICT comparison uses exact rational cross-products with overflow promotion to canonical big integers, while exposed Decimal128 scores use the profile's fixed scale/rounding. Weighted fusion names exact Decimal128 weights and versioned normalizers. Graph expansion defines duplicate/path-score aggregation and prunes only with admissible upper bounds. BM25 statistics, ANN traversal, seed resolution, and expansion use the authorized bindings; hidden elements cannot influence scores or routing. The GLA operator composes every input contract, tail state, fusion stage, and expansion stage; it emitsExactonly after complete exact sources/fallback and otherwise emits a fully populatedApproximatecontract satisfying that requirement. -
Temporal connectivity index: rollback/persistent union-find and offline segment-tree-over-time generations accelerate declared graph projections. Each generation pins branch, edge-type/label projection, authority domain, sequence range, and deletion semantics.
sealed-exactroots may answer only covered snapshots; an uncovered tail or branch overlay is compensated completely or falls back to BFS at the requested snapshot. Online approximate roots are never selected for an exactCONNECTEDcontract.