Like `install_intent_body` but sets arbitrary frontmatter string fields (e.g. `kind`, `attributedTo`, `status`) so tests can control the review gate's inputs. `lift_intent` reads these straight off the frontmatter.
(
repo: &Repository,
intent_file: &str,
body: &str,
overrides: &[(&str, &str)],
)
| 1248 | /// (e.g. `kind`, `attributedTo`, `status`) so tests can control the review |
| 1249 | /// gate's inputs. `lift_intent` reads these straight off the frontmatter. |
| 1250 | fn install_intent_body_fm( |
| 1251 | repo: &Repository, |
| 1252 | intent_file: &str, |
| 1253 | body: &str, |
| 1254 | overrides: &[(&str, &str)], |
| 1255 | ) { |
| 1256 | use atomic_core::pristine::VaultEntryType; |
| 1257 | let entry = repo.vault_retrieve(intent_file).unwrap().unwrap(); |
| 1258 | let mut fm: serde_json::Map<String, serde_json::Value> = |
| 1259 | serde_json::from_str(&entry.frontmatter_json).unwrap(); |
| 1260 | for (k, v) in overrides { |
| 1261 | fm.insert( |
| 1262 | (*k).to_string(), |
| 1263 | serde_json::Value::String((*v).to_string()), |
| 1264 | ); |
| 1265 | } |
| 1266 | repo.vault_store( |
| 1267 | intent_file, |
| 1268 | VaultEntryType::Intent, |
| 1269 | body.as_bytes().to_vec(), |
| 1270 | serde_json::to_string(&fm).unwrap(), |
| 1271 | ) |
| 1272 | .unwrap(); |
| 1273 | repo.vault_index_kg(intent_file).unwrap(); |
| 1274 | } |
| 1275 | |
| 1276 | /// Build a report where intent A (reached by a candidate change that edits |
| 1277 | /// `a.txt`) is remediated by intent B. `b_done` controls whether the |
no test coverage detected