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
17 changes: 17 additions & 0 deletions .claude/board/AGENT_LOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## 2026-09-23 — W0 recon: OGAR DocIR projection seam (read-only, one Opus general-purpose run)

- D-ids: D-RPT-3, D-RPT-4. No edits, no cargo.
- **Finding (VERIFIED-IN-CODE, file:line cited in the run):** `DocCompose` /
`ObjectSlot` / `ResolutionMode` / `resolve_doc` + `DocObjectSource` are SHIPPED.
`DocRenderer` / `FieldRow` / `FieldView::Table` are SPEC-ONLY, and the
resolved projection had no 2-D shape.
- Consequences:
- the ONLY irreducible gap is a grid outcome, which became OGAR #307;
- `lance-graph-report`'s own HTML terminal was a parallel renderer, and was
removed;
- the adapter must be an EXCLUDED lance-graph crate, because of the dependency
direction.
- Also found: paperless-rs is a dead copy (its CLAUDE.md marks it SUPERSEDED
2026-08-24); the intake seam lives in tesseract-rs `crates/tesseract-paperless*`.
Tantivy there is a borrowed-token probe plus an ordinary BM25 index.

## 2026-09-22 — SAP/CATS fold-first dependency stack (PR #1257, unmerged)

- Substrate: ndarray #318 `d0376505`; lance-graph #1256 `4d27032e`.
Expand Down
17 changes: 17 additions & 0 deletions .claude/board/ISSUES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## ISS-REPORT-NO-COMPOSITE-KEY-GROUP-FOLD — a 2-D fold costs one pass per partition member (2026-09-23)

**Status:** OPEN. **Basis:** VERIFIED-IN-CODE. mask-risc's `GroupKey` is one
`U32` lane or a `Via` hop, so `lance-graph-report` folds the widest coordinate as
the key and evaluates every other coordinate as a PARTITION. A partition is a
member conjunct, run tile-local, one pass per member tuple.

- **Measured:** a 32×12 pivot over 4M rows takes 25 scans / 177 ms (report_bench).
- **Consequence:** a high-cardinality, densely-observed partition side exceeds
`PlannerPolicy::pass_budget`, and the plan is REFUSED (`ReportError::PassBudget`).
It is never run slowly, and never allocated densely.
- **What closes it:** a multi-lane (composite-key) masked group fold in `ndarray::simd`,
named in mask-risc as a `GroupKey` variant, so that ONE pass folds (a, b) → a
dense or sparse cell.
- **What does NOT close it:** a report-side row loop, or a population-sized composite
key lane. Both are forbidden by the missing-capability STOP rule.

## ISS-R2IL-PROBE-HAS-NO-CI-LINE-UNTIL-OGAR-305 — RESOLVED (OGAR #305 merged; step restored)

**Status:** RESOLVED 2026-09-20. AdaWorldAPI/OGAR #305 merged (OGAR main
Expand Down
13 changes: 13 additions & 0 deletions .claude/board/LATEST_STATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 2026-09-23 — ReportPlan + report-as-OGAR-projection (branch `claude/brave-mayer-65y3cy`, unmerged)

