diff --git a/crates/ghostlight-dungeon/src/domain.rs b/crates/ghostlight-dungeon/src/domain.rs index 5983589..56abfe3 100644 --- a/crates/ghostlight-dungeon/src/domain.rs +++ b/crates/ghostlight-dungeon/src/domain.rs @@ -483,7 +483,10 @@ pub enum StrategicActivityKind { impl StrategicActivityKind { pub fn allows_targetless_local_attempt(&self) -> bool { - matches!(self, Self::Prepare | Self::Investigate | Self::Communicate) + matches!( + self, + Self::Prepare | Self::Investigate | Self::Obstruct | Self::Communicate + ) } } diff --git a/crates/ghostlight-dungeon/src/kernel.rs b/crates/ghostlight-dungeon/src/kernel.rs index 9011f96..392e11f 100644 --- a/crates/ghostlight-dungeon/src/kernel.rs +++ b/crates/ghostlight-dungeon/src/kernel.rs @@ -2552,6 +2552,9 @@ fn strategic_activity_summary( (StrategicActivityKind::Obstruct, false) => { format!("{source_name} attempts to obstruct {targets}.") } + (StrategicActivityKind::Obstruct, true) => { + format!("{source_name} attempts local interference.") + } (StrategicActivityKind::Trade, false) => { format!("{source_name} offers a trade to {targets}.") } @@ -4225,6 +4228,35 @@ mod tests { assert_eq!(events[0].gestalt_ids, vec!["refugees-east"]); } + #[test] + fn local_obstruction_records_the_source_without_inventing_a_target() { + let mut value = hierarchical_refugee_campaign(); + let before = value.clone(); + let events = apply_strategic_tick_plan( + &mut value, + resolve_test_activities(StrategicTickPlan { + gestalt_activities: vec![StrategicGestaltActivity { + action_digest: test_action_digest("local infrastructure obstruction"), + gestalt_id: "refugees-east".into(), + activity: StrategicActivityKind::Obstruct, + target_subject_ids: vec![], + location_ids: vec!["camp".into()], + public_channels: vec![], + }], + ..Default::default() + }), + ) + .unwrap(); + assert_eq!(value, before); + assert_eq!( + events[0].summary, + "Eastern transit refugees attempts local interference." + ); + assert!(events[0].actor_ids.is_empty()); + assert!(events[0].institution_ids.is_empty()); + assert_eq!(events[0].gestalt_ids, vec!["refugees-east"]); + } + #[test] fn dormant_member_can_speak_locally_without_inventing_a_listener() { let mut value = hierarchical_refugee_campaign(); diff --git a/crates/ghostlight-dungeon/src/persona.rs b/crates/ghostlight-dungeon/src/persona.rs index 73fde22..da3dc79 100644 --- a/crates/ghostlight-dungeon/src/persona.rs +++ b/crates/ghostlight-dungeon/src/persona.rs @@ -911,6 +911,9 @@ impl CellProjectionEngine { ), slice.max_actions ); + let permission_guidance = format!( + "{permission_guidance} A targetless local obstruct at the exact supplied location records attempted interference with unnamed infrastructure, terrain, traffic, or another local feature. It records only the source's attempt—never damage, disruption, or a target response. Never substitute a merely permitted canonical subject for that unnamed local feature." + ); let permission_guidance = format!( "{permission_guidance} Campaign policy is a hard output boundary, not actor knowledge. Emit no action, inaction rationale, pressure, migration, posture, or activity that introduces a line topic, depicts a veil topic on-screen, or introduces an ask_first topic. Never reveal boundary attribution. CAMPAIGN POLICY: {campaign_policy}" ); @@ -957,7 +960,7 @@ impl CellProjectionEngine { ) .await?; let verifier_context = serde_json::json!({ - "local_attempt_contract":"A targetless local communicate at the source's exact current location faithfully records speech, an offer, a permission request, or a notice directed to an unnamed ordinary role. It records no listener, reply, acceptance, or outcome and must not be rejected merely because target_subject_ids is empty.", + "local_attempt_contract":"A targetless local communicate at the source's exact current location faithfully records speech, an offer, a permission request, or a notice directed to an unnamed ordinary role. A targetless local obstruct there faithfully records attempted interference with unnamed infrastructure, terrain, traffic, or another local feature. Both record only the source's attempt—never a listener, reply, damage, disruption, acceptance, or outcome—and must not be rejected merely because target_subject_ids is empty.", "spatial_effect_contract":"A prepare, investigate, or other activity may include incidental walking, approaching, queuing, carrying, or repositioning around an unnamed local feature while the source remains inside the effect's supplied canonical location. The activity records the attempt and need not serialize every footstep. Reject omitted movement only when the Persona clearly commits the subject to a different supplied canonical location or population destination; local texture does not create topology or establish arrival.", "exact_typed_permissions":serde_json::from_str::(&interpreter_context)?, "lived_stream":lived.text, @@ -1976,7 +1979,7 @@ fn exact_activity_scope_schema( }, "allOf":[{ "if":{ - "properties":{"activity":{"enum":["coordinate","recruit","obstruct","trade"]}}, + "properties":{"activity":{"enum":["coordinate","recruit","trade"]}}, "required":["activity"] }, "then":{"properties":{"target_subject_ids":{"minItems":1}}} @@ -2506,6 +2509,12 @@ mod tests { "target_subject_ids":[], "location_ids":["forum"] })))); + assert!(validator.is_valid(&action(serde_json::json!({ + "type":"actor_activity", + "activity":"obstruct", + "target_subject_ids":[], + "location_ids":["forum"] + })))); assert!(validator.is_valid(&action(serde_json::json!({ "type":"actor_activity", "activity":"coordinate", @@ -2750,13 +2759,7 @@ mod tests { target_subject_ids: vec![], location_ids: vec!["forum".into()], }; - let error = validate_constituent_effect(subject, &targetless_obstruction).unwrap_err(); - assert!( - error - .to_string() - .contains("no anonymous or unsupplied target") - ); - assert!(error.to_string().contains("Remove the action")); + validate_constituent_effect(subject, &targetless_obstruction).unwrap(); let internal_preparation = StrategicCellEffect::GestaltActivity { gestalt_id: "refugees".into(),