Skip to content

Commit 5561908

Browse files
authored
Merge pull request #625 from AdaWorldAPI/claude/medcare-bridge-lance-graph-wmx76z
knowledge: brick-3 RAN — truncation-disallowed / overflow-as-SoC-reroute; DO-arm 3-bucket triage
2 parents c8e1ec4 + 7787a1c commit 5561908

4 files changed

Lines changed: 310 additions & 34 deletions

File tree

.claude/board/EPIPHANIES.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,46 @@ OGAR `docs/OSINT-SUBSTRATE-REUSE-MAP.md` (ClassView + askama-ERB transfer stack)
141141
`ISS-OSINT-SYSTEM-ROOT-SLOT-VIOLATION` (the frozen-side id fix).
142142

143143
---
144+
## 2026-07-01 — E-BRICK3-RAN-TRUNCATION-DISALLOWED — the (part_of:is_a) rank-minter brick-3 RAN; naive 6-tier mint falsified at scale; truncation is DISALLOWED (overflow = SoC-reroute trigger); DO-arm residue triaged into 3 buckets
145+
146+
**Status:** FINDING (brick-3 measured) + DOCTRINE (operator: "truncations were
147+
disallowed / we introduced bucket overflow with separation of concerns as a
148+
trigger for rerouting"; the 3-bucket DO triage).
149+
150+
**What ran.** The `ast-as-partof-isa-address.md` "missing brick" (deterministic
151+
part_of/is_a rank-minter) is no longer missing — public `ruff_spo_address::{mint,
152+
mint_factored}` shipped and the brick-3 probe RAN against a real C# corpus via
153+
`ruff_csharp_spo` + `medcare_probe`. Result: the **naive fixed-width 6-tier
154+
`(part_of:is_a)` packing was falsified at scale** (mass truncation + god-class
155+
collisions); **`mint_factored`** (base-255 positional path +
156+
`is_a`-from-`inherits`-only) drives truncation AND collisions to 0. The
157+
proprietary measured numbers live ONLY in the private MedCare-rs
158+
`.claude/archive/ruff-spo-address-medcare-probe/` (MedCare-rs is private;
159+
lance-graph + ruff are not) — this board records the design consequence, never
160+
the numbers.
161+
162+
**The doctrine (operator).** Truncation is **disallowed by policy** — not
163+
"reduced by a bigger packer." A bucket that exceeds capacity (256-cap or 6-tier
164+
depth) neither truncates nor field-widens: **the overflow itself is the
165+
separation-of-concerns REROUTE trigger** — split the god-class into sub-concerns,
166+
or escalate to the next cascade level. This is the OGAR `256-cap-is-a-lint` law
167+
made operational (`scale = the next cascade level, never field-widening`, OGAR
168+
#130/#140). Division of labour: `mint_factored` = addressing precision;
169+
overflow→SoC-reroute = structure.
170+
171+
**DO-arm triage (operator, new doc).** The behavioural residue after the THINK
172+
arm partitions into 3 buckets: (1) **fuzzy/order-varying** → canonicalize first,
173+
re-triage; (2) **anticipated standard DO** → ontologically-shaped landing zone,
174+
do ONCE as DTO adapter + codebook swiss-knife (`open`/`filter`/`reorder`/
175+
`apply_mask`); (3) **truly random** → hand-port, partially inventing new standard
176+
interfaces so recurrences graduate to bucket 2. Refines OGAR's 85/15 split. Gap:
177+
the DO extractor (`ruff_python_dto_check`) is **Python-only** — no C#/C++ DO
178+
harvester yet. Full doc: `.claude/knowledge/do-arm-triage-3-bucket.md`.
179+
180+
**Docs updated in this arc:** `ast-as-partof-isa-address.md` (Status →
181+
PARTIALLY MEASURED; headline section rewritten with measured design consequence;
182+
"missing brick" → "brick that ran"; Next-bricks checkmarked + re-fetch/reroute-
183+
automation/LSP open bricks), new `do-arm-triage-3-bucket.md`.
144184

145185
## 2026-07-01 — E-OGAR-LANCEGRAPH-MOVE-IN-PARALLEL — OGAR + lance-graph are one coupled pair moved together every session; the `COUNT_FUSE` is the intentional dependency contract that enforces it (NOT a break to engineer away)
146186

.claude/knowledge/ast-as-partof-isa-address.md

Lines changed: 104 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22

33
> **READ BY:** integration-lead, truth-architect, core-first-architect,
44
> family-codec-smith, baton-handoff-auditor
5-
> **Status:** CONJECTURE (design; the **carrier is now SHIPPED** — see V3
6-
> alignment below — only the rank-minter is unbuilt/unmeasured).
5+
> **Status:** PARTIALLY MEASURED (design; the **carrier is SHIPPED** — see V3
6+
> alignment below — and the **rank-minter brick-3 has now RUN** against a real
7+
> corpus. The naive 6-tier `(part_of:is_a)` mint was **falsified at scale**;
8+
> `mint_factored` is the corrected minter. The measured numbers are proprietary
9+
> and live **only** in the private `MedCare-rs`
10+
> `.claude/archive/ruff-spo-address-medcare-probe/` — this doc records the
11+
> *design* consequence, not the numbers.).
712
> **Cross-ref:** `crates/lance-graph-contract/src/facet.rs` (the **SHIPPED**
813
> `FacetCascade` substrate, #613/#614), `canonical_node.rs`
914
> (`TailVariant::V3` / `mint_for` / `CLASSID_OSINT_V3`, #615),
@@ -155,19 +160,61 @@ across every consumer** — MedCare / WoA / SMB / Odoo / OpenProject-nexgen all
155160
the *same* OGIT patterns (the regulatory `NTO/{Audit, Compliance, Legal}` set
156161
imported once; cf. boundary #1). That magnitude — "much cheaper than 500K LOC" —
157162
is precisely the CONJECTURE's payoff, and the brick-3 probe (MedCare harvest →
158-
mint → SoA → LSP query, MedCareV2 oracle) is what turns it from a claim into a
159-
measurement.
160-
161-
**Headline target (CONJECTURE — the probe measures it):** OpenProject + Odoo
162-
together as **~2 MB of GUID-encoded `(part_of:is_a)`** instead of ~20 MB / ~250K
163-
LOC — a ~10× collapse. Dimensionally credible: at 16 B/`FacetCascade`,
164-
2 MB ≈ **131K class/member/field nodes**, enough to hold both ERPs' structural
165-
skeleton. The honest caveat: that 2 MB is the **THINK-arm structure + classaction
166-
pointers**; the DO-arm `ActionDef` *bodies* don't vanish — they are minted **once**
167-
in OGAR and shared (amortized across every consumer), so the figure is the
168-
*per-consumer marginal* footprint over a shared primitive library, not the whole
169-
system reduced to 2 MB. The 10× ratio is the hypothesis the MedCare probe gives
170-
the first real datapoint for.
163+
mint → SoA → LSP query, MedCareV2 oracle) is what turned it from a claim into a
164+
first measurement.
165+
166+
**Headline target:** OpenProject + Odoo together as **~2 MB of GUID-encoded
167+
`(part_of:is_a)`** instead of ~20 MB / ~250K LOC — a ~10× collapse. Dimensionally
168+
credible: at 16 B/`FacetCascade`, 2 MB ≈ **131K class/member/field nodes**, enough
169+
to hold both ERPs' structural skeleton. The honest caveat: that 2 MB is the
170+
**THINK-arm structure + classaction pointers**; the DO-arm `ActionDef` *bodies*
171+
don't vanish — they are minted **once** in OGAR and shared (amortized across every
172+
consumer), so the figure is the *per-consumer marginal* footprint over a shared
173+
primitive library, not the whole system reduced to 2 MB.
174+
175+
**What brick-3 actually measured (design consequence, numbers are private).**
176+
The rank-minter probe RAN — `ruff_csharp_spo` harvest of a real corpus →
177+
`ruff_spo_address::{mint, mint_factored}``medcare_probe`. Two findings that
178+
change this doc's design (the proprietary counts stay in the private MedCare-rs
179+
archive, cross-referenced below, never embedded here):
180+
181+
1. **The naive 6-tier `(part_of:is_a)` mint was falsified at scale.** A packing
182+
that maps each concept into a fixed 6-tier `(hi:lo)` cascade *truncates* a
183+
large fraction of a real corpus and *collides* on god-classes (a WinForms
184+
god-class exceeds the fixed per-tier 256-cap / 6-tier budget, so the naive
185+
packer truncates and collides instead of rerouting). "2 MB" is not reachable
186+
by naively bit-packing whatever the harvest emits.
187+
2. **`mint_factored` (base-255 positional path + `is_a`-from-`inherits`-only) is
188+
the corrected minter** — it drives collisions **and** truncation to 0 by
189+
construction, because the path is positional (not a fixed-width bitfield) and
190+
`is_a` is derived only from real inheritance edges (killing the god-class
191+
`is_a` redundancy).
192+
193+
**Truncation is DISALLOWED; bucket overflow is a separation-of-concerns REROUTE
194+
trigger.** The falsification above is *not* "reduce truncation with a bigger
195+
packer." Per the OGAR `256-cap-is-a-lint` law (`scale = the next cascade level,
196+
never field-widening`; OGAR #130/#140), a tier/family that exceeds its capacity
197+
(the 256-cap, or the 6-tier depth) does **not** truncate and does **not**
198+
field-widen — the **overflow itself is the signal to reroute**: split the
199+
overflowing god-class into sub-concerns (SoC), or escalate to the next cascade
200+
level (a new family/basin). So the god-classes brick-3 surfaced are **flagged for
201+
SoC split**, not silently mangled — the overflow is a real transcode signal (a
202+
hundreds-of-members god-class *should* decompose), not a minter limitation. Division of
203+
labour: `mint_factored` handles **addressing precision**; overflow→SoC-reroute
204+
handles **structure**. Together: zero truncation, zero collision, god-classes
205+
flagged for split. The 10× headline is therefore a *design target reachable with
206+
`mint_factored` + overflow-reroute*, and the private archive holds the pre-policy
207+
falsification numbers that motivated the disallow-truncation rule.
208+
209+
**Where the measured numbers live (privacy).** `MedCare-rs` is private; `ruff` is
210+
public. The proprietary corpus counts (triples/nodes/classes, truncation and
211+
collision figures) are recorded **only** in `MedCare-rs`
212+
`.claude/archive/ruff-spo-address-medcare-probe/` (`RESTORE-STATUS.md` +
213+
`medcare_probe.rs`). This doc, being in the (fork-)public lance-graph tree, states
214+
the *design* outcome and deliberately embeds **no** proprietary numbers. A
215+
re-fetch pass against the moved-forward public `ruff` (`origin/main` `b459ec3`+,
216+
carrying scrubbed `ruff_spo_address` + `ruff_csharp_spo`) will re-confirm the
217+
numbers on the current minter; treat the archive's figures as *last measured*.
171218

172219
**What the primitives actually are: laws and regulations, not CRUD shapes —
173220
content stays with the consumer.** An ERP's hard value is *compliance* (tax law,
@@ -294,16 +341,24 @@ the FacetCascade carries the full address. The rank-minter therefore targets the
294341
allocation is left to ratify, and the only open ordering is the classid half-order
295342
above (Canon:Custom), which is orthogonal to per-tier packing.
296343

297-
## The missing brick — a deterministic part_of/is_a rank-minter
344+
## The brick that ran — a deterministic part_of/is_a rank-minter (`mint_factored`)
298345

299346
Between the SPO harvest and the GUID is the **one** genuinely-new component — the
300-
carrier (`FacetCascade`) is **already shipped**, so this is the only brick to
347+
carrier (`FacetCascade`) is **already shipped**, so this was the only brick to
301348
build: a pure-Rust, dependency-free rank-minter. Given the corpus's part_of edges
302349
+ is_a edges, assign each node its `(po_rank, ia_rank)` at each tier and write
303350
them into the 6 `FacetCascade` tiers (`tier.hi = po_rank`, `tier.lo = ia_rank`);
304351
`FacetCascade::to_bytes()` is then the 16-byte facet and `hi_chain()`/`lo_chain()`
305352
the two prefix-routable hierarchies — no new layout, no new type.
306353

354+
**This brick has now RUN** (brick-3, public `ruff_spo_address::mint_factored`,
355+
measured against a private corpus — see the "What brick-3 actually measured"
356+
section above). The naive fixed-width 6-tier packing (`mint`) was falsified;
357+
`mint_factored` (base-255 positional path + `is_a`-from-`inherits`-only) is the
358+
corrected form, and **truncation is disallowed** — bucket overflow triggers an
359+
SoC reroute, never a truncation or a field-widen. The description below is the
360+
`mint_factored` design as it now stands.
361+
307362
- **part_of tree** (namespace → class → member): deterministic sibling/
308363
topological rank.
309364
- **is_a lattice** (class → base, member → kind): deterministic type rank.
@@ -342,21 +397,41 @@ linter surface — it is a **language-agnostic semantic-navigation surface** ove
342397
whatever frontend filled the graph (Python / C++ / **C#-MedCare** / Ruby),
343398
because at that layer it is all the same `Model`/ClassView keyed by GUIDs.
344399

345-
## Next bricks (ordered; each gated on the prior)
400+
## Next bricks (ordered; ✔ = done)
346401

347-
1. **Slot allocation — LOCKED (shipped).** The 6-pair / 12-slot layout is the
402+
1. **Slot allocation — LOCKED (shipped).** The 6-pair / 12-slot layout is the
348403
shipped `FacetCascade` (#613/#614); no ratification needed. The ONLY remaining
349404
ordering decision is the classid `(part_of:is_a)` half-order (the operator's
350-
Canon:Custom correction) — orthogonal to per-tier ranking, so it does **not**
351-
block brick 2.
405+
Canon:Custom correction) — orthogonal to per-tier ranking.
352406
2. **Build the deterministic rank-minter** (`ruff_spo_address`, pure std): SPO
353-
graph → `(po_rank, ia_rank)` per level → packed slots. Verifiable in
354-
isolation.
407+
graph → `(po_rank, ia_rank)` per level → packed slots. ✔ **DONE** — shipped as
408+
`mint` (naive, falsified) + `mint_factored` (corrected: positional path,
409+
`is_a`-from-`inherits`-only, truncation-disallowed).
355410
3. **Probe on MedCare**: `ruff_csharp_spo` harvest → mint → lance SoA →
356411
`typeHierarchy`/`definition` query → diff the class graph against the C#
357-
original, with `MedCareV2` as the parity oracle.
358-
359-
The per-tier layout is **locked** (the shipped `FacetCascade`), so brick 2 (the
360-
rank-minter) can proceed now — it writes into existing tiers, inventing no type.
361-
Only the classid half-order (Canon:Custom) remains a decision, and it is
362-
orthogonal to per-tier packing, so it does not gate the minter.
412+
original, with `MedCareV2` as the parity oracle. ✔ **RAN** (brick-3) — the naive
413+
mint falsified at scale, `mint_factored` corrects it, overflow→SoC-reroute
414+
handles god-classes. Proprietary numbers in the private MedCare-rs archive.
415+
416+
**Remaining open bricks (post-brick-3):**
417+
418+
- **Re-fetch pass** against the moved-forward public `ruff` (`origin/main`
419+
`b459ec3`): diff RAN 2026-07-01 — `lib.rs` is **byte-identical** to the
420+
archived snapshot; the forward movement is a **new `soc` module** (below).
421+
The `medcare_probe` re-run on the current minter remains blocked on input
422+
data (the harvest NDJSON is not in this container).
423+
- **Overflow→SoC-reroute — classification SHIPPED, reroute execution open.**
424+
`ruff_spo_address::soc` now carries the reusable `256-cap-is-a-lint`
425+
(`soc_findings` → `SocVerdict::{Duplication, Conflation,
426+
DuplicationAndConflation, Counterexample}`, `law_holds` falsifier) promoted
427+
from the probe's §[G] check, CI-runnable. Operator refinement recorded there
428+
(2026-06-29): the ClassView cascade **shape is class-conditioned, inherited
429+
from the class's format** — Rails → `6×2`, other frameworks → `4×3`, the
430+
canonical GUID → `3×4` (all `G·D = 12`, 8-bit tiers); never lock one shape.
431+
What is still NOT built: *executing* the reroute (the actual SoC split /
432+
next-cascade-level escalation) inside the mint pipeline — the lint flags,
433+
a human splits.
434+
- **classid half-order (Canon:Custom)**: still the one open ordering decision;
435+
orthogonal to per-tier packing, so it did not gate the minter.
436+
- **LSP serve end** (`ruff-lsp` → lance store): the read surface is still a clean
437+
slate (vanilla fork, no SPO/lance wiring).

0 commit comments

Comments
 (0)