Skip to content

feat(report): ReportPlan fold substrate, zero-copy pivot, reports as OGAR projection sources - #1271

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/brave-mayer-65y3cy
Sep 23, 2026
Merged

AdaWorldAPI merged 1 commit into
mainfrom
claude/brave-mayer-65y3cy

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

crates/lance-graph-report (workspace member). A coordinate-native report plan that lowers into lance-graph-quack and runs on lance-graph-mask-risc's single evaluator. It adds no second evaluator, no independent aggregate semantics and no row loop.

  • ReportPlan has three parts:

    • a lazy Selection — a predicate never becomes a bitmap just by being written;
    • coordinate providers, each with a role: an ordinal Field, or a derived Bucket that is never materialized as a lane;
    • measures expressed as mergeable fold states (FoldState::identity / merge / finalize). Adding a measure does not touch the pivot engine.
  • Zero-copy pivot. PhysicalKey leaves out roles, axis order and top-k. A pivot rotation is therefore the same Arc<CellSpace> with a new View: never transpose data to pivot, transpose meaning.

  • Physical planner (explain shows its choices). It picks:

    • the fold key;
    • which coordinates become partitions;
    • a dense or sparse accumulator — the full product is never allocated;
    • the selection carrier: validity plane, execution extent, tile-local ops, or one reused mask.

    Every planner knob has an inertness test.

  • String-free execution core. It uses only FieldId, MaskId, SourceId and ordinals, and a source-fence test enforces that. Text appears in three places only:

    • boundary: a KV built on the contract's ContentStore/ContentSink, plus a CAM codebook of ContentIds that stores no text;
    • render: JSON/CSV data export;
    • explain.

crates/lance-graph-report-ogar (EXCLUDED; path-deps the OGAR sibling).

  • ReportSource implements ogar_doc_ir::resolve::DocObjectSource over any existing object source and answers grid_of for report views.
  • One DocCompose can arrange object A, a report, and object B by reference:
    • rotating a report means naming another view;
    • Revision(generation) pins a report;
    • Snapshot falls back to the slot's fallback.
  • Rendering goes through OGAR's Typst emitter. There is no report-specific rendering ontology.

Depends on / companions

Tests / measurements

All suites were run locally and pass; clippy -D warnings is clean on every crate.

Suite Tests
lance-graph-report agnostic suite (TEST 1–9 + knob twins) 14
zero-copy allocation falsifiers 2
string fence 2
reference workload (KV/CAM, label counts, rename, late hydration, Quack parity + NULL semantics) 5
lance-graph-report-ogar convergence (rotation through composition, mixed recombination, Live/Revision/Snapshot, label rename) 4
  • Execution allocations do not grow with population: execution allocates the same bytes at N and 64·N. The reused-mask twin grows by exactly the mask.
  • Rotation is metadata: it allocates < 64 B (view) and < 256 B (plan reinterpret), and the payload address does not change.
  • Label resolution is result-sized: a 100k-row 8×12 pivot resolves 20 CAM labels, and the fold itself does 0 CAM and 0 KV work.
  • Falsifiers are disable-verified:
    • making rotation a no-op fails its test;
    • dropping partition filters fails 8 tests;
    • bypassing grid_of fails its tests;
    • ignoring the view orientation fails its test.
  • report_bench (4M rows, avx2 build):
Case Time Notes
range→count 91 µs 0 mask ops
32×12 pivot 177 ms 25 scans
rotation via result view 49 ns 16 B
rotation via plan reinterpret 124 ns 140 B

Board

  • New entry, and the entries index regenerated.
  • STATUS_BOARD D-RPT-1..5, LATEST_STATE (no contract delta), and the AGENT_LOG recon run.
  • ISSUES: ISS-REPORT-NO-COMPOSITE-KEY-GROUP-FOLD. A 2-D fold costs one pass per partition member. The missing primitive is a multi-lane group fold in ndarray::simd/mask-risc, not a report-side loop.
  • SUPERSESSION-INDEX regenerated, with no diff.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DCEP2fZdHYdMCtcEVcTpS2


Generated by Claude Code

…OGAR projection sources

lance-graph-report (workspace member): a coordinate-native report plan that
LOWERS INTO lance-graph-quack and runs on mask-risc's one evaluator — no
second evaluator, no independent aggregate semantics, no row loop.

- ReportPlan = Selection (lazy; a predicate is never a bitmap by
  construction) + coordinate providers with roles (ordinal Field, derived
  Bucket — never a materialized lane) + measures as mergeable fold states.
- PhysicalKey excludes roles/order/top-k, so rotation is Arc<CellSpace> +
  a new View: never transpose data to pivot, transpose meaning.
- Planner: fold key, partitions, dense vs sparse accumulator (product never
  allocated), selection carrier (validity plane / extent / tile-local / one
  reused mask). Every knob has an inertness test; `explain` shows the plan.
