Skip to content

id-store: graph encoding bake-off across four real engines (#10219) - #11984

Merged
dezren39 merged 1 commit into
mainfrom
claude/graph-encoding-bakeoff
Nov 19, 2026
Merged

dezren39 merged 1 commit into
mainfrom
claude/graph-encoding-bakeoff

Conversation

@dezren39

@dezren39 dezren39 commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Before: the V2 storage and encoding choice for graph triples (#9125) had only a stdlib serialization toy behind it, with no measurement of a real engine.

After: one deterministic corpus of 6129 canonical typed-byte triples is loaded into four real candidates (a chunked binary file, redb tuple-key SPO/POS tables, SQLite JSONB documents and normalized SQLite BLOB rows), and each runs load, storage, byte/type round-trip, subject query, predicate/object query, paged stream and single-row write workloads three times. The report, real-encoding-bakeoff.md, sets out the trade-offs and asserts no universal winner.

The declared oracle passes:

$ python3 -I doc/2026-11-13T03-40-00Z_design_id-atlas-summit/part-a-graph/validate_real_encoding_bakeoff.py --run-and-check
OK: fresh run and committed results: 6129 triples, fixture 73d1772be3c809f9..., 4 engines x 7 workloads x 3 runs = 84 cells

How: pkgs/id/crates/id-store/tests/graph_encoding_bakeoff.rs is the harness. It checks every output against a reference model and, with BAKEOFF_RESULTS set, writes the raw results. The validator is standard-library Python and independent of the Rust code. It regenerates the corpus with its own splitmix64 and canonical-CBOR encoder, recomputes the fixture hash and every expected query, page and write output, and checks the following:

  • every engine/workload cell is present for each run;
  • engine versions match their pins, and both SQLite query plans use their indexes;
  • deterministic fields are identical across runs and between a fresh run and the committed file;
  • the report's tables match the committed results.

I spot-checked it by tampering with digests, counts, cells, versions, plans and run counts, and each one was caught.

Changed files:

  • New: the test, the report, real-encoding-bakeoff-results.json and validate_real_encoding_bakeoff.py.
  • id-store/Cargo.toml gains rusqlite (bundled) and sha2 as dev-dependencies. Both were already in Cargo.lock, which only gains the two edges.

No production codec, schema or index is changed. The measurement limits are listed in the report and in the results file.

Refs #10219


Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Slice A-GRAPH-9125-03. One deterministic typed-byte corpus (6129
canonical triples) is loaded into a chunked binary file, redb tuple-key
SPO/POS tables, SQLite JSONB documents and normalized SQLite BLOB rows.
Each engine runs load, storage, round-trip, subject query,
predicate/object query, paged stream and single-row write workloads,
checked against a reference model. An independent stdlib validator
regenerates the corpus, runs the harness and checks every cell, the
repeated runs and the report. No universal winner is asserted.

Adds rusqlite and sha2 as id-store dev-dependencies (both already in
Cargo.lock).

Refs #10219

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 requested a review from a team as a code owner November 19, 2026 01:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T02:00:45.938257Z a1295a2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 68ac78a6-fd62-4e09-ae79-0f1ad14d5461
Commits

Reviewing files that changed from the base of the PR and between 3843826 and a1295a2.

Files ignored due to path filters: 1

  • pkgs/id/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 5

  • doc/2026-11-13T03-40-00Z_design_id-atlas-summit/part-a-graph/real-encoding-bakeoff-results.json
  • doc/2026-11-13T03-40-00Z_design_id-atlas-summit/part-a-graph/real-encoding-bakeoff.md
  • doc/2026-11-13T03-40-00Z_design_id-atlas-summit/part-a-graph/validate_real_encoding_bakeoff.py
  • pkgs/id/crates/id-store/Cargo.toml
  • pkgs/id/crates/id-store/tests/graph_encoding_bakeoff.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39
dezren39 merged commit f9a6d8d into main Nov 19, 2026
1 check passed
@dezren39
dezren39 deleted the claude/graph-encoding-bakeoff branch November 19, 2026 02:00
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