Skip to content

Latest commit

 

History

History
152 lines (115 loc) · 17.4 KB

File metadata and controls

152 lines (115 loc) · 17.4 KB

Plan completed items - heed pin + heed-inspired Rust bindings

Role: ledger of completed work from PLAN.md (Phases 0-6 growth shipped so far). Not a residual inventory - open / actionable work: PLAN-REMAINING.md (+ product residuals on GAPS.md). Do not invent closed - only rows that actually landed in the tree.

Last updated: 2026-07-13 (R7-SNAP done - docs-only EXPORT long-lived handle visibility honesty (reopen or successful sync); R7-SCAN / R7-BYTES done earlier; R7 stays deeper partial; D3 measure/D2/D1/P6-RANGE/P6-ACID done earlier).


How to read this file

Column Meaning
Item Phase, growth row, gap, or residual slice from PLAN
Status done only when true in-tree (flake-green / docs landed as claimed)
Evidence Paths, checks, pins
Honesty Non-claims that still apply

Cross-links: PLAN.md * PLAN-REMAINING.md (what to do next) * HEED-MAP.md * GAPS.md * git history / forge release notes.


Phase exits (0-5) - all done

Phase Status Date Evidence
0 Policy + inventory done (accepted) 2026-07-12 AGENTS.md foreign-bindings exception under ffi/<lang>/; README monorepo + bindings; residual R17 opened then closed later; dual write + local-power durability; Gap #1 durability-"C1" scrub closed
1 Submodule pin done 2026-07-12 ref/heed tag v0.22.1 @ 86cd1f681953cd5f6870706f6139b851e975975e; .gitmodules; ref/README.md; PRIOR-ART.md
2 Study extract done 2026-07-12 HEED-MAP.md Port/Adapt/Skip; frozen T1-01...T1-12; C ABI growth list; batching notes
3 Crate v0 done 2026-07-12 ffi/rust/beastdb/ dual write (Mode A immediate + Mode B batch); checks.beastdb-rust-smoke
4 Selective suite done 2026-07-12 checks.beastdb-rust-t0 + beastdb-rust-t1; skip matrix HEED-MAP §6; residual R17 closed (at land: T0 4 / T1 14 tests)
5 Docs honesty done 2026-07-12 Suite provenance (heed3 tests zero); thin v0 completeness (not "most of heed"); Gap #3 VISION/LIMITS R17 cross-links

Residual R17 (heed-inspired crate + selective T0/T1 suite): closed after Phases 3-5. Soft reopen by measure + embed need applies to remaining Phase 6 growth (optional WAL). Tier 0: P6-ACID shipped (product multi-key atomic batch). P6-RANGE shipped (reverse/range/first-last/neighbors). Does not close R7 (deeper partial after PR2 export default - not lmdb.h / free-page / snapshot visibility / List wall / static .a CLI-only; multi-key atomic batch / range scan do not close R7).


Phase 6 growth rows - shipped vs not

Phase 6 is advanced (partial): P6-ACID done (Tier 0 required row shipped); P6-RANGE done (Tier 2 reverse/range/first-last/neighbors); P6-WAL still open/optional. Status is advanced (partial) - not full Phase 6 closed.

