use std::fs; use serde::Deserialize; #[derive(Debug, Deserialize)] struct G6HostBridgePrerequisites { #[serde(rename = "decisionDate")] decision_date: String, scope: String, #[serde(rename = "startingState")] starting_state: StartingState, #[serde(rename = "blockedCapability")] blocked_capability: BlockedCapability, #[serde(rename = "capabilityBreakdown")] capability_breakdown: Vec, #[serde(rename = "selectedFollowup")] selected_followup: SelectedFollowup, notes: Vec, } #[derive(Debug, Deserialize)] struct StartingState { #[serde(rename = "targetGroup")] target_group: String, #[serde(rename = "executionOutOfScope")] execution_out_of_scope: bool, #[serde(rename = "reopenedGroups")] reopened_groups: Vec, #[serde(rename = "heldGroups")] held_groups: Vec, } #[derive(Debug, Deserialize)] struct BlockedCapability { name: String, summary: String, #[serde(rename = "boundedInsteadOfBroadRuntime")] bounded_instead_of_broad_runtime: bool, } #[derive(Debug, Deserialize)] struct CapabilityBreakdown { slice: String, status: String, reason: String, } #[derive(Debug, Deserialize)] struct SelectedFollowup { design: String, plan: String, } #[test] fn g6_host_bridge_prerequisites_stay_bounded() { let asset: G6HostBridgePrerequisites = serde_json::from_str( &fs::read_to_string( "tests/fixtures/generated_scene/g6_host_bridge_prerequisites_2026-04-19.json", ) .unwrap(), ) .unwrap(); assert_eq!(asset.decision_date, "2026-04-19"); assert_eq!(asset.scope, "g6-host-bridge-prerequisites"); assert_eq!(asset.starting_state.target_group, "G6"); assert!(asset.starting_state.execution_out_of_scope); assert!(asset.starting_state.reopened_groups.is_empty()); assert_eq!(asset.starting_state.held_groups, vec!["G8"]); assert_eq!( asset.blocked_capability.name, "host-bridge-real-execution-semantics" ); assert!(asset.blocked_capability.bounded_instead_of_broad_runtime); assert!(asset .capability_breakdown .iter() .any(|item| item.slice == "bridge_action_invocation" && item.status == "needed")); assert!(asset .capability_breakdown .iter() .any(|item| item.slice == "callback_completion_semantics" && item.status == "needed")); assert!( asset .capability_breakdown .iter() .any(|item| item.slice == "host_runtime_platform_rebuild" && item.status == "out-of-scope") ); assert!(asset .selected_followup .design .ends_with("2026-04-19-g6-host-bridge-execution-semantics-design.md")); assert!(asset .selected_followup .plan .ends_with("2026-04-19-g6-host-bridge-execution-semantics-plan.md")); assert!(!asset.notes.is_empty()); }