Mirror `attest`'s tracked-vault write (body = pretty JSON + '\n').
(repo: &Repository, id: &str, node: &CanonicalNode)
| 427 | |
| 428 | /// Mirror `attest`'s tracked-vault write (body = pretty JSON + '\n'). |
| 429 | fn write_tracked(repo: &Repository, id: &str, node: &CanonicalNode) { |
| 430 | let inputs = bridge::read_intent(repo, id).unwrap(); |
| 431 | let mut body = serde_json::to_string_pretty(&node.to_value()).unwrap(); |
| 432 | body.push('\n'); |
| 433 | let mut fm = serde_json::Map::new(); |
| 434 | fm.insert( |
| 435 | "intentId".into(), |
| 436 | Value::String(bridge::normalized_id(repo, id).unwrap()), |
| 437 | ); |
| 438 | fm.insert( |
| 439 | "sourceContentHash".into(), |
| 440 | Value::String(bridge::source_content_hash(&inputs)), |
| 441 | ); |
| 442 | let vpath = bridge::attestation_vault_path(repo, id).unwrap(); |
| 443 | repo.vault_store( |
| 444 | &vpath, |
| 445 | VaultEntryType::Attestation, |
| 446 | body.into_bytes(), |
| 447 | serde_json::to_string(&fm).unwrap(), |
| 448 | ) |
| 449 | .unwrap(); |
| 450 | } |
| 451 | |
| 452 | /// Compute a single row using an explicit verifier keypair (no global store). |
| 453 | /// Reads the row's kind tag from the manifest, exactly as `build_rows` does. |