use std::fs; use serde::Deserialize; #[derive(Debug, Deserialize)] struct G6HostBridgeCallbackStateVerification { #[serde(rename = "decisionDate")] decision_date: String, scope: String, #[serde(rename = "startingState")] starting_state: StartingState, #[serde(rename = "verificationTargets")] verification_targets: Vec, #[serde(rename = "verificationPriority")] verification_priority: Vec, #[serde(rename = "selectedFollowup")] selected_followup: SelectedFollowup, notes: Vec, } #[derive(Debug, Deserialize)] struct StartingState { #[serde(rename = "targetGroup")] target_group: String, #[serde(rename = "realExecutionOutOfScope")] real_execution_out_of_scope: bool, #[serde(rename = "implementationOutOfScope")] implementation_out_of_scope: bool, #[serde(rename = "heldGroups")] held_groups: Vec, } #[derive(Debug, Deserialize)] struct VerificationTarget { state: String, #[serde(rename = "evidenceRequirement")] evidence_requirement: String, } #[derive(Debug, Deserialize)] struct SelectedFollowup { design: String, plan: String, } #[test] fn g6_host_bridge_callback_state_verification_stays_bounded() { let asset: G6HostBridgeCallbackStateVerification = serde_json::from_str( &fs::read_to_string( "tests/fixtures/generated_scene/g6_host_bridge_callback_state_verification_2026-04-19.json", ) .unwrap(), ) .unwrap(); assert_eq!(asset.decision_date, "2026-04-19"); assert_eq!(asset.scope, "g6-host-bridge-callback-state-verification"); assert_eq!(asset.starting_state.target_group, "G6"); assert!(asset.starting_state.real_execution_out_of_scope); assert!(asset.starting_state.implementation_out_of_scope); assert_eq!(asset.starting_state.held_groups, vec!["G8"]); assert!(asset .verification_targets .iter() .any(|item| item.state == "ok")); assert!(asset .verification_targets .iter() .any(|item| item.state == "partial")); assert!(asset .verification_targets .iter() .any(|item| item.state == "blocked")); assert!(asset .verification_targets .iter() .any(|item| item.state == "error")); assert_eq!( asset.verification_priority, vec!["blocked", "error", "partial", "ok"] ); assert!(asset .selected_followup .design .ends_with("2026-04-19-g6-host-bridge-entry-readiness-design.md")); assert!(asset .selected_followup .plan .ends_with("2026-04-19-g6-host-bridge-entry-readiness-plan.md")); assert!(!asset.notes.is_empty()); }