Growth Status Date Evidence Honesty
Bulk / multi-put C ABI (P1) done 2026-07-12 CLI put-bytes-multi; C beastdb_put_bytes_multi (API v3+; non-ACID bulk path); ffi-smoke multi + fail-closed probes At land (pre-PR2): one fork/exec per batch; multi-put still non-ACID; R7 partial. Mode B commit/auto-flush later moved to P6-ACID atomic batch. Superseded residual: see PR2 deeper partial
Measure: multi vs N put done (ephemeral) 2026-07-12 BENCHMARKS.md Phase 6 note - N=50 ~= 9.8x multi vs sequential put Not an SLA; no host identity committed
Sophisticated batching (size/count) done 2026-07-12 Rust BatchFlushPolicy (max_pairs / max_bytes); Env::batch_write_txn_with; auto-flush without sync Abort cannot undo already-flushed pairs
contains (P2) done 2026-07-12 CLI contains-bytes; C beastdb_contains / beastdb_contains_bytes; Rust Database::contains; API v4; T0/T1/smoke At land (pre-PR2): still fork/exec; existence via product get. Superseded residual: see PR2 deeper partial
Product delete (P6-DEL / P2b) done 2026-07-12 KV tombstone + WAL Record.del + StoreDir/Api + CLI delete-bytes + C beastdb_delete/_bytes (API v5) + Rust Database::delete; ffi-smoke + T0/T1/smoke Not LMDB free-page reclaim; not multi-key ACID
Same-process compiled @[export] (P6-EXPORT PR0/PR0b/PR1) done (R7 was partial) 2026-07-13 PR0/PR0b: spike + M0. PR1: full C ABI v5 @[export]; dual-backend; CLI default then superseded by PR2 Historical PR1 land; see PR2 row
Export package default + M1 (P6-EXPORT PR2) done (R7 deeper partial) 2026-07-13 Flip select_backend_at_open -> export default; CLI emergency BEASTDB_USE_CLI=1; M1 export-vs-CLI N∈{1,5,10} in BENCHMARKS.md; ffi-smoke export default + CLI probe; rust smoke/t0/t1 on export default; Workstream K docs R7 deeper partial (not closed): export is production package default; CLI emergency remains; not lmdb.h / free-page; long-lived snapshot visibility; List materialization wall; static .a CLI-only
Cursor / prefix / range (P6-CURSOR) done 2026-07-13 Product ScanCursor + scanOpen/scanNext/scanClose; CLI scan-bytes; C ABI v6 beastdb_cursor_open/next/close + BEASTDB_ERR_DONE; dual-backend (export two-phase next + CLI bulk dump); Lean @[export] cursor table; Rust RoIter + Database::iter/prefix_iter; ffi-smoke cursor + export probe; T1 t1_p6_cursor_iter + smoke Snapshot at open; tombstones hidden; internal-key order; materializes live index at open (not LMDB B+tree); reverse/range later as P6-RANGE; R7 stays deeper partial
Time-based batch coalesce (P6-BATCH-TIME) done 2026-07-13 BatchFlushPolicy::max_delay; lazy idle check on put + WriteTxn::poll_flush; T1 time flush abort/commit + smoke Auto-flush chunks not abortable (each chunk later product-atomic via P6-ACID path); no background timer thread
Real multi-key atomic txn (P6-ACID) done 2026-07-13 Product WriteTxn begin/put/del/commit/abort + applyAtomicBatch (atomic-commit temp+rename); CLI atomic-batch-bytes; C ABI v7 beastdb_atomic_batch_bytes dual-backend export+CLI; FfiExport leanAtomicBatch; Rust Mode B unlimited commit -> one atomic batch then sync; abort discards unflushed; auto-flush chunks product-atomic but not abortable; ffi-smoke acid probe; T0 7 / T1 24 + smoke (pre-P6-RANGE) beastdb multi-key atomic batch, not LMDB page-level ACID; multi-put still non-ACID; R7 stays deeper partial
Reverse / range / first-last / neighbors (P6-RANGE) done 2026-07-13 Product ScanOpts / scanOpenWith / scanFirst / scanLast / getNeighbor + scanCursorDemo; CLI scan-bytes-ex / first-bytes / last-bytes / neighbor-bytes; C ABI v8 beastdb_cursor_open_ex + beastdb_first_bytes / last_bytes / get_neighbor_bytes dual-backend; FfiExport leanApiVersion 8; Rust rev_iter / range / rev_range / first / last / neighbors; ffi-smoke range probe export+CLI; T0 7 / T1 25 + smoke rev_iter_pairs= / first_last_ok=1 / range_pairs= Internal-key order (bytesToKey, LSB-first) - not always unsigned external-byte; snapshot; tombstones hidden; materializes live index; R7 stays deeper partial
Drop-in depth D1: len / is_empty / clear / delete_range done 2026-07-13 Product Api.len / isEmpty / clear / deleteRange + d1ClearLenDemo; CLI len-bytes / clear / delete-range-bytes; C ABI v9 beastdb_len / beastdb_clear / beastdb_delete_range_bytes dual-backend; FfiExport leanApiVersion 9; Rust Database::len / is_empty / clear / delete_range; ffi-smoke D1 probe export+CLI; T0 8 / T1 26 + smoke clear_len_ok=1 Live count only (tombs hidden); clear = tombstone-all via one atomic batch (empty OK; not hard wipe); delete_range = internal-key bounds; R7 stays deeper partial
Drop-in depth D2: RoTxn + T2 + migration done 2026-07-13 Crate-only RoTxn / Env::read_txn / static_read_txn (no LMDB reader table); Database read methods accept &Env or &RoTxn; pure U32BE/U64BE codecs; tests/t2.rs 8 selective tests; checks.beastdb-rust-t2; MIGRATE-HEED.md + CONSUME-RUST D2; HEED-MAP §6.1 still heed3 tests zero Not LMDB MVCC; not full suite; no ABI bump; R7 stays deeper partial
Drop-in depth D3: R7 embed measure (M2) measure slice done 2026-07-13 BENCHMARKS.md M2: export vs CLI tiny put/get; large-value get ~linear in value_len; scan open dominates iterate; no product Lean/C/Rust change this slice; Workstream K R7 residual language with evidence R7 stays deeper partial (not closed) - measure only; later R7-BYTES addresses export get copy wall without closing R7
R7-DEPTH slice R7-BYTES (export large-value get densify) done 2026-07-13 Types.valueToByteArray + Api.getByteArray; FfiExport two-phase get holds ByteArray + __builtin_memcpy bulk fill; ABI unchanged (len+copy+clear); scan/pair copyBytesToPtr densifies then bulk-copies; M2b before/after in BENCHMARKS.md (~2x at 64 KiB; still linear); ffi-smoke + rust smoke green; no hand-written C edit R7 stays deeper partial (not closed) - not mmap O(1); not product-wide Types.Bytes rewrite; remaining at land: Value Latin-1 densify cost, scan open materialize (later R7-SCAN), static .a CLI-only, not lmdb.h / free-page / LMDB page ACID
R7-DEPTH slice R7-SCAN (lazy external-pair scan) done 2026-07-13 Product ScanCursor freezes internal KeyxValue at open; scanNext yields external Bytes on demand; TreeMap candidate dedup for live index; CLI scan drain via scanNext; ABI unchanged (cursor open/next/DONE); M2c before/after in BENCHMARKS.md; ffi-smoke + rust smoke/t1 green; no hand-written C edit R7 stays deeper partial (not closed) - snapshot-at-open preserved; not LMDB B+tree; open still freezes live unique index (still dominates iterate); remaining: live-index freeze cost, Value densify, static .a CLI-only, not lmdb.h / free-page / LMDB page ACID
R7-DEPTH slice R7-SNAP (EXPORT long-lived handle visibility) done (docs-only) 2026-07-13 Documented: EXPORT env holds long-lived Api.Handle - idle gets do not auto-follow peer multi-process puts; load newer durable snapshot via reopen (close+open) or successful sync / beastdb_sync / Api.sync (refreshes handle from disk); CLI emergency reopens per call so peers are visible next op; no dedicated beastdb_env_refresh (Wave B2 optional); API / CONSUME-RUST / Env rustdoc / GAPS / release notes / PLAN boards; comment tighten on beastdb.h only R7 stays deeper partial (not closed) - not LMDB MVCC / reader table; still not auto-follow on idle gets; optional dedicated refresh ABI not shipped
Drop / simplify product WAL open (optional / deprioritized) -> P6-WAL - - Not a bindings blocker; product may keep WAL
lmdb.h shim out of scope -> OOS - - Honesty break if claimed

Live suite counts after Phase 6 growth + D2: T0 8 / T1 26 / T2 8 #[test] functions (flake greps; includes P6-ACID multi-key commit/abort + P6-BATCH-TIME + P6-CURSOR + P6-RANGE rev/range/first-last + D1 len/clear/delete_range + D2 RoTxn/range/clear/len/multi-env/abort/codecs). Historical Phase 4 land was 4 / 14; post-contains wave was 5 / 17; post-P6-DEL land was 6 / 18; post-time-flush land was 6 / 21; post-cursor land was 6 / 22; post-P6-ACID land was 7 / 24; post-P6-RANGE land was 7 / 25; post-D1 land was 8 / 26; post-D2 land is 8 / 26 / 8.

C ABI version history (completed bumps):

Version Shipped surface
1 open / put / get / sync / close (UTF-8)
2 + put_bytes / get_bytes
3 + put_bytes_multi
4 + contains / contains_bytes
5 + delete / delete_bytes (product tombstone)
6 + cursor_open / cursor_next / cursor_close + BEASTDB_ERR_DONE
7 + atomic_batch_bytes (P6-ACID multi-key atomic batch)
8 + cursor_open_ex (reverse/range bounds) + first_bytes / last_bytes / get_neighbor_bytes (P6-RANGE)
9 + len / clear / delete_range_bytes (D1 live count + tombstone-all + internal-key range delete)

Plan gaps & nits (from PLAN review backlog)

