diff --git a/crates/ghostlight-dungeon/src/domain.rs b/crates/ghostlight-dungeon/src/domain.rs index a4cecdd..dd85b32 100644 --- a/crates/ghostlight-dungeon/src/domain.rs +++ b/crates/ghostlight-dungeon/src/domain.rs @@ -174,6 +174,19 @@ pub fn gestalt_member_subject_id(member_id: &str) -> String { format!("member:{}", canonical_gestalt_member_local_id(member_id)) } +/// State-reference namespaces wrap a canonical world ID exactly once. World +/// compilers may choose already-qualified IDs (for example +/// `gestalt:raincross_households`), while older fixtures use local IDs. Both +/// must project to the same evidence handle rather than accumulating prefixes. +pub fn gestalt_state_reference(gestalt_id: &str) -> String { + let gestalt_id = gestalt_id.trim(); + if gestalt_id.starts_with("gestalt:") { + gestalt_id.to_owned() + } else { + format!("gestalt:{gestalt_id}") + } +} + #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)] pub struct GestaltPromotion { pub gestalt_id: String, @@ -552,6 +565,9 @@ pub struct CellAppraisal { pub cell_id: String, pub world_revision: u64, pub resolution_epoch: u64, + /// Exact projected decision owners for this wave. The resolution cover + /// separately proves representation of every canonical cell constituent; + /// each ID here must own exactly one action or explicit inaction. pub considered_subject_ids: BTreeSet, pub actions: Vec, pub inactions: Vec, diff --git a/crates/ghostlight-dungeon/src/kernel.rs b/crates/ghostlight-dungeon/src/kernel.rs index 53fb1a3..7da3268 100644 --- a/crates/ghostlight-dungeon/src/kernel.rs +++ b/crates/ghostlight-dungeon/src/kernel.rs @@ -7618,23 +7618,25 @@ mod tests { appraisals: cover .cells .iter() - .map(|cell| CellAppraisal { - schema: "ghostlight.cell_appraisal.v1".into(), - cell_id: cell.id.clone(), - world_revision: campaign.revision, - resolution_epoch: campaign.resolution_policy.resolution_epoch, - considered_subject_ids: cell.subject_ids.clone(), - actions: vec![], - inactions: cell - .subject_ids - .iter() - .next() - .map(|subject_id| crate::domain::CellInaction { - subject_id: subject_id.clone(), + .map(|cell| { + let decision_owner = cell + .detail_focus_subject_id + .as_ref() + .or_else(|| cell.subject_ids.iter().next()) + .expect("a simulation cell has at least one subject") + .clone(); + CellAppraisal { + schema: "ghostlight.cell_appraisal.v1".into(), + cell_id: cell.id.clone(), + world_revision: campaign.revision, + resolution_epoch: campaign.resolution_policy.resolution_epoch, + considered_subject_ids: BTreeSet::from([decision_owner.clone()]), + actions: vec![], + inactions: vec![crate::domain::CellInaction { + subject_id: decision_owner, reason: "No justified move.".into(), - }) - .into_iter() - .collect(), + }], + } }) .collect(), cover, @@ -7942,11 +7944,19 @@ mod tests { .unwrap() .1; let mut wave = inaction_wave(&persisted, &store); + let refugees_cell_id = wave + .cover + .cells + .iter() + .find(|cell| cell.subject_ids.contains("refugees-east")) + .map(|cell| cell.id.clone()) + .unwrap(); let appraisal = wave .appraisals .iter_mut() - .find(|appraisal| appraisal.considered_subject_ids.contains("refugees-east")) + .find(|appraisal| appraisal.cell_id == refugees_cell_id) .unwrap(); + appraisal.considered_subject_ids = BTreeSet::from(["refugees-east".into()]); let proposal = CellActionProposal { subject_id: "refugees-east".into(), intent: "prepare storm lashings".into(), diff --git a/crates/ghostlight-dungeon/src/persona.rs b/crates/ghostlight-dungeon/src/persona.rs index 45b0b54..fe0cd31 100644 --- a/crates/ghostlight-dungeon/src/persona.rs +++ b/crates/ghostlight-dungeon/src/persona.rs @@ -1347,6 +1347,7 @@ impl CellProjectionEngine { let permission_guidance = format!( concat!( "Emit at most {} exact constituent- or named-member-attributed attempts. Priority is an urgency score from 0 to 100 where higher numbers resolve first. ", + "Every subject in exact_permissions owns a projected internal perspective and must appear exactly once across actions and inactions. Do not let a voiced constituent vanish during interpretation. ", "Each action carries an effects object whose exact subject-specific lane keys are supplied by the schema. Scalar lanes contain one typed effect. An activities lane is one object keyed by up to three distinct chosen activity kinds; each kind occurs at most once and its value contains the union of that means' exact targets and locations. Top-level lane names are stable across subjects: use null for a null-only unavailable lane and for any schema-required optional lane or activity key the subject does not use. A non-null lane or activity key absent from its exact schema is structurally unavailable: do not emit it and do not invent a destination. Pressure and migration lanes each have one slot. Preserve every means of one chosen course in one action. With relocation, activities at the exact snapshot location occur before departure and activities at the exact admitted destination occur after arrival; activity keys inside each location phase are an atomic set. Field order is not chronology. Never split one subject's single choice into multiple actions. ", "Use gestalt_activities or member_activities for concrete attempts that do not themselves change pressure. A cohesive Gestalt coordinating its own unnamed internal members uses coordinate with an empty target_subject_ids list; do not invent its containing population, a distant population, or another canonical subject as the target of internal coordination. Cite the smallest exact set of state_references that materially supports each attempt; the permission list is an upper bound, not a checklist to echo. ", "target_subject_ids and location_ids must come from that exact subject's permissions. activity_targets is the exact canonical target map: each key is the authoritative ID and each value supplies the target's name and current canonical locations. Use an ID only when the Persona addresses that named target, never merely because the ID is permitted. If an addressed person or role has no matching activity_targets entry, it is not a canonical target in this slice. reachable_destinations maps exact actor-movement destination IDs to names. migration_destinations maps exact population destination IDs to names and locations. When the Persona chooses to go to a canonical target, compare the target's current locations with the acting subject's current location and exact reachable destinations; never guess a destination from an opaque ID. Every activity has at most four unique target_subject_ids; choose the four most causally relevant when more permitted subjects are involved. A member activity uses exactly the member's source_location_id. Internal work is prepare with no targets. A local investigate may have no target and use the exact current location to seek information from the environment or an unnamed ordinary role; asking an unnamed clerk or dock master for facts maps here and records only the inquiry, never a reply or discovery. A local communicate may likewise have no target at the exact current location when the Persona speaks, sends, offers, asks permission, or notifies an unnamed ordinary role; it records only the source's outgoing attempt, never a listener, reply, acceptance, or outcome. Communication with a canonical subject requires that exact target ID. Never substitute a containing population, related institution, or merely permitted ID for an unnamed role. ", @@ -1399,7 +1400,7 @@ impl CellProjectionEngine { stage_receipts: Vec::new(), })); } - let appraisal = bind_cell_appraisal(&slice, proposal)?; + let appraisal = bind_cell_appraisal(&slice, &active_subject_ids, proposal)?; validate_cell_appraisal(&slice, &appraisal)?; validate_active_decision_owners(&active_subject_ids, &appraisal)?; Ok(appraisal) @@ -1715,6 +1716,11 @@ fn cell_correction_guidance(error: &anyhow::Error) -> &'static str { "The named subject already has a concrete chosen attempt in actions. Remove its inaction entry. Waiting for that attempt's result or declining some other option is not inaction. Do not change a faithful permitted action merely to preserve the duplicate inaction." } else if error.to_string().contains("duplicate strategic actions") { "The named subject may own exactly one strategic choice in this horizon. Merge all faithful chosen means into one action and use its orthogonal effect slots together; remove any separate alternative, deliberation, or unreachable choice rather than emitting a second action." + } else if error + .to_string() + .contains("omitted explicit strategic decisions") + { + "Every projected perspective must end in exactly one attributed decision. Preserve existing valid decisions and add an action only when the Persona explicitly chose a concrete attempt; otherwise add that voiced subject's explicit hold or wait as an inaction. Never invent a decision for an unprojected subject." } else { "Repair the semantic mismatch named by the verifier while preserving every unaffected faithful effect. A correction may retain exact unaffected values; do not alter text merely to make it bytewise different. Compress bounded text into complete clauses rather than truncating its meaning." } @@ -1836,6 +1842,7 @@ pub fn cell_effect_verification_binding( fn bind_cell_appraisal( slice: &PermittedCellSlice, + active_subject_ids: &BTreeSet, proposal: CellAppraisalProposal, ) -> Result { let actions = proposal @@ -1955,11 +1962,7 @@ fn bind_cell_appraisal( cell_id: slice.cell_id.clone(), world_revision: slice.world_revision, resolution_epoch: slice.resolution_epoch, - considered_subject_ids: slice - .constituents - .iter() - .map(|subject| subject.subject_id.clone()) - .collect(), + considered_subject_ids: active_subject_ids.clone(), actions, inactions: proposal.inactions, }) @@ -1969,25 +1972,19 @@ fn validate_cell_appraisal( slice: &PermittedCellSlice, appraisal: &crate::domain::CellAppraisal, ) -> Result<()> { - let expected: BTreeSet<_> = slice - .constituents - .iter() - .map(|value| value.subject_id.clone()) - .collect(); if appraisal.schema != "ghostlight.cell_appraisal.v1" || appraisal.cell_id != slice.cell_id || appraisal.world_revision != slice.world_revision || appraisal.resolution_epoch != slice.resolution_epoch - || appraisal.considered_subject_ids != expected { return Err(anyhow!( "appraisal has a stale or incomplete runtime binding" )); } - if appraisal.actions.len() > slice.max_actions { + if appraisal.actions.len() + appraisal.inactions.len() > slice.max_actions { return Err(anyhow!( - "appraisal emitted {} actions but this cell permits at most {}", - appraisal.actions.len(), + "appraisal emitted {} attributed decisions but this cell permits at most {}", + appraisal.actions.len() + appraisal.inactions.len(), slice.max_actions )); } @@ -2007,8 +2004,28 @@ fn validate_cell_appraisal( .map(|member| member.subject_id.as_str()), ) .collect::>(); + if appraisal.considered_subject_ids.is_empty() + || appraisal.considered_subject_ids.len() > slice.max_actions + || appraisal + .considered_subject_ids + .iter() + .any(|subject_id| !permitted_subject_ids.contains(subject_id.as_str())) + { + return Err(anyhow!( + "appraisal considered subjects are empty, over quota, or outside this cell's exact decision owners" + )); + } let mut action_subject_ids = BTreeSet::new(); for action in &appraisal.actions { + if !appraisal + .considered_subject_ids + .contains(&action.subject_id) + { + return Err(anyhow!( + "action subject {} was not an exact projected decision owner", + action.subject_id + )); + } if !action_subject_ids.insert(action.subject_id.as_str()) { return Err(anyhow!( "subject {} has duplicate strategic actions; combine every chosen movement and activity means into one composed action", @@ -2037,6 +2054,15 @@ fn validate_cell_appraisal( inaction.subject_id )); } + if !appraisal + .considered_subject_ids + .contains(&inaction.subject_id) + { + return Err(anyhow!( + "inaction subject {} was not an exact projected decision owner", + inaction.subject_id + )); + } if action_subject_ids.contains(inaction.subject_id.as_str()) { return Err(anyhow!( "subject {} appears in both actions and inactions; retain exactly one of those decisions", @@ -2053,6 +2079,21 @@ fn validate_cell_appraisal( for action in &appraisal.actions { validate_cell_action(slice, action)?; } + let decided_subject_ids = action_subject_ids + .into_iter() + .chain(inaction_subject_ids) + .collect::>(); + let missing = appraisal + .considered_subject_ids + .iter() + .map(String::as_str) + .filter(|subject_id| !decided_subject_ids.contains(subject_id)) + .collect::>(); + if !missing.is_empty() { + return Err(anyhow!( + "appraisal omitted explicit strategic decisions for projected subjects {missing:?}" + )); + } Ok(()) } @@ -2202,6 +2243,11 @@ fn validate_active_decision_owners( active_subject_ids: &BTreeSet, appraisal: &crate::domain::CellAppraisal, ) -> Result<()> { + if appraisal.considered_subject_ids != *active_subject_ids { + return Err(anyhow!( + "appraisal decision owners do not match the exact projected perspectives" + )); + } let inactive = appraisal .actions .iter() @@ -3461,6 +3507,7 @@ mod tests { let mut slice = fixture_cell_slice(); let mut appraisal = bind_cell_appraisal( &slice, + &BTreeSet::from(["faction-06".into()]), CellAppraisalProposal { actions: vec![], inactions: vec![crate::domain::CellInaction { @@ -3511,6 +3558,41 @@ mod tests { ); } + #[test] + fn every_projected_decision_owner_requires_an_action_or_explicit_inaction() { + let mut slice = fixture_cell_slice(); + let mut second = slice.constituents[0].clone(); + second.subject_id = "faction-07".into(); + second.name = "Faction Seven".into(); + second.permitted_state_references = BTreeSet::from(["institution:faction-07".into()]); + slice.constituents.push(second); + slice.max_actions = 2; + let active = BTreeSet::from(["faction-06".into(), "faction-07".into()]); + let mut appraisal = bind_cell_appraisal( + &slice, + &active, + CellAppraisalProposal { + actions: vec![], + inactions: vec![crate::domain::CellInaction { + subject_id: "faction-06".into(), + reason: "Faction Six explicitly holds its current course.".into(), + }], + }, + ) + .unwrap(); + + let error = validate_cell_appraisal(&slice, &appraisal).unwrap_err(); + assert!(error.to_string().contains("faction-07")); + assert!(cell_correction_guidance(&error).contains("Every projected perspective must end")); + + appraisal.inactions.push(crate::domain::CellInaction { + subject_id: "faction-07".into(), + reason: "Faction Seven explicitly waits for the vote count.".into(), + }); + validate_cell_appraisal(&slice, &appraisal).unwrap(); + validate_active_decision_owners(&active, &appraisal).unwrap(); + } + #[test] fn duplicate_action_inaction_correction_preserves_the_chosen_attempt() { let guidance = cell_correction_guidance(&anyhow!( @@ -4091,6 +4173,7 @@ mod tests { subject.permitted_state_references = BTreeSet::from(["gestalt:crowd".into()]); let appraisal = bind_cell_appraisal( &slice, + &BTreeSet::from(["crowd".into()]), CellAppraisalProposal { actions: vec![CellActionCandidate { subject_id: "crowd".into(), @@ -4246,6 +4329,7 @@ mod tests { }); let appraisal = bind_cell_appraisal( &slice, + &BTreeSet::from(["member:mira".into()]), CellAppraisalProposal { actions: vec![CellActionCandidate { subject_id: "member:mira".into(), @@ -4302,6 +4386,7 @@ mod tests { let appraisal = bind_cell_appraisal( &slice, + &BTreeSet::from(["actor:liaison".into()]), CellAppraisalProposal { actions: vec![CellActionCandidate { subject_id: "actor:liaison".into(), @@ -4333,6 +4418,7 @@ mod tests { let wrong_lane = bind_cell_appraisal( &slice, + &BTreeSet::from(["actor:liaison".into()]), CellAppraisalProposal { actions: vec![CellActionCandidate { subject_id: "actor:liaison".into(), @@ -4380,6 +4466,7 @@ mod tests { let proposal = bind_cell_appraisal( &slice, + &BTreeSet::from(["actor:director".into()]), CellAppraisalProposal { actions: vec![CellActionCandidate { subject_id: "actor:director".into(), diff --git a/crates/ghostlight-dungeon/src/resolution.rs b/crates/ghostlight-dungeon/src/resolution.rs index 6822e39..7d66faa 100644 --- a/crates/ghostlight-dungeon/src/resolution.rs +++ b/crates/ghostlight-dungeon/src/resolution.rs @@ -1877,28 +1877,58 @@ pub fn select_resolution_wave( .get(appraisal.cell_id.as_str()) .ok_or_else(|| anyhow!("cell appraisal references an inactive cell"))?; if !seen_cells.insert(appraisal.cell_id.as_str()) + || appraisal.schema != "ghostlight.cell_appraisal.v1" || appraisal.world_revision != campaign.revision || appraisal.resolution_epoch != campaign.resolution_policy.resolution_epoch - || appraisal.considered_subject_ids != cell.subject_ids - || (appraisal.actions.is_empty() && appraisal.inactions.is_empty()) { return Err(anyhow!("cell appraisal is incomplete or stale")); } let quota = cell_action_limit(cell); - if appraisal.actions.len() > quota || appraisal.inactions.len() > quota { + if appraisal.considered_subject_ids.is_empty() + || appraisal.considered_subject_ids.len() > quota + || appraisal.actions.len() + appraisal.inactions.len() > quota + { return Err(anyhow!("cell appraisal exceeds its action quota")); } - let action_subject_ids = appraisal - .actions + if appraisal + .considered_subject_ids .iter() - .map(|proposal| proposal.subject_id.as_str()) - .collect::>(); + .any(|subject_id| !cell_contains_attributed_subject(campaign, cell, subject_id)) + { + return Err(anyhow!( + "cell appraisal considered a subject outside its exact cell authority" + )); + } + if cell + .detail_focus_subject_id + .as_ref() + .is_some_and(|focus| !appraisal.considered_subject_ids.contains(focus)) + { + return Err(anyhow!( + "cell appraisal omitted its mandatory detail-focus subject" + )); + } + let mut action_subject_ids = BTreeSet::new(); + for proposal in &appraisal.actions { + if !action_subject_ids.insert(proposal.subject_id.as_str()) + || !appraisal + .considered_subject_ids + .contains(&proposal.subject_id) + { + return Err(anyhow!( + "cell appraisal contains a duplicate or unconsidered action owner" + )); + } + } let mut inaction_subject_ids = BTreeSet::new(); for inaction in &appraisal.inactions { if inaction.reason.trim().is_empty() || inaction.reason.chars().count() > 240 || action_subject_ids.contains(inaction.subject_id.as_str()) || !inaction_subject_ids.insert(inaction.subject_id.as_str()) + || !appraisal + .considered_subject_ids + .contains(&inaction.subject_id) || !cell_contains_attributed_subject(campaign, cell, &inaction.subject_id) { return Err(anyhow!( @@ -1906,6 +1936,22 @@ pub fn select_resolution_wave( )); } } + let decided_subject_ids = action_subject_ids + .iter() + .chain(&inaction_subject_ids) + .copied() + .collect::>(); + if decided_subject_ids + != appraisal + .considered_subject_ids + .iter() + .map(String::as_str) + .collect::>() + { + return Err(anyhow!( + "every considered cell subject must own exactly one action or explicit inaction" + )); + } for proposal in &appraisal.actions { validate_cell_proposal(campaign, cell, proposal)?; proposals.push(proposal.clone()); @@ -2753,7 +2799,7 @@ pub fn member_state_references(campaign: &Campaign, member_id: &str) -> Result Result Result for (destination_id, location_id) in gestalt_migration_destinations(campaign, subject_id, &gestalt.home_location_id) { - references.insert(format!("gestalt:{destination_id}")); + references.insert(crate::domain::gestalt_state_reference(&destination_id)); references.insert(format!("location:{location_id}")); } } @@ -4052,23 +4098,26 @@ pub(crate) mod tests { let cover = plan_cover(&value, default_demand(&value, "espionage")).unwrap(); let cell = cover.cells[0].clone(); assert_eq!(cell.mode, SimulationCellMode::Arena); - let make_wave = |proposal: CellActionProposal| ResolutionWaveCommit { - schema: "ghostlight.resolution_wave_commit.v1".into(), - world_revision: value.revision, - resolution_epoch: value.resolution_policy.resolution_epoch, - plan_receipt: plan_receipt(&value, &cover), - appraisals: vec![CellAppraisal { - schema: "ghostlight.cell_appraisal.v1".into(), - cell_id: cell.id.clone(), + let make_wave = |proposal: CellActionProposal| { + let decision_owner = proposal.subject_id.clone(); + ResolutionWaveCommit { + schema: "ghostlight.resolution_wave_commit.v1".into(), world_revision: value.revision, resolution_epoch: value.resolution_policy.resolution_epoch, - considered_subject_ids: cell.subject_ids.clone(), - actions: vec![proposal], - inactions: vec![], - }], - cover: cover.clone(), - activity_outcomes: vec![], - model_receipt_hashes: vec![], + plan_receipt: plan_receipt(&value, &cover), + appraisals: vec![CellAppraisal { + schema: "ghostlight.cell_appraisal.v1".into(), + cell_id: cell.id.clone(), + world_revision: value.revision, + resolution_epoch: value.resolution_policy.resolution_epoch, + considered_subject_ids: BTreeSet::from([decision_owner]), + actions: vec![proposal], + inactions: vec![], + }], + cover: cover.clone(), + activity_outcomes: vec![], + model_receipt_hashes: vec![], + } }; let collective = CellActionProposal { subject_id: cell.id.clone(), @@ -4113,12 +4162,24 @@ pub(crate) mod tests { }], }; let mut mixed = make_wave(valid_action.clone()); + mixed.appraisals[0] + .considered_subject_ids + .insert("faction-0001".into()); mixed.appraisals[0].inactions = vec![CellInaction { subject_id: "faction-0001".into(), reason: "The rival deliberately holds its separate position.".into(), }]; validate_and_resolve_wave(&value, &mixed).unwrap(); + let mut omitted = mixed.clone(); + omitted.appraisals[0].inactions.clear(); + assert!( + validate_and_resolve_wave(&value, &omitted) + .unwrap_err() + .to_string() + .contains("every considered cell subject") + ); + let mut contradictory = make_wave(valid_action); contradictory.appraisals[0].inactions = vec![CellInaction { subject_id: "faction-0000".into(), @@ -4232,23 +4293,26 @@ pub(crate) mod tests { destination_gestalt_id: "dockers".into(), }], }; - let make_wave = |proposal: CellActionProposal| ResolutionWaveCommit { - schema: "ghostlight.resolution_wave_commit.v1".into(), - world_revision: value.revision, - resolution_epoch: value.resolution_policy.resolution_epoch, - plan_receipt: plan_receipt(&value, &cover), - appraisals: vec![CellAppraisal { - schema: "ghostlight.cell_appraisal.v1".into(), - cell_id: cover.cells[0].id.clone(), + let make_wave = |proposal: CellActionProposal| { + let decision_owner = proposal.subject_id.clone(); + ResolutionWaveCommit { + schema: "ghostlight.resolution_wave_commit.v1".into(), world_revision: value.revision, resolution_epoch: value.resolution_policy.resolution_epoch, - considered_subject_ids: cover.cells[0].subject_ids.clone(), - actions: vec![proposal], - inactions: vec![], - }], - cover: cover.clone(), - activity_outcomes: vec![], - model_receipt_hashes: vec![], + plan_receipt: plan_receipt(&value, &cover), + appraisals: vec![CellAppraisal { + schema: "ghostlight.cell_appraisal.v1".into(), + cell_id: cover.cells[0].id.clone(), + world_revision: value.revision, + resolution_epoch: value.resolution_policy.resolution_epoch, + considered_subject_ids: BTreeSet::from([decision_owner]), + actions: vec![proposal], + inactions: vec![], + }], + cover: cover.clone(), + activity_outcomes: vec![], + model_receipt_hashes: vec![], + } }; let plan = validate_and_resolve_wave(&value, &make_wave(proposal.clone())).unwrap(); assert_eq!(plan.member_migrations.len(), 1); @@ -4293,7 +4357,7 @@ pub(crate) mod tests { cell_id: cover.cells[0].id.clone(), world_revision: value.revision, resolution_epoch: value.resolution_policy.resolution_epoch, - considered_subject_ids: cover.cells[0].subject_ids.clone(), + considered_subject_ids: BTreeSet::from(["member:mira".into()]), actions: vec![member_activity.clone(), proposal.clone()], inactions: vec![], }], @@ -4301,11 +4365,7 @@ pub(crate) mod tests { activity_outcomes: vec![], model_receipt_hashes: vec![], }; - let same_member_plan = select_resolution_wave(&value, &same_member_wave) - .unwrap() - .plan; - assert_eq!(same_member_plan.member_activities.len(), 1); - assert!(same_member_plan.member_migrations.is_empty()); + assert!(select_resolution_wave(&value, &same_member_wave).is_err()); let mut announced = proposal.clone(); announced.public_channels = vec!["camp-bulletin".into()]; @@ -4369,7 +4429,7 @@ pub(crate) mod tests { cell_id: cover.cells[0].id.clone(), world_revision: value.revision, resolution_epoch: value.resolution_policy.resolution_epoch, - considered_subject_ids: cover.cells[0].subject_ids.clone(), + considered_subject_ids: BTreeSet::from(["refugees".into()]), actions: vec![exact_rival_activity.clone(), lower_priority_pressure], inactions: vec![], }], @@ -4377,11 +4437,7 @@ pub(crate) mod tests { activity_outcomes: vec![], model_receipt_hashes: vec![], }; - let same_subject_plan = select_resolution_wave(&value, &same_subject_wave) - .unwrap() - .plan; - assert_eq!(same_subject_plan.gestalt_activities.len(), 1); - assert!(same_subject_plan.gestalt_actions.is_empty()); + assert!(select_resolution_wave(&value, &same_subject_wave).is_err()); let mut borrowed_rival_channel = exact_rival_activity.clone(); borrowed_rival_channel.public_channels = vec!["private dock code".into()]; diff --git a/crates/ghostlight-dungeon/src/scheduler.rs b/crates/ghostlight-dungeon/src/scheduler.rs index 1139871..6c40f08 100644 --- a/crates/ghostlight-dungeon/src/scheduler.rs +++ b/crates/ghostlight-dungeon/src/scheduler.rs @@ -700,7 +700,7 @@ fn member_exceptions(campaign: &Campaign, cell: &SimulationCell) -> Result Result Result