lawsynth/crates/lawsynth-discovery/tests/assumptions_integration.rs
caelum0x b5da90b795 feat: discovery Pareto frontier + regime/uncertainty stages + benchmark execution engine
Discovery (§8/§16): add Pareto-frontier construction over the multi-objective
candidate score vector (DiscoveryResult.frontier + pareto_frontier()), opt-in
regime segmentation (result.regimes), and bootstrap uncertainty attachment;
CLI --pareto/--regimes flags. Benchmarks: a real generate->run->score->classify
execution engine driving the compiled CLI (9 supported cases end-to-end, 21
honest capability boundaries).

Rust workspace 329->342 tests; benchmarks +8 tests. clippy -D warnings clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 17:00:40 +03:00

24 lines
859 B
Rust

use std::collections::BTreeSet;
use lawsynth_core::Identifier;
use lawsynth_discovery::{
DependencyAssumptions, DependencyEdge, DependencyGraph, DiscoveryError, EdgeConstraint,
};
#[test]
fn contradictory_required_and_forbidden_constraints_are_rejected_before_graph_filtering() {
let x = Identifier::new("x").unwrap();
let y = Identifier::new("y").unwrap();
let edge = EdgeConstraint::new(x.clone(), y.clone());
let graph = DependencyGraph {
edges: vec![DependencyEdge { source: x, target: y, lag: 1, correlation: 1.0 }],
};
let assumptions = DependencyAssumptions {
required: BTreeSet::from([edge.clone()]),
forbidden: BTreeSet::from([edge]),
};
assert!(
matches!(assumptions.apply(&graph), Err(DiscoveryError::Graph(message)) if message.contains("both required and forbidden"))
);
}