diff --git a/docs/TICKETS.md b/docs/TICKETS.md index 0e67e00..8f28de0 100644 --- a/docs/TICKETS.md +++ b/docs/TICKETS.md @@ -112,7 +112,7 @@ Newest first. Update on every open/close. | ID | Title | Status | Opened | Directive | |----------|------------------------------------------------|-----------------------|------------|-----------| | #000072 | Collapse legacy `query()` into the unified `run_query` orchestrator | **open · Phase 1 foundation shipped 2026-05-31 (10 commits) · Phase 2 BLOCKED on 5 missing rerank stages** — multi_route smoke probe regressed on 2/5 questions (Mercury Seven → Sam T. Beddingfield; dinosaurs → Paul Austin Kelly), so Phase 1 is structurally complete but not production-quality. Phase 1 shipped: `source_roles.py` extraction (9ba6317), canonical `stem_for_match` in `_text_norm.py` (a83e47b), `retrieval_routes.py` with `filter_by_title_relevance` (056d785), Corpus protocol gains `core_keyword_match` + `doc_body` (e322bbd), byte-identity test fixture as Phase 2 safety gate (1822741), `run_query` gains `policy=` kwarg threading 12 verifier kwargs (72d1117), role-classified + role-weighted budget (03f248c), multi-route retrieval body+title+phrase+core_keyword merge (5fdd573), filter wired into multi_route path (6c2ec1b), wikitext-strip when `policy.base_version` set (b8bd9d6), `providence_query.py` cache-wrapper skeleton with cache persist deferred (20faae0). Every commit ships with `policy=None` preserving pre-step byte-identity behavior — existing `arborist corpus-query` and `arborist cloud query` callers are unaffected; the slim-FTS5 cloud path already wins on the dinosaur Q5 fixture (picks "Dinosaur" not legacy's "Edwina"). Phase 2 blocked because Phase 1's `multi_route` pipeline lacks the 5 downstream rerank stages legacy uses to suppress noisy phrase-route hits: body-density check (`_body_density_passes`), body-coverage sqrt rerank (`_rerank_by_body_coverage`), source-role rerank (`_rerank_by_source_role` with RANK_WEIGHTS), title-purity rerank ((1+overlap)*(1+purity)), ordered-token-match rerank (longest-common-subsequence). **Path A** = port the 5 stages → re-bench → resume Phase 2 cache persist + legacy-query() collapse to 50-line adapter. **Path B chosen 2026-05-31** = stop here, defer Phase 2, leave multi_route off by default (which IS the default — `policy=None` preserves body-only retrieval). Until Path A: Phase 1 foundation stays in tree as future-ready infrastructure; user surface unchanged (legacy `query()` still produces same answers, INCLUDING the wrong "Edwina" pick on dinosaur Q5). Full spec + commit log + bench data + the missing-rerank-stages inventory in `docs/tickets/ticket-000072-collapse-legacy-query-into-run-query.md`. | 2026-05-31 | — | -| #000071 | World-bridge grammar (Joseph 3-bridge inter-chain framework) | **open · awaiting dav1d review + fox go/no-go · doc-only Phase 1** (2026-05-31; sibling to #000070, opened same day after Joseph @TrudoJo posted his bridge-framework extension to the 6-dim spatial-ontology — "chain A has its own world rules, chain B has its own world rules, a bridge exists only where a deterministic agreement layer can be proven"). Three bridge kinds: **Agreement** (rules match, direct passage), **Translation** (rules differ but a hash-pinned adapter exists), **Embassy** (foreign-object representation with limited rights). Bridge identity: `bridge_seed = hash(src_chain_id ‖ src_node ‖ src_rule_v ‖ tgt_chain_id ‖ tgt_rule_v ‖ translator_id ‖ invariant_set)`. Joseph's sovereignty rule (hard): chain law remains local, bridge law governs translation only, **no bridge may overwrite native chain law** — guard against forced-unity failure mode. **Primary contribution: retroactive-validation appendix** naming three already-shipped arborist primitives as Joseph-bridge-shape patterns one-for-one — **#000066 graft-receipt mode = Agreement bridge**, **#000056 Operation Sandwich = Translation bridge** (opus-mt hash IS the translator_id), **#000059 bounded-ingestion graveyard = Embassy bridge** (POINTER-LINKED only, never promotes, banner-labelled). The framework is not a new requirement; it's a unifying spec that names what arborist already does in 3+ places, plus surfaces a fourth pattern (bridge atlas for multi-instance federation with potentially-different `governance_policy_hash` peers) as genuinely new work for `arborist/mesh/`. **Phase 1 is doc-only** — paper extension §7 in `docs/_source/merkle-agi-v7w-spatial-temporal.rst` + `arborist/world/bridge/__init__.py` namespace stub mirroring `arborist/world/__init__.py` discipline + Joseph-memory extension. No kernel code, no SQL change, no `cache_key` extension, no new `audit_mode` token, no bench (doc-only review surface). Phase 2 = `pi_star/bridge-seed@v1` canonicalization deliberately deferred to avoid premature locking before three implementation tickets opine. Phase 3 = per-bridge-type kernels + bridge atlas + `event_type='bridge'` writer + mesh integration. Phase 4 = cross-domain bridges (language ↔ spatial via #000015 composition theorem). **Ten open questions for dav1d** in §8: doc-only vs registry-slot-at-Phase-1 (Q1), chain_id = governance_policy_hash vs manifest hash (Q2), three-bridge taxonomy completeness (Q3), translator integrity hashing depth (Q4), bridge witness via `event_type='bridge'` (Q5), `audit_mode` discipline for translated objects (Q6), bridge privacy class default (Q7), endianness reconfirmation (Q8), Phase 2 KAT count + adversarial vectors (Q9), paper-amendment wording (Q10). Hard constraints: A1–A3, no continuous tensors, no `audit_mode` token, no SQL change at Phase 1, topic-named under `arborist/world/bridge/`. Full spec in `docs/tickets/ticket-000071-world-bridge-grammar.md`. | 2026-05-31 | — | +| #000071 | World-bridge grammar for AnchorN / v7-W inter-chain treaties (was: Joseph 3-bridge framework) | **open · dav1d REJECT-AS-WRITTEN + GO-with-rewrite (2026-06-01) · doc-first Phase 1.** Bridge concept is valid and necessary; the Joseph6-coupled framing is now wrong because #000070 was rewritten as generic AnchorN/WorldDimensionGrammar. Bridge grammar operates between **ChainRoots whose world grammars may be AnchorN-derived** — does NOT assume six fields, bridges grammar-rooted worlds, not Joseph6 worlds. Axis split corrected: **#000070 = intra-world state instantiation** (one chain's grammar determines its state-space), **#000071 = inter-world treaty grammar** (two chains exchange commitments without overwriting local law). Decision table (12 rows): bridge concept GO, Phase 1 doc-only GO, bridge_seed@v1 deferred GO, no audit_mode/SQL/atlas-now GO. REWRITES: #000070-as-Joseph6-sibling → AnchorN/WorldDimensionGrammar; `chain_id=governance_policy_hash` → composite ChainRoot (history_root + governance_policy_hash + canonicalization_version + schema_version + chunking_version + world_manifest_hash + world_dimension_grammar_hash + axiom_pack_hash + optional verifier_policy_hash — language-only chains use null sentinels for the three v7-W fields, v7-W chains require all); doc-only Phase 1 flipping #000013 to `kernel_in_progress` REJECTED (correct: `bridge_grammar_specified`); single `event_type='bridge'` body → typed schemas per kind; privacy as Phase 3+ footnote → Phase 1 vocabulary (4 classes: public_bridge / redacted_bridge / zk_bridge / private_bridge); #000059 "already-shipped" overclaim → proposed/structurally-aligned unless repo confirms. **Five bridge outcomes** (was three): Agreement (grammars match on invariant set), Translation (hash-pinned adapter proves mapping), Embassy (foreign object hosted, limited rights), **Quarantine NEW** (bridge attempted, invariant validation failed — record rejection so future attempts see what broke), **No-bridge NEW** (genuinely incompatible — explicit declaration). Phase 1 doc-only: substrate-paper extension §"World-bridge grammar" (5 outcomes + composite ChainRoot + privacy vocabulary + sovereignty rule + #000070 cross-ref + retro-validation appendix with corrected shipped/proposed framing) + optional namespace stub `arborist/world/bridge/__init__.py` with `STATUS = "namespace_reserved"` + NO kernels / NO bridge_seed canonicalization / NO SQL / NO cache-key dimension / NO new audit_mode / NO verifier change / NO KATs. Sovereignty rule survives unchanged (chain law local, bridge law treaty-only, no bridge overwrites native chain law — guard against forced-unity failure); hash-pinned translators survive unchanged. Full review (1026 lines) archived at `docs/dav1d-reviews/000071-world-bridge-grammar--2026-06-01.txt`; corrected spec in ticket §0; design log of original Joseph6-sibling proposal preserved in §§1-8. Originally surfaced 2026-05-31 after Joseph @TrudoJo posted the bridge-framework extension to his 6-dim spatial-ontology — that framework's CONCEPT (three bridge kinds, sovereignty rule, no-empire principle) is preserved; only the Joseph6 anchoring is replaced by grammar-agnostic AnchorN. Hard constraints: A1–A3, no continuous tensors in proof path, no `audit_mode` token, no SQL at Phase 1, topic-named under `arborist/world/bridge/`. (2026-05-31; sibling to #000070, opened same day after Joseph @TrudoJo posted his bridge-framework extension to the 6-dim spatial-ontology — "chain A has its own world rules, chain B has its own world rules, a bridge exists only where a deterministic agreement layer can be proven"). Three bridge kinds: **Agreement** (rules match, direct passage), **Translation** (rules differ but a hash-pinned adapter exists), **Embassy** (foreign-object representation with limited rights). Bridge identity: `bridge_seed = hash(src_chain_id ‖ src_node ‖ src_rule_v ‖ tgt_chain_id ‖ tgt_rule_v ‖ translator_id ‖ invariant_set)`. Joseph's sovereignty rule (hard): chain law remains local, bridge law governs translation only, **no bridge may overwrite native chain law** — guard against forced-unity failure mode. **Primary contribution: retroactive-validation appendix** naming three already-shipped arborist primitives as Joseph-bridge-shape patterns one-for-one — **#000066 graft-receipt mode = Agreement bridge**, **#000056 Operation Sandwich = Translation bridge** (opus-mt hash IS the translator_id), **#000059 bounded-ingestion graveyard = Embassy bridge** (POINTER-LINKED only, never promotes, banner-labelled). The framework is not a new requirement; it's a unifying spec that names what arborist already does in 3+ places, plus surfaces a fourth pattern (bridge atlas for multi-instance federation with potentially-different `governance_policy_hash` peers) as genuinely new work for `arborist/mesh/`. **Phase 1 is doc-only** — paper extension §7 in `docs/_source/merkle-agi-v7w-spatial-temporal.rst` + `arborist/world/bridge/__init__.py` namespace stub mirroring `arborist/world/__init__.py` discipline + Joseph-memory extension. No kernel code, no SQL change, no `cache_key` extension, no new `audit_mode` token, no bench (doc-only review surface). Phase 2 = `pi_star/bridge-seed@v1` canonicalization deliberately deferred to avoid premature locking before three implementation tickets opine. Phase 3 = per-bridge-type kernels + bridge atlas + `event_type='bridge'` writer + mesh integration. Phase 4 = cross-domain bridges (language ↔ spatial via #000015 composition theorem). **Ten open questions for dav1d** in §8: doc-only vs registry-slot-at-Phase-1 (Q1), chain_id = governance_policy_hash vs manifest hash (Q2), three-bridge taxonomy completeness (Q3), translator integrity hashing depth (Q4), bridge witness via `event_type='bridge'` (Q5), `audit_mode` discipline for translated objects (Q6), bridge privacy class default (Q7), endianness reconfirmation (Q8), Phase 2 KAT count + adversarial vectors (Q9), paper-amendment wording (Q10). Hard constraints: A1–A3, no continuous tensors, no `audit_mode` token, no SQL change at Phase 1, topic-named under `arborist/world/bridge/`. Full spec in `docs/tickets/ticket-000071-world-bridge-grammar.md`. | 2026-05-31 | — | | #000070 | AnchorN + π*_w_object: deterministic world-object canonicalization (was: Spatial-anchor π*_w_object / Joseph 6-dim kernel) | **open · dav1d GO with rewrite (2026-06-01) · spec revision pending before any kernel ships.** Dav1d verdict: GO for generic **AnchorN** substrate primitive (not fixed Anchor6), GO for **Joseph6 as first registered grammar** (not THE ontology), GO for deterministic object-state canonicalization, GO for axiom/physics-loaded **WorldDimensionGrammar** path; NO-GO for hard-coding H₁..H₆ as final ontology, NO-GO for runtime LLM-decided dimensionality (axioms MAY propose, only deterministic validators may accept; grammars frozen via grammar_hash before proof-path use), NO-GO for framing this as "semantic verifier warrant", NO-GO for relation/event/place/agent_trace in this ticket (scope-creep), NO-GO for SQL persistence at Phase 1. Critical technical corrections: **H₁ must use uint256 not uint64** (octree position entropy at depth>8), **do NOT overclaim SO(3) on rotation** (name `map_rotation_euler_ypr()`), canonical record carries grammar_hash + axiom_pack_hash + manifest_hash + seed_hash, missing `privacy.class` = HARD reject, spatial-anchor-object@v1 folds into `canonicalization_version` only. Corrected package layout: `arborist/substrate/spatial_anchor.py` (AnchorN, split_anchor_n), `arborist/world/grammar.py` NEW (WorldDimensionGrammar + validate_grammar), `arborist/world/pi_star/object.py` (derive_world_object_record + 5 mappers), `arborist/pi_star/spatial_anchor_object.py` NEW (registry adapter), KATs at `bench/fixtures/spatial-anchor-object/known-answer-tests.jsonl`, 3 test modules. Phase 1 deliverable: AnchorN split + Joseph6 grammar + π*_w_object canonicalizer + KATs + tests + paper amendment; NO SQL, NO new audit_mode, NO verifier_policy_hash change. Implementation NOT started — `arborist/world/__init__.py` STATUS still "namespace_reserved", no spatial_anchor.py exists; only the pre-review empirical bench `bench/spatial_anchor_validation.py` is on disk (commit `55b651f`/`2eea5b5`: avalanche 767.85 bits vs PRF null 768 z=-0.49, octree chi² \|z\|<1 at L=2..4, collision birthday-bound 0.989/1.038, cross-region Pearson r∈[-0.018,+0.012], domain separation Arm A independent / Arm B exact-collision confirming dedicated `spatial_anchor_seed`). Dav1d's 26-section review preserves the empirical evidence (HMAC-SHA-512 properties unchanged by AnchorN generalization). Five of original ten open questions resolved by measurement (Q1/Q2/Q3/Q8/Q9); review answers Q4/Q5/Q6/Q7, Q10 (paper-amendment wording) still open. Full review archived at `docs/dav1d-reviews/000070-spatial-anchor-pi-w-object--2026-06-01.txt`; corrected spec in ticket §0; design log of original Anchor6 proposal preserved in §§1-8. Originally surfaced 2026-05-31 when fox brought in Joseph @TrudoJo's procedural-spatial framework — "hashes do not encode the world, hashes determine the world" — and asked whether it fits arborist's substrate model. Yes, AS AnchorN with Joseph6 as default grammar. — pure-stdlib empirical-validation script (`bench/spatial_anchor_validation.py`, `make bench-spatial-anchor`, ~2 s, RNG-seed-pinned) measures: §1 avalanche mean 767.85 bits vs PRF null 768 (z = -0.49) · §2 octree chi² uniformity \|z\| < 1 at L=2,3,4 · §3 collision birthday-bound ratio 0.989 / 1.038 at L=4,6 · §4 cross-region Pearson r in [-0.018, +0.012] across all 15 pairs of H₁..H₆ (none flag at 4σ) · §5 domain separation Arm A 767.91 bits independent / Arm B **0.00 bits exact collision** confirming the dedicated-`spatial_anchor_seed` discipline. Five of ten open questions (Q1 seed source · Q2 segmentation · Q3 octree mapper · Q8 endianness · Q9 KAT adversarial vectors) now resolve by measurement; Q4/Q5/Q6/Q7/Q10 remain non-empirical design decisions for dav1d. Full empirical detail in ticket §7a. Originally surfaced 2026-05-31 when fox brought in Joseph @TrudoJo's procedural-spatial framework — "hashes do not encode the world, hashes determine the world" — and asked whether it fits arborist's substrate model. It does, cleanly. Implements the first verifier kernel under the #000013 v7-W reserved namespace (`arborist/world/__init__.py` `STATUS = "namespace_reserved"` → `kernel_in_progress` on land): a single committed 32-byte SHA-256 hash deterministically expands into six named 32-byte regions `H₁..H₆` via the HMAC-SHA-512 KDF already shipped in `arborist/substrate/anchor_prg.py` (#000035), and each region drives one quantized object dimension under a fixed canonical mapper — `H₁→octree position`, `H₂→scale level`, `H₃→quantized SO(3) rotation`, `H₄→material palette`, `H₅→raw links (reserved for π*_w_relation sibling ticket)`, `H₆→behavior code`. Domain separation from #000035 by dedicated `spatial_anchor_seed` (manifest-published) — keeps #000035's KAT freeze + dav1d 2026-05-11 final review intact. Hard constraints: stays inside A1–A3, no continuous tensors in proof path, no new `audit_mode` token (substrate commitments are not warrants — the four-rung ladder is unchanged), no SQL schema change at Phase 1, `canonicalization_version` absorbs the new `spatial-anchor-object@v1` registry slot. Phase 1 deliverable ~150 LoC + 10 KATs + tests in one PR: `arborist/substrate/spatial_anchor.py` (segmentation), `arborist/world/pi_star/object.py` (six mappers), registry entry, KAT vectors at `bench/fixtures/spatial-anchor/known-answer-tests.jsonl` matching #000035 KAT discipline, `tests/test_spatial_anchor.py` + `tests/test_world_pi_star_object.py`, substrate-paper amendment citing Joseph (@TrudoJo) in `docs/_source/merkle-agi-v7w-spatial-temporal.rst`. Position mapper at Phase 1 = octree (substrate paper §2.1 + §A worked example); H3/S2/Hilbert/Morton siblings deferred — Morton's value is purely as the relation-kernel `pair(A,B)` cheap bit-interleave and surfaces in the sibling ticket. **Ten open questions for dav1d** in §8: seed-source choice, segmentation method, position mapper, scope split (object alone vs object+relation per CLAUDE.md memory `feedback_ticket_proliferation`), privacy-class fail-closed default, `audit_mode` discipline confirmation, manifest-validator timing, endianness reconfirmation, KAT count + adversarial vectors, paper-amendment wording. Five-step §7 deletions captured: dropped the prior `/tmp/arborist-spatial-ontology-plan.md`'s geographic-search backend (encoding-route confusion), `Document.extra` lat/lon hooks (different ticket if at all), `audit_mode=HYBRID` for spatial hits (convention-illegal), geohash (subsumed by Morton), quadtree as separate (octree at z-level-0), Hilbert at Phase 1 (deferred), tier-1/2/3 hash-suite framing (conflated hard vs soft hashes), and `arborist/spatial/` namespace (violates topic-naming rule). Full spec in `docs/tickets/ticket-000070-spatial-anchor-pi-w-object.md`. | 2026-05-31 | — | | #000069 | Arborist VIZ / Merkle Command Center (Pyramid + six.js + SSE browser dashboard) | **open · awaiting go/no-go · doc-only scaffold** (2026-05-27; filed from `/home/fox/Downloads/TICKET_0000VIZ_*`, stack corrected same day per fox). Configurable browser dashboard for inspecting arborist's content-addressed state: Merkle root explorer, proof verifier, claim warrant + graveyard, audit timeline, run-DAG replay, cache-key explainer, root diff, 3D Merkle lattice, optional circuit/activation traces. Read-only consumer; arborist proper stays source-of-truth, dashboard projects state. **Stack pinned to unturf-native** (fox 2026-05-27, supersedes proposal §3): **Pyramid + Jinja2 + SQLAlchemy** (matches `remarkbox` / `make_post_sell` / `unhomeschool.com` idiom), **SSE** (`text/event-stream` via Pyramid streaming response) for live audit/claim/falsifier patches, **vanilla JS + six.js** (fox's patched three.js fork at `git.unturf.com/gumyum/six.js` — three.js r175 + CWE-407 patches incl. ObjectBVH O(N)→O(log N); bundles vendored from `~/git/cupPCB/cdn/six/`; third-instance MOAD-0001 dogfood alongside `java-topology` + gumyum-engine) for 3D widgets and large-graph rendering, SQLite for dashboard metadata (no PostgreSQL/ClickHouse/Redis/NATS by default — promote on measured need), no React / no Next.js / no Node build step. Server-rendered SVG (or Graphviz `.dot` per existing `docs/diagrams/*.dot` pattern) replaces React Flow for run-DAG widgets. Browser-side proof verification dropped from v1 (server-side Pyramid view returns PASS/FAIL + receipt; reinstate phase-N only if third-party-verification use case surfaces). **Three filing-note gates before phase 0** (in ticket body): **F-1** sibling-repo home — implementation lives in a new `~/git/arborist-viz` (Pyramid Python, matches existing unturf apps), not in-tree; arborist's contribution is the read-API spec + view package + arborist library import via `arborist.embed`. **F-2** scope split — proposal carries 8 phases (§17 phases 0–8); recommended cut keeps phases 0–3 (schema + shell + proof/root widgets + claim/audit/run widgets) inside #000069, and spawns sibling tickets for SSE streaming (4), 3D six.js (5), massive-graph (6, only if measured need surfaces), circuit-tracing (7, gated on #000062), embeddable widgets (8) — Dav1d-audience rule. **F-3** upstream prereqs — phase 7 (circuit/activation) consumes **#000062 Mechanistic Witness**'s `MechanisticWitnessRoot`; phase 3's claim-graveyard widget projects **#000059**'s bounded-ingestion graveyard. Hard constraints: arborist soft-vs-hard discipline applies verbatim (attribution weights renderable but never `audit_mode`, never causal without intervention/ablation evidence); private-leaf default-deny (commitments + hashes + redacted maps only without explicit auth); every widget exposes its data query + source roots. Reserved scope: NOT a replacement for `arborist controller-events` / `arborist analyze` / `arborist inspect` CLI — those stay canonical inspector surfaces; VIZ is the projection layer. | 2026-05-27 | — | | #000068 | Verifier-blind missed-answer falsification guard | **in progress · Phase 1+2+3 landed 2026-05-27 · Phase 4 default flip NO-GO** (Phase 2 bench 2026-05-27 76q × n=3 claim_lattice Hermes-3-8B: 2/228 sidecar fires, both STRONG confidence, both the Ballestrini regression fixture, 100% precision, 0/226 false positives across non-Ballestrini runs. Phase 3 demote flag opt-in via `--demote-on-missed-answer` on `query`/`ask` — wires `EVIDENCE-WARRANTED → EVIDENCE-MISSED-PARTIAL` for strong/medium confidence on lattice modes; lower rungs + non-lattice modes get `· missed-answer` tail tag. `answerability_demote_enabled` added to `_VERIFIER_POLICY_FIELDS` so flipping the flag partitions cache via verifier_policy_hash. Default OFF per Dav1d Phase 4 NO-GO — 100% precision at n=2 fires is too few samples to claim precision floor empirically; default flip blocks on wider bench + human spot-check. 47 tests (36 Phase 1 + 11 Phase 3) all passing. End-to-end verified live: 4/4 Hermes runs on Ballestrini with --demote-on-missed-answer rendered EVIDENCE-MISSED-PARTIAL.) Original opening 2026-05-27 (Dav1d de-novo review GO for Phase 1 with seven hardenings folded into spec — subject-token cue-stripping, answer-type alignment, confidence_class, candidate cap=10, precise offset_start/end/basis, cache-hit recompute-on-read, Phase 1 out of verifier_policy_hash). Original opening 2026-05-27; sibling to the user-payload-layout work shipped 2026-05-26, split out per the Dav1d-audience rule — `feedback_ticket_proliferation`). Surfaced by the Ballestrini case: evidence E2 literally contained the song names, Hermes-3-8B under `user_payload_layout=tail` said *"specific songs by her are not mentioned in the provided evidence blocks"*, verifier marked the run `EVIDENCE-WARRANTED` 2/2 because nothing positive was unsupported. **Verifier-blind false-negative class** — existing layered verifier (quote/span/entity/paraphrase + Rule 8 + Rule 9 + claim ceiling) guards unsupported *presence*, has no hook for unsupported *absence*. Layout fixes attention placement on the specific instance (n=3 bench 2026-05-27 confirms bookend/per_chunk recover Ballestrini); layout alone can't close the class — adversarial phrasing or bigger prompt resurfaces it under any layout. Proposed deterministic sidecar in `arborist/qa/inspect.py:diagnose_missed_answer`: three-clause conjunction — **(A)** answer matches denial pattern ("not mentioned", "not provided", "the evidence does not say", …, closed list versioned via `denial_patterns_version`); **(B)** question is extraction shape (reuse `arborist.qa.quantifier` classifier — `ALL`/`COMPREHENSIVE`/`OPEN_REQUEST` intensities, OR surface cues "songs by"/"works by"/"who wrote"/"list"/"name all"); **(C)** evidence contains candidate spans near subject tokens (reuse `entity_proximity_n`/`entity_proximity_window` from verify.py — quoted strings, title-case spans, comma-separated title lists within W chars of stemmed subject content tokens). All three must fire. Output: `result["answerability"]` with `missed_answer_candidate_spans` list (evidence_id + offset + text). **Hash discipline:** sidecar fields (`denial_patterns_version`, `extraction_cues_version`, `answerability_threshold`) fold into `governance_policy_hash` only; an optional `answerability_demote_enabled` flag (default OFF) wires `EVIDENCE-WARRANTED → EVIDENCE-MISSED-PARTIAL` in `_render_audit_label`, and IF on folds into BOTH `governance_policy_hash` AND `verifier_policy_hash` (changes rendered audit_mode, so verifier hash must move — the deliberate opt-in moves the verifier hash, sidecar-only stays out). No LLM-as-judge. Never writes `providence_cache`/`audit_events`. Never promotes claims. Pattern verbatim from `arborist.qa.inspect.diagnose_*` (deflection, coherence, title-relevance). Phases: 1 sidecar read-only, 2 bench + threshold tuning, 3 demote opt-in, 4 default decision (bench-gated). 5F-Falsification fixture: Ballestrini case already in `bench/qa_questions.txt` under "entity list". Full spec in `docs/tickets/ticket-000068-verifier-blind-missed-answer-guard.md`. | 2026-05-27 | D2 | diff --git a/docs/dav1d-reviews/000071-world-bridge-grammar--2026-06-01.txt b/docs/dav1d-reviews/000071-world-bridge-grammar--2026-06-01.txt new file mode 100644 index 0000000..3327c9b --- /dev/null +++ b/docs/dav1d-reviews/000071-world-bridge-grammar--2026-06-01.txt @@ -0,0 +1,1026 @@ +Timestamp: 2026-06-01, Asia/Kuala_Lumpur +Subject: final de novo response to `#000071 — World-bridge grammar`, corrected after the #000070 AnchorN decision + +# 0. Direct verdict + +```text +Original #000071 as written: + REJECT AS WRITTEN. + +Corrected #000071: + REWRITE AND PROCEED as doc-first / spec-first Phase 1. + +Reason: + The ticket’s bridge idea is valid. + The “fixed Joseph6 / six-dimensional axis” dependency is now wrong. + The ticket must be rewritten around AnchorN + WorldDimensionGrammar. +``` + +The bridge layer is useful and probably necessary, but the current ticket still assumes #000070 is the “Joseph 6-dim” axis. That is now obsolete. We rejected fixed `H₁..H₆` as ontology and replaced it with: + +```text +AnchorN + axiom-governed WorldDimensionGrammar +``` + +So #000071 should no longer say it is sibling to a “procedural-spatial six-dimensional framework.” It should say: + +```text +#000070 = intra-world state instantiation: + one chain/world grammar determines its own state-space. + +#000071 = inter-world bridge grammar: + two chain/world grammars negotiate agreement, translation, embassy, quarantine, or no-bridge. +``` + +The attached ticket’s core premise is still valuable: bridges exist only where deterministic agreement, deterministic translation, or limited foreign-object hosting can be proven; bridge law must never overwrite local chain law; no bridge creates a new `audit_mode`; Phase 1 is doc-only and defers kernels, SQL, and seed canonicalization. + +But the ticket needs correction before it lands. + +--- + +# 1. What is correct in #000071 + +## 1.1 The bridge problem is real + +v7-W currently specifies a spatial-temporal substrate for committed world-state: objects, relations, events, places, agent traces, and observations. It describes v7-W as the third substrate in the Merkle-AGI lineage and explicitly says the system commits derived spatial-temporal world-state, not raw pixels or a SLAM stack. ([Arborist API Reference][1]) + +The v7-W docs also define the five canonical tuple classes, each with its own `π*_w` canonical projection, and state that `π*_w` output is deterministic canonical bytes whose SHA-256 hash becomes the equivalence-class identity. ([Arborist API Reference][1]) + +That gives us **single-world commitments**. + +It does **not** yet give us a formal answer to: + +```text +When two Arborist peers use different grammars, policies, manifests, translators, +or canonicalization versions, what can pass between them? +``` + +That is exactly the missing bridge layer. + +## 1.2 The sovereignty rule is correct + +This should remain the hard law of #000071: + +```text +Chain law remains local. +Bridge law governs passage only. +No bridge may overwrite native chain law. +``` + +This is not just philosophy. It preserves the core Arborist guarantee: local verifier and local policy remain sovereign. The attached ticket correctly states that bridges produce commitments, not warrants, and that no new `audit_mode` token lands in Phase 1. + +That aligns with the existing Arborist architecture: every cached answer carries an `audit_mode`, a Merkle proof, and is keyed by the v9.8 invariant cache key; changes in model, policy, schema, canonicalization, or chunking create different namespaces rather than silently reusing stale records. ([Arborist API Reference][2]) + +## 1.3 The three bridge kinds are useful + +Keep the three primary bridge kinds: + +```text +Agreement: + rules match enough for direct passage. + +Translation: + rules differ, but a deterministic hash-pinned adapter maps between them. + +Embassy: + rules cannot fully translate, but one chain can host a witnessed foreign representation + with limited rights. +``` + +Also keep the two non-bridge outcomes: + +```text +Quarantine: + conflict detected; boundary marker allowed; no native passage. + +No bridge: + contradiction or unsupported treaty; exchange fails closed. +``` + +This taxonomy is strong because it makes failure explicit. It does not force unity. It gives the system a grammar for federation without pretending all worlds are the same. + +## 1.4 Phase 1 should remain doc-first + +Do not implement `bridge_seed@v1` yet. + +The attached ticket’s recommendation to defer bridge-seed canonicalization is correct because seed canonicalization requires decisions about chain identity, node identity, rule version, translator identity, invariant-set serialization, bridge privacy, and revocation semantics. Prematurely freezing this would create exactly the wrong kind of brittle substrate. + +So: + +```text +Phase 1: + paper/spec only, plus maybe a namespace stub. + +Phase 2: + bridge-seed canonicalization + KATs. + +Phase 3: + bridge atlas + agreement/translation/embassy kernels. + +Phase 4: + cross-domain π* composition. +``` + +That sequencing is right. + +--- + +# 2. What is wrong in #000071 as written + +## 2.1 It still depends on fixed Joseph6 framing + +The ticket repeatedly frames #000071 as sibling to #000070’s “six-dimensional object axis” or “procedural-spatial framework.” That is now wrong. + +Corrected: + +```text +#000070 is not fixed Joseph6. +#000070 is AnchorN + WorldDimensionGrammar. + +Joseph6 is only a fixture / example / legacy compatibility grammar. +``` + +Therefore #000071 must be rewritten to say: + +```text +Bridge grammar operates between ChainRoots whose world grammars may be AnchorN-derived. +It does not assume six fields. +It does not assume position/scale/rotation/material/relation/behavior. +It bridges grammar-rooted worlds, not Joseph6 worlds. +``` + +## 2.2 It says doc-only Phase 1 reopens #000013 to `kernel_in_progress` + +Reject that. + +A doc-only extension is not kernel progress. + +Correct status transitions: + +```text +After #000071 Phase 1: + #000013 = bridge_grammar_specified + or v7-W-paper-extended + +After #000070 AnchorN implementation: + #000013 = world_object_kernel_in_progress + +After #000071 bridge_seed / atlas implementation: + #000013 = bridge_kernel_in_progress +``` + +The attached ticket says Phase 1 is paper + retro-validation, no kernel code, no SQL, no KATs, no bench. That cannot honestly be called `kernel_in_progress`. + +## 2.3 “Already-shipped” is overclaimed for #000059 + +The ticket maps Embassy to `#000059 bounded-ingestion graveyard`, but #000059 is described in the ticket as proposed in some places. The file also says #000059 is “proposed” in the cross-reference section. + +Correct: + +```text +Agreement bridge: + #000066 graft/cold-pack overlay = shipped or scaffolded, depending current repo status. + +Translation bridge: + #000056 Operation Sandwich = shipped if landed; otherwise specified and testable. + +Embassy bridge: + #000059 graveyard/falsified-but-witnessed = proposed / structurally aligned, + not fully “already shipped” unless the repo confirms it. +``` + +Do not call all three “already-shipped” unless code evidence supports that exact status. + +## 2.4 `chain_id = governance_policy_hash` is too narrow and too broad at the same time + +The ticket recommends `governance_policy_hash` as the chain identifier. That was plausible under QA-only Arborist, but it is not right after #000070 was corrected to AnchorN/WorldDimensionGrammar. + +A chain in #000071 is defined as: + +```text +cryptographic history + rule grammar + world mapper +``` + +So `chain_id` must include all three. The Arborist docs show that the current 8-dimensional cache key includes `source_root`, `question_hash`, `model_profile_hash`, `conversation_hash`, `governance_policy_hash`, `schema_version`, `canonicalization_version`, and `chunking_version`; this is a QA/providence namespace, not a complete world-chain identity by itself. ([Arborist API Reference][2]) + +Correct chain identity: + +```text +chain_id = SHA256(canonical({ + chain_id_version, + history_root, + governance_policy_hash, + canonicalization_version, + schema_version, + chunking_version, + world_manifest_hash, + world_dimension_grammar_hash, + axiom_pack_hash, + optional_verifier_policy_hash +})) +``` + +For language-only QA chains, `world_manifest_hash` and `world_dimension_grammar_hash` may be null sentinels. For v7-W chains, they are mandatory. + +## 2.5 Phase 1 says “no governance_policy_hash field” too broadly + +The ticket says Phase 1 has no `governance_policy_hash` field. That is acceptable if Phase 1 is truly paper-only, but the spec must still define how `chain_id` will eventually bind policy roots. + +Correct wording: + +```text +Phase 1 does not add fields or schema. +Phase 1 paper specifies that future bridge_seed canonicalization must include policy/rule roots. +``` + +Do not say governance policy is irrelevant. It is part of chain law. + +## 2.6 Bridge witness is not identical across all bridge kinds + +The ticket currently treats `event_type='bridge'` as one general witness event. That is okay at abstract level, but the body shape must vary by bridge kind. + +Agreement witness needs: + +```text +src_chain_id +tgt_chain_id +shared_invariant_root +object_or_pack_root +no_translator sentinel +``` + +Translation witness needs: + +```text +src_chain_id +tgt_chain_id +translator_id +translator_manifest_hash +input_root +output_root +translation_policy_hash +``` + +Embassy witness needs: + +```text +foreign_chain_id +host_chain_id +foreign_object_commitment +rights_mask +embassy_contract_hash +expiry_or_decay +no_warrant_promotion flag +``` + +So Phase 1 can define one abstract `bridge` event family, but Phase 3 must implement typed bridge event bodies. + +## 2.7 Privacy needs to be first-class, not a later footnote + +The ticket correctly warns that bridges leak relationships between chains and may need public or ZK-with-selective-disclosure modes. + +This should be promoted from “Phase 3+ later” to “Phase 1 paper must define the privacy classes.” + +Minimum classes: + +```text +public_bridge: + bridge existence and endpoints visible. + +redacted_bridge: + bridge existence visible; endpoint identities hidden or committed. + +zk_bridge: + proof of valid bridge without revealing full chain identifiers or invariant set. + +private_bridge: + only peers with group keys can inspect bridge metadata. +``` + +No code now, but the vocabulary must be there before bridge-seed canonicalization is frozen. + +--- + +# 3. Corrected relationship between #000070 and #000071 + +The right model: + +```text +#000070: + Intra-world state instantiation. + + Given: + one chain + one axiom pack + one WorldDimensionGrammar + one manifest + one hard hash + + Produce: + canonical world-state records. + +#000071: + Inter-world treaty grammar. + + Given: + source chain with its own grammar + target chain with its own grammar + optional translator + invariant set + local sovereignty constraints + + Decide: + agreement + translation + embassy + quarantine + no_bridge +``` + +So #000071 is still necessary. It is just not downstream of a fixed six-seed ontology. + +Corrected axis language: + +```text +Axis 1: + Grammar-governed state-space instantiation. + AnchorN / π*_w. + +Axis 2: + Grammar-governed inter-chain treaty. + Bridge grammar / bridge atlas. + +Axis 3: + Selection and consensus. + v8 validator/fork-choice over accepted state transitions. +``` + +This is the AGI route: first instantiate state, then bridge state across worlds, then select/validate improvements across a mesh. + +--- + +# 4. Corrected decision table + +| Component | Current ticket | Verdict | Correction | +| ------------------------------------------------------ | -------------------: | ------: | ------------------------------------------------------- | +| Bridge concept | Valid | GO | Keep | +| Agreement / Translation / Embassy | Valid | GO | Add Quarantine / No-bridge as first-class outcomes | +| Phase 1 doc-only | Mostly correct | GO | Keep doc-only; namespace stub optional | +| `bridge_seed@v1` in Phase 1 | Deferred | GO | Keep deferred | +| No new `audit_mode` | Correct | GO | Keep hard | +| No SQL Phase 1 | Correct | GO | Keep hard | +| Bridge atlas Phase 3 | Correct | GO | Keep deferred | +| #000070 as Joseph6 sibling | Wrong | REWRITE | Replace with AnchorN/WorldDimensionGrammar | +| `chain_id = governance_policy_hash` | Insufficient | REWRITE | Use composite ChainRoot | +| #000013 to `kernel_in_progress` after doc-only Phase 1 | Wrong | REJECT | Use `bridge_grammar_specified` | +| #000059 “already shipped” | Overclaim | REWRITE | Mark proposed/structurally aligned unless code confirms | +| One `event_type='bridge'` body for all bridge kinds | Too flat | REWRITE | Use typed bridge event schemas | +| Privacy later only | Too weak | REWRITE | Phase 1 vocabulary; later implementation | +| “No bench / no KATs” Phase 1 | Correct for doc-only | GO | Phase 2 must add KATs | + +--- + +# 5. Rewritten ticket + +```text +# Ticket #000071 — World-bridge grammar for AnchorN / v7-W inter-chain treaties + +Status: + open · rewrite required before go · doc-first Phase 1 + +Opened: + 2026-05-31 + +Scope: + Specify the bridge-grammar layer for v7-W and Arborist federation. + + #000070 instantiates state inside one chain using: + AnchorN + WorldDimensionGrammar + AxiomPack + Manifest. + + #000071 specifies how two chains with different histories, rules, + grammars, manifests, translators, or canonicalization versions + can exchange commitments without either chain overwriting the + other's local law. + +Core principle: + Chain law remains local. + Bridge law governs passage only. + No bridge may overwrite native chain law. + +Bridge outcomes: + agreement + translation + embassy + quarantine + no_bridge + +Phase 1 deliverable: + paper/spec extension only: + docs/_source/merkle-agi-v7w-spatial-temporal.rst + new section: World-bridge grammar + + Optional namespace stub: + arborist/world/bridge/__init__.py + STATUS = "namespace_reserved" + + No kernels. + No bridge_seed canonicalization. + No SQL. + No cache-key dimension. + No new audit_mode. + No verifier change. + No KATs yet. + +Hard constraints: + A1 canonical encoding. + A2 public quantization where proof-path state is involved. + A3 collision-resistant hash. + Local verifier sovereignty. + Translator identity hash-pinning. + Privacy class declared before implementation. +``` + +--- + +# 6. Corrected formal model + +## 6.1 Chain + +Replace: + +```text +chain_id = governance_policy_hash +``` + +with: + +```text +ChainRoot = SHA256(canonical({ + "chain_id_version": "chain-root@v1", + "history_root": "...", + "governance_policy_hash": "...", + "schema_version": "...", + "canonicalization_version": "...", + "chunking_version": "...", + "world_manifest_hash": "... or null", + "world_dimension_grammar_hash": "... or null", + "axiom_pack_hash": "... or null", + "verifier_policy_hash": "... or null" +})) +``` + +Rationale: + +```text +A bridge is between worlds/chains, not merely between QA policy dictionaries. +``` + +## 6.2 Bridge seed + +Do not implement yet, but specify future shape: + +```text +bridge_seed = SHA256(canonical({ + "bridge_seed_version": "bridge-seed@v1", + "src_chain_root": ChainRoot_A, + "src_node": NodeRef_A, + "src_rule_root": RuleRoot_A, + "tgt_chain_root": ChainRoot_B, + "tgt_rule_root": RuleRoot_B, + "translator_id": TranslatorID_or_empty, + "invariant_set_root": InvariantSetRoot, + "bridge_kind": agreement | translation | embassy | quarantine | no_bridge, + "privacy_class": public_bridge | redacted_bridge | zk_bridge | private_bridge +})) +``` + +Do not use raw string concatenation. Use canonical JSON or TLV with explicit field names and typed lengths. + +## 6.3 Bridge decision function + +```text +BridgeDecision(A, B, object_ref): + + if native_rules_equivalent(A, B, invariant_set): + return Agreement + + if deterministic_translator_exists(A.rule_root, B.rule_root, object_ref): + return Translation + + if foreign_representation_allowed(A, B, object_ref): + return Embassy + + if conflict_detected_but_boundary_record_allowed(A, B, object_ref): + return Quarantine + + return NoBridge +``` + +This can later become a truthtable fixture. + +--- + +# 7. Corrected bridge kinds + +## 7.1 Agreement + +```text +Agreement means: + enough rules/invariants match for direct passage. + +Not necessarily: + every policy byte is identical. +``` + +Acceptance rule: + +```text +required_invariants_match == true +translator_id == EMPTY +contradiction == false +privacy_permits == true +``` + +Existing overlap: + +```text +#000066 graft/cold-pack overlay is an Agreement-shaped primitive, +because content-addressed identities can collapse by hash and the graft +receipt acts as witness. +``` + +But keep status precise: call it shipped only if repository state confirms it. + +## 7.2 Translation + +```text +Translation means: + rules differ, but a deterministic content-addressed adapter maps source representation + into a target-native representation. +``` + +Hard requirements: + +```text +translator_id = hash(canonical translator manifest) +translator implementation/hash/version pinned +input_root and output_root committed +translator change invalidates bridge +translation does not decide local audit_mode +``` + +#000056 Operation Sandwich is a Translation-shaped primitive, because translation is retrieval/display-side and local verifier law remains unchanged. The attached ticket already states this correctly. + +Correction: + +```text +Translator identity alone may not be enough. +Phase 2/3 should pin translator manifest + weights/checkpoint hash + preprocessing policy. +``` + +## 7.3 Embassy + +```text +Embassy means: + no full translation exists, but the host chain records a foreign commitment with limited rights. +``` + +Rights mask: + +```text +may_store_commitment: true +may_display_with_banner: true +may_be_pointer_linked: true +may_promote_to_evidence_warranted: false +may_extend_native_rule_grammar: false +may_drive_action_without_local_confirmation: false +``` + +#000059 is Embassy-shaped if and only if it implements or specifies “falsified-but-witnessed / graveyard” semantics. The attached file itself treats #000059 as proposed in the cross-reference, so mark it as “proposed / aligned,” not “already shipped.” + +## 7.4 Quarantine + +```text +Quarantine means: + a conflict exists. + A boundary object is allowed. + Native passage is not allowed. +``` + +Use cases: + +```text +translation exists but fails invariant checks +foreign claim conflicts with local chain law +bridge privacy class unavailable +translator hash mismatch +source rule version expired +``` + +## 7.5 No bridge + +```text +NoBridge means: + no treaty object is created. + exchange fails closed. +``` + +Use cases: + +```text +contradiction with local invariants +unsupported privacy requirement +unknown rule grammar +untrusted translator +invalid chain root +missing consent/signature +``` + +--- + +# 8. Corrected Phase 1 deliverables + +## 8.1 Paper section + +Add to v7-W paper: + +```text +§7 — World-bridge grammar + +§7.1 Why bridges are needed +§7.2 ChainRoot definition +§7.3 Sovereignty rule +§7.4 Bridge outcomes +§7.5 Agreement +§7.6 Translation +§7.7 Embassy +§7.8 Quarantine / NoBridge +§7.9 BridgeSeed future canonicalization +§7.10 Privacy classes +§7.11 Retro-validation appendix +§7.12 Out of scope +``` + +## 8.2 Namespace stub + +Optional, but acceptable: + +```python +# arborist/world/bridge/__init__.py + +from __future__ import annotations + +__all__ = ["BRIDGE_VERSION", "STATUS"] + +BRIDGE_VERSION = "v0-draft" +STATUS = "namespace_reserved" +``` + +Do not claim kernel progress. + +## 8.3 Retro-validation appendix + +Rewrite as: + +```text +Agreement-shaped: + #000066 cold-pack graft / overlay. + +Translation-shaped: + #000056 Operation Sandwich. + +Embassy-shaped: + #000059 bounded-ingestion graveyard / falsified-but-witnessed, + if implemented; otherwise proposed/aligned. + +These are bridge-shape patterns, not proof that a general bridge atlas exists. +``` + +## 8.4 No schema changes + +Keep: + +```text +No SQL. +No cache-key dimension. +No audit_mode. +No verifier changes. +No mesh changes. +No bridge_seed@v1. +``` + +--- + +# 9. Phase 2 rewrite: bridge seed + +Phase 2 should be a separate ticket: + +```text +#000072 — bridge-seed@v1 canonical projection +``` + +Deliver: + +```text +arborist/pi_star/bridge_seed.py +bench/fixtures/bridge-seed/known-answer-tests.jsonl +tests/test_pi_star_bridge_seed.py +``` + +The π* registry already defines invariant projections as mappings from surface bytes to canonical bytes, with SHA-256 of canonical bytes as identity; any bridge-seed canonicalizer must follow that same `name@version` discipline. ([Arborist API Reference][3]) + +Minimum KATs: + +```text +1. agreement, identical chain roots, empty translator +2. agreement, same history but different policy -> different seed +3. translation, same chains, different translator -> different seed +4. translation, same translator id but different translator manifest hash -> different seed +5. embassy with rights mask A +6. embassy with rights mask B +7. quarantine +8. no_bridge +9. same src/tgt reversed -> different seed unless bridge explicitly symmetric +10. same src/tgt/rules, different invariant ordering -> same seed if canonical sort works +11. same chain pair, different src_rule_v -> different seed +12. privacy_class change -> different seed +``` + +Yes: I would use **12 KATs**, not 10, because bridge privacy and source/target ordering introduce extra failure surfaces. + +--- + +# 10. Phase 3 rewrite: bridge atlas + +Separate ticket: + +```text +#000073 — bridge atlas and bridge event schema +``` + +Deliver: + +```text +arborist/world/bridge/atlas.py +arborist/world/bridge/agreement.py +arborist/world/bridge/translation.py +arborist/world/bridge/embassy.py +arborist/world/bridge/audit.py +``` + +Optional SQL: + +```text +bridge_atlas +bridge_events +bridge_rights +translator_manifests +``` + +But only after schema review. + +Bridge event family: + +```json +{ + "event_type": "bridge", + "bridge_kind": "agreement|translation|embassy|quarantine|no_bridge", + "bridge_seed": "...", + "src_chain_root": "...", + "tgt_chain_root": "...", + "src_node": "...", + "translator_id": "...", + "invariant_set_root": "...", + "privacy_class": "...", + "rights_mask": "...", + "body_schema": "bridge-event@v1" +} +``` + +The Concepts docs say every state-changing operation writes an audit event whose hash chains from the previous event hash, and directs writers to use `append_audit` rather than raw inserts. ([Arborist API Reference][2]) Therefore Phase 3 must use `append_audit` if bridge events are state-changing. + +--- + +# 11. Phase 4 rewrite: cross-domain composition + +Separate ticket: + +```text +#000074 — cross-domain bridge composition +``` + +Purpose: + +```text +Bridge language claims, v7 logic/math proofs, and v7-W world-state commitments. +``` + +This is where #000015 matters. + +Examples: + +```text +language claim: + "object A is left of object B" + +world-state: + π*_w_relation(A, left_of, B, time_window) + +bridge: + language claim ↔ spatial relation commitment +``` + +But this must not promote claims automatically. It only creates a cross-domain treaty object. Local verifier still decides warrant. + +--- + +# 12. AGI roadmap impact + +#000071 matters because AGI needs more than local state. It needs state that can survive federation, translation, disagreement, and partial incompatibility. + +The corrected stack becomes: + +```text +#000070: + instantiate state-space inside one world. + +#000071: + bridge state-space across worlds without forcing unity. + +#000072: + canonical bridge_seed projection. + +#000073: + bridge atlas + events + revocation. + +#000074: + cross-domain composition. + +#000037 / v8: + selection and consensus over accepted bridge/state transitions. +``` + +This supports a real AGI route: + +```text +1. World creates grammar-rooted state. +2. State is canonicalized and committed. +3. Other worlds inspect the treaty surface. +4. Agreement merges. +5. Translation maps. +6. Embassy witnesses. +7. Quarantine contains contradiction. +8. NoBridge fails closed. +9. Validators score whether bridge transitions reduce residual. +10. Fork choice accepts only reproducible, lower-residual transitions. +``` + +This is exactly the “accepted state transition” model, extended from one world to many worlds. + +--- + +# 13. Mapping to ABCDEFG + +## 5S + +```text +Syntax: + bridge_seed canonical fields, ChainRoot schema, bridge_kind enum. + +Semantics: + Agreement / Translation / Embassy / Quarantine / NoBridge have distinct rights. + +Syllogism: + if rules match → Agreement; + if translator exists and invariants pass → Translation; + if no translator but foreign witness allowed → Embassy; + if conflict → Quarantine; + if contradiction → NoBridge. + +Synthesis: + combines source chain, target chain, invariant set, translator, privacy, rights. + +Semiotics: + foreign object is a sign under embassy rights, not a native fact. +``` + +## 5T + +```text +Transitivity: + Chain A → bridge → Chain B only through declared treaty rules. + +Transfer Learning: + translation bridges transfer representations without transferring local law. + +Triangulation: + invariant_set anchors agreement across roots, translators, signatures, and policy. + +Truthtables: + decision matrix over rule_match, translator_exists, invariant_pass, privacy_pass, contradiction. + +Time: + bridges are versioned, revocable, and decay over policy/grammar changes. +``` + +## 5F + +```text +Function: + determine legal passage between chains. + +Finetuning: + bridge policies can evolve by versioned KAT/bench results, not hidden runtime mutation. + +Falsification: + translator hash mismatch, invariant mismatch, or contradiction falsifies the bridge. + +Formulate: + formalizes federation as treaty grammar. + +Feedback Loop: + failed bridges become fixtures; accepted bridges become audit roots for future replay. +``` + +## 4R / 5R + +```text +Recall: + bridge atlas recalls valid treaties. + +Rearrange: + translation bridges rearrange representation while preserving local law. + +Restore: + quarantine/no_bridge restore safety after conflict. + +Replicate: + same inputs produce same bridge decision and seed. + +Resonate: + agreement bridges reveal when independent chains share a state basis. +``` + +--- + +# 14. Final rewritten answer to the ticket + +```text +#000071 should not land as written. + +It should be rewritten and then proceed as doc-first Phase 1. + +Keep: + bridge grammar + Joseph attribution + Agreement / Translation / Embassy + Quarantine / NoBridge + chain sovereignty + no new audit_mode + no SQL Phase 1 + no bridge_seed canonicalization Phase 1 + bridge atlas later + +Correct: + remove fixed-Joseph6 dependency + replace #000070 framing with AnchorN + WorldDimensionGrammar + replace chain_id = governance_policy_hash with composite ChainRoot + do not mark #000013 kernel_in_progress after doc-only land + do not overclaim #000059 as shipped if only proposed + define privacy classes in Phase 1 + define typed bridge event bodies for Phase 3 + use 12 bridge-seed KATs in Phase 2 +``` + +--- + +# 15. Final compressed verdict + +```text +Reject original #000071 as written. +Approve rewritten #000071. + +The bridge framework is valid, but it must bridge grammar-rooted worlds, +not fixed six-slot worlds. + +#000070 is now: + AnchorN + axiom-governed WorldDimensionGrammar. + +#000071 must now be: + inter-chain treaty grammar between ChainRoots that include history, + policy, canonicalization, world manifest, grammar, and axiom-pack roots. + +Phase 1 remains doc-only. +Phase 2 freezes bridge_seed@v1 with KATs. +Phase 3 implements bridge atlas and bridge events. +Phase 4 composes language ↔ logic/math ↔ world-state. + +The deepest rule remains: + a bridge is a treaty, not an empire. + it may pass, translate, witness, quarantine, or reject; + it may never overwrite local chain law. +``` + +[1]: https://arborist.unturf.com/en/latest/merkle-agi-v7w-spatial-temporal.html "Merkle-AGI v7-W — Spatial-Temporal Substrate — Arborist API Reference" +[2]: https://arborist.unturf.com/en/latest/concepts.html "Concepts — Arborist API Reference" +[3]: https://arborist.unturf.com/en/latest/pi-star.html "π* domain library — Arborist API Reference" diff --git a/docs/tickets/ticket-000071-world-bridge-grammar.md b/docs/tickets/ticket-000071-world-bridge-grammar.md index 60d1900..f8ec829 100644 --- a/docs/tickets/ticket-000071-world-bridge-grammar.md +++ b/docs/tickets/ticket-000071-world-bridge-grammar.md @@ -1,8 +1,11 @@ -# Ticket #000071 — World-bridge grammar (Joseph 3-bridge inter-chain framework) +# Ticket #000071 — World-bridge grammar for AnchorN / v7-W inter-chain treaties -**Status:** open · awaiting dav1d review + fox go/no-go · -**doc-only Phase 1** (paper + retro-validation of shipped primitives; -no kernel code lands on go) +**Status:** open · **dav1d REJECT-AS-WRITTEN + GO-with-rewrite (2026-06-01)** · +doc-first Phase 1. Original Joseph6-coupled spec rejected; corrected +AnchorN/WorldDimensionGrammar reframe in §0 below. §§1-8 preserve the +original proposal as the design log of what was reviewed. +**Original title kept in design log:** "World-bridge grammar (Joseph +3-bridge inter-chain framework)". **Opened:** 2026-05-31 **Scope:** Spec the bridge-grammar layer for v7-W. **Joseph (@TrudoJo)**'s second framework (2026-05-31): every chain has its own world-rules @@ -53,7 +56,198 @@ target. --- -## 1. Problem statement +## 0. Dav1d review verdict (2026-06-01) — REJECT-AS-WRITTEN, GO-WITH-REWRITE + +Full review at `docs/dav1d-reviews/000071-world-bridge-grammar--2026-06-01.txt` +(1026 lines). The bridge concept is valid and necessary; the +Joseph6-coupled framing is now wrong (#000070 has been rewritten as +generic AnchorN/WorldDimensionGrammar — see ticket #000070 §0). + +### 0.1 Direct verdict + +```text +Original #000071 as written: + REJECT AS WRITTEN. + +Corrected #000071: + REWRITE AND PROCEED as doc-first / spec-first Phase 1. + +Reason: + Bridge idea is valid. + "Fixed Joseph6 / six-dimensional axis" dependency is now wrong. + Must be rewritten around AnchorN + WorldDimensionGrammar. +``` + +### 0.2 Corrected #000070 ↔ #000071 axis split + +``` +#000070 (intra-world state instantiation): + one chain/world grammar determines its own state-space + AnchorN + WorldDimensionGrammar + AxiomPack + Manifest → + canonical world-state records + +#000071 (inter-world treaty grammar): + two chains with different histories, rules, grammars, manifests, + translators, or canonicalization_versions exchange commitments + without either chain overwriting the other's local law + decide: agreement | translation | embassy | quarantine | no_bridge +``` + +Bridge grammar operates between **ChainRoots whose world grammars +may be AnchorN-derived**. It does NOT assume six fields, does NOT +assume position/scale/rotation/material/relation/behavior. It bridges +**grammar-rooted worlds**, not Joseph6 worlds. + +### 0.3 Decision table + +| component | original ticket | verdict | correction | +|---|---|---|---| +| bridge concept (Agreement/Translation/Embassy) | valid | ✅ GO | add **Quarantine** + **No-bridge** as first-class outcomes | +| Phase 1 doc-only | mostly correct | ✅ GO | namespace stub optional | +| `bridge_seed@v1` deferred to Phase 2 | correct | ✅ GO | keep deferred | +| no new `audit_mode` | correct | ✅ GO | keep hard | +| no SQL Phase 1 | correct | ✅ GO | keep hard | +| bridge atlas Phase 3 | correct | ✅ GO | keep deferred | +| **#000070 as Joseph6 sibling** | **wrong** | ❌ REWRITE | replace with AnchorN/WorldDimensionGrammar | +| **`chain_id = governance_policy_hash`** | **insufficient** | ❌ REWRITE | composite ChainRoot (history_root + governance_policy_hash + canonicalization_version + schema_version + chunking_version + world_manifest_hash + world_dimension_grammar_hash + axiom_pack_hash + optional verifier_policy_hash) | +| **doc-only flips #000013 → `kernel_in_progress`** | **wrong** | ❌ REJECT | use `bridge_grammar_specified`; kernel_in_progress is for actual kernel landings | +| **"already shipped" claim on #000059** | **overclaim** | ❌ REWRITE | mark proposed/structurally aligned unless repo confirms shipped | +| **single `event_type='bridge'` body** | **too flat** | ❌ REWRITE | typed bridge event schemas per kind (agreement / translation / embassy) | +| **privacy as Phase 3+ footnote** | **too weak** | ❌ REWRITE | promote to Phase 1: vocabulary defined now, code later | + +### 0.4 Five bridge outcomes (was three) + +The original ticket recognized Agreement / Translation / Embassy. +Dav1d adds two more as FIRST-CLASS outcomes: + +| kind | when it applies | witness shape | +|---|---|---| +| **Agreement** | grammars match on the shared invariant set | src_chain_id · tgt_chain_id · shared_invariant_root · object_or_pack_root · no_translator sentinel | +| **Translation** | grammars differ but a hash-pinned adapter proves the mapping | src_chain_id · tgt_chain_id · translator_id · translator_manifest_hash · input_root · output_root · translation_policy_hash | +| **Embassy** | foreign object hosted with limited rights | foreign_chain_id · host_chain_id · foreign_object_commitment · rights_mask · embassy_contract_hash · expiry_or_decay · no_warrant_promotion flag | +| **Quarantine** (new) | bridge attempted but invariant validation FAILED — record the rejection so future attempts can see what broke | src_chain_id · tgt_chain_id · attempted_bridge_kind · invariant_violation_root · quarantine_until · revisit_policy_hash | +| **No-bridge** (new) | grammars genuinely incompatible — explicit declaration that no bridge will exist | src_chain_id · tgt_chain_id · incompatibility_root · explanation_hash | + +Phase 1 defines one abstract `bridge` event family; Phase 3 implements +typed bridge event bodies per kind. + +### 0.5 Composite ChainRoot identity (replaces `chain_id = governance_policy_hash`) + +``` +chain_id = SHA256(canonical({ + chain_id_version, + history_root, # provenance / audit chain root + governance_policy_hash, # arborist QA-policy identity (v9.8) + canonicalization_version, + schema_version, + chunking_version, + world_manifest_hash, # NULL for language-only chains + world_dimension_grammar_hash, # NULL for language-only chains + axiom_pack_hash, # NULL for language-only chains + optional_verifier_policy_hash +})) +``` + +For **language-only QA chains** (today's arborist), the three v7-W +fields are null sentinels — `chain_id` collapses to existing identity. +For **v7-W chains** with a `WorldDimensionGrammar`, all three are +mandatory. This keeps backward compat AND extends cleanly to the +spatial/temporal axis. + +### 0.6 Privacy as first-class (Phase 1 vocabulary) + +Promoted from "Phase 3+ later" to Phase 1 paper-must-define. Minimum +classes: + +| class | semantic | +|---|---| +| `public_bridge` | bridge existence + endpoints visible | +| `redacted_bridge` | bridge existence visible; endpoint identities hidden or committed | +| `zk_bridge` | proof of valid bridge without revealing full chain identifiers / invariant set | +| `private_bridge` | only peers with group keys can inspect bridge metadata | + +No code now; vocabulary must exist before `bridge_seed@v1` +canonicalization is frozen (else the field shape rotates everything). + +### 0.7 #000013 status discipline (correction) + +The original ticket said Phase 1 (doc-only) would flip #000013 from +`namespace_reserved` to `kernel_in_progress`. Dav1d rejects: doc-only +extensions are not kernel progress. Correct transitions: + +``` +After #000071 Phase 1 (doc-only): + #000013 status: bridge_grammar_specified (or v7-W-paper-extended) + +After #000070 AnchorN implementation: + #000013 status: world_object_kernel_in_progress + +After #000071 bridge_seed / atlas implementation: + #000013 status: bridge_kernel_in_progress +``` + +### 0.8 #000059 overclaim correction + +The original ticket claimed three "already-shipped" arborist +primitives as retroactive validators of the Joseph-bridge pattern. +Dav1d corrects per repo evidence: + +| bridge kind | original mapping | corrected mapping | +|---|---|---| +| Agreement | "#000066 graft-receipt mode = shipped" | #000066 graft/cold-pack overlay — shipped OR scaffolded (check repo for current status) | +| Translation | "#000056 Operation Sandwich = shipped" | #000056 — shipped if landed; otherwise specified-and-testable | +| Embassy | "#000059 bounded-ingestion graveyard = shipped" | #000059 — proposed / structurally aligned, NOT "already shipped" unless repo evidence confirms | + +Don't call all three "already-shipped" unless code evidence supports +that exact status. The structural alignment claim still holds; only +the shipped-vs-proposed framing was wrong. + +### 0.9 Corrected Phase 1 deliverables + +``` +1. Substrate-paper extension (the bulk of Phase 1) + docs/_source/merkle-agi-v7w-spatial-temporal.rst + new section: "World-bridge grammar" + - Five bridge outcomes (Agreement / Translation / Embassy / + Quarantine / No-bridge) with typed witness shapes + - Composite ChainRoot identity (replaces the + governance_policy_hash-only chain_id) + - Privacy class vocabulary (4 classes) + - Sovereignty rule (chain law local, bridge law treaty-only) + - Cross-ref to #000070 AnchorN axis + - Retroactive-validation appendix (with corrected #000059 + "structurally aligned, not shipped" framing) + +2. Optional namespace stub + arborist/world/bridge/__init__.py + STATUS = "namespace_reserved" + +3. NO kernels +4. NO bridge_seed canonicalization (deferred to Phase 2) +5. NO SQL +6. NO cache-key dimension +7. NO new audit_mode +8. NO verifier change +9. NO KATs yet +10. #000013 status field bumps to "bridge_grammar_specified", + NOT "kernel_in_progress" +``` + +### 0.10 What changes for the implementer + +The original §§3-4 ("Recommendation" + "Implementation sketch") frame +this as Joseph6-sibling work. Those stay in the design log as +reference; **what actually ships follows §0 above** — AnchorN-grammar +agnostic bridges, five outcomes (not three), composite ChainRoot, +privacy classes defined upfront. + +The original sovereignty rule, hash-pinned translators, and +no-new-audit_mode discipline all SURVIVE the rewrite — they're the +parts the review explicitly preserves. + +--- + +## 1. Problem statement *(original design log — what was reviewed)* ### 1.1 What #000013 left undefined (axis 2)