Skip to content

DisMech compact evidence vocabulary + typed citation sidecar - #974

Merged
AdaWorldAPI merged 5 commits into
mainfrom
claude/lance-graph-stage-3-recovery-2wrdbd
Aug 20, 2026
Merged

DisMech compact evidence vocabulary + typed citation sidecar#974
AdaWorldAPI merged 5 commits into
mainfrom
claude/lance-graph-stage-3-recovery-2wrdbd

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Lands only what measurement has closed. The endpoint codebook and DisMech-local identity scheme are deliberately left open — see "Not frozen" below.

Scope note: this branch previously carried an S3.0 CausalLiteral address type. It was withdrawn (e4a3cba) after the audit found no falsifier requiring a new address type; the #973 retraction was kept. This PR body describes what the branch actually carries now.

Measured first, then written

All numbers from the upstream corpus (monarch-initiative/dismech, 2,100 disorder files, fetched ephemeral to /tmp, never committed — the /tmp-fixture rule). Full census: E-DISMECH-CORPUS-CENSUS-1.

87.2 MB of strings — and the entire causal semantics is bits + ordinals.

causal_link_type has exactly the four CausalTopology states, so the CE64 bits 59+60 mapping is source-authoritative and never inferred from confidence, edge count, or predicate name:

state count
DIRECT 9,073
INDIRECT_UNKNOWN_INTERMEDIATES 4,539
INDIRECT_KNOWN_INTERMEDIATES 3,978
UNKNOWN 408
total causal edges 17,998

Two experimental populations, not one

source_knows_intermediates() / mediator_unresolved() separate them:

  • 3,978 IndirectKnownIntermediates — the oracle population; the source names the mediators, so they can be hidden and recovery measured.
  • 4,539 IndirectUnknownIntermediates — the restraint control; the source itself does not know, so a reasoner that "recovers" a mediator there is hallucinating closure.

Success is two-sided: recovery sensitivity and epistemic restraint.

Source-side only — CE64 stays out of the bake

This module deliberately does not reference CausalEdge64. The durable causal overlay must not become a pile of hot reasoning registers; DismechTopology → CE64 bits 59..60 happens at hydration, in the consumer, as a 1:1 read of to_bits_2().

Every parse fails closed

UNKNOWN is a value the corpus asserts 408 times. Minting it from a parse failure would forge an assertion the source never made — pinned by unrecognised_topology_fails_closed_and_never_becomes_unknown, with the paired silence half proving the real token still parses.

Citation identity is never the title

The corpus is LLM-generated, so wording drifts between regenerations while the citation does not. Measured: 131,904 title occurrences over 31,361 distinct (4.21× reuse), 12.12 MB inline vs 3.58 MB keyed. A stable key already exists on ~104,700 occurrences (PMID dominant, plus DOI/ORPHA/CGGV/NCT/URL), so CitationKey is (namespace, id). Where no stable identifier exists, ContentAddressed says so explicitly rather than synthesising a bibliographic identity.

Falsifier: reference_identity_survives_a_title_rewording — same PMID, reworded title ⇒ same key, different ContentId; different PMID, identical title ⇒ different key, same ContentId.

