Skip to content

refactor(filesystem): role-based public API and heap encapsulation#27

Merged
nevzheng merged 1 commit into
mainfrom
refactor/filesystem-api
Jun 13, 2026
Merged

refactor(filesystem): role-based public API and heap encapsulation#27
nevzheng merged 1 commit into
mainfrom
refactor/filesystem-api

Conversation

@nevzheng

Copy link
Copy Markdown
Owner

Role-based public API + heap encapsulation

Makes filesystem navigable and tightens its surface, plus a doc-accuracy sweep.

API: organized by what you're doing

  • The modules are now pub (memory, tuple, codec, cache, block, page) and the crate doc is a role map — "execution engine → memory; storage engine → tuple; format owner → codec; the rest is plumbing." No more flat wall of 25 root types.

Encapsulation: the storage engine works only with tuples

  • New Heap::open(dir, frames) builds and owns its BlockStore + PageCache internally (absorbs strata-store's open_heap).
  • Heap and its view types (TupleRef/TupleView/PageTuples/TupleMut) default their block-store backend, so strata-store writes Heap / TupleRef and no longer names FileBlockStore or PageCache anywhere. The plumbing is hidden behind the constructor; tuning hooks can be added later.

Docs

  • New crate-level README (role map + quickstart + layering diagram).
  • Accuracy fixes from a full comment audit: WALjournal in two cache comments, a journal codec comment, a stale from_pager test variable, and the sstable shard-layout note.

Workspace builds, clippy -D warnings clean, all tests green.

🤖 Generated with Claude Code

- expose capability modules (memory, tuple, codec, cache, block, page) and
  rewrite the crate doc as a role map, so the API is navigable by what you're
  doing rather than a flat wall of types
- add Heap::open (owns its block store + page cache internally) and default the
  block-store backend on Heap and its view types, so the storage engine works
  only with tuples and never names FileBlockStore/PageCache
- add a crate-level README (role map + quickstart + layering)
- doc accuracy: WAL -> journal in cache comments, fix a journal codec comment,
  rename a stale test variable, clarify the sstable shard-layout note
@nevzheng
nevzheng merged commit f94ede2 into main Jun 13, 2026
5 checks passed
@nevzheng
nevzheng deleted the refactor/filesystem-api branch June 13, 2026 21:33
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.

1 participant