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