Not frozen by this PR (measurement says don't)

  • Endpoint codebook / DisMech-local identity — 63.6% of unprefixed endpoints are still unresolved, and the tail is three different kinds: provenance leaking into the endpoint slot (Orphanet 120, OMIM 32, ClinGen 23 — database names, not concepts), qualified mechanism propositions (Impaired Neurodevelopment 20) that must stay DisMech-local, and lexical variants.
  • "MONDO-derived" applies to the disorders, not the edges — measured endpoint prefixes: no prefix 25.2%, HP 24.9%, GO 11.6%, NCIT 10.5%, hgnc 7.6%, CL 7.3%, MONDO 4.4%. OBO_CORE's five namespaces cover 32.7%.
  • HP needs its own resolution domain — 1,169 labels exist in >1 namespace, 1,129 of them HP+MONDO. Of 19,738 resolved phenotype labels, 26.2% landed in MONDO not HP and 23.7% are ambiguous. Collapsing them misroutes phenotype edges onto same-named disease nodes — harder to detect than a missing edge. UBERON, by contrast, is near-collision-free (10 / 14,975 = 0.07%) and is the safe anchor.
  • phenotypes[].category is 261 distinct — over the 255 Codebook cap, with Neurologic and Neurological among its top values. Needs normalization or a deliberate split; Codebook::intern returning None is the split signal, never a silent widening.

Deterministic resolution reached 80.7% on phenotype labels (55.3% exact + 23.2% case/punct + 2.1% singular) with no model invoked. The next rung is the HPO synonym table — Sensorineural Hearing Loss and Sensorineural hearing loss both fail, so that tail is a synonym miss, not a case miss.

Gates

  • lance-graph-contract 1178/1178 (7 new)
  • cargo fmt clean · cargo clippy --all-targets --no-deps -- -D warnings clean

Board

EPIPHANIES ×3 (I-STRINGS-ARE-CAM-INDEX-ONLY-1 operator ruling, E-DISMECH-CORPUS-CENSUS-1, plus the retained #973 retraction pair) · LATEST_STATE contract inventory.

…laim

Cold-start recovery session. PR #973 ("S3.0 — the exact HHTL causal-literal
address") was closed unmerged by the operator: its CausalLiteral struct and
nine tests were sound, but its board-finding title/framing
(E-THE-LITERAL-CANNOT-LIVE-IN-THE-PATH-IT-ROOTS-1) turned a correct local
fact -- a domain.subject.predicate.object literal exactly fills
NiblePath::MAX_DEPTH (16 nibbles) -- into an implied global claim that exact
identity cannot live in HHTL addressing and evidence must "ref-escape" out of
address space. That inference forgot three already-measured counterexamples
in this same repository:

- E-WORDNET-MAKES-THE-4-ARY-ADDRESS-SEMANTIC-1 (#875/#876, MERGED): a
  full-width 4-ary HHTL fold of real WordNet ancestry is an EXACT structural
  encoding, not lossy hashing.
- tekamolo_facet.rs / facet::FacetCascade (#839/#844, MERGED, live code): one
  16-byte content-blind register supports several simultaneous ClassView
  readings (G3D4/G4D3/G6D2/24xi4) -- new capability lands as a new reading,
  never a deeper path.
- E-ANAPHORA-BEYOND-I4-IS-A-BASIN-EDGE-1 (measured, 7,657 real clauses): a
  local representation exhausting cleanly marks a TYPE boundary, not a
  substrate ceiling -- the sanctioned response is a different reading of the
  same address, never an unbounded escape hatch.

This commit reintroduces CausalLiteral verbatim (the struct and all nine
tests were correct) with the module doc and board findings rewritten to
scope the NiblePath-depth fact correctly, retract the overclaiming finding
in place (append-only), and leave S3.1's evidence/meta placement explicitly
OPEN with the orthogonal-facet pattern named as the leading candidate rather
than pre-decided by a forced "ref-escape" conclusion.

Full audit trail: .claude/handovers/2026-08-20-s3-0-cold-start-recovery-audit.md

Gates: lance-graph-contract 1180/1180 (9 new), fmt clean, clippy
--all-targets --no-deps -D warnings clean, downstream lance-graph-planner
Stage-2.6a harness still 4/4.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZLe87ssKXGuXFbrmHdGnG
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2481777a-6cae-4f35-a874-b027acea7a28


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Aug 20, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_e7ad219e-3456-4047-bbcc-661830c44029)

…tion

Operator stopped the previous commit before merge. It retracted #973's
overclaim and then committed four of its own. All four are corrected here by
WITHDRAWING the type entirely; this commit adds no code.

1. WRONG UNIVERSALITY. `CausalLiteral`'s own test asserted TREATED_WITH,
   proving the structure is generic. ASSOCIATED_WITH / TREATED_WITH / CAUSES /
   MEDIATES / PART_OF are exact predicate identities over one generic literal
   substrate; causality is a predicate family, never universal identity.

2. 4xu16 IS NOT ABSOLUTE. MedCare-rs docs/ONTOLOGY_BAKE_STATE.md:182 states it
   plainly: real OBO ids run past u16 (MONDO:0700092 = 700,092). A u16 subject
   would have silently mis-addressed the largest ontology in the bake. The
   substrate already solved this with the V3 rail.

3. THE WORDNET CLAIM WAS INFLATED. #875 was cited as proving an EXACT
   structural encoding. Its own W5 gate reports 256/256 cells at occupancy
   median 255 over 65,292 leaves -- many-to-one by hundreds. What it measured
   is a taxonomy-informed HHTL locality/search prior (corr +0.494 vs -0.036
   shuffled; 24.71x out-of-cell band recall), never an identity encoding.
   Citing a measured result past its own Boundaries section is the #973 failure
   mode with the sign flipped, and it is easier to commit while correcting
   someone else.

4. routing_prefix() WAS UNEARNED. A lexicographic prefix over concatenated
   ordinals was labelled an HHTL locality/cohort projection with no consumer
   and no measurement that it preserves HHTL semantic locality.

The closing question, per the operator's rule: WHAT EXACT INFORMATION CANNOT BE
EXPRESSED BY THE ADDRESSING THAT ALREADY EXISTS? Nothing demonstrable.
identity_quad::IdentityQuad (operator-ratified 2026-08-17) already carries four
exact external identities as 4 x u24 in one 96-bit V3 facet behind a
classid(4), refuse-don't-truncate, resolving the crosswalk once at bake time.
It strictly dominates the withdrawn type. No falsifier => no new type. S3.0 is
closed as NOT-NEEDED rather than filled because the plan had a slot.

Separately surfaced, NOT fixed here: ClassId = u16 is near-exhausted for
RELATIONS (MedCare-rs CLAUDE.md #10) -- a classid-mint capacity question for
the operator, not something a literal type addresses.

The ladder matrix says the empty column is not ADDRESS but HYDRATED SoA for
Bible/Rosetta; the real next work is hydrate epistemic/causal nodes -> reason
over them -> think about the reasoning, gated by the DisMech oracle experiment.

Board: EPIPHANIES x4 (E-S3-0-NEEDED-NO-NEW-ADDRESS-1,
E-WORDNET-IS-A-LOCALITY-PRIOR-NOT-AN-IDENTITY-ENCODING-1,
E-NIBLEPATH-DEPTH-IS-NOT-HHTL-DIMENSIONALITY-1,
E-A-LOCAL-DERIVATION-CANNOT-OVERRULE-A-MEASURED-COUNTEREXAMPLE-1 with both
instances) + LATEST_STATE + STATUS_BOARD re-scope + the full audit.

Gates: zero code diff vs main; lance-graph-contract back to its 1171 baseline.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZLe87ssKXGuXFbrmHdGnG
@AdaWorldAPI AdaWorldAPI changed the title S3.0 corrected — exact causal-literal address (retracts #973's overclaim, salvages its code) S3.0 closed as NOT-NEEDED — withdraw the address type, keep the #973 retraction (docs only, zero code) Aug 20, 2026
claude added 2 commits August 20, 2026 16:44
Strings in the hot path must resolve through a codebook. The only string
home is the CAM index codebook (content_store / codebook.rs); never in any
SoA row, value tenant, overlay, or reasoning struct. In the hot path a
string may only be patient data or a KV side-car entry.

Records the measured compliance audit: nars/belief.rs and stance.rs's
Interner are already correct; literal_graph.rs and exploration.rs carry
string identity through the live ranking and NARS-revision paths, and
literal_graph.rs maintains an ad-hoc fourth codebook whose ordinal it
computes and discards.

Also records two corrections earned this session: predicate ordinals are
(vocabulary, FnIndex) two bytes -- ogar-dismech and ogar-ro both mint into
the same domain-local 0x90.. range -- and ClassRowSchema/RowField/ValueSchema
exist (an earlier audit pass wrongly reported them absent); what is absent is
a slot-to-ROLE mapping, not a row schema.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZLe87ssKXGuXFbrmHdGnG
Lands only what measurement has closed. Source-side only: this module
deliberately does not reference CausalEdge64 -- the durable causal overlay
must not become a pile of hot reasoning registers. DismechTopology maps to
CE64 bits 59..60 at hydration, in the consumer.

Measured on the upstream corpus (2,100 files, fetched ephemeral, not
committed): causal_link_type has exactly the four CausalTopology states over
17,998 causal edges, so the mapping is source-authoritative and never
inferred. Every evidence enum is bits: supports 4, evidence_source 5,
modifier 7, frequency 19.

Every parse fails closed. UNKNOWN is a value the corpus asserts 408 times,
so minting it from a parse failure would forge an assertion the source never
made.

Citation identity is (namespace, id), never a hash of the title: the corpus
is LLM-generated, so wording drifts between regenerations while the citation
does not. 131,904 title occurrences over 31,361 distinct (4.21x reuse),
12.12 MB inline vs 3.58 MB keyed. Where no stable identifier exists the key
says so explicitly rather than synthesising a bibliographic identity.

Deliberately NOT frozen: the endpoint codebook and DisMech-local identity
scheme, pending the unprefixed-population probe. Recorded with the census.

Gates: contract 1178/1178 (7 new), fmt clean, clippy -D warnings clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZLe87ssKXGuXFbrmHdGnG
@cursor

cursor Bot commented Aug 20, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_89020a00-36c6-4f55-abd2-5ad859bf6b60)

@AdaWorldAPI AdaWorldAPI changed the title S3.0 closed as NOT-NEEDED — withdraw the address type, keep the #973 retraction (docs only, zero code) DisMech compact evidence vocabulary + typed citation sidecar Aug 20, 2026
… board claim

P1 (1) Unknown was being turned into a known mediator hole.
mediator_unresolved() matched IndirectUnknownIntermediates | Unknown, which
conflates two epistemically different statements: IndirectUnknown establishes
the mediator ROLE and leaves only its identity open (A -> ? -> B), while
Unknown leaves direct-vs-indirect itself undecided (A ? B), so dispatching
SeekMediator for it MINTS a schema slot the source never asserted. Narrowed to
IndirectUnknownIntermediates and added topology_unresolved() for the Unknown
case, so the two genuinely-unresolved states are partitioned rather than
merged (403 vs 4,325 -- a ~10.7x population difference a merged predicate hid).

Measured while fixing, and recorded on the predicate: the topology ordinal
alone does NOT imply a mediator exists. Cross-tabbed on the upstream corpus
(2,100 files, pathophysiology[].downstream[]): of 3,844 edges declaring
INDIRECT_KNOWN_INTERMEDIATES, 1,347 (35.0%) carry zero intermediate_mechanisms,
and 92 declaring INDIRECT_UNKNOWN carry some anyway. The usable hidden-mediator
oracle population is 2,497 distinct (disease, source, target, mediators) tuples
across 539 diseases -- deduped, raw and distinct coincide, so no many-to-many
mention inflation. A consumer must filter on the actual intermediate list.

P1 (2) the citation sentinel contract was false in two places.
fnv1a(b"") is the nonzero FNV offset basis, so of_str("") minted a well-formed
content address meaning "nothing supplied" -- indistinguishable on replay from
a real citation and colliding every uncited row onto one identity. CitationKey::
parse now returns Option and refuses blank input; BibliographyRecord::new
returns Option and writes the reserved ContentId(0) sentinel for a blank title.
Also fixed a broken doc link to a nonexistent ContentId::EMPTY.

Both fixes carry falsifiers, each disable-verified red-then-green against the
exact assertion message.

Board: the "PHENOTYPES NEED THEIR OWN RESOLUTION DOMAIN" conclusion is regraded
in place (append-only, measurements untouched). quad_tenant.rs already ships
Domain with 8 variants, a classid->domain map, an enforced classid+TUI
two-witness contract, and FacetRegime::PerRowTui for the CUI horseshoe -- so HP
is Domain::Phenomenology's currently populated vocabulary, not a new domain,
and Anatomy is UBERON + FMA with UBERON a strong anchor rather than the domain
itself. Left as written it is how a later session mints HpResolutionDomain
beside the existing type.

Gates: lance-graph-contract 1180/1180, fmt clean, clippy --all-targets
--no-deps -D warnings clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZLe87ssKXGuXFbrmHdGnG
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review August 20, 2026 17:51
@AdaWorldAPI
AdaWorldAPI merged commit 8a93423 into main Aug 20, 2026
6 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Aug 21, 2026
Both merged PRs shipped types, so neither is discharged by the Termination
clause. #974's obligation was missed at merge on 2026-08-20 and is recorded
late rather than silently skipped; its entry says so.

PR_ARC_INVENTORY: two prepended entries with Added / Locked / Deferred /
Docs / Review / Confidence. #974's carries the source-side-only ruling, the
fail-closed parse, and the citation-identity falsifier, plus an explicit
Superseded-by-#975 line for the one doc claim that did not survive. #975's
carries the three findings, the two codex P1s, and the two rules the session
paid for: absent is not unwired and their remedies are opposite; a
measurement a committed parser can make must not be made by an ad-hoc script.

LATEST_STATE: the #974 heading becomes a merged-PR entry and #975 is added
above it, including the AriGraph correction as a standing warning -- the
15 shipped modules must not be rebuilt under a new name by a session that
greps for a function spelling and concludes absence.
AdaWorldAPI added a commit that referenced this pull request Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants