Resolve the node the gate should validate together with its native pins. A fresh attestation is gated as itself; an unattested or stale intent is gated as the raw lifted node, matching the CLI's ordinary validation.
(repo: &Repository, id: &str)
| 190 | /// A fresh attestation is gated as itself; an unattested or stale intent is |
| 191 | /// gated as the raw lifted node, matching the CLI's ordinary validation. |
| 192 | pub fn prepare(repo: &Repository, id: &str) -> Result<PreparedIntent, EvidenceError> { |
| 193 | let inputs = intent_bridge::read_intent(repo, id)?; |
| 194 | let node = match intent_bridge::load_attestation(repo, id, &inputs)? { |
| 195 | intent_bridge::Attestation::Fresh(node) => *node, |
| 196 | intent_bridge::Attestation::Stale(_) | intent_bridge::Attestation::None => { |
| 197 | intent_bridge::lift(&inputs)? |
| 198 | } |
| 199 | }; |
| 200 | let context = context_from_inputs(repo, &inputs)?; |
| 201 | Ok(PreparedIntent { node, context }) |
| 202 | } |
| 203 | |
| 204 | /// Read a manifest within the protocol ceiling. |
| 205 | pub fn read_manifest(path: &Path) -> Result<Vec<u8>, EvidenceError> { |
no test coverage detected