use harn_parser::Repair;
pub(super) fn is_capability_migration_repair(repair: &Repair) -> bool {
is_capability_migration_repair_id(repair.id.as_str())
}
pub(super) fn is_capability_migration_repair_id(id: &str) -> bool {
id.starts_with("bindings/thread-harness")
|| matches!(
id,
"bindings/thread-missing-harness"
| "bindings/thread-root-argument"
| "bindings/prepend-capability-argument"
| "bindings/attenuate-harness"
| "bindings/attenuate-capability-argument"
| "bindings/attenuate-capability-bundle-argument"
| "bindings/name-capability-parameter"
| "imports/remove-retired-testing-helper"
)
}
pub(super) fn defers_to_whole_program_pass(id: &str) -> bool {
matches!(
id,
"bindings/rename-unused"
| "bindings/name-capability-parameter"
)
}
pub(super) fn is_whole_program_superseded_repair(repair: &Repair) -> bool {
let id = repair.id.as_str();
id.starts_with("bindings/thread-harness")
|| matches!(
id,
"bindings/thread-missing-harness"
| "bindings/thread-root-argument"
| "bindings/prepend-capability-argument"
)
}