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)],
)
| 984 | /// (e.g. `kind`, `attributedTo`, `status`) so tests can control the review |
| 985 | /// gate's inputs. `lift_intent` reads these straight off the frontmatter. |
| 986 | fn install_intent_body_fm( |
| 987 | repo: &Repository, |
| 988 | intent_file: &str, |
| 989 | body: &str, |
| 990 | overrides: &[(&str, &str)], |
| 991 | ) { |
| 992 | use atomic_core::pristine::VaultEntryType; |
| 993 | let entry = repo.vault_retrieve(intent_file).unwrap().unwrap(); |
| 994 | let mut fm: serde_json::Map<String, serde_json::Value> = |
| 995 | serde_json::from_str(&entry.frontmatter_json).unwrap(); |
| 996 | for (k, v) in overrides { |
| 997 | fm.insert( |
| 998 | (*k).to_string(), |
| 999 | serde_json::Value::String((*v).to_string()), |
| 1000 | ); |
| 1001 | } |
| 1002 | repo.vault_store( |
| 1003 | intent_file, |
| 1004 | VaultEntryType::Intent, |
| 1005 | body.as_bytes().to_vec(), |
| 1006 | serde_json::to_string(&fm).unwrap(), |
| 1007 | ) |
| 1008 | .unwrap(); |
| 1009 | repo.vault_index_kg(intent_file).unwrap(); |
| 1010 | } |
| 1011 | |
| 1012 | /// Build a report where intent A (reached by a candidate change that edits |
| 1013 | /// `a.txt`) is remediated by intent B. `b_done` controls whether the |
no test coverage detected