Skip to main content

lex_store/
lib.rs

1//! M6: content-addressed store. Spec §4.
2//!
3//! Filesystem layout (§4.2):
4//!
5//! ```text
6//! <root>/
7//! ├── stages/
8//! │   └── <SigId>/
9//! │       ├── implementations/
10//! │       │   ├── <StageId>.ast.json
11//! │       │   └── <StageId>.metadata.json
12//! │       ├── tests/
13//! │       │   └── <test_id>.json
14//! │       ├── specs/
15//! │       │   └── <spec_id>.json
16//! │       └── lifecycle.json
17//! └── traces/
18//!     └── <run_id>/
19//!         └── trace.json
20//! ```
21//!
22//! The filesystem is canonical. We don't ship `index.db` (the spec calls
23//! it a cache); the in-memory index is rebuilt on `Store::open` by
24//! scanning the filesystem. Acceptance §4.6 requires that this rebuild
25//! produces identical results regardless of cache state — the obvious way
26//! to honor that is to keep the cache trivially derivable.
27
28mod store;
29mod model;
30mod branches;
31pub mod users;
32pub mod policy;
33
34pub use lex_vcs::{OpId, Operation, OperationKind, OperationRecord, StageTransition};
35pub use model::{Lifecycle, Metadata, Spec, StageStatus, Test, Transition};
36pub use store::{PublishOp, PublishOutcome, StageHistoryEntry, Store, StoreError};
37pub use branches::{
38    Branch, MergeConflict, MergeEntry, MergeRecord, MergeReport, MergeSummary,
39    DEFAULT_BRANCH,
40};