Mirror `attest`'s tracked-vault write (body = pretty JSON + '\n').
(repo: &Repository, id: &str, node: &CanonicalNode)
| 625 | |
| 626 | /// Mirror `attest`'s tracked-vault write (body = pretty JSON + '\n'). |
| 627 | fn write_tracked(repo: &Repository, id: &str, node: &CanonicalNode) { |
| 628 | let inputs = bridge::read_intent(repo, id).unwrap(); |
| 629 | let mut body = serde_json::to_string_pretty(&node.to_value()).unwrap(); |
| 630 | body.push('\n'); |
| 631 | let mut fm = serde_json::Map::new(); |
| 632 | fm.insert( |
| 633 | "intentId".into(), |
| 634 | Value::String(bridge::normalized_id(repo, id).unwrap()), |
| 635 | ); |
| 636 | fm.insert( |
| 637 | "sourceContentHash".into(), |
| 638 | Value::String(bridge::source_content_hash(&inputs)), |
| 639 | ); |
| 640 | let vpath = bridge::attestation_vault_path(repo, id).unwrap(); |
| 641 | repo.vault_store( |
| 642 | &vpath, |
| 643 | VaultEntryType::Attestation, |
| 644 | body.into_bytes(), |
| 645 | serde_json::to_string(&fm).unwrap(), |
| 646 | ) |
| 647 | .unwrap(); |
| 648 | } |
| 649 | |
| 650 | /// Compute a single row using an explicit verifier keypair (no global store). |
| 651 | /// Reads the row's kind tag from the manifest, exactly as `build_rows` does. |