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 budget;
29mod planner;
30mod store;
31pub mod render;
32pub mod deps;
33pub mod issues;
34pub mod api;
35mod model;
36mod branches;
37mod merge_checker;
38mod delta;
39mod gc;
40pub mod users;
41pub mod policy;
42pub mod files;
43
44pub use merge_checker::MergeResolutionChecker;
45pub use budget::SessionBudget;
46pub use planner::{Plan, PlanPath};
47pub use delta::{StageDelta, DELTA_CHAIN_CAP, DELTA_RATIO_THRESHOLD};
48pub use gc::{BlobGcPlan, GcPlan, RetentionReason};
49pub use files::{
50    BlobId, Entry as FileEntry, Manifest, ManifestAt, ManifestError, ManifestMergeOutcome,
51    NotReplayable,
52};
53
54pub use lex_vcs::{OpId, Operation, OperationKind, OperationRecord, StageTransition};
55pub use model::{Lifecycle, Metadata, Spec, StageStatus, Test, Transition};
56pub use deps::{ModuleSurface, ResolvedDeps};
57pub use store::{
58    CandidateInfo, DepResolver, HubCiVerdict, PublishOp, HUB_CI_PRODUCER_TOOL, REVIEW_PRODUCER_PREFIX, REVIEW_PRODUCER_RESERVATION, PublishOutcome, ReconstructedProgram,
59    ReplayOutcome, ReplayRequest, SkippedStage, StageHistoryEntry, Store, StoreError,
60};
61pub use store::transition_for_kind;
62pub use branches::{
63    Branch, BranchAdvance, MergeConflict, MergeEntry, MergeRecord, MergeReport, MergeSummary,
64    DEFAULT_BRANCH,
65};