- String-free execution core (FieldId / MaskId / SourceId / ordinals),
  fenced by a source test; text only in boundary (KV over the contract's
  ContentStore/ContentSink, CAM codebook of ContentIds), render (JSON/CSV
  data export) and explain.

lance-graph-report-ogar (EXCLUDED; path-deps the OGAR sibling): ReportSource
implements ogar-doc-ir's DocObjectSource over ANY existing object source and
answers grid_of (OGAR #307), so one DocCompose arranges objects and reports
by reference, rotates by naming another view, pins by Revision(generation),
and renders through OGAR's Typst emitter. No report rendering ontology.

Measured: execution allocates identical bytes at N and 64N; rotation <64 B
with the payload address unchanged; a 100k-row 8x12 pivot resolves 20 CAM
labels; fold does 0 CAM/KV work. Disable-verified falsifiers throughout.

Board: entry + index, STATUS_BOARD D-RPT-1..5, LATEST_STATE, ISSUES
(ISS-REPORT-NO-COMPOSITE-KEY-GROUP-FOLD), AGENT_LOG (recon run).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCEP2fZdHYdMCtcEVcTpS2
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 598c8d31-1ff5-49ee-9629-fa732e002dac

📥 Commits

Reviewing files that changed from the base of the PR and between bcec6b3 and d4dd251.

📒 Files selected for processing (27)
  • .claude/board/AGENT_LOG.md
  • .claude/board/ISSUES.md
  • .claude/board/LATEST_STATE.md
  • .claude/board/STATUS_BOARD.md
  • .claude/board/entries/2026-09-23-report-plan-zero-copy-pivot-docir-convergence.md
  • .claude/board/entries/README.md
  • Cargo.toml
  • crates/lance-graph-report-ogar/Cargo.toml
  • crates/lance-graph-report-ogar/src/lib.rs
  • crates/lance-graph-report-ogar/tests/convergence.rs
  • crates/lance-graph-report/Cargo.toml
  • crates/lance-graph-report/examples/report_bench.rs
  • crates/lance-graph-report/src/batch.rs
  • crates/lance-graph-report/src/boundary.rs
  • crates/lance-graph-report/src/exec.rs
  • crates/lance-graph-report/src/explain.rs
  • crates/lance-graph-report/src/ids.rs
  • crates/lance-graph-report/src/lib.rs
  • crates/lance-graph-report/src/plan.rs
  • crates/lance-graph-report/src/render.rs
  • crates/lance-graph-report/src/result.rs
  • crates/lance-graph-report/src/selection.rs
  • crates/lance-graph-report/tests/agnostic.rs
  • crates/lance-graph-report/tests/common/mod.rs
  • crates/lance-graph-report/tests/reference_workload.rs
  • crates/lance-graph-report/tests/string_fence.rs
  • crates/lance-graph-report/tests/zero_copy.rs
 __________________________________________________________
< Sometimes, I pretend to be a compiler to feel important. >
 ----------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

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

@cursor

cursor Bot commented Sep 23, 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_222481ca-91ec-42b1-83cc-dd2b9306ec00)

Copy link
Copy Markdown
Owner Author

member-tests was cancelled after the tests finished, during the cache save. No test failed.

Every step in the job passed (log for job 107266243280):

  • cargo build --workspace finished in 4m09s.
  • Every per-crate test step was green through dto-class-check, which finished at 16:24:59.

After the tests, Swatinem/rust-cache restored for 6 min (16:03 → 16:09) and then spent 8 min saving in its post-job step (16:25 → 16:33). That save hit the job's timeout-minutes: 30 and was cancelled.

Why this happens here and not on main: the PR adds a workspace member (lance-graph-report), which changes the Cargo manifest hash. That hash is part of the lance-graph-members cache key, so this run has to save a fresh cache that main never has to write. The latest main run of this workflow (bcec6b3) is green.

I'm re-running the failed job once. If the save times out again, the fix is outside this PR's code: raise timeout-minutes or skip the cache save on PRs. I'll report back rather than widen this PR.


Generated by Claude Code

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review September 23, 2026 18:24
@AdaWorldAPI
AdaWorldAPI merged commit d90600d into main Sep 23, 2026
12 of 14 checks passed
@cursor

cursor Bot commented Sep 23, 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_5cbfc3cb-de63-404e-92c3-c2b88ba60157)

AdaWorldAPI pushed a commit that referenced this pull request Sep 23, 2026
… statuses)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCEP2fZdHYdMCtcEVcTpS2
AdaWorldAPI added a commit that referenced this pull request Sep 23, 2026
board: record #1271 merge (arc entry, LATEST_STATE, D-RPT statuses)
AdaWorldAPI pushed a commit that referenced this pull request Sep 23, 2026
AdaWorldAPI pushed a commit that referenced this pull request Sep 23, 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