Skip to content

id benchmarks: D1 workload adapter and native counters (C9133-02-D1) - #11142

Merged
dezren39 merged 1 commit into
mainfrom
queue/17012-10162-d1-adapter
Nov 17, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/17012-10162-d1-adapter

Conversation

@dezren39

@dezren39 dezren39 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Implements ID/Atlas slice C9133-02-D1 for #10162: the D1 workload adapter and native counters for the #9133 benchmark contract (S2.1–S2.3, S2.16).

What

  • pkgs/id/benchmarks/src/adapters/d1.rs (new): maps each supported logical operation onto D1 (SQLite) statements over objects / generations / generation_refs / physical_objects, and captures D1's native result counters per operation (rows_read, rows_written, duration, size_after, changes, last_row_id). Execution runs against FakeD1, an in-memory fake of the D1 SQL API in the same finite, timer-free, provider-free style as the crate's reference store — no network call, and duration is synthetic (0.0), never a latency measurement. D1 support terms follow the crate's support_level: tombstone delete is authority-fence-only (the tombstone is the fence), captured-key delete is delete-captured-key-after-fence.
  • pkgs/id/benchmarks/tests/d1_adapter.rs (new, written first): drives the synthetic workload fixture through the adapter and checks every transition against both the fixture's expected rows and the independent ReferenceStore, plus the extracted counters against an expected counter fixture (totals: 28 rows read, 11 rows written), and asserts DB size grows on put and shrinks on the captured-key delete.
  • pkgs/id/benchmarks/src/lib.rs: minimal pub mod adapters wiring.

Evidence

  • Preflight (queue task 17012): the slice's sole native blocker Benchmark schema and synthetic mapping oracle #10153 closed 2026-11-17T07:00:50Z (PR id benchmarks: schema, synthetic fixture and reference oracle crate (C9133-01, #10153) #11021 merged, benchmark crate on main) — gate clear before implementation.
  • cargo test --manifest-path pkgs/id/benchmarks/Cargo.toml --test d1_adapter — 2 passed, 0 failed (laptop, via fleet-build-lock). cargo fmt --check clean after cargo fmt.
  • The full-crate run (incl. workload_oracle) was queued behind the shared build lock under heavy CI load and was not re-run this shift; the change to existing code is additive only (one module declaration), and the d1_adapter build compiles the full library.

Rollback: remove the D1 adapter module and its wiring; the benchmark harness and other adapters remain usable.

Closes #10162.


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

@dezren39
dezren39 requested a review from a team as a code owner November 17, 2026 07:51
@coderabbitai

coderabbitai Bot commented Nov 17, 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 6 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: 0eaa315b-c3d7-46ff-afcf-17c213ba9b19
Commits

Reviewing files that changed from the base of the PR and between 888530d and b51a0ea.

Files selected for processing: 3

  • pkgs/id/benchmarks/src/adapters/d1.rs
  • pkgs/id/benchmarks/src/lib.rs
  • pkgs/id/benchmarks/tests/d1_adapter.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

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T07:51:28.993986Z
We couldn’t complete this review. Comment @codex review to try again.
b51a0ea 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dezren39

Copy link
Copy Markdown
Member Author

Codex disposition (lane any-u, task 17012): the Codex code review on this PR failed to run — "You have reached your Codex usage limits for code reviews" (review status: failed, 2026-11-17T07:51Z). It posted no findings: zero inline review comments exist on this PR. There is therefore no Codex finding to fix or rebut; the failure is a reviewer-capacity limit, not a code verdict. Merging under the standing criteria (targeted tests verified locally, diff matches the slice scope, no held labels).

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.

D1 workload adapter and native counters

1 participant