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 budget;
29mod planner;
30mod store;
31mod model;
32mod branches;
33mod merge_checker;
34mod delta;
35mod gc;
36pub mod users;
37pub mod policy;
38
39pub use merge_checker::MergeResolutionChecker;
40pub use budget::SessionBudget;
41pub use planner::{Plan, PlanPath};
42pub use delta::{StageDelta, DELTA_CHAIN_CAP, DELTA_RATIO_THRESHOLD};
43pub use gc::{GcPlan, RetentionReason};
44
45pub use lex_vcs::{OpId, Operation, OperationKind, OperationRecord, StageTransition};
46pub use model::{Lifecycle, Metadata, Spec, StageStatus, Test, Transition};
47pub use store::{
48 CandidateInfo, PublishOp, PublishOutcome, ReplayOutcome, ReplayRequest, StageHistoryEntry,
49 Store, StoreError,
50};
51pub use branches::{
52 Branch, BranchAdvance, MergeConflict, MergeEntry, MergeRecord, MergeReport, MergeSummary,
53 DEFAULT_BRANCH,
54};