|
2 | 2 |
|
3 | 3 | > **READ BY:** integration-lead, truth-architect, core-first-architect, |
4 | 4 | > 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.). |
7 | 12 | > **Cross-ref:** `crates/lance-graph-contract/src/facet.rs` (the **SHIPPED** |
8 | 13 | > `FacetCascade` substrate, #613/#614), `canonical_node.rs` |
9 | 14 | > (`TailVariant::V3` / `mint_for` / `CLASSID_OSINT_V3`, #615), |
@@ -155,19 +160,61 @@ across every consumer** — MedCare / WoA / SMB / Odoo / OpenProject-nexgen all |
155 | 160 | the *same* OGIT patterns (the regulatory `NTO/{Audit, Compliance, Legal}` set |
156 | 161 | imported once; cf. boundary #1). That magnitude — "much cheaper than 500K LOC" — |
157 | 162 | 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*. |
171 | 218 |
|
172 | 219 | **What the primitives actually are: laws and regulations, not CRUD shapes — |
173 | 220 | 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 |
294 | 341 | allocation is left to ratify, and the only open ordering is the classid half-order |
295 | 342 | above (Canon:Custom), which is orthogonal to per-tier packing. |
296 | 343 |
|
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`) |
298 | 345 |
|
299 | 346 | 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 |
301 | 348 | build: a pure-Rust, dependency-free rank-minter. Given the corpus's part_of edges |
302 | 349 | + is_a edges, assign each node its `(po_rank, ia_rank)` at each tier and write |
303 | 350 | them into the 6 `FacetCascade` tiers (`tier.hi = po_rank`, `tier.lo = ia_rank`); |
304 | 351 | `FacetCascade::to_bytes()` is then the 16-byte facet and `hi_chain()`/`lo_chain()` |
305 | 352 | the two prefix-routable hierarchies — no new layout, no new type. |
306 | 353 |
|
| 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 | + |
307 | 362 | - **part_of tree** (namespace → class → member): deterministic sibling/ |
308 | 363 | topological rank. |
309 | 364 | - **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 |
342 | 397 | whatever frontend filled the graph (Python / C++ / **C#-MedCare** / Ruby), |
343 | 398 | because at that layer it is all the same `Model`/ClassView keyed by GUIDs. |
344 | 399 |
|
345 | | -## Next bricks (ordered; each gated on the prior) |
| 400 | +## Next bricks (ordered; ✔ = done) |
346 | 401 |
|
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 |
348 | 403 | shipped `FacetCascade` (#613/#614); no ratification needed. The ONLY remaining |
349 | 404 | 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. |
352 | 406 | 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). |
355 | 410 | 3. **Probe on MedCare**: `ruff_csharp_spo` harvest → mint → lance SoA → |
356 | 411 | `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