### Current Contract Inventory — UNCHANGED (no contract type added; two crates added)
- NEW workspace member `lance-graph-report`: `ReportPlan`, `Selection`,
`CoordSpec` (`Field` / derived `Bucket`), `Measure` / `FoldState` (mergeable),
`PhysicalKey` (role-free), `PlannerPolicy`, `PhysicalPlan` (explain),
`CellSpace` + `View` = `ReportResult`, `boundary::{MemKv, CamLabels, Catalog}`
(KV over the contract's `ContentStore`/`ContentSink`). Lowers into Quack only.
- NEW excluded crate `lance-graph-report-ogar`: `ReportSource`
(`ogar_doc_ir::resolve::DocObjectSource`), `Orientation`, `emit_typst`.
Needs OGAR #307 (`SlotOutcome::Grid`).
- Companion: z8run#1 (`z8run-lance`).

## 2026-09-22 — SAP/CATS fold-first dependency stack (PR #1257, unmerged)

- Substrate: ndarray #318 `d0376505`; lance-graph #1256 `4d27032e`.
Expand Down
12 changes: 12 additions & 0 deletions .claude/board/STATUS_BOARD.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## D-RPT — ReportPlan / zero-copy pivot / report-as-OGAR-projection (2026-09-23)

Entry: `entries/2026-09-23-report-plan-zero-copy-pivot-docir-convergence.md`.

| D-id | scope | status | gate / falsifier |
|---|---|---|---|
| **D-RPT-1** | `crates/lance-graph-report`: ReportPlan → Quack lowering, fold planner, CellSpace + View, KV/CAM boundary, JSON/CSV export | In PR | `tests/{agnostic,zero_copy,string_fence,reference_workload}.rs` |
| **D-RPT-2** | z8run `crates/z8run-lance`: 8 native nodes, handle envelopes, physical-key cache (AdaWorldAPI/z8run#1) | In PR | z8run-lance `tests/nodes.rs` |
| **D-RPT-3** | OGAR `SlotOutcome::Grid` / `grid_of` / typst `emit_grid` (AdaWorldAPI/OGAR#307) | In PR | ogar-doc-ir resolver grid tests |
| **D-RPT-4** | `crates/lance-graph-report-ogar`: ReportSource (DocObjectSource) over any object source; Live/Revision; emit_typst | In PR | `tests/convergence.rs` |
| **D-RPT-5** | composite-key (multi-lane) group fold primitive in ndarray::simd / mask-risc | Queued | `ISS-REPORT-NO-COMPOSITE-KEY-GROUP-FOLD` |

## D-WFL — CodeRabbit round 3 on `9fd6956d` (2026-09-19): three findings, all valid, all outside the diff

| D-id | correction |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 2026-09-23 — ReportPlan: fold-first reporting, zero-copy pivot, and reports as OGAR projection sources

**Status:** MEASURED (tests + allocation falsifiers + benchmark) · OPEN (composite-key
fold; DocRenderer trait; Snapshot pinning; sparse high-cardinality partitions)
**D-ids:** D-RPT-1 (report plan crate), D-RPT-2 (z8run nodes), D-RPT-3 (OGAR grid
projection), D-RPT-4 (report → ObjectSlot adapter)

## What landed
- `crates/lance-graph-report` (workspace member). `ReportPlan` = Selection + coordinate
providers with roles + mergeable fold states. It LOWERS INTO Quack (`lance()` →
`Program`), and mask-risc's evaluator runs it, so there is no second evaluator and no
independent aggregate semantics.
- `PhysicalKey` excludes roles, axis order and top-k. A rotated plan and its twin share
one fold; rotation is `Arc<CellSpace>` + a new `View`.
- Planner choices, each with an inertness test:
- fold key = the widest ordinal coordinate within budget;
- partitions = member conjuncts, evaluated tile-local; a derived `Bucket` is two range
compares and is never a lane;
- dense accumulator vs sparse, where discovery counts per domain and the product is
never allocated;
- selection carrier = validity plane, execution extent, tile-local ops, or ONE reused
mask when the programs × passes count warrants it.
- The execution modules are string-free: `FieldId` / `MaskId` / `SourceId` / ordinals.
A source fence test enforces it.
- Text lives only in `boundary` (KV = the contract's `ContentStore`/`ContentSink`; the
CAM codebook maps (FieldId, ordinal) ↔ ContentId and stores no text), `render`
(JSON/CSV data export) and `explain`.
- `crates/lance-graph-report-ogar` (EXCLUDED; path-deps the OGAR sibling).
- `ReportSource` wraps ANY `DocObjectSource` and answers `grid_of` for report views.
- One `DocCompose` then arranges object A · report · object B by reference and
resolves them in one `resolve_doc`. `emit_typst` renders through OGAR's emitters.
- `Live` = newest result; `Revision(n)` = source generation n, held by `Arc`;
`Snapshot` → the slot's fallback.
- OGAR #307: `SlotOutcome::Grid` / `ResolvedGrid` / `DocObjectSource::grid_of`
(default `None`) plus typst `emit_grid`. This is the one irreducible gap: flat
(label, value) rows cannot carry a two-coordinate object, and u8 rail positions
cannot address report coordinates.
- z8run #1: `z8run-lance`. FlowMessages carry a ~100-byte handle. The emitted plan ==
the native plan, and so do the lowered programs.

## Measured
- 23 report tests + 4 convergence + 3 OGAR resolver + 6 z8run node tests.
Disable-verified: rotation no-op, dropped partitions, grid_of bypass, orientation
ignored, html refusal.
- Execution allocates the SAME bytes at N and 64·N (F8). The reused-mask twin grows by
exactly the mask's words. Rotation allocates < 64 B (view) / < 256 B (plan
reinterpret), with the payload address unchanged.
- Label resolution for a 100k-row 8×12 pivot = 20 CAM resolutions (presented members).
The fold did 0 CAM and 0 KV work.
- `report_bench` (4M rows, avx2 build):
- range→count 91 µs, 0 mask ops;
- 2D pivot 32×12 177 ms (25 scans: 1 reused mask + 12 partitions × 2 states);
- rotation 49 ns / 16 B via the result view, 124 ns / 140 B via plan reinterpret.

## OPEN
- **Composite-key fold is missing.** A partition costs one pass per member tuple, so a
high-cardinality, densely-observed partition side is refused with `PassBudget`.
Hand-rolling it here would be wrong: the primitive is a multi-lane group fold in
`ndarray::simd` / mask-risc. → `ISS-REPORT-NO-COMPOSITE-KEY-GROUP-FOLD`.
- **OGAR `DocRenderer` is spec-only.** Every consumer, this adapter included, writes a
thin block walker.
- **Snapshot pinning:** there is no content-addressed report store; it resolves to the
fallback. `FieldView::Table` (askama side) is unbuilt.
- `lance-graph-sap` (#1257) already lowers `GroupSumI32` through Quack for CATS. The
two are not reconciled; this crate is the domain-agnostic plan layer. UNKNOWN whether
CATS should consume it.
3 changes: 2 additions & 1 deletion .claude/board/entries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ 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.

151 entries, 2026-08-06 .. 2026-09-23.
152 entries, 2026-08-06 .. 2026-09-23.

| date | entry id | finding | file |
|---|---|---|---|
| 2026-09-23 | `terminal-elects-materialization-range-plane` | | [2026-09-23-terminal-elects-materialization-range-plane.md](2026-09-23-terminal-elects-materialization-range-plane.md) |
| 2026-09-23 | `report-plan-zero-copy-pivot-docir-convergence` | ReportPlan lowers into Quack; pivot = view over shared Arc<CellSpace>; reports become OGAR ObjectSlot sources via grid_of (OGAR #307) | [2026-09-23-report-plan-zero-copy-pivot-docir-convergence.md](2026-09-23-report-plan-zero-copy-pivot-docir-convergence.md) |
| 2026-09-23 | `quack-having-sym-sum-presence-mask` | | [2026-09-23-quack-having-sym-sum-presence-mask.md](2026-09-23-quack-having-sym-sum-presence-mask.md) |
| 2026-09-23 | `cubecl-llvm-boundary-and-audit-regrade` | | [2026-09-23-cubecl-llvm-boundary-and-audit-regrade.md](2026-09-23-cubecl-llvm-boundary-and-audit-regrade.md) |
| 2026-09-23 | `absolute-execution-extent` | | [2026-09-23-absolute-execution-extent.md](2026-09-23-absolute-execution-extent.md) |
Expand Down
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ members = [
"crates/lance-graph-contract",
"crates/lance-graph-mask-risc",
"crates/lance-graph-quack",
# Z8RUN capstone: the ReportPlan / zero-copy pivot layer Quack and z8run
# both lower into (no second evaluator; lowers INTO lance-graph-quack).
"crates/lance-graph-report",
"crates/neural-debug",
"crates/lance-graph-callcenter",
"crates/lance-graph-archetype",
Expand Down Expand Up @@ -102,6 +105,11 @@ exclude = [
# half of the OGIT(ontology)/OGAR(ogar) clean separation. Verify via
# `cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml`.
"crates/lance-graph-ogar",
# A lance-graph ReportResult as an addressed OGAR ObjectSlot source
# (implements ogar-doc-ir's DocObjectSource::grid_of). EXCLUDED for the same
# reason as lance-graph-ogar: path-deps the OGAR sibling. Verify via
# `cargo test --manifest-path crates/lance-graph-report-ogar/Cargo.toml`.
"crates/lance-graph-report-ogar",
# Cognitive Compilation loop (claude/cognitive-compilation-lance-graph-h8sgym).
# The NEW piece is the Elixir-shaped template — thinking styles, JITson, and
# i4-32D thinking-style vectors already exist; the template was the gap. Four
Expand Down
42 changes: 42 additions & 0 deletions crates/lance-graph-report-ogar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# lance-graph-report-ogar — a report result as an ADDRESSED OGAR projection
# source. EXCLUDED from the lance-graph workspace (own [workspace] root below)
# so OGAR never enters the default build — the same shape as lance-graph-ogar.
#
# Direction: this crate depends on BOTH sides; neither side depends on it.
# lance-graph-report never learns OGAR exists, and OGAR never depends on the
# lance-graph engine (only on the zero-dep contract). The seam is OGAR's own
# `DocObjectSource` trait — this crate implements it, nothing more.
#
# OGAR sibling via NO-PIN path deps (`../../../OGAR`), the fleet convention the
# rust-test workflow's OGAR checkout serves (see r2il-mask-abi-probe / symbiont).
#
# ONE contract source: ogar-doc-ir's `classview` feature git-deps the contract;
# the [patch] below folds it onto the in-repo PATH copy, which is what
# lance-graph-report compiles against. Without it `ClassView` would be two traits.
#
# Build/verify: cargo test --manifest-path crates/lance-graph-report-ogar/Cargo.toml

[package]
name = "lance-graph-report-ogar"
version = "0.1.0"
edition = "2021"
publish = false
description = "A lance-graph ReportResult as an addressed OGAR ObjectSlot source: implements ogar-doc-ir's DocObjectSource (grid_of) over any existing object source, so reports compose, rotate, pin (Live / Revision) and render through OGAR's existing composition + renderer path — no report-specific rendering ontology."
license = "Apache-2.0"

[workspace]

[dependencies]
lance-graph-report = { path = "../lance-graph-report" }
lance-graph-contract = { path = "../lance-graph-contract" }
ogar-doc-ir = { path = "../../../OGAR/crates/ogar-doc-ir", features = ["classview"] }
ogar-render-typst = { path = "../../../OGAR/crates/ogar-render-typst" }
# Only for its `FieldView` row type, which the Typst emitter consumes for
# ordinary (non-grid) object slots.
ogar-render-askama = { path = "../../../OGAR/crates/ogar-render-askama" }

[dev-dependencies]
serde_json = "1.0"

[patch."https://github.com/AdaWorldAPI/lance-graph"]
lance-graph-contract = { path = "../lance-graph-contract" }
Loading
Loading