Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 32 additions & 6 deletions .kanon-lint-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,38 @@ STORAGE/no-migration-checksum:crates/lexis/src/ast.rs
STORAGE/no-migration-checksum:crates/lexis/src/lib.rs

# =============================================================================
# crates/{hypomnema,phylaxis,pinax}/ — genuinely empty scaffolds
# crates/pinax/ — Phase 01 landed; false positives, not real defects
# =============================================================================

# WHY: these three crates are empty by design at this phase — lib.rs is
# WHY(forkwright/kanon#2975): same has_ddl bare-substring-match false
# positive as the lexis entries above, same root cause, same upstream fix
# tracked there. `database.rs`'s module doc names "CREATE TABLE" as Phase
# 04 territory this facade does not implement yet (Decision 1: "one file
# per database" today, no table catalog); `row.rs`'s module doc cites
# `lexis`'s own exit-criterion wording, which likewise names "CREATE TABLE"
# only to say the typed-row/`TableDef` format it gates is Phase 4/5
# territory. Neither file runs a migration or executes DDL. Drop these two
# entries once kanon#2975 lands.
STORAGE/no-migration-checksum:crates/pinax/src/database.rs
STORAGE/no-migration-checksum:crates/pinax/src/row.rs

# WHY: lib.rs is a module-declaration + public re-export file with no
# behavior of its own — same shape as the lexis/lib.rs entry above, not the
# "empty scaffold" reason the hypomnema/phylaxis entries below still carry.
# Phase 01 landed real behavior in `btree/`, `buffer_pool.rs`, `codec.rs`,
# `database.rs`, `page.rs`, `pager.rs`, and `row.rs`, each with its own
# colocated `#[cfg(test)] mod tests`; the TESTING/no-tests heuristic only
# inspects lib.rs itself and a sibling `tests/` directory (which exists here
# too — `tests/phase01_acceptance.rs` — but the heuristic still cannot see
# module-level coverage), so it cannot see any of that. Drop once the
# heuristic learns to walk sibling submodules.
TESTING/no-tests:crates/pinax/src/lib.rs

# =============================================================================
# crates/{hypomnema,phylaxis}/ — genuinely empty scaffolds
# =============================================================================

# WHY: these two crates are empty by design at this phase — lib.rs is
# module-doc-comment-only, zero functions, zero types, zero logic (see each
# crate's [package.metadata.kanon] maturity = "scaffold" in Cargo.toml). A
# #[cfg(test)] module here would have no real behavior to assert against;
Expand All @@ -42,9 +70,7 @@ STORAGE/no-migration-checksum:crates/lexis/src/lib.rs
# is worse than an honest, exit-criteria-bound suppression. Each crate's own
# Cargo.toml exit-criteria field names the concrete Phase that ends this:
# hypomnema Phase 02 (WAL + virtual-WAL trait + causal changelog), phylaxis
# Phase 03/06 (MVCC + encryption), pinax Phase 01 (pager + buffer pool +
# B-tree) — see kanon/projects/pinax/ROADMAP.md. Drop each entry the moment
# its crate gets real behavior and a real test.
# Phase 03/06 (MVCC + encryption) — see kanon/projects/pinax/ROADMAP.md.
# Drop each entry the moment its crate gets real behavior and a real test.
TESTING/no-tests:crates/hypomnema/src/lib.rs
TESTING/no-tests:crates/phylaxis/src/lib.rs
TESTING/no-tests:crates/pinax/src/lib.rs
9 changes: 9 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ proptest = "1"
# lets ARCHITECTURE/crate-index-conformance read real `path =` edges out of
# each crate's Cargo.toml and cross-check them against CRATE-INDEX.toml.
snafu = "0.8"
# WHY: pinax's page-format checksum per PLAN.md Decision 2 — pure-Rust
# XxHash3-64, the same algorithm Turso's page cache uses
# (`turso/core/storage/checksum.rs:81`), chosen over CRC32C (32-bit is
# collision-borderline at millions of pages) and blake3 (256-bit dominates a
# 4 KiB page's overhead budget; cryptographic integrity is the encryption
# layer's job, not corruption detection's).
xxhash-rust = { version = "0.8", features = ["xxh3"] }
# WHY: fixture temp-dirs for pager/buffer-pool/B-tree tests — kanon RUST.md
# § Testing forbids `/tmp/<literal>` and `.parent()` off a tempdir.
tempfile = "3"

