Mirror `attest`'s tracked-vault write exactly.
(repo: &Repository, id: &str, node: &MemoryNode, inputs: &MemLiftInputs)
| 431 | |
| 432 | /// Mirror `attest`'s tracked-vault write exactly. |
| 433 | fn write_tracked(repo: &Repository, id: &str, node: &MemoryNode, inputs: &MemLiftInputs) { |
| 434 | let mut body = serde_json::to_string_pretty(&node.to_value()).unwrap(); |
| 435 | body.push('\n'); |
| 436 | let mut fm = serde_json::Map::new(); |
| 437 | fm.insert("memoryId".into(), Value::String(memory_id(id))); |
| 438 | fm.insert( |
| 439 | "sourceContentHash".into(), |
| 440 | Value::String(source_content_hash(inputs)), |
| 441 | ); |
| 442 | let frontmatter_json = serde_json::to_string(&fm).unwrap(); |
| 443 | let vpath = attestation_vault_path(id); |
| 444 | repo.vault_store( |
| 445 | &vpath, |
| 446 | VaultEntryType::Attestation, |
| 447 | body.into_bytes(), |
| 448 | frontmatter_json, |
| 449 | ) |
| 450 | .unwrap(); |
| 451 | } |
| 452 | |
| 453 | /// Mirror `attest`'s legacy sidecar write exactly ({node, source} wrapper). |
| 454 | fn write_legacy_sidecar( |