Expand description
Pure domain core: the schema as types, the immutable Graph, the event bus
(Event, Subscriber, Context), and Diagnostic. No IO — see
corpora-engine for the filesystem/git edges.
Re-exports§
pub use graph::Cite;pub use graph::Graph;pub use graph::Relation;pub use oracle::NullOracle;pub use oracle::OracleStatus;pub use oracle::RevisionOracle;pub use subscriber::Context;pub use subscriber::Interest;pub use subscriber::Subscriber;pub use model::*;pub use diagnostic::*;pub use config::*;pub use event::*;
Modules§
- config
- Run configuration, threaded through every
Context. - diagnostic
- Diagnostics are data, not panics — the corpus stays inspectable on any failure.
- event
- The event vocabulary the bus carries. Components communicate only through these.
- graph
- The immutable, queryable graph rules and adapters consume.
buildis pure:records -> (Graph, Vec<Diagnostic>), resolving supersession into three views — raw (declared edges), effective (adopted successor, chased to the terminal), and pending (a proposed/open replacement not yet adopted) — and flagging duplicate ids, kind mismatches, multiple adopted successors, and cycles. - model
- The schema (schema-v0) as types: illegal states unrepresentable where cheap.
Parsing produces a
Record; a kind-specificFacetcarries the rest. - oracle
- The one impure dependency the rule pack needs: resolving VCS revisions. The trait lives
in core so rules can depend on it; the git-backed implementation is in
corpora-engine(it does IO). Inject aNullOraclein tests to keep rules pure-testable. - subscriber
- The bus contract: every component is a
Subscriberthat reacts toEvents and emits more through itsContext.Interestis a cheap bitset prefilter.