use crate::fork::roles_at;
use crate::git_tree::tests::fixture::Fixture;
use crate::test_support::TEMPLATE_PROVIDERS;
const CONV: &str = "20260803T090000Z-aaaa";
fn workspace() -> Fixture {
let fx = Fixture::new();
fx.commit_other("providers.yaml", TEMPLATE_PROVIDERS);
fx.build_agent(CONV, "walk the rail");
fx
}
#[test]
fn every_point_names_the_model_its_config_binds() {
let fx = workspace();
let named: Vec<(String, String)> = roles_at(&fx.path, &format!("agents/{CONV}"))
.iter()
.map(|r| (r.role.clone(), r.model.clone()))
.collect();
assert_eq!(
named,
vec![
("worker".to_owned(), "claude-sonnet-5".to_owned()),
("compactor".to_owned(), "claude-haiku-4-5".to_owned()),
]
);
}
#[test]
fn a_ref_that_declares_nothing_offers_nothing() {
let fx = Fixture::new();
fx.orphan_agent("stray");
assert!(roles_at(&fx.path, "agents/stray").is_empty());
assert!(roles_at(&fx.path, "config/default").is_empty());
}