Create a repo+vault and a single memory via the GENERIC vault path.
()
| 413 | |
| 414 | /// Create a repo+vault and a single memory via the GENERIC vault path. |
| 415 | fn repo_with_memory() -> (Repository, String, MemLiftInputs, tempfile::TempDir) { |
| 416 | let dir = tempdir().unwrap(); |
| 417 | let repo = Repository::init(dir.path()).unwrap(); |
| 418 | repo.init_vault().unwrap(); |
| 419 | let inputs = memory_inputs(); |
| 420 | let id = "01j8zc4r8t".to_string(); |
| 421 | let path = normalize_memory_path(&id); |
| 422 | repo.vault_store( |
| 423 | &path, |
| 424 | VaultEntryType::Memory, |
| 425 | inputs.body.clone().into_bytes(), |
| 426 | serde_json::to_string(&inputs.frontmatter).unwrap(), |
| 427 | ) |
| 428 | .unwrap(); |
| 429 | (repo, id, inputs, dir) |
| 430 | } |
| 431 | |
| 432 | /// Mirror `attest`'s tracked-vault write exactly. |
| 433 | fn write_tracked(repo: &Repository, id: &str, node: &MemoryNode, inputs: &MemLiftInputs) { |