Skip to content

feat: S5a transaction API with streaming updates benchmark#6

Merged
blove merged 10 commits into
mainfrom
feat/s5a-transaction-api
Apr 21, 2026
Merged

feat: S5a transaction API with streaming updates benchmark#6
blove merged 10 commits into
mainfrom
feat/s5a-transaction-api

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Apr 21, 2026

Summary

  • Add applyTransaction({ add?, update?, remove? }) to grid-core, core, and react layers with O(1) Map-indexed row lookup, partial merge for updates, and single-emit-per-transaction semantics
  • Expose onGridReady callback from PretableSurface for imperative grid access in bench scripts
  • Register S5 streaming-updates scenario and updates bench script with proper validation guards (pretable adapter, S5 scenario only)
  • Implement measureBenchUpdatesRun — 3-second streaming update benchmark with 50ms batch intervals and RAF frame tracking

Test Plan

  • 141 unit tests passing (10 new grid-core transaction tests)
  • Typecheck, lint, format all clean
  • S5 updates benchmark: completed, 0 long tasks
  • S5 scroll benchmark: completed, no regressions
  • S2 scroll regression: completed, no regressions

blove and others added 10 commits April 21, 2026 16:21
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Seven tasks covering layout-core pure function, grid-core integration,
public API surface, scenario-data changes, React wiring, and benchmark proof.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ript access

Expose the internal grid instance via an onGridReady prop on PretableSurface and wire it through PretableAdapter so bench update scripts can call applyTransaction() directly on the live grid.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…bench app

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…enario

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@blove blove force-pushed the feat/s5a-transaction-api branch from 69f19b2 to ada923b Compare April 21, 2026 23:24
@blove blove merged commit 94927cf into main Apr 21, 2026
blove added a commit that referenced this pull request May 9, 2026
…ound B2 evidence (#126)

The B2 corrections PR (#125) confirmed pretable / MUI parity at n=20 and
overturned the H1 flip narrative. Three homepage components still
referenced the old gridalpha-stub "4× faster" claim with stub-era
numbers. This PR brings them in line with the real B2 runset.

ComparisonTable.tsx:
- Drop the "4× faster scroll" header badge.
- Replace the gridalpha / gridbeta / gridgammaX columns with real
  ag-grid / tanstack / mui columns; rename Row interface fields.
- Replace scroll-row data with real B2 numbers (pretable 9.07, MUI 9.14,
  AG Grid 16.7, TanStack 16.7) and add row-height-fidelity, blank-gap,
  anchor-shift rows that surface the quality wedge.
- Drop streaming rows (S5/updates) until follow-up #6 lands real-
  comparator S5 evidence; replace with headless-engine + streaming-
  pipeline rows that distinguish pretable's surface honestly.
- Update trail-marker labels to fact-checkable characterizations:
  AG Grid "Slower scroll; row-height drift", TanStack "Headless; you
  wire selection and nav", MUI X "Parity at scroll p95; full-grid
  feature surface".
- Rewrite the section subhead to a parity framing.

ReceiptsBand.tsx:
- Drop the "4×" hero stat.
- Replace stats with the quality wedge: 0 blank gaps (accent), 9 ms
  frame p95, ≤1 px row-height fidelity, 25k/s max sustained update
  rate. The 25k/s figure is pretable's own from the May-1 streaming
  runset; comparative S5 evidence is still pending.

FeatureGrid.tsx:
- Replace "16ms p95 ... 4× faster than Grid Alpha Community" with a
  parity + quality-wedge description that names real comparators.

Test updates:
- ReceiptsBand.test.tsx asserts the new "0" + "9ms" hero stats.
- ComparisonTable.test.tsx asserts the new fact-checkable trail-marker
  labels (regex-matched so prose tweaks don't break the tests).

No source/package changes outside apps/website. All 190 website tests
pass; 68/68 bench-matrix tests pass; pnpm -w lint / typecheck / format
clean.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
blove added a commit that referenced this pull request May 9, 2026
* docs(plans): B2 follow-up #6 — S5/S7 cross-validation

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* chore(bench): B2 follow-up #6 — S5/S7 cross-validation milestone

Matrix re-run at S5 (streaming updates) + S7 (filter-metadata) for all
four real adapters; populates H9, H13, H14, H15 (previously insufficient).

Run command:
  pnpm bench:matrix --project=chromium \
    --adapters=pretable,ag-grid,tanstack,mui \
    --scenarios=S5,S7 --scripts=scroll,updates \
    --scale=hypothesis --repeats=3 --update-rates=1000,25000

Wall-clock ~3.5 min. Milestone:
  status/milestones/2026-05-09-b2-s5-s7-cross-validation.hypotheses.json

Status delta:

| H#  | Before        | After       | Notes                                                           |
| --- | ------------- | ----------- | --------------------------------------------------------------- |
| H9  | insufficient  | satisfied   | Mirrors H1 parity story on S7 scroll (9.2ms p95, 0 blank gaps). |
| H13 | insufficient  | directional | AG Grid clears the streaming frame budget too (9.2ms vs 9.2ms). |
| H14 | insufficient  | directional | AG Grid sustains 25k/sec — no order-of-magnitude gap.           |
| H15 | insufficient  | directional | AG Grid drift 0 vs pretable drift 1; threshold not exceeded.    |

The streaming-uniqueness wedge (H13/H14/H15) is no longer numeric on
hypothesis scale — AG Grid Community's native applyTransaction matches
or beats pretable on every measured streaming metric. Pretable's
streaming wedge in the project narrative is integration (the
@pretable/stream-adapter + @cacheplane/json-stream pipeline), not raw
throughput. Editorial homepage refresh based on this finding is a
separate follow-up.

S2-dependent hypotheses (H1, H6-H8, H10-H12, H16-H22) remain
insufficient because S2 was not in this matrix; expected. Existing B2
+ B2-with-autosize milestones for S2 are unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant