lonca_policy/lib.rs
1//! Lonca's deterministic decision layer.
2//!
3//! - [`state::State`] is a pure fold over the operation log.
4//! - [`decide::decide`] is a pure function from (state, request, recorded
5//! evidence, time, policy) to a decision.
6//! - [`chain::Chain`] combines both into the single-writer sequencer the daemon
7//! runs; the auditor replays the same functions over a stored log.
8//! - [`whatif::compare`] decides a log again with another policy.
9
10#![forbid(unsafe_code)]
11// The trusted core: a panic in the single writer stops every repository,
12// so bad input must become an error or a denial (clippy.toml lets tests panic).
13#![warn(clippy::unwrap_used, clippy::expect_used, clippy::indexing_slicing)]
14
15pub mod chain;
16pub mod config;
17pub mod decide;
18pub mod details;
19pub mod events;
20pub mod harness;
21pub mod human;
22pub mod refs;
23pub mod state;
24pub mod symbols;
25pub mod whatif;
26
27pub use chain::Chain;
28pub use config::{Config, PolicyBundle};
29pub use decide::{Ctx, decide};
30pub use state::State;