daemonic_error 0.1.0

Errors that compose, predict, and leave receipts - Compose: algebraic combination (in active development) - Predict: Glass/Severity - Receipts: audit trail, position, checksum - Reflection: Runtime Reflection through TopologySegment (in active development)
use alloc::vec::Vec;
use crate::daemonic::glass::Glass;
use crate::DaemonicError;

/// Two or more incompatible observations coexist.
/// Neither dominates. Both have evidence.
/// Requires observer decision to collapse.
/// WARNING: Paradox CAN cascade. Contradictions infect children.
pub trait GlassParadox<GLASS>: Glass<GLASS>+ for<'error> DaemonicError<'error> {
	/// The incompatible observations
	fn observations(&self) -> &[GLASS];

	/// Why are they incompatible?
	fn contradiction_description(&self) -> &str;

	/// Collapse to one observation. Observer chooses.
	/// This IS measurement. Superposition → concrete.
	fn collapse(self, chosen_index: usize) -> Option<GLASS>;

	/// Can additional context resolve without forced collapse?
	fn is_self_resolving(&self) -> bool {
		false
	}
}
/// Annotation on a Paradox observation.
/// "Two realities, here's why they conflict."
pub trait ParadoxAnnotation<GLASS>: GlassParadox<GLASS> {
	fn annotation(&self) -> &str;

	/// Per-observation annotations explaining each side.
	fn per_observation_notes(&self) -> Vec<&str>;
}