Skip to content

D1 workload adapter and native counters #10162

Closed

Description

@dezren39

Problem and goal

Implement D1 mapping for supported logical operations and capture rows read/written, duration and DB size.

Version and design basis

Version: V2. Settled design: https://github.com/developing-today/code/blob/main/doc/2026-11-13T03-40-00Z_design_id-atlas-summit/part-c/versioned-design.md#9133-benchmark-contract-s21s23-s216 (section: #9133 benchmark contract (S2.1–S2.3, S2.16)).
Tier: recommended.
Statement IDs: S2.1, S2.2, S2.3, S2.16
Enables: D1 parity runs; cloud evidence

Scope and ownership

Parent: #9133 (native component/meta parent).

  • pkgs/id/benchmarks/src/adapters/d1.rs (new; owner: C9133-02-D1)
  • pkgs/id/benchmarks/tests/d1_adapter.rs (new; owner: C9133-02-D1)
    Hard dependencies (native blockers): C9133-01 — benchmark crate manifest, schema, shared workload types and synthetic fixtures
    Soft sequencing (not blockers): none

Test / evidence first

Create or validate pkgs/id/benchmarks/tests/d1_adapter.rs first. Proposed command: cargo test --manifest-path pkgs/id/benchmarks/Cargo.toml --test d1_adapter
Oracle: reference — expected Fake D1 fixture returns reference rows and extracts rows_read/rows_written without any network call or latency assertion.; verifier: Independent reference rows plus expected counter fixture..

Done and rollback

Done when the declared oracle passes and test/evidence output plus changed-file summary is attached. Research evidence: not applicable.
Rollback: Remove D1 adapter module; benchmark harness and other adapters remain usable.

Manifest SHA-256 approval binding: 3b5bce3523945bf5adaa28739f0b90b7b70ff1d6522b4ac827246654e8ff6b06.

Activity

  1. developing-today commented on Nov 14, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    Preflight record — task 17012 / slice C9133-02-D1 (lane code-d, 2026-11-14)

  3. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — openchamber scheduled lane (code-g), queue task 19121 (triage). Verdict: still blocked. Fresh check 2026-11-17: #10162 OPEN; native blocker #10153 (C9133-01, benchmark schema and synthetic mapping oracle) still OPEN. Work stays paused until it closes. Task blocked with reason class blocked.

  4. added
    queue/claimedQueue worker lifecycle state
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    priority/highImportant and time-sensitive
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    kind/featureNew feature or capability request
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    and removed
    status/blockedQueue or user escalation state
    queue/blockedQueue or user escalation state
    on Nov 17, 2026
  5. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Preflight record — task 17012 / slice C9133-02-D1 (lane any-u, 2026-11-17)

    • state: triaged — preflight CLEARED; implementation routed to follow-on task 20690
    • task: 17012
    • issue: D1 workload adapter and native counters #10162 — OPEN
    • Native blocker: Benchmark schema and synthetic mapping oracle #10153 CLOSED ("Benchmark schema and synthetic mapping oracle"; closed_at 2026-11-17T07:00:50Z, verified fresh this shift via both gh issue view and gh api). PR id benchmarks: schema, synthetic fixture and reference oracle crate (C9133-01, #10153) #11021 merged (squash 8046b00) delivering the benchmark crate; pkgs/id/benchmarks confirmed present on laptop main. The earlier blocked notes (2026-11-14 lane code-d; 2026-11-17T05:46Z lane code-g) were correct when written — the blocker closed ~10 minutes before this claim.
    • Contingent research trigger: none for this slice.
    • Triage labels applied: task/small-fix, priority/high, effort/l, kind/feature, app/id (parent research(atlas): benchmark harness — D1 vs R2 vs laptop redb vs laptop Turso, shards x growth #9133 already linked in the body).
    • Disposition: per the packet (mandatory preflight only, no production rollout authorized), no implementation was performed under task 17012. The build is enqueued as task 20690 (small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:10162): tests first (pkgs/id/benchmarks/tests/d1_adapter.rs), then pkgs/id/benchmarks/src/adapters/d1.rs; oracle = Fake D1 fixture returns reference rows and extracts rows_read/rows_written with no network call or latency assertion; test command cargo test --manifest-path pkgs/id/benchmarks/Cargo.toml --test d1_adapter.
  6. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Correction to the triaged note above (lane any-u, task 17012, 2026-11-17)

    • The follow-on task 20690 named in the previous note has been cancelled as a duplicate vehicle: task 17012 is itself the C9133-02-D1 delivery vehicle. Precedent verified fresh this shift: sibling slice C9133-02-redb's task 17014 self-blocked on Benchmark schema and synthetic mapping oracle #10153 on 2026-11-14 and, after the blocker closed, proceeded to implementation under the same task (lane any-t, 2026-11-17T07:22Z).
    • Disposition now: task 17012 proceeds to implementation in its approved scope — branch queue/17012-10162-d1-adapter, worktree ~/git/fleet/queue-17012-10162-d1-adapter (laptop). Tests first (pkgs/id/benchmarks/tests/d1_adapter.rs), then pkgs/id/benchmarks/src/adapters/d1.rs. No production rollout.
  7. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Agent note — task 17012 done (lane any-u): #10162 fixed_merged via PR #11142

    • PR id benchmarks: D1 workload adapter and native counters (C9133-02-D1) #11142 merged (squash a201312); issue D1 workload adapter and native counters #10162 CLOSED. Files: pkgs/id/benchmarks/src/adapters/d1.rs (new), pkgs/id/benchmarks/tests/d1_adapter.rs (new), pkgs/id/benchmarks/src/lib.rs (adapters wiring only).
    • The adapter maps every supported logical operation onto D1/SQLite statements over objects/generations/generation_refs/physical_objects and captures native counters (rows_read, rows_written, duration, size_after, changes, last_row_id) via a Fake D1 fixture — no network call, duration synthetic (no latency assertion).
    • Tests: cargo test --manifest-path pkgs/id/benchmarks/Cargo.toml --test d1_adapter — 2 passed (transitions match the fixture AND the independent ReferenceStore row-by-row; counters match the expected counter fixture, totals 28 read / 11 written). cargo fmt clean. Full-crate run was queued behind the shared build lock under heavy CI load and not re-run; the lib change is additive only.
    • Codex: review failed to run (Codex usage limits) and posted no findings; disposition recorded on PR id benchmarks: D1 workload adapter and native counters (C9133-02-D1) #11142.
    • Follow-on task 20690 (enqueued mid-shift under a preflight-only reading) was cancelled as a duplicate vehicle once the sibling precedent (task 17014) established task 17012 itself implements after unblock.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-inskind/featureNew feature or capability requestpriority/highImportant and time-sensitivestatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions