chore: rename packages/ to crates/
Move all 29 workspace members from packages/<name>/ to crates/<name>/. Updates: workspace Cargo.toml (members + path deps), justfile, root CLAUDE.md, scripts/build/CARGO_INSTALL.md, docs/architecture/crates.md (renamed from packages.md), structural references in docs/architecture and docs/configuration, per-crate CLAUDE.md self-references. Historical plans, reports, and building/ docs are left untouched. No behavior change; just check-all stays green and fermata tests pass.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
use dirigent_fermata::core::{Decision, Op, Reason, Rule};
|
||||
|
||||
#[test]
|
||||
fn op_variants_exist() {
|
||||
let _ = Op::Read;
|
||||
let _ = Op::Write;
|
||||
let _ = Op::Execute;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn decision_allow_is_simple() {
|
||||
let d = Decision::Allow;
|
||||
assert!(matches!(d, Decision::Allow));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn decision_deny_carries_reason() {
|
||||
let rule = Rule {
|
||||
source: "/proj/.botignore".into(),
|
||||
pattern: ".env".into(),
|
||||
};
|
||||
let d = Decision::Deny(Reason {
|
||||
message: "blocked by .botignore".into(),
|
||||
rule: Some(rule),
|
||||
});
|
||||
match d {
|
||||
Decision::Deny(r) => {
|
||||
assert_eq!(r.message, "blocked by .botignore");
|
||||
assert!(r.rule.is_some());
|
||||
}
|
||||
_ => panic!("expected Deny"),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn decision_ask_carries_reason() {
|
||||
let d = Decision::Ask(Reason {
|
||||
message: "needs confirmation".into(),
|
||||
rule: None,
|
||||
});
|
||||
assert!(matches!(d, Decision::Ask(_)));
|
||||
}
|
||||
Reference in New Issue
Block a user