ID Status Notes
Gap #1 durability-"C1" scrub closed Local-power language; fitness C1/R3 disambiguated
Gap #2 README Decision 1 closed (worktree) Monorepo bindings + Constraints ffi/ exception + R17 naming
Gap #3 operator R17 cross-links closed VISION / LIMITS / API
N1 UPS first-use expand done (docs) 2026-07-13
N2 GAPS last-updated density done (docs) 2026-07-13
N3 dirty worktree mix noted Human land only
N4 README Constraints/Status closed (worktree) With Gap #2

Success criteria from PLAN (done column)

Done means (PLAN) Status
ref/heed study pin + map done
AGENTS and README: monorepo + ffi/<lang> bindings allowed done
Crate under ffi/rust/beastdb feels heed-like done (thin v0)
Immediate + batch write paths done (+ flush policy)
T0+T1 flake-green done (live 8 / 26; T2 8 selective D2 also flake-green)
Perf measured; batching invested when it wins done (P1 measure + Mode B policy)
Local-power durability honesty (no durability-"C1" token) done

Still not done (PLAN "not done means"): product links LMDB from heed sys crates; Rust as Lean product engine; full heed3 encryption / lmdb.h wire drop-in; full upstream suite; "as fast as LMDB"; power-fail claims - all correctly out of scope or non-claims. P6-ACID is done (product multi-key atomic batch). P6-RANGE is done (reverse/range/first-last/neighbors; internal-key order honesty). D1 is done (len/is_empty/clear/delete_range + C ABI v9). D2 is done (RoTxn + T2 + migration). D3 measure is done (M2 evidence; no product change). P6-WAL remains optional/open. R7 stays deeper partial (not closed).

Decisions recorded (not completed growth)

Decision Date Notes
Tier 0 master: heed / heed3 non-encrypted drop-in migration track; P6-ACID in scope; P6-WAL optional/deprioritized 2026-07-13 Docs-only lock at decision time. P6-ACID later done same day (product multi-key atomic batch + C ABI v7 + Mode B). Does not mark P6-WAL or R7 done (WAL optional/open; R7 deeper partial).

Flake checks landed for this plan

Check Role
checks.beastdb-rust-smoke Phase 3 exit: immediate + batch + bytes + corrupt fail-closed (+ Phase 6 contains/delete/flush/acid + P6-RANGE rev_iter_pairs= / first_last_ok=1 / range_pairs= + D1 clear_len_ok=1)
checks.beastdb-rust-t0 Phase 4 T0 (8 tests; + Phase 6 contains + delete + P6-ACID multi-key commit/abort + D1 len/clear)
checks.beastdb-rust-t1 Phase 4 frozen T1 (26 tests; + Phase 6 growth incl. delete, time flush, cursor, P6-ACID Mode B unlimited / auto-flush honesty, P6-RANGE reverse/first/last/range, D1 len/clear/delete_range)
checks.beastdb-rust-t2 D2 selective suite (8 tests; RoTxn / range edges / clear-then-put / codecs / multi-env; not full heed; heed3 tests zero)
checks.ffi-smoke C ABI bridge: binary put/get, multi-put, multi fail-closed, contains, delete, cursor open/next/close + ERR_DONE, atomic-batch probe export+CLI, range probe export+CLI, D1 len/clear/delete_range probe export+CLI, API v9

See TESTING.md.


Explicit non-claims (still true)

  • Not lmdb.h / LMDB on-disk wire or page format
  • Not full heed / heed3 suite green on beastdb
  • Not heed3 encryption product
  • Not power-fail / kill-9 durability (R9/R10)
  • Multi-key atomic batch shipped (P6-ACID done) - product temp+rename all-or-none; not LMDB page-level ACID; multi-put remains non-ACID sequential
  • Not R7 closed (PR2 + D3/M2 + R7-BYTES + R7-SCAN + R7-SNAP docs: deeper partial - export is package default; CLI emergency remains; not lmdb.h / free-page reclaim; List/scan/static residuals measured; long-lived EXPORT idle gets do not auto-follow peers (reopen or successful sync refreshes); atomic batch / D1-D3 measure / SNAP docs do not close R7)
  • Agents never commit/push; human G1 publish remains open

Maintenance

When a PLAN growth row or phase exit lands:

  1. Add/update a row here with date + evidence.
  2. Update PLAN-REMAINING.md (mark done / refresh recommended order).
  3. Keep PLAN.md remaining board honest (do not invent full Phase 6 closed).
  4. Reconcile GAPS.md / HEED-MAP.md / git history / forge release notes in the same change set (Workstream K).