Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .claude/board/INTEGRATION_PLANS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2026-10-30 — D-TRACT-HARVEST-0: Tract as a cold ONNX frontend, admitted onto native methods → `.claude/plans/d-tract-harvest-0-native-algebra-bridge-v1.md`

**Status:** LAB PROBE IMPLEMENTED, REDESIGNED 2026-10-30 to the ONNX graph as a DR#3 graph resolved through the DT64 ON×WHEN×DO registry (plan §0; the recipe text below is the superseded first version) (`crates/tract-harvest-probe`, own workspace, no native dependents); runs the Tract arm of D-ONNX-INTAKE S1/S3 (#1802, #1810); Burn not run. **Board:** [entry](entries/2026-10-30-d-tract-harvest-0-native-algebra-bridge.md), [STATUS_BOARD](STATUS_BOARD.md) D-TRACT-HARVEST-0. Tiny graph bit-exact with ORT (optimizer off); Jina v5 small layer-0 RMSNorm slice bounded (max 4 ulp, deviation confined to the float mean). Records the Tract provenance gaps (domain ignored, equal constants merged, declutter Div→Mul(recip) and fusion name loss) and the next PR sequence (float reduction tolerance, admitted f32 MatMul first).
**Confidence:** lab evidence on two fixtures; no whole-model claim.
## 2026-10-30 — D-DRCA-3: DR #4 method routing falsifier (lab) → `.claude/plans/d-drca-3-dr4-method-routing-v1.md`

**Status:** lab probe in `dr-math-binding-probe` (`src/dr4.rs`, `tests/dr4_method_routing.rs`); first DR #4 falsifier of D-DRDT §5. **Board:** [entry](entries/2026-10-30-d-drca-3-dr4-method-routing.md), [STATUS_BOARD](STATUS_BOARD.md) D-DRCA-3. DT-owned method key, guard witness and effect order are carried opaque; the effect-order oracle is ndarray #395's order law. No DT resolver (D-CMH-1), no MethodKey mint, no contract change.
Expand Down
5 changes: 3 additions & 2 deletions .claude/board/STATUS_BOARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@
| D-id | scope | status | gate / falsifier |
|---|---|---|---|
| **D-ONNX-INTAKE-0** | S0 capstone: candidates, ownership crosswalk, staged bake-off, falsifiers | Shipped, docs only (#1802) | no importer, test or model parity claimed |
| **D-ONNX-INTAKE-1** | S1 cold import of one pinned real model plus a synthetic graph, unoptimized; source preservation | Queued (NOT RUN; not authorized) | metadata counted preserved/lost/renamed against raw protobuf/ORT; adversarial fixtures refuse |
| **D-ONNX-INTAKE-1** | S1 cold import of one pinned real model plus a synthetic graph, unoptimized; source preservation | Tract arm RUN as lab (D-TRACT-HARVEST-0); Burn arm NOT RUN | metadata counted preserved/lost/renamed against raw protobuf/ORT; adversarial fixtures refuse |
| **D-ONNX-INTAKE-2** | S2 node coverage on the same raw model | Queued (NOT RUN; not authorized) | separate denominators; coverage under declared semantic admission, not op-name similarity |
| **D-ONNX-INTAKE-3** | S3 one complete static subgraph on existing native methods | Queued (NOT RUN; not authorized) | scalar oracle + ORT; no Burn/Tract in the native call path; unsupported nodes refuse |
| **D-ONNX-INTAKE-3** | S3 one complete static subgraph on existing native methods | Tract arm RUN as lab (D-TRACT-HARVEST-0): tiny graph exact, Jina RMSNorm slice bounded | scalar oracle + ORT; no Burn/Tract in the native call path; unsupported nodes refuse |
| **D-ONNX-INTAKE-4** | S4 numeric/quantization parity for real model blockers | Queued (conditional; not authorized) | IntegerExact / bounded FP / SourceParity / CertifiedMath kept distinct |
| **D-ONNX-INTAKE-5** | S5 whole-model forward pass and cost closure | Goal, not authorized | outputs vs ORT under declared tolerance; every cost stage reported |
| **D-TRACT-HARVEST-0** | ONNX graph as a DR#3 graph (nodes Identity, values Property, dep = do_ ∘ read_by) resolved through a DT64 ON×WHEN×DO registry (op signature → classid → native DO); Tract cold facts; ORT (optimizer off) oracle; `crates/tract-harvest-probe` | Lab probe implemented (this PR, redesigned to the graph); plan [d-tract-harvest-0-native-algebra-bridge-v1.md](../plans/d-tract-harvest-0-native-algebra-bridge-v1.md) §0 | 20 tests, 7 disable runs red; full model 3,751/7,620 nodes WHEN-true, >64 positions untiled, first unregistered groups Unsqueeze/Shape/Gather/Concat/MatMul |

## D-TFLP — TFLite models on the native polyfill: int8 codes as Palette256 (2026-10-25)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# D-TRACT-HARVEST-0 — Tract as a cold ONNX frontend, admitted onto native methods

**Date 2026-10-30 · Status LAB PROBE IMPLEMENTED (not production) · Owner D-NAM [EXO-152](https://linear.app/exo-red/issue/EXO-152) · Plan [`d-tract-harvest-0-native-algebra-bridge-v1.md`](../../plans/d-tract-harvest-0-native-algebra-bridge-v1.md) · Crate `crates/tract-harvest-probe` (own workspace)**

Runs the Tract arm of D-ONNX-INTAKE S1 and S3 (#1802), nominated by #1810. Burn `onnx-ir` was not run.

**Chain shown:** source-attested ONNX subgraph → Tract `InferenceModel → TypedModel` (cold) → admission (fixed pattern; domain/opset/initializer identity from the raw protobuf) → concrete recipe calling only `lance-graph-onnx` / `ndarray` → ORT with its graph optimizer off.

| fixture | result vs ORT (`ORT_DISABLE_ALL`) |
|---|---|
| tiny (Greater/Where/ReduceSum + Add/Mul/Abs/Sqrt/Div, opset 18) | bit-exact; 256-input div3 sweep bit-exact |
| Jina v5 small retrieval, layer-0 input RMSNorm (10×1024) | 9,259/10,240 exact, max 4 ulp; all deviation is in the one row whose mean is 1 ulp off |

**Findings (source-backed):**
- Tract looks operators up by `op_type` only (`onnx/src/model.rs:135`): `com.example:Abs` imports as `Abs`. Admission refuses from the protobuf domain.
- `InferenceModel::add_const` merges equal-valued initializers (`hir/src/infer/model.rs:202`): `T = 0` and `Z = 0` become one node.
- Declutter rewrites `Div(Y,B)` → `Mul(Y,1/B)`: 161/1,536 sweep elements differ from ORT. It also fuses RMSNorm and Silu (use as pattern evidence, not kernels).
- An impossible broadcast is typed symbolically and fails only at run time; the native broadcast check refuses.
- `Flatten` refuses >1 symbolic dim (`hir/src/ops/array/flatten.rs:11`); the full Jina graph types only with pinned inputs.
- ORT's default optimizer changes the RMSNorm bytes (7,136/10,240 equal to its literal run): the oracle setting is part of the contract.
- Tract's `Reduce<Mean>` is 33 ulp from an f64 reference mean; native and ORT literal are within 2.

**Cost (reported):** Jina slice native 9 µs (9 allocations, every intermediate materialized) vs Tract fused 22.6 µs; full 7,620-node graph cold import + type + declutter 0.4 s with no weight bytes read.

**OPEN:** float reduction tolerance contract (D-ONNX-NATIVE-1); admitted f32 MatMul (first whole-model blocker); Gather reclassification; ORT_DISABLE_ALL as the standing oracle setting.

**Redesign (same day, operator correction "We want the graph"):** the fixed recipes are removed. The ONNX graph is laid onto a DR#3 tile (nodes = Identity, values = Property, `on`/`do_` as 64x64 relations, `dep = do_ ∘ read_by`) and every node resolves through a DT64 ON × WHEN × DO registry: op signature (domain, op_type, dtype, attributes) → one immutable lab classid, WHEN a K3 guard over Tract's facts, DO an existing `lance-graph-onnx` / `ndarray` function. Plans are sealed in a `FrameStore` frame. Tiny fixture bit-exact (incl. div3 sweep; `Where(c, X, 1)` now runs, 17); Jina RMSNorm through the graph 9,259/10,240 exact, max 4 ulp; full model coverage 3,751 WHEN-true / 169 WHEN-not-true (facts Tract drops) / 3,700 unregistered. 20 tests; 7 disable runs each red on the named test. Plan §0.
3 changes: 2 additions & 1 deletion .claude/board/entries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ index row, (3) no duplicate entry id. Checks 1 and 2 are deliberately
opposite directions; the stranding this convention prevents shows up in
exactly one of them, never both.

503 entries, 2026-08-06 .. 2026-10-30.
504 entries, 2026-08-06 .. 2026-10-30.

| date | entry id | finding | file |
|---|---|---|---|
| 2026-10-30 | `D-TRACT-HARVEST-0` | | [2026-10-30-d-tract-harvest-0-native-algebra-bridge.md](2026-10-30-d-tract-harvest-0-native-algebra-bridge.md) |
| 2026-10-30 | `D-DRCA-3` | | [2026-10-30-d-drca-3-dr4-method-routing.md](2026-10-30-d-drca-3-dr4-method-routing.md) |
| 2026-10-29 | `palette512-turbovec9-nsl-worksteal` | | [2026-10-29-palette512-turbovec9-nsl-worksteal.md](2026-10-29-palette512-turbovec9-nsl-worksteal.md) |
| 2026-10-28 | `thought-layers-nan-skip` | | [2026-10-28-thought-layers-nan-skip.md](2026-10-28-thought-layers-nan-skip.md) |
Expand Down
Loading
Loading