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