[workspace.lints.clippy]
pedantic = { level = "warn", priority = -1 }
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ in Rust. The Tier-1 storage primitive: the answer to "what is." Replaces
SQLite for fleet consumers whose state is tabular, transactional, and
aggregation-heavy.

**Status:** design phase - no code yet. This repo carries the public
specification surface as it lands; the phased roadmap and state tracking
live in the fleet planning home. First implementation phase is the
pager / buffer pool / B-tree tier.
**Status:** Phase 01 (pager / buffer pool / B-tree) implemented - a
checksummed, copy-on-write, integer-keyed B+tree behind an LRU-evicting
buffer pool. The phased roadmap and state tracking live in the fleet
planning home; `lexis` (the strict six-type value system) landed first,
as the vocabulary Phase 01 stores.

## Locked design decisions

Expand Down
2 changes: 1 addition & 1 deletion crates/pinax/CRATE-SHAPE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
shape = "unclassified"
top_level = "layer"
within_crate = "feature"
purpose = "Facade: pager, buffer pool, B-tree, page format, SQL surface, async API, migration runner, CLI (Decision 14). Not yet implemented — reserves the workspace position."
purpose = "Facade: pager, buffer pool, B-tree, page format land Phase 01 (Decision 1, Decision 2). SQL surface, async API, migration runner, CLI (Decision 14) land later phases."
20 changes: 13 additions & 7 deletions crates/pinax/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true
authors.workspace = true
description = "(scaffold) Relational storage facade for the forkwright fleet: pager, buffer pool, B-tree, SQL surface, async API, migrations, and CLI."
description = "Relational storage facade for the forkwright fleet: page format, pager, buffer pool, and B+tree land Phase 01; SQL surface, async API, migrations, and CLI land later phases."
readme = "../../README.md"
keywords = ["sql", "database", "storage"]
categories = ["database"]
Expand All @@ -16,17 +16,23 @@ categories = ["database"]
hypomnema = { path = "../hypomnema", version = "0.0.2" }
lexis = { path = "../lexis", version = "0.0.2" }
phylaxis = { path = "../phylaxis", version = "0.0.2" }
snafu = { workspace = true }
xxhash-rust = { workspace = true }

[dev-dependencies]
tempfile = { workspace = true }

[lints]
workspace = true

# WHY: maturity flag is read by the kanon substrate registry so consumers can
# tell at a glance which API surfaces are pre-stabilization. This crate is an
# empty scaffold reserving the facade's position in the Decision 14
# dependency graph; the pager + buffer pool + B-tree land Phase 01.
# tell at a glance which API surfaces are pre-stabilization. Phase 01 lands
# the page format, pager, buffer pool, and B+tree (Decision 1, Decision 2,
# Decision 14); the SQL surface, async API, migration runner, and CLI are
# later phases per ROADMAP.md.
[package.metadata.kanon]
maturity = "scaffold"
maturity = "alpha"
since = "2026-08-15"
phase = "1"
phase-description = "empty crate reserving the workspace position and dependency edges; no implementation yet"
exit-criteria = "Phase 1 pager + buffer pool + B-tree land; see kanon/projects/pinax/ROADMAP.md Phase 01"
phase-description = "page format (checksummed, configurable 4-64 KiB), pager, buffer pool with LRU eviction, and a copy-on-write B+tree keyed by i64 (Decision 1, Decision 2)"
exit-criteria = "Phase 2 adopts this pager under a WAL + transaction boundary; see kanon/projects/pinax/ROADMAP.md Phase 02"
Loading