diff --git a/crates/ghostlight-dungeon/src/bin/ghostlight-strategic-smoke.rs b/crates/ghostlight-dungeon/src/bin/ghostlight-strategic-smoke.rs index c10fc5d..5149e40 100644 --- a/crates/ghostlight-dungeon/src/bin/ghostlight-strategic-smoke.rs +++ b/crates/ghostlight-dungeon/src/bin/ghostlight-strategic-smoke.rs @@ -518,7 +518,7 @@ struct ComplexityRoundCheckpoint { schedule: ghostlight_dungeon::elaboration::ElaborationScheduleReceipt, mutation_checkpoints: Vec, session_checkpoints: std::collections::BTreeMap< - ghostlight_dungeon::elaboration::ElaboratorTitle, + String, ghostlight_dungeon::elaboration::ElaboratorSessionCheckpoint, >, } @@ -1026,8 +1026,8 @@ async fn main() -> anyhow::Result<()> { ElaboratorTitle, ModelWorldComplexityWorker, ModelWorldElaborationWorker, WorldComplexityProposal, WorldScaleIntent, admit_world_elaboration_wave, canonical_actionable_subject_count, compact_elaborator_session, - derive_world_elaboration_demand, dispatch_elaboration_wave, finalize_world_elaboration, - rebase_world_complexity_proposal, resume_elaboration_wave, + derive_world_elaboration_demand, dispatch_elaboration_wave, elaborator_session_id, + finalize_world_elaboration, rebase_world_complexity_proposal, resume_elaboration_wave, world_complexity_parent_binding, world_elaboration_wave_binding, }, kernel::{CommandResult, WorldKernel}, @@ -2129,9 +2129,7 @@ async fn main() -> anyhow::Result<()> { let complexity_profile = strategic_world_elaboration_profile(); let eligible_titles = ElaboratorTitle::ALL.into_iter().collect::>(); let mut complexity_scheduler = ElaborationScheduler::new(&complexity_profile)?; - let mut session_checkpoints = - BTreeMap::::new(); - let session_location_id = initial_location_ids[0].clone(); + let mut session_checkpoints = BTreeMap::::new(); let mut completed_complexity_rounds = 0_u32; if resume { for round in 1..=maximum_complexity_rounds as u32 { @@ -2151,8 +2149,14 @@ async fn main() -> anyhow::Result<()> { &complexity_profile, checkpoint.schedule.final_state.clone(), )?; - for (title, session) in &checkpoint.session_checkpoints { - session.validate_for(&campaign, &session_location_id, *title)?; + for (session_id, session) in &checkpoint.session_checkpoints { + if session.session_id != *session_id + || elaborator_session_id(session.title, &session.target_location_id) + != *session_id + { + anyhow::bail!("complexity session checkpoint is misrouted") + } + session.validate_for(&campaign, &session.target_location_id, session.title)?; } session_checkpoints = checkpoint.session_checkpoints.clone(); completed_complexity_rounds = round; @@ -2228,11 +2232,27 @@ async fn main() -> anyhow::Result<()> { .total_dispatches .saturating_add(1) }; + let parent_jurisdiction_ids = parents + .iter() + .map(|parent_id| { + let profile = campaign.agency_profiles.get(parent_id).ok_or_else(|| { + anyhow::anyhow!("complexity parent has no agency profile") + })?; + let jurisdiction_id = complexity_realm_for_profile(profile, &demand) + .ok_or_else(|| { + anyhow::anyhow!( + "complexity parent has no demanded realm jurisdiction" + ) + })?; + Ok((parent_id.clone(), jurisdiction_id)) + }) + .collect::>>()?; let worker = Arc::new(ModelWorldComplexityWorker::new( model.clone(), Arc::new(campaign.clone()), first_dispatch_ordinal, parents.clone(), + parent_jurisdiction_ids, session_checkpoints.clone(), )?); let result = if let Some(path) = latest_failure.as_ref() { @@ -2373,8 +2393,22 @@ async fn main() -> anyhow::Result<()> { checkpoint }; let mut mutation_paths = Vec::new(); - let mut journals = - BTreeMap::>::new(); + let mut session_routes = BTreeMap::::new(); + let mut invocation_sessions = BTreeMap::::new(); + for invocation in &preview.invocations { + let profile = campaign + .agency_profiles + .get(invocation.proposal.parent_gestalt_id()) + .ok_or_else(|| anyhow::anyhow!("complexity parent has no agency profile"))?; + let location_id = + complexity_realm_for_profile(profile, &demand).ok_or_else(|| { + anyhow::anyhow!("complexity parent has no demanded realm jurisdiction") + })?; + let session_id = elaborator_session_id(invocation.dispatch.title, &location_id); + invocation_sessions.insert(invocation.dispatch.ordinal, session_id.clone()); + session_routes.insert(session_id, (invocation.dispatch.title, location_id)); + } + let mut journals = BTreeMap::>::new(); for invocation in &preview.invocations { let commit_path = root.join(format!( "complexity-round-{round:03}-commit-{:04}.json", @@ -2459,7 +2493,10 @@ async fn main() -> anyhow::Result<()> { { anyhow::bail!("complexity mutation checkpoint is inconsistent") } - journals.entry(checkpoint.dispatch.title).or_default().push( + let session_id = invocation_sessions + .get(&checkpoint.dispatch.ordinal) + .ok_or_else(|| anyhow::anyhow!("complexity invocation has no session route"))?; + journals.entry(session_id.clone()).or_default().push( ElaboratorSessionJournalEntry { world_revision: checkpoint.commit_receipt.revision, commit_receipt_id: format!( @@ -2479,10 +2516,20 @@ async fn main() -> anyhow::Result<()> { ); mutation_paths.push(commit_path); } - for (title, journal) in journals { + for (session_id, journal) in journals { + let (title, location_id) = session_routes + .get(&session_id) + .ok_or_else(|| anyhow::anyhow!("complexity journal has no session route"))?; + let session_digest = strategic_smoke_digest(&session_id)?; + let session_suffix = session_digest + .strip_prefix("sha256:") + .unwrap_or(&session_digest) + .chars() + .take(12) + .collect::(); let path = root.join(format!( - "complexity-round-{round:03}-session-{}.json", - title.display_name().to_ascii_lowercase() + "complexity-round-{round:03}-session-{}-{session_suffix}.json", + title.display_name().to_ascii_lowercase(), )); let checkpoint = if path.is_file() { read_checkpoint::(&path)? @@ -2490,14 +2537,10 @@ async fn main() -> anyhow::Result<()> { let (checkpoint, receipts) = compact_elaborator_session( model.as_ref(), &campaign, - &session_location_id, - title, - &format!( - "{}:{}", - title.display_name().to_ascii_lowercase(), - session_location_id - ), - session_checkpoints.get(&title), + location_id, + *title, + &session_id, + session_checkpoints.get(&session_id), &journal, Vec::new(), ) @@ -2506,8 +2549,8 @@ async fn main() -> anyhow::Result<()> { publish_immutable_checkpoint(&path, &checkpoint)?; checkpoint }; - checkpoint.validate_for(&campaign, &session_location_id, title)?; - session_checkpoints.insert(title, checkpoint); + checkpoint.validate_for(&campaign, location_id, *title)?; + session_checkpoints.insert(session_id, checkpoint); } let actionable_after = canonical_actionable_subject_count(&campaign); if actionable_after <= actionable_before { @@ -3309,13 +3352,6 @@ fn complexity_parent_candidates( demand: &ghostlight_dungeon::elaboration::WorldElaborationDemand, limit: usize, ) -> Vec { - let realm_for = |profile: &ghostlight_dungeon::domain::AgencyProfile| { - profile - .location_ids - .iter() - .find(|location_id| demand.realm_subject_targets.contains_key(*location_id)) - .cloned() - }; let mut current_by_realm = demand .realm_subject_targets .keys() @@ -3327,7 +3363,7 @@ fn complexity_parent_candidates( .values() .filter(|profile| profile.active_leaf && profile.simulation_eligible) { - if let Some(realm) = realm_for(profile) { + if let Some(realm) = complexity_realm_for_profile(profile, demand) { *current_by_realm.entry(realm).or_default() += 1; } } @@ -3352,7 +3388,7 @@ fn complexity_parent_candidates( .any(|member| member.gestalt_id == *id && member.materialized_actor_id.is_some())) .then_some((id, profile)) }) { - if let Some(realm) = realm_for(profile) + if let Some(realm) = complexity_realm_for_profile(profile, demand) && realm_pressure.get(&realm).copied().unwrap_or(0) > 0 { by_realm @@ -3395,6 +3431,17 @@ fn complexity_parent_candidates( selected } +fn complexity_realm_for_profile( + profile: &ghostlight_dungeon::domain::AgencyProfile, + demand: &ghostlight_dungeon::elaboration::WorldElaborationDemand, +) -> Option { + profile + .location_ids + .iter() + .find(|location_id| demand.realm_subject_targets.contains_key(*location_id)) + .cloned() +} + fn admitted_public_channel(value: &str) -> anyhow::Result { let channel = value.trim(); if !ghostlight_dungeon::resolution::information_channel_is_concrete(channel) { diff --git a/crates/ghostlight-dungeon/src/elaboration.rs b/crates/ghostlight-dungeon/src/elaboration.rs index 35a8337..7fdb959 100644 --- a/crates/ghostlight-dungeon/src/elaboration.rs +++ b/crates/ghostlight-dungeon/src/elaboration.rs @@ -323,6 +323,17 @@ pub struct ElaboratorSessionJournalEntry { pub summary: String, } +/// Stable logical-session routing key. A title keeps a distinct bounded mind +/// in each world jurisdiction instead of carrying one global transcript across +/// unrelated realms. +pub fn elaborator_session_id(title: ElaboratorTitle, jurisdiction_id: &str) -> String { + format!( + "{}:{}", + title.display_name().to_ascii_lowercase(), + jurisdiction_id + ) +} + impl ElaboratorSessionCheckpoint { #[allow(clippy::too_many_arguments)] pub fn bind_compaction( @@ -1231,7 +1242,8 @@ pub struct ModelWorldComplexityWorker { wave: ElaborationWaveBinding, first_dispatch_ordinal: u64, parent_gestalt_ids: Vec, - session_checkpoints: BTreeMap, + parent_jurisdiction_ids: BTreeMap, + session_checkpoints: BTreeMap, } impl ModelWorldComplexityWorker { @@ -1240,7 +1252,8 @@ impl ModelWorldComplexityWorker { campaign: Arc, first_dispatch_ordinal: u64, parent_gestalt_ids: Vec, - session_checkpoints: BTreeMap, + parent_jurisdiction_ids: BTreeMap, + session_checkpoints: BTreeMap, ) -> Result { if parent_gestalt_ids.is_empty() || parent_gestalt_ids.iter().collect::>().len() != parent_gestalt_ids.len() @@ -1265,17 +1278,37 @@ impl ModelWorldComplexityWorker { "complexity round parent is not an unresolved active Gestalt" )); } - } - for (title, checkpoint) in &session_checkpoints { - if checkpoint.campaign_id != campaign.id - || checkpoint.through_world_revision > campaign.revision - || checkpoint.title != *title + let Some(jurisdiction_id) = parent_jurisdiction_ids.get(parent_id) else { + return Err(anyhow!( + "complexity round parent has no session jurisdiction" + )); + }; + if !campaign.locations.contains_key(jurisdiction_id) + || !campaign.agency_profiles[parent_id] + .location_ids + .contains(jurisdiction_id) { return Err(anyhow!( - "complexity worker received a stale or cross-title session checkpoint" + "complexity round session jurisdiction is not an exact parent location" )); } } + if parent_jurisdiction_ids.len() != parent_gestalt_ids.len() { + return Err(anyhow!( + "complexity round session jurisdictions do not match assigned parents" + )); + } + for (session_id, checkpoint) in &session_checkpoints { + if checkpoint.session_id != *session_id + || elaborator_session_id(checkpoint.title, &checkpoint.target_location_id) + != *session_id + { + return Err(anyhow!( + "complexity worker received a stale or misrouted session checkpoint" + )); + } + checkpoint.validate_for(&campaign, &checkpoint.target_location_id, checkpoint.title)?; + } let wave = ElaborationWaveBinding { schema: "ghostlight.elaboration_wave_binding.v1".into(), snapshot_binding: crate::legacy_transition::digest_serializable(&( @@ -1292,6 +1325,7 @@ impl ModelWorldComplexityWorker { wave, first_dispatch_ordinal, parent_gestalt_ids, + parent_jurisdiction_ids, session_checkpoints, }) } @@ -1357,7 +1391,29 @@ pub enum WorldComplexityProposal { #[serde(deny_unknown_fields)] struct WorldComplexityAction { schema: String, - proposal: WorldComplexityProposal, + mutation: WorldComplexityMutationDraft, +} + +#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)] +#[serde(tag = "operation", rename_all = "snake_case", deny_unknown_fields)] +enum WorldComplexityMutationDraft { + Fission { + children: Vec, + residual_child_id: String, + member_child_assignments: BTreeMap, + resource_child_assignments: BTreeMap, + }, + Individuate { + member: crate::domain::GestaltMemberDelta, + }, +} + +#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)] +#[serde(deny_unknown_fields)] +struct WorldComplexityChildDraft { + id: String, + name: String, + partition_value: String, } impl WorldComplexityProposal { @@ -1438,6 +1494,109 @@ struct WorldComplexityTool<'a> { workbench: serde_json::Value, } +impl WorldComplexityTool<'_> { + fn materialize_proposal( + &self, + mutation: WorldComplexityMutationDraft, + ) -> Result { + let parent = &self.campaign.gestalts[self.parent_gestalt_id]; + match mutation { + WorldComplexityMutationDraft::Fission { + children, + residual_child_id, + member_child_assignments, + resource_child_assignments, + } => { + if self.operation != WorldComplexityOperation::Fission { + return Err(anyhow!("complexity action changed its assigned operation")); + } + let child_ids = children + .iter() + .map(|child| child.id.clone()) + .collect::>(); + let partition_values = children + .iter() + .map(|child| child.partition_value.trim().to_ascii_lowercase()) + .collect::>(); + let expected_members = self + .campaign + .gestalt_members + .values() + .filter(|member| member.gestalt_id == self.parent_gestalt_id) + .map(|member| member.id.clone()) + .collect::>(); + let assigned_members = member_child_assignments + .keys() + .cloned() + .collect::>(); + if child_ids.len() != children.len() + || partition_values.len() != children.len() + || assigned_members != expected_members + { + return Err(anyhow!( + "fission draft must use unique children and partitions and assign every exact member" + )); + } + let child_states = children + .iter() + .map(|child| { + let mut state = parent.clone(); + state.id = child.id.clone(); + state.name = child.name.clone(); + state.version = 0; + state.resources = resource_child_assignments + .iter() + .filter(|(_, child_id)| *child_id == &child.id) + .map(|(resource, _)| resource.clone()) + .collect(); + state + }) + .collect::>(); + let preview = crate::domain::GestaltFissionPreview { + schema: "ghostlight.gestalt_fission_preview.v1".into(), + campaign_id: self.campaign.id, + expected_world_revision: self.campaign.revision, + parent_gestalt_id: self.parent_gestalt_id.into(), + partition_axis: self.partition_axis.clone(), + child_partition_values: children + .into_iter() + .map(|child| (child.id, child.partition_value)) + .collect(), + children: child_states, + residual_child_id, + member_child_assignments, + resource_child_assignments, + evidence_receipt_ids: Vec::new(), + gaps: Vec::new(), + canon_candidates: Vec::new(), + requires_approval: true, + }; + crate::resolution::validate_fission(self.campaign, &preview)?; + Ok(WorldComplexityProposal::Fission { preview }) + } + WorldComplexityMutationDraft::Individuate { member } => { + if self.operation != WorldComplexityOperation::Individuate { + return Err(anyhow!("complexity action changed its assigned operation")); + } + let location_id = self.campaign.agency_profiles[self.parent_gestalt_id] + .location_ids + .iter() + .next() + .ok_or_else(|| anyhow!("complexity parent has no exact location"))? + .clone(); + let individuation = crate::domain::GestaltIndividuation { + gestalt_id: self.parent_gestalt_id.into(), + expected_gestalt_version: parent.version, + member, + location_id, + }; + crate::resolution::validate_gestalt_individuation(self.campaign, &individuation)?; + Ok(WorldComplexityProposal::Individuate { individuation }) + } + } + } +} + #[async_trait] impl crate::agent::ModelAgentTool for WorldComplexityTool<'_> { type Action = WorldComplexityAction; @@ -1449,9 +1608,9 @@ impl crate::agent::ModelAgentTool for WorldComplexityTool<'_> { .map_err(|error| error.to_string())?; schema["properties"]["schema"] = exact_schema("ghostlight.world_complexity_action.v1"); let variants = schema - .pointer_mut("/$defs/WorldComplexityProposal/oneOf") + .pointer_mut("/$defs/WorldComplexityMutationDraft/oneOf") .and_then(serde_json::Value::as_array_mut) - .ok_or_else(|| "complexity action schema has no proposal variants".to_owned())?; + .ok_or_else(|| "complexity action schema has no mutation variants".to_owned())?; let expected_operation = match self.operation { WorldComplexityOperation::Fission => "fission", WorldComplexityOperation::Individuate => "individuate", @@ -1467,79 +1626,39 @@ impl crate::agent::ModelAgentTool for WorldComplexityTool<'_> { .ok_or_else(|| { format!("complexity action schema has no {expected_operation} variant") })?; - let selected = variants.remove(selected); + let mut selected = variants.remove(selected); + if self.operation == WorldComplexityOperation::Fission { + let children = selected + .pointer_mut("/properties/children") + .and_then(serde_json::Value::as_object_mut) + .ok_or_else(|| "complexity fission schema has no children".to_owned())?; + children.insert("minItems".into(), serde_json::json!(2)); + children.insert("maxItems".into(), serde_json::json!(8)); + } *variants = vec![selected]; - match self.operation { - WorldComplexityOperation::Fission => { - let preview = schema - .pointer_mut("/$defs/GestaltFissionPreview/properties") - .and_then(serde_json::Value::as_object_mut) - .ok_or_else(|| "complexity schema has no fission preview".to_owned())?; - preview.insert( - "schema".into(), - exact_schema("ghostlight.gestalt_fission_preview.v1"), - ); - preview.insert("campaign_id".into(), exact_schema(self.campaign.id)); - preview.insert( - "expected_world_revision".into(), - exact_schema(self.campaign.revision), - ); - preview.insert( - "parent_gestalt_id".into(), - exact_schema(self.parent_gestalt_id), - ); - preview.insert("partition_axis".into(), exact_schema(&self.partition_axis)); - preview.insert( - "evidence_receipt_ids".into(), - exact_schema(Vec::::new()), - ); - preview.insert("gaps".into(), exact_schema(Vec::::new())); - preview.insert( - "canon_candidates".into(), - exact_schema(Vec::::new()), - ); - preview.insert("requires_approval".into(), exact_schema(true)); - let children = preview - .get_mut("children") - .and_then(serde_json::Value::as_object_mut) - .ok_or_else(|| "complexity fission schema has no children".to_owned())?; - children.insert("minItems".into(), serde_json::json!(2)); - children.insert("maxItems".into(), serde_json::json!(8)); - } - WorldComplexityOperation::Individuate => { - let individuation = schema - .pointer_mut("/$defs/GestaltIndividuation/properties") - .and_then(serde_json::Value::as_object_mut) - .ok_or_else(|| "complexity schema has no individuation".to_owned())?; - individuation.insert("gestalt_id".into(), exact_schema(self.parent_gestalt_id)); - individuation.insert( - "expected_gestalt_version".into(), - exact_schema(self.campaign.gestalts[self.parent_gestalt_id].version), - ); - let location_id = self.campaign.agency_profiles[self.parent_gestalt_id] - .location_ids - .iter() - .next() - .ok_or_else(|| "complexity parent has no location".to_owned())?; - individuation.insert("location_id".into(), exact_schema(location_id)); - let member = schema - .pointer_mut("/$defs/GestaltMemberDelta/properties") - .and_then(serde_json::Value::as_object_mut) - .ok_or_else(|| "complexity schema has no member delta".to_owned())?; - member.insert( - "schema".into(), - exact_schema("ghostlight.gestalt_member_delta.v1"), - ); - member.insert("gestalt_id".into(), exact_schema(self.parent_gestalt_id)); - member.insert("version".into(), exact_schema(0_u64)); - member.insert("last_location_id".into(), exact_schema(location_id)); - member.insert( - "materialized_actor_id".into(), - exact_schema(Option::::None), - ); - member.insert("last_relevant_revision".into(), exact_schema(0_u64)); - member.insert("relevance_lease_until_revision".into(), exact_schema(0_u64)); - } + if self.operation == WorldComplexityOperation::Individuate { + let location_id = self.campaign.agency_profiles[self.parent_gestalt_id] + .location_ids + .iter() + .next() + .ok_or_else(|| "complexity parent has no location".to_owned())?; + let member = schema + .pointer_mut("/$defs/GestaltMemberDelta/properties") + .and_then(serde_json::Value::as_object_mut) + .ok_or_else(|| "complexity schema has no member delta".to_owned())?; + member.insert( + "schema".into(), + exact_schema("ghostlight.gestalt_member_delta.v1"), + ); + member.insert("gestalt_id".into(), exact_schema(self.parent_gestalt_id)); + member.insert("version".into(), exact_schema(0_u64)); + member.insert("last_location_id".into(), exact_schema(location_id)); + member.insert( + "materialized_actor_id".into(), + exact_schema(Option::::None), + ); + member.insert("last_relevant_revision".into(), exact_schema(0_u64)); + member.insert("relevance_lease_until_revision".into(), exact_schema(0_u64)); } Ok(schema) } @@ -1553,42 +1672,17 @@ impl crate::agent::ModelAgentTool for WorldComplexityTool<'_> { action: Self::Action, _context: &crate::agent::ModelAgentToolContext, ) -> crate::agent::ModelAgentToolOutcome { - if action.schema != "ghostlight.world_complexity_action.v1" - || action.proposal.parent_gestalt_id() != self.parent_gestalt_id - || !matches!( - (&self.operation, &action.proposal), - ( - WorldComplexityOperation::Fission, - WorldComplexityProposal::Fission { .. } - ) | ( - WorldComplexityOperation::Individuate, - WorldComplexityProposal::Individuate { .. } - ) - ) - { + if action.schema != "ghostlight.world_complexity_action.v1" { return crate::agent::ModelAgentToolOutcome::Rejected { finding: WorldComplexityFinding { - diagnostic: "complexity proposal changed its assigned parent or operation" - .into(), + diagnostic: "complexity action schema is unsupported".into(), }, receipts: Vec::new(), }; } - let validation = match &action.proposal { - WorldComplexityProposal::Fission { preview } => { - if preview.partition_axis != self.partition_axis { - Err(anyhow!("fission changed its assigned partition axis")) - } else { - crate::resolution::validate_fission(self.campaign, preview) - } - } - WorldComplexityProposal::Individuate { individuation } => { - crate::resolution::validate_gestalt_individuation(self.campaign, individuation) - } - }; - match validation { - Ok(()) => crate::agent::ModelAgentToolOutcome::Accepted { - output: action.proposal, + match self.materialize_proposal(action.mutation) { + Ok(proposal) => crate::agent::ModelAgentToolOutcome::Accepted { + output: proposal, receipts: Vec::new(), }, Err(error) => crate::agent::ModelAgentToolOutcome::Rejected { @@ -1635,19 +1729,25 @@ impl ElaborationSubAgentPort for ModelWorldComplexityWo diagnostic: "complexity parent has no exact location".into(), model_stage_receipts: Vec::new(), })?; + let jurisdiction_id = self.parent_jurisdiction_ids.get(parent_id).ok_or_else(|| { + ElaborationSubAgentFailure { + diagnostic: "complexity parent lost its session jurisdiction".into(), + model_stage_receipts: Vec::new(), + } + })?; + let session_id = elaborator_session_id(invocation.dispatch.title, jurisdiction_id); let assignment = match operation { WorldComplexityOperation::Fission => serde_json::json!({ "operation":"fission_gestalt", "parent_gestalt_id":parent_id, "partition_axis":axis, "requirements":[ - "Return a ghostlight.world_complexity_action.v1 envelope whose proposal has operation=fission and a ghostlight.gestalt_fission_preview.v1 preview.", - "Bind campaign_id and expected_world_revision exactly to the frozen world.", + "Return a ghostlight.world_complexity_action.v1 envelope whose mutation has operation=fission.", + "Propose only child ids, names, partition values, the residual child id, and exact member/resource assignments; the deterministic tool constructs inherited child state and frozen bindings.", "Create 2 through 8 non-overlapping children with distinct partition values.", "Exactly one residual child must have partition value other/unknown.", - "Children inherit capabilities, knowledge, goals, and pressures exactly.", "Assign every scarce resource and dormant named member exactly once.", - "Use no evidence receipts or canon candidates and require approval." + "Do not repeat inherited capabilities, knowledge, goals, pressures, evidence, or approval fields." ] }), WorldComplexityOperation::Individuate => serde_json::json!({ @@ -1655,8 +1755,8 @@ impl ElaborationSubAgentPort for ModelWorldComplexityWo "parent_gestalt_id":parent_id, "location_id":location_id, "requirements":[ - "Return a ghostlight.world_complexity_action.v1 envelope whose proposal has operation=individuate and one GestaltIndividuation.", - "Use the exact parent id, parent version, and assigned location.", + "Return a ghostlight.world_complexity_action.v1 envelope whose mutation has operation=individuate and one member delta.", + "The deterministic tool owns the exact parent id, parent version, and assigned location.", "Create one consequential named person whose goals, knowledge, relationships, and memories are grounded in the parent state.", "Use a new local member id without the member: prefix; version zero; no materialized actor id.", "Do not create quota names, unsupported relationships, or decorative biography." @@ -1675,6 +1775,7 @@ impl ElaborationSubAgentPort for ModelWorldComplexityWo "world_revision":self.campaign.revision, }, "assignment":assignment, + "session_jurisdiction_id":jurisdiction_id, "parent":parent, "parent_profile":profile, "parent_members":self.campaign.gestalt_members.values() @@ -1682,7 +1783,7 @@ impl ElaborationSubAgentPort for ModelWorldComplexityWo "local_relations":self.campaign.agency_relations.values() .filter(|relation|relation.from_subject_id == parent_id || relation.to_subject_id == parent_id) .collect::>(), - "compacted_session":self.session_checkpoints.get(&invocation.dispatch.title), + "compacted_session":self.session_checkpoints.get(&session_id), }); let mut tool = WorldComplexityTool { campaign: &self.campaign, @@ -3432,50 +3533,69 @@ mod tests { "ghostlight.world_complexity_action.v1" ); assert_eq!( - schema["$defs"]["WorldComplexityProposal"]["oneOf"] + schema["$defs"]["WorldComplexityMutationDraft"]["oneOf"] .as_array() .unwrap() .len(), 1 ); - assert_eq!( - schema["$defs"]["GestaltFissionPreview"]["properties"]["campaign_id"]["const"], - campaign.id.to_string() - ); - assert_eq!( - schema["$defs"]["GestaltFissionPreview"]["properties"]["expected_world_revision"]["const"], - campaign.revision - ); - assert_eq!( - schema["$defs"]["GestaltFissionPreview"]["properties"]["parent_gestalt_id"]["const"], - "river-households" - ); + assert!(schema["$defs"].get("GestaltFissionPreview").is_none()); + let draft = WorldComplexityMutationDraft::Fission { + children: preview + .children + .iter() + .map(|child| WorldComplexityChildDraft { + id: child.id.clone(), + name: child.name.clone(), + partition_value: preview.child_partition_values[&child.id].clone(), + }) + .collect(), + residual_child_id: preview.residual_child_id.clone(), + member_child_assignments: preview.member_child_assignments.clone(), + resource_child_assignments: preview.resource_child_assignments.clone(), + }; let admitted = crate::agent::ModelAgentTool::invoke( &mut tool, WorldComplexityAction { schema: "ghostlight.world_complexity_action.v1".into(), - proposal: WorldComplexityProposal::Fission { - preview: preview.clone(), - }, + mutation: draft, }, &context, ) .await; - assert!(matches!( - admitted, - crate::agent::ModelAgentToolOutcome::Accepted { .. } - )); + let crate::agent::ModelAgentToolOutcome::Accepted { + output: WorldComplexityProposal::Fission { preview: admitted }, + .. + } = admitted + else { + panic!("compact fission draft was not admitted") + }; + assert!(admitted.children.iter().all(|child| { + child.shared_knowledge == campaign.gestalts["river-households"].shared_knowledge + && child.shared_capabilities + == campaign.gestalts["river-households"].shared_capabilities + })); - let mut wrong_axis = preview; - wrong_axis.partition_axis = crate::domain::AgencyAxis::Ideology; + let invalid = WorldComplexityMutationDraft::Fission { + children: preview + .children + .iter() + .map(|child| WorldComplexityChildDraft { + id: child.id.clone(), + name: child.name.clone(), + partition_value: "same partition".into(), + }) + .collect(), + residual_child_id: preview.residual_child_id, + member_child_assignments: preview.member_child_assignments, + resource_child_assignments: preview.resource_child_assignments, + }; let rejected = crate::agent::ModelAgentTool::invoke( &mut tool, WorldComplexityAction { schema: "ghostlight.world_complexity_action.v1".into(), - proposal: WorldComplexityProposal::Fission { - preview: wrong_axis, - }, + mutation: invalid, }, &context, ) @@ -3509,7 +3629,7 @@ mod tests { relationships: BTreeMap::new(), goals: vec!["force a public reckoning over the narrowing banks".into()], memories: vec!["found three seasonal ford marks reset upstream".into()], - last_location_id: None, + last_location_id: Some("room".into()), materialized_actor_id: None, last_relevant_revision: 0, relevance_lease_until_revision: 0, @@ -3528,16 +3648,13 @@ mod tests { }; let schema = crate::agent::ModelAgentTool::action_schema(&tool).unwrap(); assert_eq!( - schema["$defs"]["WorldComplexityProposal"]["oneOf"] + schema["$defs"]["WorldComplexityMutationDraft"]["oneOf"] .as_array() .unwrap() .len(), 1 ); - assert_eq!( - schema["$defs"]["GestaltIndividuation"]["properties"]["gestalt_id"]["const"], - "river-households" - ); + assert!(schema["$defs"].get("GestaltIndividuation").is_none()); assert_eq!( schema["$defs"]["GestaltMemberDelta"]["properties"]["last_location_id"]["const"], "room" @@ -3547,7 +3664,9 @@ mod tests { &mut tool, WorldComplexityAction { schema: "ghostlight.world_complexity_action.v1".into(), - proposal: WorldComplexityProposal::Individuate { individuation }, + mutation: WorldComplexityMutationDraft::Individuate { + member: individuation.member, + }, }, &context, ) @@ -4139,6 +4258,59 @@ mod tests { .unwrap(); } + #[test] + fn elaborator_session_routing_separates_titles_and_realm_jurisdictions() { + assert_ne!( + elaborator_session_id(ElaboratorTitle::Patina, "elven-realms"), + elaborator_session_id(ElaboratorTitle::Patina, "kharad-hearths") + ); + assert_ne!( + elaborator_session_id(ElaboratorTitle::Patina, "elven-realms"), + elaborator_session_id(ElaboratorTitle::Charter, "elven-realms") + ); + assert_eq!( + elaborator_session_id(ElaboratorTitle::Patina, "elven-realms"), + "patina:elven-realms" + ); + } + + #[test] + fn complexity_worker_rejects_a_cross_bound_session_identity() { + let campaign = campaign_with_fission_parent(); + let checkpoint = ElaboratorSessionCheckpoint::bind_compaction( + "patina:room", + ElaboratorTitle::Charter, + 0, + campaign.id, + campaign.revision, + "room", + ElaboratorSessionCompactionDraft { + schema: "ghostlight.elaborator_session_compaction_draft.v1".into(), + frontier_summary: "A valid checkpoint parked under another title's key.".into(), + unresolved_leads: Vec::new(), + }, + vec!["world-commit:1".into()], + Vec::new(), + None, + ) + .unwrap(); + + let result = ModelWorldComplexityWorker::new( + Arc::new(PanicIfInvokedModel), + Arc::new(campaign), + 1, + vec!["river-households".into()], + BTreeMap::from([("river-households".into(), "room".into())]), + BTreeMap::from([("patina:room".into(), checkpoint)]), + ); + + let error = match result { + Ok(_) => panic!("cross-bound elaborator session reached the worker"), + Err(error) => error, + }; + assert!(error.to_string().contains("misrouted session checkpoint")); + } + #[tokio::test] async fn provider_worker_rejects_a_wave_from_a_newer_world_before_model_inference() { let frozen = campaign_with_civic_room(); diff --git a/docs/architecture/ghostlight-multiresolution-agency.md b/docs/architecture/ghostlight-multiresolution-agency.md index 16e7cab..4949854 100644 --- a/docs/architecture/ghostlight-multiresolution-agency.md +++ b/docs/architecture/ghostlight-multiresolution-agency.md @@ -81,7 +81,7 @@ complexity deficit until grounded elaboration promotes them. Resolution may still compress roughly 2,400 such leaves into at most 240 cells. The mutation budget is not a cold-prompt budget. Each titled elaborator owns a -resumable working session containing its current frontier, unresolved leads, +resumable working session per realm jurisdiction containing its current frontier, unresolved leads, recent admitted mutations, exact rejection findings, and title mandate. The canonical world remains long-term memory. Bounded retrieval supplies older relevant state. After each round, every title that committed work receives one @@ -91,6 +91,15 @@ from the checkpoint. This round boundary is the current bounded context policy. Scheduler frequency remains proportional to slider share across sequential turns. +The scale workbench uses mutation drafts rather than asking a model to restate a +complete kernel command. A fission draft owns only new child identities, +partition values, and exact member/resource assignments. The deterministic tool +attaches campaign revision, parent, axis, approval fields, and inherited +capabilities, knowledge, goals, and pressures before running the ordinary +fission validator. An individuation draft owns only the new member delta; the +tool attaches the exact parent version and location. Unchanged world state is +therefore never paid for in model output and cannot drift while being copied. + Round effort is proportional to unresolved pressure rather than presumed model yield: `ceil(active_cell_budget * deficit / target)`, zero when the target is satisfied. With 80 admitted leaves against the 2,400 target, the first round diff --git a/docs/public-architecture/Agents and model stages.md b/docs/public-architecture/Agents and model stages.md index e1dcab9..9e8b0fe 100644 --- a/docs/public-architecture/Agents and model stages.md +++ b/docs/public-architecture/Agents and model stages.md @@ -76,12 +76,18 @@ alone commits it. At latent-world scale, the same titled sessions also receive `world-complexity--fission` or `world-complexity-<title>-individuate` assignments. Each call may subdivide one -active Gestalt or promote one grounded consequential person. Deterministic -fission/individuation validation and the existing kernel commands remain the -only admission owners. After every productive round, -`world-elaborator-<title>-session-compaction` distills that title's frontier and -unresolved leads while the harness reattaches exact commit ancestry. Compacted -memory can guide later proposals but cannot create subjects or facts. +active Gestalt or promote one grounded consequential person. A fission worker +returns only the partition delta—child identities and partition values plus +exact member/resource assignments. The deterministic tool attaches the frozen +world binding and inherited population state, avoiding repeated constitutions +in model output. An individuation worker similarly supplies the member delta +while the tool owns parent version and location. Deterministic validation and +the existing kernel commands remain the only admission owners. After every productive round, +`world-elaborator-<title>-session-compaction` distills that title's frontier in +the assigned realm jurisdiction and its unresolved leads while the harness +reattaches exact commit ancestry. The title-by-realm key prevents unrelated +political frontiers from becoming one global transcript. Compacted memory can +guide later proposals but cannot create subjects or facts. ## Foreground perception, response, and action diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 357a5cc..7b97899 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -1690,16 +1690,23 @@ materializing a `NewsIssue`. bounded round pressure, not a model-call or session count and not an assumption that one mutation yields one subject. Elaborator context now keeps stable identity and mandate in a prefix separate from the bounded - dynamic workbench snapshot. The current uncommitted cut now persists - digest-chained per-title compacted sessions, proposes both meaningful Gestalt - fission and grounded named-person promotion, admits only through existing - WorldKernel commands, remeasures canonical complexity after each round, and - resumes only failed dispatches from the exact frozen schedule. Focused - complexity, session, and resume checks pass. Do not assume a fixed batch - yield or one model call per useful subject. Finish independent architecture - review and the full package/strategic gates, commit and push the exact cut, - then launch a fresh provider-backed product-scale acceptance without - resuming Run 75. Keep Resolution as cover owner. Nemesis receives + dynamic workbench snapshot. Pushed through `7ce721d`, persistent logical + title-by-realm sessions use digest-chained agentic compaction, both meaningful + Gestalt fission and grounded named-person promotion are available, only + failed dispatches resume from the exact frozen schedule, WorldKernel alone + commits, and canonical complexity is remeasured after each round. + + Run 78 reached live provider complexity pressure but admitted no mutation. + Its model actions had to restate inherited full previews, so workers failed + before deterministic admission. The current uncommitted cut makes the model + submit only a compact mutation draft and makes the deterministic tool bind + frozen parent, revision, location, inherited state, approval fields, and the + complete command before the existing validator. Preserve Run 78 as failure + evidence. Review and verify this ownership cut, run the full package and + strategic gates, commit and push, then obtain provider proof from preserved + canonical pre-mutation state without resuming Run 75. Do not assume a fixed + batch yield or one model call per useful subject. Keep Resolution as cover + owner. Nemesis receives that cover and assigns causal decision windows inside it; it does not choose cover membership. Preserve Runs 64 through 75 and both live services. This work does not wait for the Delvehold adapter because the Greathold remains an diff --git a/notes/ghostlight-current-system-map.md b/notes/ghostlight-current-system-map.md index f14ad90..32c4f46 100644 --- a/notes/ghostlight-current-system-map.md +++ b/notes/ghostlight-current-system-map.md @@ -1283,34 +1283,54 @@ outside this authority. bounded termination. `WorldScaleIntent` is consumer-authored; `derive_world_elaboration_demand` deterministically owns the target, deficit, realm shares, and per-round mutation pressure. Each titled elaborator owns - only its compact working frontier. `WorldKernel` remains the sole canonical - mutation owner, and Resolution remains the owner of the later active cover. + only its compact title-by-realm working frontier and mutation draft. The + acceptance driver owns deterministic parent-to-jurisdiction routing; + `WorldComplexityTool` owns construction of the complete frozen proposal from + the draft. `WorldKernel` remains the sole canonical mutation owner, and + Resolution remains the owner of the later active cover. - **Inputs:** the admitted campaign after region and locality elaboration; its active-cell entitlement; a target cover ratio; equal acceptance-driver realm weights; a weighted titled-elaborator profile; bounded parallelism and round limits; active, simulation-eligible Gestalt leaves without a currently - materialized member; the prior per-title session checkpoint; and the exact - frozen parent state, members, profile, and local relations for each assigned + materialized member; the prior title-by-realm session checkpoint; and the + exact frozen parent state, members, profile, and local relations for each assigned mutation. Scheduler title deterministically selects the proposal lane: Hearth and Veil individuate one consequential member; the other six titles - fission the assigned population along their fixed agency axis. + fission the assigned population along their fixed agency axis. The model sees + the assigned parent projection and compacted session, but its action schema + admits only the lane-specific delta. A fission draft contains child IDs, + names, partition values, the residual child, and exact member/resource + assignments. An individuation draft contains only the member delta. + `complexity_realm_for_profile` derives the parent jurisdiction from the same + demanded-realm membership used to measure allocation pressure, and the + worker receives the resulting exact parent-to-jurisdiction map. - **Outputs:** each round publishes an immutable frozen preview with demand, wave and schedule receipts, exact parent bindings, proposals, and model receipt hashes; then one immutable mutation checkpoint per sequentially admitted fission or individuation; one compacted checkpoint for each title that obtained an admitted mutation in that round; and a terminal round checkpoint carrying the scheduler state, mutation paths, the accumulated - per-title session checkpoints, and remeasured - actionable-subject count. The final count and round reports are acceptance - metadata, not canonical world state. + title-by-realm session checkpoints keyed by stable + `<lowercase-title>:<jurisdiction-id>` session ID, and remeasured + actionable-subject count. Per-round session filenames contain the title plus + a stable digest suffix of that session ID; filenames are storage addresses, + while the map key and checkpoint's own `session_id` carry routing identity. + The final count and round reports are acceptance metadata, not canonical + world state. - **Derived state:** actionable complexity is the count of canonical active, simulation-eligible agency leaves. Dormant member rows, census texture, model calls, dispatches, mutation budget, and compacted prose do not satisfy - the target. A session checkpoint's frontier summary, unresolved leads, + the target. Inherited child capabilities, knowledge, goals, pressures, + evidence fields, campaign/revision binding, approval requirement, parent + version, partition axis, and individuation location are deterministic + projections of the frozen assignment, not model-authored state. A session + checkpoint's title, jurisdiction, frontier summary, unresolved leads, rejection findings, digest chain, and recent commit IDs are bounded steering - memory; the campaign and kernel commit receipts remain truth. Resolution - cover membership and Nemesis decision windows are downstream derivations and - do not feed back into complexity admission authority. + memory. Raw provider sessions, request history, and transcripts are neither + continuity nor world state; the checkpoint is the only carried elaborator + context, while the campaign and kernel commit receipts remain truth. + Resolution cover membership and Nemesis decision windows are downstream + derivations and do not feed back into complexity admission authority. - **Forbidden writers:** elaborators, session compaction, the scheduler, demand derivation, preview files, round files, and acceptance metadata cannot write campaign state, declare a target satisfied, allocate the Resolution @@ -1318,13 +1338,25 @@ outside this authority. or commit itself, invent evidence, promote raw roster rows, or rewrite a parent. An individuation cannot invent a population, duplicate an existing actor or member identity, materialize itself, or acquire relationships to - nonexistent subjects. Sequential commits may update only the optimistic - revision of a frozen fission proposal after the exact parent binding remains - unchanged; individuation instead revalidates its exact Gestalt version and - location against current state. + nonexistent subjects. The model cannot restate or alter inherited child + Persona constitutions, campaign identity, parent identity/version, location, + partition axis, evidence, or approval authority because those fields do not + exist in its mutation-draft schema. The model provider cannot select a realm, + merge title sessions, persist a transcript as memory, or redirect a + checkpoint to another title or jurisdiction. Sequential commits may update + only the optimistic revision of a frozen fission proposal after the exact + parent binding remains unchanged; individuation instead revalidates its exact + Gestalt version and location against current state. - **Shared paths:** all round workers use the existing generic elaborator - dispatcher and weighted schedule. Every proposal passes the existing - fission or individuation validator and the existing + dispatcher and weighted schedule. `WorldComplexityTool` first lowers a + compact draft into the existing full proposal algebra. For fission, it clones + the frozen parent Persona into every child, replaces only child identity, + name, version, and assigned resources, builds the child-partition map, + attaches the exact campaign/revision/parent/axis and empty + evidence/gap/canon fields, and fixes `requires_approval=true`. For + individuation, it attaches the frozen parent ID/version and the exact first + parent-profile location to the member delta. Every constructed proposal then + passes the existing fission or individuation validator and the existing `WorldCommand::FissionGestalt` or `WorldCommand::IndividuateGestaltMember` mailbox. `resolution::validate_gestalt_individuation` is the single local authority for member identity, parent version, exact location, bounds, and @@ -1339,16 +1371,23 @@ outside this authority. while any change to the assigned parent, its profile, or its members rejects the later proposal instead of silently reconciling it. Compaction consumes only admitted commit journals plus bounded rejection - findings, then the resulting title-bound checkpoint is supplied as context - to the next round. + findings routed by the invocation's stable title-by-realm session ID. The + resulting checkpoint is stored under that ID and supplied only when a later + dispatch has the same title and deterministically derived jurisdiction. - **Cut line:** this cut reuses Gestalt fission, strategic Gestalt individuation, WorldKernel admission, model receipts, the generic scheduler, and immutable acceptance checkpoints. It adds no second population or member insertion path, campaign store, parallel commit owner, cover allocator, or - transcript-shaped session log. The prior partial-wave - checkpoint remains recovery for one frozen dispatch partition; it is not - elaborator memory. Compact checkpoints replace accumulated working history - without replacing canonical commits. + transcript-shaped session log. `WorldComplexityAction` is a model-boundary + draft, not a new canonical mutation or persistent state authority; the + existing `WorldComplexityProposal` remains the checked checkpoint and kernel + handoff. The prior partial-wave checkpoint remains recovery for one frozen + dispatch partition; it is not + elaborator memory. The title-by-realm checkpoint map replaces both the former + title-only global memory and any temptation to preserve provider transcripts; + it introduces no provider-session store or second jurisdiction allocator. + Compact checkpoints replace accumulated working history without replacing + canonical commits. - **Verification layer:** checkpoint shape and digest bind title, session, campaign, target location, generation, world revision, prior checkpoint, and bounded narrative fields. Frozen parent digests make conflicting parallel @@ -1356,11 +1395,24 @@ outside this authority. partitioning, resource custody, and member transfer; shared individuation validation proves active parent and location, exact version, unique bounded identity, valid relationships, and non-materialized member state. WorldKernel - revalidates either lane before atomic mutation. Each round must strictly + revalidates either lane before atomic mutation. The model schema exposes only + the assigned operation, bounds fission children to two through eight, and + fixes invariant member fields for individuation; tool-level construction + additionally rejects duplicate child IDs/partitions or incomplete exact + member assignment before shared semantic validation. Worker construction + requires exactly one jurisdiction for every assigned parent, rejects extra + routes, and proves that each jurisdiction is a canonical location on that + parent's profile. Resume and worker construction require every checkpoint + map key to equal both the embedded session ID and the session ID recomputed + from its embedded title and target location; checkpoint validation binds + those fields to its digest and current campaign. Runtime lookup + derives the expected ID from the current dispatch title and routed realm. + Routing tests prove that equal titles in different realms and different + titles in one realm produce different IDs. Each round must strictly increase the canonical actionable count; completion requires a freshly - derived zero deficit rather than exhaustion of calls or rounds. Focused tests cover scale - arithmetic, checkpoint tampering and cross-title rejection, exact compaction - ancestry, assigned-parent validation, and safe revision rebasing. + derived zero deficit rather than exhaustion of calls or rounds. Focused tests + cover scale arithmetic, checkpoint tampering and cross-title rejection, exact + compaction ancestry, assigned-parent validation, and safe revision rebasing. - **Failure and resume:** a provider failure publishes an immutable round-failure generation with the exact completed and failed dispatches and receipts, then stops that run. Explicit resume rehydrates the latest failure, @@ -1368,22 +1420,19 @@ outside this authority. dispatches through `resume_elaboration_wave`; repeated failures publish numbered generations without changing the frozen schedule. A published successful round preview may also be reused on explicit resume. Existing - mutation checkpoints suppress replay, per-title compaction checkpoints - suppress recompaction, and consecutive completed round checkpoints restore scheduler - fairness and session memory before the first unfinished round. Missing - eligible parents, stale or malformed checkpoints, changed parent bindings, - zero-growth rounds, and a nonzero deficit at the configured round ceiling are - terminal failures. Canonical CultCache state, not the checkpoint prose, - decides whether already admitted mutations exist after interruption. + mutation checkpoints suppress replay, title-by-realm compaction checkpoints + suppress recompaction, and consecutive completed round checkpoints restore + scheduler fairness and session memory before the first unfinished round. + Missing eligible parents, stale or malformed checkpoints, changed parent + bindings, zero-growth rounds, and a nonzero deficit at the configured round + ceiling are terminal failures. Canonical CultCache state, not the checkpoint + prose, decides whether already admitted mutations exist after interruption. -Two boundaries remain intentionally narrow in this acceptance-driver cut. One -session checkpoint exists per title but is currently anchored to the first -admitted jurisdiction, while assignments may mutate parents elsewhere; it is -not yet a per-realm memory topology. Fission and named-member individuation are -live, but institution promotion is not. Dormant member rows still do not count; -the individuation lane earns its increment by atomically promoting the admitted -member into an Actor and deriving that Actor's active agency profile through the -shared presence-commit path. +One boundary remains intentionally narrow in this acceptance-driver cut. +Fission and named-member individuation are live, but institution promotion is +not. Dormant member rows still do not count; the individuation lane earns its +increment by atomically promoting the admitted member into an Actor and deriving +that Actor's active agency profile through the shared presence-commit path. Architecture claims that complexity has no production caller, no durable elaborator compaction owner, no partial-failure resume, or only a fission proposal lane are stale. diff --git a/state/map.yaml b/state/map.yaml index ec04e05..ed22b58 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -196,7 +196,7 @@ live_architecture: - Institution, faction, and consumer decision models active_subgoals: - - Complete the separate latent-world complexity and active-simulation budget cut before another full-world acceptance. Approximately 2,400 potentially acting entities under a 240-cell attention cover is a causal-complexity target, not a population-roster target. Iterative elaboration must raise admitted complexity by fissioning Gestalts and promoting causally meaningful individuals and institutions, then remeasure the remaining deficit; it may not assume one row or one model call equals one useful subject. Resolution owns cover selection, and Nemesis assigns causal decision windows inside an existing cover without gaining cover or commit authority. Preserve Runs 64 through 75 and treat the Greathold as an externally sovereign boundary observer. + - Complete the separate latent-world complexity and active-simulation budget cut before another full-world acceptance. Approximately 2,400 potentially acting entities under a 240-cell attention cover is a causal-complexity target, not a population-roster target. Iterative elaboration must raise admitted complexity by fissioning Gestalts and promoting causally meaningful individuals and institutions, then remeasure the remaining deficit; it may not assume one row or one model call equals one useful subject. Resolution owns cover selection, and Nemesis assigns causal decision windows inside an existing cover without gaining cover or commit authority. Preserve Runs 64 through 78 and treat the Greathold as an externally sovereign boundary observer. - Connect a Delvehold-owned adapter to the admitted generic consumer contract: shared compiler/consumer WorldSeed admission, externally authoritative institution-or-Gestalt snapshots, attributed proposal acknowledgement, and committed-event newspaper composition over typed CultNet, without consumer-specific IDs or schemas in Ghostlight. - Extend strategic/offscreen named-person individuation beyond the proven emerge-then-act path so people plot across sustained political waves, acquire relationships, fold, and return without granting a cell, arena, or model commit authority. - Finish the semantic mutation migration: delete or demote remaining legacy model effect schemas and move aggregate campaign fields toward projection-only state. Seed publication and named-person presence now have explicit non-effect authority classifications. @@ -329,8 +329,8 @@ current_status: provider_acceptance_checkpoint: Exact pushed commit `139b8a6` completed Run 60 under `character-newsroom.v10` without world or per-wave replay. Its acceptance witness and terminal status bind the completed page and exact resume lineage. The independently dispatched blind reviewer, shown only the reader-facing fantasy newspaper, read it as a real left-populist civic broadsheet and did not immediately identify procedural generation, so the narrative reverse-Turing criterion passes. The review's substantive criticism is that the three stories feel like three rewrites of one briefing; accepted Run 60 remains immutable. The run used 96,902 prompt tokens and reported zero cache hits. Its delivered typeset artifact is `output/pdf/canopy-ledger-run-60-front-page.pdf`; frozen-source and visual verification remain accepted. Exact pushed `bc2ca39` then produced frozen-fact newsroom-only Run 61 Issues 13, 15, 16, 17, and 18 without world or wave model replay. Provider output proves `special_issue` convergence in Issues 13 and 15, independent `general_issue` beats in Issues 16 through 18, and assignment-selector cache hits. Blind review of Issues 13, 15, 16, and 17 passes both distinct recurring voices and issue-shape diversity, recognizing Ossan, Mera, Corin, and Lysa's biases plus modest cross-issue evolution. Run 62 exercised v12 without world or wave replay and failed only because two lead articles proposed invalid datelines; recurring reporter calls still recorded zero cache hits. Run 63 used exact pushed v13 `a52d57b`; Issues 17 and 18 completed before root stopped the final weekly recomposition, both repeated bylines again recorded zero cache hits, and live services remained unchanged. Preserve Runs 61 through 63 as stopped or completed immutable evidence. Copy defects remain later deadline-correction work rather than a reason to reopen accepted issue artifacts. implementation_checkpoint: Exact pushed v13 `a52d57b` keeps one stable reporter action schema, places a common stable house charter before recurring identity and dynamic assignment, and projects deterministic `allowed_datelines` from cited records while retaining copy-desk factual authority and deterministic cited-place admission; 480 library tests and the all-target check pass. Run 63 falsifies reporter-cache pursuit as a useful acceptance target for sporadic independent filings. The proposed v14 cache-floor prompt growth was removed. Append-only agent contexts remain the natural cache beneficiary; accepted Run 60 remains immutable. The strategic cut extracts one shared `validate_strategic_individuation_proposals` owner used by resolution validation and by the scheduler before it returns an optional proposal. An invalid optional identity emits a semantic-invalid receipt and produces no individuation instead of aborting the recoverable wave. Focused valid and invalid regressions pass, and exact-source Run 68 exercises the corrected provider path through twelve committed waves; no further validator implementation is pending. The newsroom-only cut adds a navigation-only directory of completed public changes grouped by period and exact source timestamps to new v14 audit citations. The directory derives context from canonical records and gains no fact or world authority. Legacy empty source times are omitted from both rendering and serialization, preserving inherited v13 receipt bytes and digests; new v14 nonempty source times remain rendered and serialized. Exact-source Run 73 proves that compatibility path and final recomposition mechanically. Current source gives the assignment editor bounded full-ledger queries and explicitly asks it to search sideways for opposition and countermoves; Run 73 falsifies the stronger assumption that this access and instruction alone guarantee balanced selection. Exact pushed v15 source `b6787d909bd79b68ed3a4d143b7f6dd438e00fa2` binds accountability, opposition, and counter-narrative pitches to two distinct named parties and selected citations through a typed conflict axis, and preserves canonical ledger order. Run 74 falsifies the stronger v15 assumption: its lone accountability pitch used the same transfer citation for cultivators and a passive Tribunal, while four of five pitches avoided the adversarial axis through lead or consequence functions. Two cited names did not prove two moves. Exact pushed v16 `86fe6ed89d51da26b65ab6a031608075840b1527` binds each adversarial axis to two distinct cited public moves or positions and rejects one record presented as both sides; it adds no event writer, judge, process, dependency, or persistent authority. Formatting, 27 focused newspaper tests, 484 full library tests, and 16 strategic-smoke tests pass. full_world_acceptance_checkpoint: Run 68 at exact source `69c811a2669fc38f19f9199bf57088dc250bfc3e` is mechanically complete at world revision 27 with 12/12 strategic waves, 240 events, 514 public news rows, and a final newspaper. Independent editorial and grounding reviews both fail. Earlier per-wave papers prove the immutable record already contains dramatic completed facts, including an organ breaching the rail capital, a dead pump, and families crossing borders; the final paper failed to make that committed change legible. Preserve Run 68 unchanged. Run 69 at source `84b31e57a462710eb939c4559e0437eb5d6a7a28` failed before any model call when immutable recomposition verification encountered an empty rendered `Source time:` line in inherited v13 per-wave issues. Run 70 at source `ec45952b843e102dc2ebddda3a3bbb4058687175` also failed before any model call because v14 serialization changed the legacy recomposition digest. Exact-source Run 73 `b827d897b9579c2091a67c363d35b8695288ba2f` is terminal complete at `/var/lib/gamecult/ghostlight-dungeon/acceptance/full-world-delvehold-b827d89-73`: world revision 27, 12/12 waves, 240 events, 514 news rows, inherited artifacts byte-identical to Run 68, manifest valid, and archive SHA-256 `090d05f304c8f3d33c9dccd728bffbf3e5dc2969a7aeeffc2f9d7bafe701ac8a`. Exact-source Run 74 `b6787d909bd79b68ed3a4d143b7f6dd438e00fa2` is mechanically complete at `/var/lib/gamecult/ghostlight-dungeon/acceptance/full-world-delvehold-b6787d9-74`: revision 27, 12/12 waves, 240 events, 514 news rows, Run 68 inherited artifacts byte-identical, manifest valid, unchanged live services, and archive SHA-256 `957b11a5d584d27d23bf4d50ed1fbc8d067faf67953b03f80705bfb9587c496d`. Independent editorial review fails: the page has a coherent throughline and sharp prose but no sustained adversarial narrative; opposing decision-makers, motives, responses, and countermoves are largely absent, scandal and public reaction are missing, lived costs remain abstract, and the result reads as polished minutes with conclusions. Its post-press correction notice has two items: `The corridor had begun closing hours earlier` overstates a source that says the prolonged oath-route closure was diverting arrivals six hours before the breach; `no relief or assignment of liability has followed` must narrow to `no tribunal remedy is recorded yet`. Run 75 launched at exact source `86fe6ed89d51da26b65ab6a031608075840b1527` under the superseded 240-cell-only acceptance shape and was stopped cleanly at the operator's scale correction. Preserve `/var/lib/gamecult/ghostlight-dungeon/acceptance/full-world-delvehold-86fe6ed-75` as stopped non-acceptance evidence: preflight, world-region and titled-elaboration checkpoints, a wave-one cell terminal checkpoint, partial pulses 01/02, and two rejected pulse receipts exist. `ghostlight-full-world-run75.service` invocation `86bfe6a3ef504a7d99f579b3d67710ab` is inactive/dead after explicit stop; live services remain unchanged. Do not claim terminal success or failure. Preserve Runs 64 through 75. Mechanical completion of the earlier world is proven, but final newspaper acceptance under the corrected scale target is not. - scale_checkpoint: The active 240-cell entitlement is an attention budget, not the world-size claim. The approximately 2,400 potentially acting entities are a target for causally meaningful latent complexity, not a raw population or roster count. Multiresolution Gestalts compress the unresolved population; repeated admitted elaboration must fission them and promote individuals and institutions whose agency, relationships, resources, pressures, or authority can actually participate in consequences, then remeasure the deficit. Exact pushed `df66ec989c1e44a7a8b21ed159e9589778426238` defines consumer-authored `WorldScaleIntent` and deterministic `WorldElaborationDemand`; at 240 cells and 1,000 cover basis points it derives a numeric 2,400-subject target, current-subject deficit, and weighted per-realm shares. Its `round_mutation_budget` is `ceil(active_cell_budget * deficit / target)`: a 2,320/2,400 deficit under 240 cells yields 232 demanded mutations for the next round. This is bounded round pressure, not model-call/session count and not an assumption that one mutation yields one subject. The current uncommitted scale-loop cut gives titled elaborators stable identity-and-mandate prefixes plus bounded dynamic workbench snapshots, proposes both Gestalt fission and grounded named-person promotion, commits only through existing WorldKernel commands, remeasures canonical complexity after each round, resumes only failed dispatches from an exact frozen schedule, and compacts admitted journals into digest-chained per-title session checkpoints. Focused complexity, session, and resume checks pass. Full package verification, independent architecture review, commit/push, and provider-scale acceptance remain pending. Resolution owns derived cover membership. Nemesis receives an existing cover and assigns bounded causal decision windows among eligible responders; it does not allocate that cover. + scale_checkpoint: The active 240-cell entitlement is an attention budget, not the world-size claim. The approximately 2,400 potentially acting entities are a target for causally meaningful latent complexity, not a raw population or roster count. Multiresolution Gestalts compress the unresolved population; repeated admitted elaboration must fission them and promote individuals and institutions whose agency, relationships, resources, pressures, or authority can actually participate in consequences, then remeasure the deficit. Exact pushed `df66ec989c1e44a7a8b21ed159e9589778426238` defines consumer-authored `WorldScaleIntent` and deterministic `WorldElaborationDemand`; at 240 cells and 1,000 cover basis points it derives a numeric 2,400-subject target, current-subject deficit, weighted per-realm shares, and bounded `round_mutation_budget`. Pushed through `7ce721d`, the scale loop owns persistent logical elaborator sessions with agentic bounded compaction, exact failed-dispatch-only resume, both Gestalt fission and grounded named-person promotion, WorldKernel-only commit, and post-round canonical remeasurement. Run 78 reached that provider path but admitted no mutations: workers were required to restate inherited full previews and failed before deterministic admission. The current uncommitted cut narrows the model action to a compact mutation draft; deterministic tooling binds the frozen parent, revision, location, inherited state, approval fields, and complete command before existing validation. Session routing is title-by-realm, so one named elaborator preserves causal continuity without blending unrelated jurisdictions into a global transcript. Verification, review, commit/push, and provider proof of this corrected boundary remain pending. Resolution owns derived cover membership. Nemesis receives an existing cover and assigns bounded causal decision windows among eligible responders; it does not allocate that cover. presentation_checkpoint: The historical press-layout and seed-ownership split are complete. `notes/historical-newspaper-layout-grammar.md` remains the durable grammar. Manifest v2 at `output/tex/canopy-ledger-run-61-style-1847-flow-723.manifest.toml` independently binds `style_seed=1847`, `flow_seed=723`, frozen source SHA-256 `8f195140f52a40ba705d6a66987146a1500ae89668e5d82b01d1792eb3afb882`, and the final artifact `output/pdf/canopy-ledger-run-61-style-1847-flow-723.pdf`, SHA-256 `a457f4b1702a7a52480e42fce0039f0dbe677ff32958e98f1c412b346237190c`. An identical seed pair produces byte-identical TeX and PDF; changing only flow preserves the exact style section while materially changing a plausible layout, and changing only style preserves flow topology. Cut-first and cut-midstory templates pass visual inspection; the failed split-card template is deleted. Frozen copy/assets, actual PDF `/BM /Multiply`, and economic-layer advertising authority remain invariant. public_reference_checkpoint: Public architecture reference is complete. Canonical Ghostlight commit `15ea0f0` owns five pages under `docs/public-architecture` covering overview, authority, pipelines, 43 named production stages, and eight titled elaborators. Site commit `ea0b026` publishes exact projections under `F:\Projects\GhostlightDungeon-site\content\Documentation`, adds the sync/check script, explorer and table-of-contents navigation, scoped documentation layout, and homepage Architecture link. Local Quartz build and visual browser QA pass. GitHub Pages workflow `33408004480` succeeded. `https://ghostlight.gamecult.org/Documentation/` and the extensionless `Documentation/Agents-and-model-stages` route are live; the stage page exposes seven tables and 51 rows. Ghostlight remains technical authority; the site repository owns public composition and deployment. - next_action: Do not resume Run 75. Review the uncommitted iterative complexity cut against the ownership map, run the full focused/package/strategic gates, and correct any findings without weakening failed-dispatch-only resume, digest-chained per-title compaction, WorldKernel-only commit, or post-round canonical remeasurement. Then commit and push the exact source and launch a fresh provider-backed product-scale acceptance; prove meaningful Gestalt fission and grounded individual promotion progress toward the 2,400-complexity target under the 240-cell entitlement without roster padding, assumed batch yield, or replay of Run 75. Preserve Resolution cover ownership, Nemesis's bounded causal-window role, immutable Runs 64 through 75, both live services, the completed public reference, the two-seed press checkpoint, and the economic-layer advertising boundary. + next_action: Preserve Run 78 as a pre-mutation provider failure and do not resume Run 75. Review the compact world-complexity mutation-draft cut against the ownership map: elaborators own only new child identities, partition/member/resource assignments, or one grounded member delta; deterministic tooling must materialize every inherited and frozen command field before existing validation. Run focused, full-package, and strategic gates, correct findings without weakening persistent per-title sessions, bounded agentic compaction, failed-dispatch-only resume, WorldKernel-only commit, or post-round remeasurement, then commit and push. The next provider proof must start from preserved canonical pre-mutation state and show meaningful fission and promotion toward the 2,400-complexity target under the 240-cell entitlement without roster padding, assumed yield, or inherited-preview restatement. Preserve Resolution cover ownership, Nemesis's bounded causal-window role, immutable Runs 64 through 78, both live services, the completed public reference, the two-seed press checkpoint, and the economic-layer advertising boundary. gestalt_population: Gestalt Personas own shared population baselines; persistent member deltas own named individuality; WorldKernel materialization and approval-gated fission preserve lineage and identity. Materialisation/folding changes only representation and the exact member delta, advances resolution epoch, and retires the old cover; it has no Gestalt-wide effect authority. Selected actionable member exceptions are mandatory Projector perspective owners, so aggregation cannot silently erase their decision. Presence projection is limited to nearby active leaves and exact-location dormant members, includes reciprocal player relationship evidence, and may propose an earned cast without committing it. Simulation cells are derived covers only.