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