(args: &super::intent::validate::IntentValidate)
| 1133 | } |
| 1134 | |
| 1135 | pub fn intent_validate(args: &super::intent::validate::IntentValidate) -> CliResult<bool> { |
| 1136 | // Path-arg form reads a file, no redb — stays local. |
| 1137 | if args.id_or_path.ends_with(".md") || args.id_or_path.contains('/') { |
| 1138 | return Ok(false); |
| 1139 | } |
| 1140 | let Some(session) = Service::open()? else { |
| 1141 | return Ok(false); |
| 1142 | }; |
| 1143 | // Evidence replay needs the manifest and checker on the service host; the |
| 1144 | // handler owns the pins, the ordinary gate, and the post-checker freshness |
| 1145 | // read. The local body remains the fallback when no service session exists. |
| 1146 | if args.evidence_context || args.replay_evidence.is_some() { |
| 1147 | return replay_evidence(&session, args); |
| 1148 | } |
| 1149 | validate_entity(&session, Kind::Intent, &args.id_or_path, args.json) |
| 1150 | } |
| 1151 | |
| 1152 | fn replay_evidence( |
| 1153 | session: &Service, |
no test coverage detected