Add Nemesis causal attention and bounded grounding repair

This commit is contained in:
Meta Vens 2026-08-29 04:37:58 +02:00
commit b040a35061
24 changed files with 2791 additions and 431 deletions

View file

@ -272,6 +272,7 @@ fn action_campaign() -> ghostlight_dungeon::domain::Campaign {
resolution_policy: Default::default(),
resolution_pins: BTreeMap::new(),
resolution_cover: None,
nemesis_attention_history: Vec::new(),
strategic_tick_count: 0,
}
}

View file

@ -1126,6 +1126,7 @@ fn dynamics_campaign() -> ghostlight_dungeon::domain::Campaign {
},
resolution_pins: BTreeMap::new(),
resolution_cover: None,
nemesis_attention_history: Vec::new(),
strategic_tick_count: 0,
};
ghostlight_dungeon::resolution::ensure_agency_profiles(&mut campaign);

View file

@ -300,6 +300,7 @@ fn scale_campaign(
},
resolution_pins: BTreeMap::new(),
resolution_cover: None,
nemesis_attention_history: Vec::new(),
strategic_tick_count: 0,
};
ghostlight_dungeon::resolution::ensure_agency_profiles(&mut campaign);

View file

@ -212,6 +212,7 @@ fn four_actor_campaign() -> ghostlight_dungeon::domain::Campaign {
resolution_policy: Default::default(),
resolution_pins: BTreeMap::new(),
resolution_cover: None,
nemesis_attention_history: Vec::new(),
strategic_tick_count: 0,
}
}

View file

@ -2250,6 +2250,7 @@ fn strategic_campaign() -> ghostlight_dungeon::domain::Campaign {
resolution_policy: Default::default(),
resolution_pins: BTreeMap::new(),
resolution_cover: None,
nemesis_attention_history: Vec::new(),
strategic_tick_count: 0,
};
ghostlight_dungeon::resolution::ensure_agency_profiles(&mut campaign);

View file

@ -6555,6 +6555,7 @@ fn seed_to_campaign(mut seed: CompiledSeed, receipts: &[VaultEvidenceReceipt]) -
resolution_policy: Default::default(),
resolution_pins: BTreeMap::new(),
resolution_cover: None,
nemesis_attention_history: Vec::new(),
strategic_tick_count: 0,
};
crate::resolution::ensure_agency_profiles(&mut campaign);

View file

@ -133,6 +133,7 @@ impl WorldSeed {
resolution_policy: self.resolution_policy,
resolution_pins: BTreeMap::new(),
resolution_cover: None,
nemesis_attention_history: Vec::new(),
strategic_tick_count: 0,
}
}

View file

@ -50,6 +50,11 @@ pub struct Campaign {
pub resolution_pins: BTreeMap<String, ResolutionPin>,
#[serde(default)]
pub resolution_cover: Option<ResolutionCover>,
/// Durable record of exact causal attention windows already served by
/// Nemesis. WorldKernel is the sole writer; the scheduler reads it only to
/// avoid repeatedly assigning the same anchor to the same responder.
#[serde(default)]
pub nemesis_attention_history: Vec<NemesisAttentionRecord>,
#[serde(default)]
pub strategic_tick_count: u64,
}
@ -433,6 +438,27 @@ pub struct ResolutionCover {
pub mandatory_overage: u8,
pub cells: Vec<SimulationCell>,
pub demand: ResolutionDemand,
/// Scheduler-owned reaction windows for already committed world pressure.
/// These bindings decide who must receive a decision slot, never what that
/// subject decides or which consequence the kernel commits.
#[serde(default)]
pub causal_follow_through: Vec<CausalFollowThroughAssignment>,
}
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
pub struct CausalFollowThroughAssignment {
/// Exact opaque handle from the scheduler's frozen anchor catalog.
pub anchor_reference: String,
/// One exact autonomous actor, institution, population, or dormant member
/// that owns a decision window for this anchor in the current cover.
pub responder_subject_id: String,
}
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
pub struct NemesisAttentionRecord {
pub anchor_reference: String,
pub responder_subject_id: String,
pub served_world_revision: u64,
}
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]

File diff suppressed because it is too large Load diff

View file

@ -1237,6 +1237,20 @@ fn execute(
.insert((receipt.stage.clone(), receipt.snapshot_binding.clone()));
}
}
if !wave.cover.causal_follow_through.is_empty() {
let expected_binding =
crate::follow_through::nemesis_admission_binding(&campaign, &wave.cover)
.map_err(|error| KernelError::Invalid(error.to_string()))?;
if !stage_bindings.contains(&(
crate::follow_through::NEMESIS_STAGE.into(),
expected_binding,
)) {
return Err(KernelError::Invalid(
"resolution wave lacks the exact Nemesis receipt admitted for its causal agenda"
.into(),
));
}
}
for cell in &wave.cover.cells {
let binding = format!(
"campaign:{}:revision:{}:resolution:{}:cell:{}",
@ -3843,6 +3857,26 @@ fn commit_strategic_tick(
) -> Result<CommandResult, KernelError> {
crate::resolution::ensure_agency_profiles(&mut campaign);
let previous_revision = campaign.revision;
if let Some(wave) = &resolution_wave {
for assignment in &wave.cover.causal_follow_through {
if campaign.nemesis_attention_history.iter().any(|record| {
record.anchor_reference == assignment.anchor_reference
&& record.responder_subject_id == assignment.responder_subject_id
}) {
return Err(KernelError::Invalid(
"Nemesis attempted to serve an already committed causal attention window"
.into(),
));
}
campaign
.nemesis_attention_history
.push(crate::domain::NemesisAttentionRecord {
anchor_reference: assignment.anchor_reference.clone(),
responder_subject_id: assignment.responder_subject_id.clone(),
served_world_revision: previous_revision.saturating_add(1),
});
}
}
campaign.revision += 1;
let committed_at = Utc::now();
let external_authorities = store
@ -4594,6 +4628,7 @@ pub(crate) mod tests {
resolution_policy: Default::default(),
resolution_pins: BTreeMap::new(),
resolution_cover: None,
nemesis_attention_history: Vec::new(),
strategic_tick_count: 0,
}
}
@ -10104,6 +10139,113 @@ pub(crate) mod tests {
assert_eq!(store.keys("strategic_tick.v1").unwrap().len(), 1);
}
#[tokio::test]
async fn kernel_rejects_a_forged_nemesis_agenda_and_commits_the_exact_receipted_one() {
let dir = tempfile::tempdir().unwrap();
let store = CampaignStore::open(dir.path().join("campaign.cc")).unwrap();
let kernel = WorldKernel::start(store.clone());
let mut seed = crate::resolution::tests::campaign(1, 1);
let responder = "faction-0000";
seed.agency_profiles
.get_mut(responder)
.unwrap()
.information_channels
.insert("public-court".into());
seed.events.push(crate::domain::Event {
id: "court-accusation".into(),
at: seed.world_time,
kind: "public_accusation".into(),
summary: "The court accuses Faction 0 of concealing the winter tally.".into(),
actor_ids: vec![],
institution_ids: vec![],
gestalt_ids: vec![],
location_ids: vec![],
public_channels: vec!["public-court".into()],
});
kernel
.command(WorldCommand::CreateCampaign {
campaign: seed.clone(),
evidence_receipts: vec![],
model_stage_receipts: vec![],
})
.await
.unwrap();
let persisted = store
.load::<Campaign>("campaign.v1", &seed.id.to_string())
.unwrap()
.unwrap()
.1;
let mut wave = inaction_wave(&persisted, &store);
wave.cover.causal_follow_through = vec![crate::domain::CausalFollowThroughAssignment {
anchor_reference: "event:court-accusation".into(),
responder_subject_id: responder.into(),
}];
let error = kernel
.command(WorldCommand::AdvanceStrategicTick {
expected_revision: 0,
source: TickSource::Scheduler,
plan: None,
model_receipt_hash: Some(format!("sha256:{}", "9".repeat(64))),
resolution_wave: Some(wave.clone()),
})
.await
.unwrap_err();
assert!(error.to_string().contains("exact Nemesis receipt"));
let unchanged = store
.load::<Campaign>("campaign.v1", &seed.id.to_string())
.unwrap()
.unwrap()
.1;
assert_eq!(unchanged.revision, 0);
assert!(unchanged.nemesis_attention_history.is_empty());
let mut receipt = resolution_stage(
&wave.cover.cells[0].id,
&persisted,
crate::follow_through::NEMESIS_STAGE,
'z',
);
receipt.snapshot_binding =
crate::follow_through::nemesis_admission_binding(&persisted, &wave.cover).unwrap();
store
.insert(
"persona_stage_receipt.v1",
"ghostlight.persona_stage_receipt.v1",
receipt.storage_key(),
&receipt,
)
.unwrap();
wave.model_receipt_hashes
.push(receipt.storage_key().to_owned());
let result = kernel
.command(WorldCommand::AdvanceStrategicTick {
expected_revision: 0,
source: TickSource::Scheduler,
plan: None,
model_receipt_hash: Some(format!("sha256:{}", "9".repeat(64))),
resolution_wave: Some(wave),
})
.await
.unwrap();
let CommandResult::Committed { campaign, .. } = result else {
panic!()
};
assert_eq!(campaign.nemesis_attention_history.len(), 1);
assert_eq!(
campaign.nemesis_attention_history[0].anchor_reference,
"event:court-accusation"
);
assert_eq!(
campaign.nemesis_attention_history[0].responder_subject_id,
responder
);
assert_eq!(
campaign.nemesis_attention_history[0].served_world_revision,
1
);
}
#[tokio::test]
async fn invalid_effect_verifier_receipt_cannot_authorize_an_actionful_cell() {
let dir = tempfile::tempdir().unwrap();

View file

@ -3410,6 +3410,7 @@ mod tests {
resolution_policy: ResolutionPolicy::default(),
resolution_pins: BTreeMap::new(),
resolution_cover: None,
nemesis_attention_history: Vec::new(),
strategic_tick_count: 0,
}
}

View file

@ -9,6 +9,7 @@ pub mod consumer;
pub mod d20;
pub mod domain;
pub mod elaboration;
pub mod follow_through;
pub mod gestalt;
pub mod idunn_health;
pub mod initiative;

View file

@ -6527,10 +6527,30 @@ mod tests {
resolution_policy: Default::default(),
resolution_pins: BTreeMap::new(),
resolution_cover: None,
nemesis_attention_history: Vec::new(),
strategic_tick_count: 0,
}
}
fn add_aggregate_clock_witness(campaign: &mut Campaign) {
campaign.institutions.insert(
"channel-watch".into(),
ghostlight_dungeon::domain::InstitutionState {
id: "channel-watch".into(),
name: "Channel Watch".into(),
resources: Vec::new(),
goals: Vec::new(),
posture: "observing".into(),
},
);
ghostlight_dungeon::resolution::ensure_agency_profiles(campaign);
campaign
.agency_profiles
.get_mut("channel-watch")
.expect("fixture institution has a profile")
.active_leaf = false;
}
fn empty_app_state(root: &std::path::Path) -> AppState {
let registry = CampaignRegistry::new(root.join("campaigns")).unwrap();
let wrapping_key = root.join("session-wrapping.key");
@ -6998,9 +7018,10 @@ mod tests {
let dir = tempfile::tempdir().unwrap();
let state = empty_app_state(dir.path());
let mut campaign = seed("Quiet world");
add_aggregate_clock_witness(&mut campaign);
let original_player = campaign.actors["player"].clone();
let original_time = campaign.world_time;
campaign.last_player_activity = chrono::Utc::now() - chrono::Duration::hours(2);
campaign.last_player_activity = chrono::Utc::now() - chrono::Duration::minutes(90);
campaign.clocks.insert(
"tide".into(),
ghostlight_dungeon::domain::WorldClock {
@ -7009,6 +7030,11 @@ mod tests {
progress: 0,
threshold: 4,
consequence: "the channel narrows".into(),
consequence_scope: ghostlight_dungeon::domain::WorldEventScope {
institution_ids: vec!["channel-watch".into()],
location_ids: vec!["room".into()],
..Default::default()
},
},
);
let runtime = state
@ -7026,12 +7052,12 @@ mod tests {
.unwrap();
let advanced = load_campaign(&runtime.store).unwrap();
assert_eq!(advanced.away_ticks_processed, 2);
assert_eq!(advanced.strategic_tick_count, 2);
assert_eq!(advanced.clocks["tide"].progress, 2);
assert_eq!(advanced.away_ticks_processed, 1);
assert_eq!(advanced.strategic_tick_count, 1);
assert_eq!(advanced.clocks["tide"].progress, 1);
assert_eq!(
advanced.world_time,
original_time + chrono::Duration::hours(12)
original_time + chrono::Duration::hours(6)
);
assert_eq!(advanced.actors["player"], original_player);
let operator = state.mesh.operator_surface(campaign.id).unwrap();
@ -7049,6 +7075,7 @@ mod tests {
let dir = tempfile::tempdir().unwrap();
let state = empty_app_state(dir.path());
let mut campaign = seed("Player wait world");
add_aggregate_clock_witness(&mut campaign);
let original_time = campaign.world_time;
campaign.last_player_activity = chrono::Utc::now() - chrono::Duration::hours(4);
campaign.away_ticks_processed = 3;
@ -7061,6 +7088,11 @@ mod tests {
progress: 0,
threshold: 4,
consequence: "the settlement must choose".into(),
consequence_scope: ghostlight_dungeon::domain::WorldEventScope {
institution_ids: vec!["channel-watch".into()],
location_ids: vec!["room".into()],
..Default::default()
},
},
);
let runtime = state

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,8 @@
use crate::{
domain::{
Campaign, CellActionProposal, StrategicActivityKind, StrategicActivityOutcome,
StrategicCellEffect, StrategicOutcomeBand, StrategicOutcomeEffect, StrategicTickPlan,
Campaign, CausalFollowThroughAssignment, CellActionProposal, StrategicActivityKind,
StrategicActivityOutcome, StrategicCellEffect, StrategicOutcomeBand,
StrategicOutcomeEffect, StrategicTickPlan,
},
model::{
MODEL_BALANCED, MODEL_FAST, ModelPort, ModelStageOutput, ModelStageReceipt,
@ -36,6 +37,7 @@ struct ActionOutcomeContext {
source_name: String,
intent: String,
intended_effect: String,
causal_anchors: Vec<CausalAnchorOutcomeContext>,
activities: Vec<StrategicActivityKind>,
target_subject_ids: Vec<String>,
location_ids: Vec<String>,
@ -53,6 +55,12 @@ struct ActionOutcomeContext {
allowed_state_references: Vec<String>,
}
#[derive(Clone, Debug, Serialize)]
struct CausalAnchorOutcomeContext {
anchor_reference: String,
committed_account: String,
}
#[derive(Clone, Debug, Serialize)]
struct PressureOwnerContext {
owner_subject_id: String,
@ -189,6 +197,15 @@ pub async fn resolve_activity_outcomes(
model: Arc<dyn ModelPort>,
campaign: &Campaign,
proposals: &[CellActionProposal],
) -> Result<(Vec<StrategicActivityOutcome>, Vec<ModelStageOutput>)> {
resolve_activity_outcomes_with_causal_assignments(model, campaign, proposals, &[]).await
}
pub async fn resolve_activity_outcomes_with_causal_assignments(
model: Arc<dyn ModelPort>,
campaign: &Campaign,
proposals: &[CellActionProposal],
causal_assignments: &[CausalFollowThroughAssignment],
) -> Result<(Vec<StrategicActivityOutcome>, Vec<ModelStageOutput>)> {
if proposals.is_empty() {
return Ok((Vec::new(), Vec::new()));
@ -198,6 +215,8 @@ pub async fn resolve_activity_outcomes(
let campaign = Arc::new(campaign.clone());
let mut tasks = JoinSet::new();
for (index, proposal) in proposals.iter().cloned().enumerate() {
let causal_anchors =
causal_anchor_contexts(campaign.as_ref(), &proposal, causal_assignments)?;
let model = model.clone();
let campaign = campaign.clone();
let permits = permits.clone();
@ -206,7 +225,9 @@ pub async fn resolve_activity_outcomes(
.acquire_owned()
.await
.map_err(|_| anyhow!("strategic outcome concurrency gate closed"))?;
let resolved = resolve_activity_outcome(model.as_ref(), &campaign, &proposal).await?;
let resolved =
resolve_activity_outcome(model.as_ref(), &campaign, &proposal, causal_anchors)
.await?;
Ok::<_, anyhow::Error>((index, resolved))
});
}
@ -264,9 +285,10 @@ async fn resolve_activity_outcome(
model: &dyn ModelPort,
campaign: &Campaign,
proposal: &CellActionProposal,
causal_anchors: Vec<CausalAnchorOutcomeContext>,
) -> Result<(Vec<StrategicActivityOutcome>, Vec<ModelStageOutput>)> {
let proposals = std::slice::from_ref(proposal);
let context = build_context(campaign, proposals)?;
let context = build_context_with_causal_anchors(campaign, proposals, &causal_anchors)?;
let digests = proposals
.iter()
.map(cell_action_digest)
@ -286,7 +308,7 @@ async fn resolve_activity_outcome(
.into_iter()
.collect();
let static_contract = format!(
"You are Ghostlight's private strategic outcome resolver. The Interpreter already established each exact constituent's selected attempt; you alone assess opposition and choose its bounded durable result. Resolve every supplied action_digest exactly once. Never add or remove an action. For each action, effect_kind must come from that action's admissible_effect_kinds; this is the runtime's exact projection of locally valid consequence handles. Use only IDs, resources, pressure resolutions, relations, facts, member owners, targets, and state references supplied for that same action. Never mutate the player. Never treat an arena as an actor or union constituents' private state. Prefer the most specific causally supported durable effect when the attempt and its band establish one. A mixed result should preserve bounded progress, cost, or a new unresolved pressure when a supplied handle supports it; do not collapse concrete partial work into no change merely because it is incomplete. Use no_material_change when none of the other supplied handles honestly represents a durable result; success or mixed success does not itself authorize inventing a response, fact, relationship, or resource. A failure may create a pressure or spend a committed resource when causally supported. Every material effect must actually change the supplied state; do not repeat an existing resource, pressure, memory, obligation, relationship description, or known fact. Choose exactly one effect_kind. Populate only its fields and omit every irrelevant optional field. no_material_change requires reason. resource_created creates one bounded branch-local resource and requires a capability reference. Its owner_subject_id must copy one exact resource_creation_owner_ids value: choose the source for portable stock or equipment it retains, or an exact activity location for a durable installed, placed, or repaired feature there. resource_consumed spends one exact existing source resource. resource_transferred gives one exact existing source resource to one recipient: copy one exact resource_recipient_ids value into the output field other_subject_id; it cannot take from a target. For resource_consumed and resource_transferred, owner_subject_id must copy that action's exact resource_owner_id, including any member: prefix. gestalt_pressure copies one exact pressure_owners.owner_subject_id value adjacent to that owner's current_pressures into owner_subject_id; resolutions must copy exact current pressure text. agency_relation_shift uses one supplied active relation and a nonzero delta from -10 through 10. Member memory, obligation, or relationship may change only the supplied member_state_owner_id; member_id omits the member: prefix. A relationship's other_subject_id must be one exact action target. knowledge_learned uses one supplied discoverable fact and teaches only the source. knowledge_communicated copies one communicable_facts fact_id and a nonempty subset of its exact recipient_subject_ids; owner_subject_id is the source speaker. Every material effect needs at least one supporting_state_reference copied literally and only from that action's allowed_state_references. IDs shown in source_state, target_state, target_subject_ids, or effect-specific owner and target fields are not provenance handles unless repeated in allowed_state_references. Return one JSON object and no prose outside JSON.\n\nOUTPUT CONTRACT:\n{OUTCOME_PROPOSAL_OUTPUT_CONTRACT}"
"You are Ghostlight's private strategic outcome resolver. The Interpreter already established each exact constituent's selected attempt; you alone assess opposition and choose its bounded durable result. Resolve every supplied action_digest exactly once. Never add or remove an action. causal_anchors contains the exact committed account that caused Nemesis to assign this responder a turn; use it to judge causal follow-through, but never treat it as new mutation authority. For each action, effect_kind must come from that action's admissible_effect_kinds; this is the runtime's exact projection of locally valid consequence handles. Use only IDs, resources, pressure resolutions, relations, facts, member owners, targets, and state references supplied for that same action. Never mutate the player. Never treat an arena as an actor or union constituents' private state. Prefer the most specific causally supported durable effect when the attempt and its band establish one. A mixed result should preserve bounded progress, cost, or a new unresolved pressure when a supplied handle supports it; do not collapse concrete partial work into no change merely because it is incomplete. Use no_material_change when none of the other supplied handles honestly represents a durable result; success or mixed success does not itself authorize inventing a response, fact, relationship, or resource. A failure may create a pressure or spend a committed resource when causally supported. Every material effect must actually change the supplied state; do not repeat an existing resource, pressure, memory, obligation, relationship description, or known fact. Choose exactly one effect_kind. Populate only its fields and omit every irrelevant optional field. no_material_change requires reason. resource_created creates one bounded branch-local resource and requires a capability reference. Its owner_subject_id must copy one exact resource_creation_owner_ids value: choose the source for portable stock or equipment it retains, or an exact activity location for a durable installed, placed, or repaired feature there. resource_consumed spends one exact existing source resource. resource_transferred gives one exact existing source resource to one recipient: copy one exact resource_recipient_ids value into the output field other_subject_id; it cannot take from a target. For resource_consumed and resource_transferred, owner_subject_id must copy that action's exact resource_owner_id, including any member: prefix. gestalt_pressure copies one exact pressure_owners.owner_subject_id value adjacent to that owner's current_pressures into owner_subject_id; resolutions must copy exact current pressure text. agency_relation_shift uses one supplied active relation and a nonzero delta from -10 through 10. Member memory, obligation, or relationship may change only the supplied member_state_owner_id; member_id omits the member: prefix. A relationship's other_subject_id must be one exact action target. knowledge_learned uses one supplied discoverable fact and teaches only the source. knowledge_communicated copies one communicable_facts fact_id and a nonempty subset of its exact recipient_subject_ids; owner_subject_id is the source speaker. Every material effect needs at least one supporting_state_reference copied literally and only from that action's allowed_state_references. IDs shown in source_state, target_state, target_subject_ids, or effect-specific owner and target fields are not provenance handles unless repeated in allowed_state_references. Return one JSON object and no prose outside JSON.\n\nOUTPUT CONTRACT:\n{OUTCOME_PROPOSAL_OUTPUT_CONTRACT}"
);
let request = ModelStageRequest {
stage: "strategic_outcome_resolver".into(),
@ -324,6 +346,7 @@ async fn resolve_activity_outcome(
model,
campaign,
proposals,
&context,
candidate_bundle.clone(),
&candidate_sources,
)
@ -397,6 +420,7 @@ async fn evaluate_outcome_candidate(
model: &dyn ModelPort,
campaign: &Campaign,
proposals: &[CellActionProposal],
context: &OutcomeContext,
proposal_bundle: OutcomeProposalBundle,
source_receipt_ids: &[String],
) -> Result<OutcomeCandidateEvaluation> {
@ -425,14 +449,16 @@ async fn evaluate_outcome_candidate(
.map(|outcome| outcome.action_digest.clone())
.collect::<Vec<_>>();
let semantic_digest_set = semantic_digests.iter().cloned().collect::<BTreeSet<_>>();
let semantic_proposals = proposals
.iter()
.filter(|proposal| {
cell_action_digest(proposal).is_ok_and(|digest| semantic_digest_set.contains(&digest))
})
.cloned()
.collect::<Vec<_>>();
let semantic_context = build_context(campaign, &semantic_proposals)?;
let semantic_context = OutcomeContext {
world_revision: context.world_revision,
resolution_epoch: context.resolution_epoch,
actions: context
.actions
.iter()
.filter(|action| semantic_digest_set.contains(&action.action_digest))
.cloned()
.collect(),
};
let (verifier, mismatches) = verify_outcomes(
model,
campaign,
@ -1510,20 +1536,38 @@ fn validate_member_owner(
Ok(())
}
#[cfg(test)]
fn build_context(campaign: &Campaign, proposals: &[CellActionProposal]) -> Result<OutcomeContext> {
build_context_with_causal_anchors(campaign, proposals, &[])
}
fn build_context_with_causal_anchors(
campaign: &Campaign,
proposals: &[CellActionProposal],
causal_anchors: &[CausalAnchorOutcomeContext],
) -> Result<OutcomeContext> {
Ok(OutcomeContext {
world_revision: campaign.revision,
resolution_epoch: campaign.resolution_policy.resolution_epoch,
actions: proposals
.iter()
.map(|proposal| action_context(campaign, proposal))
.map(|proposal| action_context_with_causal_anchors(campaign, proposal, causal_anchors))
.collect::<Result<_>>()?,
})
}
#[cfg(test)]
fn action_context(
campaign: &Campaign,
proposal: &CellActionProposal,
) -> Result<ActionOutcomeContext> {
action_context_with_causal_anchors(campaign, proposal, &[])
}
fn action_context_with_causal_anchors(
campaign: &Campaign,
proposal: &CellActionProposal,
causal_anchors: &[CausalAnchorOutcomeContext],
) -> Result<ActionOutcomeContext> {
let (activities, targets, locations) = activity_parts(proposal)?;
let source_name = subject_name(campaign, &proposal.subject_id)?;
@ -1580,6 +1624,7 @@ fn action_context(
source_name,
intent: proposal.intent.clone(),
intended_effect: proposal.intended_effect.clone(),
causal_anchors: causal_anchors.to_vec(),
activities,
target_subject_ids: targets,
location_ids: locations,
@ -1614,6 +1659,44 @@ fn action_context(
})
}
fn causal_anchor_contexts(
campaign: &Campaign,
proposal: &CellActionProposal,
assignments: &[CausalFollowThroughAssignment],
) -> Result<Vec<CausalAnchorOutcomeContext>> {
let matching = assignments
.iter()
.filter(|assignment| assignment.responder_subject_id == proposal.subject_id)
.collect::<Vec<_>>();
if matching.len() > 1 {
return Err(anyhow!(
"one strategic action cannot inherit more than one Nemesis attention anchor"
));
}
matching
.into_iter()
.map(|assignment| {
if !proposal
.state_references
.contains(&assignment.anchor_reference)
{
return Err(anyhow!(
"Nemesis-assigned action omitted its exact causal anchor"
));
}
let committed_account = crate::follow_through::causal_anchor_summary(
campaign,
&assignment.anchor_reference,
)
.ok_or_else(|| anyhow!("Nemesis attention anchor is no longer grounded"))?;
Ok(CausalAnchorOutcomeContext {
anchor_reference: assignment.anchor_reference.clone(),
committed_account,
})
})
.collect()
}
fn admissible_effect_kinds(
campaign: &Campaign,
proposal: &CellActionProposal,
@ -2595,7 +2678,7 @@ mod tests {
use crate::{
domain::{
AgencyProfile, AgencyRelation, AgencyRelationKind, AgencySubjectKind, BranchOrigin,
GestaltPersonaState, Location, ResolutionPolicy, WorldFact,
Event, GestaltPersonaState, Location, ResolutionPolicy, WorldFact,
},
resolution::ensure_agency_profiles,
};
@ -3029,6 +3112,7 @@ mod tests {
resolution_policy: ResolutionPolicy::default(),
resolution_pins: BTreeMap::new(),
resolution_cover: None,
nemesis_attention_history: Vec::new(),
strategic_tick_count: 0,
};
value.actors.insert(
@ -3088,6 +3172,55 @@ mod tests {
}
}
#[test]
fn outcome_context_carries_only_the_exact_nemesis_anchor_account() {
let mut value = campaign();
value.events.push(Event {
id: "old-crisis".into(),
at: value.world_time,
kind: "public_crisis".into(),
summary: "The harbor court publicly voided the dockers' winter charter.".into(),
actor_ids: vec![],
institution_ids: vec![],
gestalt_ids: vec!["dockers".into()],
location_ids: vec!["dock".into()],
public_channels: vec!["harbor-notices".into()],
});
value.events.push(Event {
id: "unrelated".into(),
at: value.world_time,
kind: "public_notice".into(),
summary: "A distant bell was repaired.".into(),
actor_ids: vec![],
institution_ids: vec![],
gestalt_ids: vec![],
location_ids: vec![],
public_channels: vec!["harbor-notices".into()],
});
let mut action = proposal();
action.state_references.push("event:old-crisis".into());
action.state_references.push("event:unrelated".into());
let assignments = [CausalFollowThroughAssignment {
anchor_reference: "event:old-crisis".into(),
responder_subject_id: "dockers".into(),
}];
let anchors = causal_anchor_contexts(&value, &action, &assignments).unwrap();
let context =
build_context_with_causal_anchors(&value, std::slice::from_ref(&action), &anchors)
.unwrap();
let serialized = serde_json::to_string(&context).unwrap();
assert!(serialized.contains("event:old-crisis"));
assert!(serialized.contains("publicly voided the dockers' winter charter"));
assert!(!serialized.contains("A distant bell was repaired"));
assert!(
context.actions[0]
.allowed_state_references
.iter()
.all(|reference| reference != "event:unrelated")
);
}
#[test]
fn compound_strategic_means_share_one_digest_and_union_outcome_authority() {
let value = campaign();

File diff suppressed because one or more lines are too long

View file

@ -754,18 +754,40 @@ mod tests {
impl ModelPort for RejectingRegistryNewspaperModel {
async fn run(&self, request: &ModelStageRequest) -> Result<String> {
if request.stage == "newspaper_copy_desk" {
let claim = if request
.lived_stream
.contains("three granary auditors of acting as one accused person")
{
"three granary auditors of acting as one accused person"
} else {
"three granary auditors of being one witch in a long coat"
};
return Ok(serde_json::json!({
"accepted":false,
"assessment":"The article states an outcome that its source does not support.",
"findings":[{
"article_index":0,
"category":"unsupported_fact",
"claim_or_phrase":"the allegation is proven",
"claim_or_phrase":claim,
"reason":"The cited report records only an accusation."
}]
})
.to_string());
}
if request.stage == "newspaper_grounding_reconciliation_agent_action" {
return Ok(serde_json::json!({
"tool":"submit_edits",
"replacements":[{
"article_index":0,
"field":"paragraph",
"paragraph_index":0,
"expected_phrase":"three granary auditors of being one witch in a long coat",
"replacement":"three granary auditors of acting as one accused person"
}],
"delete_article_indices":[]
})
.to_string());
}
registry_newspaper_editor_response(request)
}
@ -831,6 +853,7 @@ mod tests {
resolution_policy: Default::default(),
resolution_pins: BTreeMap::new(),
resolution_cover: None,
nemesis_attention_history: Vec::new(),
strategic_tick_count: 0,
}
}
@ -1650,7 +1673,7 @@ mod tests {
let failure = error
.downcast_ref::<crate::newspaper::WorldNewspaperCompositionFailure>()
.expect("registry must preserve the typed terminal editorial failure");
assert_eq!(failure.model_receipts.len(), 9);
assert_eq!(failure.model_receipts.len(), 4);
let stored_after_rejection = runtime.store.keys("persona_stage_receipt.v1").unwrap();
let newly_observed_failure_receipts = failure
.model_receipts

View file

@ -852,6 +852,7 @@ pub fn plan_cover(campaign: &Campaign, demand: ResolutionDemand) -> Result<Resol
.saturating_sub(campaign.resolution_policy.active_cell_budget),
cells,
demand,
causal_follow_through: Vec::new(),
})
}
@ -1854,6 +1855,7 @@ pub fn select_resolution_wave(
}
validate_demand(campaign, &wave.cover.demand)?;
validate_cover(campaign, &wave.cover.demand, &wave.cover.cells)?;
crate::follow_through::validate_causal_follow_through(campaign, &wave.cover)?;
if wave.plan_receipt.cell_ids
!= wave
.cover
@ -1903,6 +1905,17 @@ pub fn select_resolution_wave(
"cell appraisal considered a subject outside its exact cell authority"
));
}
let causal_assignments =
crate::follow_through::assignments_for_cell(campaign, &wave.cover, cell);
if causal_assignments.iter().any(|assignment| {
!appraisal
.considered_subject_ids
.contains(&assignment.responder_subject_id)
}) {
return Err(anyhow!(
"cell appraisal omitted a scheduler-admitted causal responder"
));
}
if cell
.detail_focus_subject_id
.as_ref()
@ -1957,7 +1970,26 @@ pub fn select_resolution_wave(
));
}
for proposal in &appraisal.actions {
validate_cell_proposal(campaign, cell, proposal)?;
let causal_assignment = causal_assignments
.iter()
.find(|assignment| assignment.responder_subject_id == proposal.subject_id)
.copied();
if causal_assignment.is_some_and(|assignment| {
!proposal
.state_references
.contains(&assignment.anchor_reference)
}) {
return Err(anyhow!(
"causal response action does not cite its admitted committed anchor"
));
}
let mut scoped_proposal = proposal.clone();
if let Some(assignment) = causal_assignment {
scoped_proposal
.state_references
.retain(|reference| reference != &assignment.anchor_reference);
}
validate_cell_proposal(campaign, cell, &scoped_proposal)?;
proposals.push(proposal.clone());
}
}
@ -3437,6 +3469,7 @@ pub(crate) mod tests {
},
resolution_pins: BTreeMap::new(),
resolution_cover: None,
nemesis_attention_history: Vec::new(),
strategic_tick_count: 0,
};
ensure_agency_profiles(&mut value);
@ -3842,6 +3875,7 @@ pub(crate) mod tests {
mandatory_overage: 0,
cells: stale_cells.clone(),
demand: demand.clone(),
causal_follow_through: Vec::new(),
});
let cover = plan_cover(&value, demand).unwrap();
@ -4274,16 +4308,14 @@ pub(crate) mod tests {
validate_and_resolve_wave(&value, &mixed).unwrap();
let mut maximum_posture = valid_action.clone();
let StrategicCellEffect::Institution { posture, .. } =
&mut maximum_posture.effects[0]
let StrategicCellEffect::Institution { posture, .. } = &mut maximum_posture.effects[0]
else {
unreachable!()
};
*posture = "x".repeat(MAX_POSTURE_CHARS);
validate_and_resolve_wave(&value, &make_wave(maximum_posture.clone())).unwrap();
let StrategicCellEffect::Institution { posture, .. } =
&mut maximum_posture.effects[0]
let StrategicCellEffect::Institution { posture, .. } = &mut maximum_posture.effects[0]
else {
unreachable!()
};
@ -4307,6 +4339,88 @@ pub(crate) mod tests {
assert!(validate_and_resolve_wave(&value, &contradictory).is_err());
}
#[test]
fn causal_response_owner_must_consider_and_cite_the_scheduler_admitted_anchor() {
let mut value = campaign(1, 1);
value.events.push(Event {
id: "winter-tally-accusation".into(),
at: value.world_time,
kind: "institution_action".into(),
summary: "Faction 0000 is publicly accused of hiding the winter tally.".into(),
actor_ids: Vec::new(),
institution_ids: vec!["faction-0000".into()],
gestalt_ids: Vec::new(),
location_ids: vec!["center".into()],
public_channels: vec!["public notice".into()],
});
let mut cover = plan_cover(
&value,
default_demand(&value, "a committed accusation requires a decision window"),
)
.unwrap();
cover.causal_follow_through = vec![CausalFollowThroughAssignment {
anchor_reference: "event:winter-tally-accusation".into(),
responder_subject_id: "faction-0000".into(),
}];
crate::follow_through::validate_causal_follow_through(&value, &cover).unwrap();
let action = CellActionProposal {
subject_id: "faction-0000".into(),
intent: "answer the accusation".into(),
intended_effect: "publish a bounded denial without deciding public belief".into(),
priority: 50,
state_references: Vec::new(),
public_channels: Vec::new(),
effects: vec![StrategicCellEffect::Institution {
institution_id: "faction-0000".into(),
posture: "publicly contests the winter-tally accusation".into(),
location_ids: Vec::new(),
}],
};
let make_wave = |action: 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(),
world_revision: value.revision,
resolution_epoch: value.resolution_policy.resolution_epoch,
considered_subject_ids: BTreeSet::from(["faction-0000".into()]),
actions: vec![action],
inactions: Vec::new(),
}],
cover: cover.clone(),
activity_outcomes: Vec::new(),
strategic_individuations: Vec::new(),
model_receipt_hashes: Vec::new(),
};
assert!(select_resolution_wave(&value, &make_wave(action.clone())).is_err());
let mut grounded = action;
grounded
.state_references
.push("event:winter-tally-accusation".into());
let grounded_result = select_resolution_wave(&value, &make_wave(grounded));
assert!(grounded_result.is_ok(), "{:#?}", grounded_result.err());
let mut omitted = make_wave(CellActionProposal {
subject_id: "faction-0000".into(),
intent: "hold".into(),
intended_effect: "hold".into(),
priority: 1,
state_references: vec!["event:winter-tally-accusation".into()],
public_channels: Vec::new(),
effects: vec![StrategicCellEffect::Institution {
institution_id: "faction-0000".into(),
posture: "holds its prior course".into(),
location_ids: vec!["center".into()],
}],
});
omitted.appraisals[0].considered_subject_ids.clear();
assert!(select_resolution_wave(&value, &omitted).is_err());
}
#[test]
fn rival_arena_preserves_named_member_agency_and_exact_private_state() {
let mut value = campaign(0, 1);
@ -4567,14 +4681,15 @@ pub(crate) mod tests {
location_ids: vec!["center".into()],
}],
};
let internal_plan =
select_resolution_wave(&value, &make_wave(internal_coordination))
.unwrap()
.plan;
let internal_plan = select_resolution_wave(&value, &make_wave(internal_coordination))
.unwrap()
.plan;
assert_eq!(internal_plan.gestalt_activities.len(), 1);
assert!(internal_plan.gestalt_activities[0]
.target_subject_ids
.is_empty());
assert!(
internal_plan.gestalt_activities[0]
.target_subject_ids
.is_empty()
);
let lower_priority_pressure = CellActionProposal {
subject_id: "refugees".into(),

View file

@ -3,17 +3,22 @@ use crate::{
AgencyAxis, AgencySubjectKind, Campaign, GestaltIndividuation, GestaltMemberDelta,
ResolutionDemand, ResolutionWaveCommit, SimulationCell, StrategicGestaltIndividuation,
},
follow_through::{
NEMESIS_STAGE, assignments_for_cell, causal_anchor_summary, causal_follow_through_snapshot,
nemesis_admission_binding, propose_causal_follow_through, validate_causal_follow_through,
},
model::{
MODEL_FAST, ModelPort, ModelStageOutput, ModelStageReceipt, ModelStageRequest,
run_validated_stage,
},
outcome::{
StrategicOutcomeResolutionFailure, activity_outcome_binding, resolve_activity_outcomes,
StrategicOutcomeResolutionFailure, activity_outcome_binding,
resolve_activity_outcomes_with_causal_assignments,
},
persona::{
CellActivityTargetSlice, CellConstituentSlice, CellMemberSlice,
CellMigrationDestinationSlice, CellPerceivedEventSlice, CellPipelineFailure,
CellProjectionEngine, ExecutionPermit, PermittedCellSlice,
CellActivityTargetSlice, CellCausalFollowThroughSlice, CellConstituentSlice,
CellMemberSlice, CellMigrationDestinationSlice, CellPerceivedEventSlice,
CellPipelineFailure, CellProjectionEngine, ExecutionPermit, PermittedCellSlice,
},
resolution::{
cell_action_digest, cell_action_limit, default_demand, plan_cover, plan_receipt,
@ -173,14 +178,52 @@ pub async fn propose_resolution_wave_with_policy(
campaign_contract: Option<&CampaignContract>,
aggregate_boundaries: &[AggregatedBoundary],
) -> Result<StrategicResolutionOutput> {
let (demand, stages) = project_resolution_demand(
let (demand, mut stages) = project_resolution_demand(
model.as_ref(),
campaign,
campaign_contract,
aggregate_boundaries,
)
.await;
let cover = plan_cover(campaign, demand)?;
let mut cover = plan_cover(campaign, demand)?;
let follow_through_binding = causal_follow_through_snapshot(campaign, &cover)?;
permit
.require(
"strategic-follow-through",
&follow_through_binding,
NEMESIS_STAGE,
)
.await?;
let follow_through = propose_causal_follow_through(model.as_ref(), campaign, &cover).await;
match follow_through {
Ok(Some(proposal)) => {
cover.causal_follow_through = proposal.admission.assignments;
stages.extend(
proposal
.receipts
.into_iter()
.map(|receipt| ModelStageOutput {
narrative: String::new(),
structured: None,
receipt,
}),
);
}
Ok(None) => {}
Err(failure) => {
let mut stage_receipts = stages
.iter()
.map(|stage| stage.receipt.clone())
.collect::<Vec<_>>();
stage_receipts.extend(failure.receipts);
return Err(anyhow::Error::new(ResolutionWavePipelineFailure {
pipeline_errors: vec![failure.message],
stage_receipts,
checkpoint: None,
}));
}
}
validate_causal_follow_through(campaign, &cover)?;
let checkpoint = seal_resolution_wave_checkpoint(ResolutionWaveCheckpoint {
schema: "ghostlight.resolution_wave_checkpoint.v1".into(),
campaign_id: campaign.id,
@ -251,7 +294,7 @@ async fn resume_resolution_wave_from_checkpoint(
{
let engine = engine.clone();
let semaphore = semaphore.clone();
let slice = cell_slice(campaign, &cell)?;
let slice = cell_slice(campaign, &cover, &cell)?;
jobs.spawn(async move {
let cell_id = cell.id;
let subject_ids = cell.subject_ids;
@ -411,10 +454,11 @@ async fn resume_resolution_wave_from_checkpoint(
)
.await?;
}
let outcome_resolution = resolve_activity_outcomes(
let outcome_resolution = resolve_activity_outcomes_with_causal_assignments(
outcome_model.clone(),
campaign,
&selection.activity_proposals,
&wave.cover.causal_follow_through,
)
.await;
let (activity_outcomes, outcome_stages) = match outcome_resolution {
@ -521,6 +565,7 @@ fn validate_resolution_wave_checkpoint(
}
validate_demand(campaign, &checkpoint.cover.demand)?;
validate_cover(campaign, &checkpoint.cover.demand, &checkpoint.cover.cells)?;
validate_causal_follow_through(campaign, &checkpoint.cover)?;
let planning_binding = format!(
"campaign:{}:revision:{}:resolution:{}",
campaign.id, campaign.revision, campaign.resolution_policy.resolution_epoch
@ -531,24 +576,59 @@ fn validate_resolution_wave_checkpoint(
.iter()
.cloned()
.collect::<BTreeSet<_>>();
let causal_binding = causal_follow_through_snapshot(campaign, &checkpoint.cover)?;
let admitted_causal_binding = nemesis_admission_binding(campaign, &checkpoint.cover)?;
let mut planning_receipt_keys = BTreeSet::new();
let mut accepted_causal_receipt = false;
for receipt in &checkpoint.planning_stage_receipts {
if receipt.schema != "ghostlight.persona_stage_receipt.v1"
|| receipt.stage != "resolution_demand"
|| receipt.snapshot_binding != planning_binding
|| !model_receipt_hashes_are_well_formed(receipt)
|| !planning_receipt_keys.insert(receipt.storage_key())
|| receipt
.source_receipt_ids
.iter()
.cloned()
.collect::<BTreeSet<_>>()
!= planning_sources
|| planning_receipt_keys.contains(receipt.storage_key())
|| !receipt.source_receipt_ids.iter().all(|source| {
planning_sources.contains(source) || planning_receipt_keys.contains(source)
})
{
return Err(anyhow!(
"strategic wave checkpoint contains invalid planning receipt provenance"
));
}
match receipt.stage.as_str() {
"resolution_demand" => {
if receipt.snapshot_binding != planning_binding
|| receipt
.source_receipt_ids
.iter()
.cloned()
.collect::<BTreeSet<_>>()
!= planning_sources
{
return Err(anyhow!(
"strategic wave checkpoint contains misbound demand provenance"
));
}
}
NEMESIS_STAGE => {
if receipt.snapshot_binding != causal_binding
&& receipt.snapshot_binding != admitted_causal_binding
{
return Err(anyhow!(
"strategic wave checkpoint contains misbound causal follow-through provenance"
));
}
accepted_causal_receipt |= receipt.snapshot_binding == admitted_causal_binding;
}
_ => {
return Err(anyhow!(
"strategic wave checkpoint contains an unknown planning authority"
));
}
}
planning_receipt_keys.insert(receipt.storage_key().to_owned());
}
if !checkpoint.cover.causal_follow_through.is_empty() && !accepted_causal_receipt {
return Err(anyhow!(
"strategic wave checkpoint lacks the receipt admitted for its exact causal agenda"
));
}
let expected_plan = plan_receipt(campaign, &checkpoint.cover);
if checkpoint.plan_receipt.campaign_id != expected_plan.campaign_id
@ -583,7 +663,7 @@ fn validate_resolution_wave_checkpoint(
"strategic wave checkpoint contains duplicate completed cell authority"
));
}
validate_resolution_cell_terminal(campaign, cell, completed)?;
validate_resolution_cell_terminal(campaign, &checkpoint.cover, cell, completed)?;
}
if checkpoint.failed_cell_ids.iter().any(|cell_id| {
!cells.contains_key(cell_id.as_str()) || completed_ids.contains(cell_id.as_str())
@ -603,10 +683,11 @@ fn validate_resolution_wave_checkpoint(
fn validate_resolution_cell_terminal(
campaign: &Campaign,
cover: &crate::domain::ResolutionCover,
cell: &crate::domain::SimulationCell,
completed: &ResolutionCellTerminalCheckpoint,
) -> Result<()> {
let slice = cell_slice(campaign, cell)?;
let slice = cell_slice(campaign, cover, cell)?;
let terminal = &completed.terminal;
if terminal.appraisal.cell_id != completed.cell_id
|| terminal.appraisal.world_revision != campaign.revision
@ -1230,9 +1311,15 @@ fn resolution_demand_context(campaign: &Campaign) -> (Vec<String>, serde_json::V
)
}
fn cell_slice(campaign: &Campaign, cell: &SimulationCell) -> Result<PermittedCellSlice> {
fn cell_slice(
campaign: &Campaign,
cover: &crate::domain::ResolutionCover,
cell: &SimulationCell,
) -> Result<PermittedCellSlice> {
let member_candidates = member_exceptions(campaign, cell)?;
let decision_owner_ids = select_cell_decision_owners(campaign, cell, &member_candidates)?;
let causal_assignments = assignments_for_cell(campaign, cover, cell);
let decision_owner_ids =
select_cell_decision_owners(campaign, cell, &member_candidates, &causal_assignments)?;
let mut member_exceptions = member_candidates
.into_iter()
.filter(|member| decision_owner_ids.contains(&member.subject_id))
@ -1246,6 +1333,39 @@ fn cell_slice(campaign: &Campaign, cell: &SimulationCell) -> Result<PermittedCel
.iter()
.map(|id| constituent_slice(campaign, id))
.collect::<Result<Vec<_>>>()?;
let causal_follow_through = causal_assignments
.iter()
.map(|assignment| {
let summary = causal_anchor_summary(campaign, &assignment.anchor_reference)
.ok_or_else(|| anyhow!("causal response anchor vanished from campaign state"))?;
Ok(CellCausalFollowThroughSlice {
anchor_reference: assignment.anchor_reference.clone(),
responder_subject_id: assignment.responder_subject_id.clone(),
summary,
})
})
.collect::<Result<Vec<_>>>()?;
for focus in &causal_follow_through {
if let Some(subject) = constituents
.iter_mut()
.find(|subject| subject.subject_id == focus.responder_subject_id)
{
subject
.permitted_state_references
.insert(focus.anchor_reference.clone());
} else if let Some(member) = member_exceptions
.iter_mut()
.find(|member| member.subject_id == focus.responder_subject_id)
{
member
.permitted_state_references
.insert(focus.anchor_reference.clone());
} else {
return Err(anyhow!(
"causal response owner is absent from its exact cell slice"
));
}
}
for subject in &mut constituents {
subject.activity_targets.retain(|target, _| {
!target.starts_with("member:") || selected_member_ids.contains(target)
@ -1299,6 +1419,7 @@ fn cell_slice(campaign: &Campaign, cell: &SimulationCell) -> Result<PermittedCel
shared_knowledge,
shared_capabilities,
perceived_events,
causal_follow_through,
world_clock_pressure: campaign
.clocks
.values()
@ -1316,6 +1437,7 @@ fn select_cell_decision_owners(
campaign: &Campaign,
cell: &SimulationCell,
member_candidates: &[CellMemberSlice],
causal_assignments: &[&crate::domain::CausalFollowThroughAssignment],
) -> Result<BTreeSet<String>> {
let quota = cell_action_limit(cell);
if quota == 0 || cell.subject_ids.is_empty() {
@ -1328,27 +1450,52 @@ fn select_cell_decision_owners(
}
let canonical = cell.subject_ids.iter().cloned().collect::<Vec<_>>();
let mut selected = BTreeSet::new();
if let Some(focus) = cell.detail_focus_subject_id.as_ref() {
selected.insert(focus.clone());
let mut owners = causal_assignments
.iter()
.map(|assignment| assignment.responder_subject_id.clone())
.collect::<BTreeSet<_>>();
if owners.len() != causal_assignments.len() || owners.len() > quota {
return Err(anyhow!(
"causal response agenda duplicates an owner or exceeds this cell's quota"
));
}
let represented_canonical = |owners: &BTreeSet<String>| {
owners
.iter()
.map(|owner| {
owner
.strip_prefix("member:")
.and_then(|member_id| campaign.gestalt_members.get(member_id))
.map(|member| member.gestalt_id.clone())
.unwrap_or_else(|| owner.clone())
})
.collect::<BTreeSet<_>>()
};
if let Some(focus) = cell.detail_focus_subject_id.as_ref()
&& owners.len() < quota
&& !represented_canonical(&owners).contains(focus)
{
owners.insert(focus.clone());
}
let represented = represented_canonical(&owners);
let available = canonical
.iter()
.filter(|subject_id| !selected.contains(*subject_id))
.filter(|subject_id| !represented.contains(*subject_id))
.cloned()
.collect::<Vec<_>>();
let remaining = quota.saturating_sub(selected.len()).min(available.len());
if remaining == available.len() {
selected.extend(available);
let remaining = quota.saturating_sub(owners.len()).min(available.len());
let selected = if remaining == available.len() {
available
} else if remaining > 0 {
let start =
(campaign.strategic_tick_count as usize).saturating_mul(remaining) % available.len();
for offset in 0..remaining {
selected.insert(available[(start + offset) % available.len()].clone());
}
}
(0..remaining)
.map(|offset| available[(start + offset) % available.len()].clone())
.collect()
} else {
Vec::new()
};
let mut owners = BTreeSet::new();
for subject_id in selected {
if cell.detail_focus_subject_id.as_deref() == Some(subject_id.as_str())
|| !campaign.gestalts.contains_key(&subject_id)
@ -2068,8 +2215,7 @@ mod tests {
"verdicts":[{
"action_index":0,
"result":"match",
"mismatch_kind":null,
"repair_guidance":null
"findings":[]
}]
})
.to_string()),
@ -2440,7 +2586,7 @@ mod tests {
crate::resolution::default_demand(&campaign, "resettlement"),
)
.unwrap();
let slice = cell_slice(&campaign, &cover.cells[0]).unwrap();
let slice = cell_slice(&campaign, &cover, &cover.cells[0]).unwrap();
assert_eq!(
slice.canonical_locations.get("center").map(String::as_str),
Some("Center")
@ -2523,7 +2669,7 @@ mod tests {
let mut focused_cell = cover.cells[0].clone();
focused_cell.detail_focus_subject_id = Some("refugees".into());
let focused = cell_slice(&campaign, &focused_cell).unwrap();
let focused = cell_slice(&campaign, &cover, &focused_cell).unwrap();
assert!(focused.decision_owner_ids.contains("refugees"));
assert!(!focused.decision_owner_ids.contains("member:mira"));
@ -2533,7 +2679,8 @@ mod tests {
crate::resolution::default_demand(&campaign, "ordinary local work"),
)
.unwrap();
let local_only = cell_slice(&campaign, &local_only_cover.cells[0]).unwrap();
let local_only =
cell_slice(&campaign, &local_only_cover, &local_only_cover.cells[0]).unwrap();
assert!(
local_only
.member_exceptions

View file

@ -987,17 +987,44 @@ and Eryn Tal. Citation resolution, temporal bounds, player immutability,
manifest integrity, archive integrity, and live-service isolation otherwise
pass. Editorial and grounding acceptance are terminally failed for run 39.
The current uncommitted cut names Nemesis as the causal-attention owner.
Nemesis may bind exact committed pressure anchors to eligible autonomous
decision owners already represented in the frozen cover, or return an empty
judgment; it cannot choose their actions or outcomes. Deterministic scheduler
admission enforces visibility, simulation authority, player exclusion, cell
quota, and checkpoint binding. `WorldKernel` requires the exact admitted
Nemesis receipt before commit and persists the served anchor/responder pair so
durable continuation suppresses replay. The outcome resolver receives the
exact assigned causal account as context rather than a generic demand for
drama. The action-effect verifier returns one bounded complete mismatch set for
one private Interpreter correction.
Newspaper grounding repair is a `ModelAgentTool` transaction over the same
frozen desk and complete finding set. One bounded pass may replace only an
exact uniquely occurring phrase named by a finding or delete its flagged
article, then must undergo fresh whole-page verification. Focused tests pass
for exact-receipt kernel admission, exact causal outcome context, legitimate
empty judgment, durable replay suppression, narrow one-pass exact-phrase
grounding repair, and bounded complete mismatch feedback. Local package
verification is complete: all 464 library tests pass; 42 of 44 binary tests
passed in the package run, and the two fixture-only failures caused by clocks
binding the externally controlled player both pass after the shared fixture was
corrected to use one non-active aggregate institution as exact observable
consequence scope. The cut is not yet committed, pushed, provider-proven, or
editorially accepted; run 39's independent FAIL verdicts remain authoritative.
Pushed `af749de` routes a provider timeout through the shared model transport's
existing one same-request retry and records attempt telemetry. Run 36 crossed
that boundary; timeout retry is not its active blocker.
1. Before editing code, map and cut the missing causal follow-through and
outcome ownership upstream of the newsroom, using the independent review
findings as exact falsifiers. Separately map the grounding reconciliation
owner that must reject completion inflation and unsupported identity
attributes before publication. Do not add a newsroom spice prompt rule.
Preserve the immutable run-38 and run-39 archives, stopped run 23, exact
acceptance conditions, and unchanged live daemons.
1. Commit and push the locally verified Nemesis, causal-context,
complete-mismatch, and grounding-reconciliation source.
2. Launch exact-source run 40 as a continuation from immutable run 39 at
revision 21 without replaying prior waves. Submit the strongest unedited
run-40 issue plus final digest to fresh independent editorial and provenance
review. Preserve run 39's FAIL verdicts until those reviews reverse them;
preserve immutable runs 38/39, stopped run 23, exact acceptance conditions,
and unchanged live daemons.
3. Have the game-side adapter lower its authored hierarchy into the published
generic schemas; keep projection and economy translation consumer-owned.
4. Prove one consumer-owned effect crosses that public API, changes two foreign

View file

@ -173,6 +173,8 @@ exact campaign revision
-> flash-model six-axis resolution demand
-> connected agency graph + budget/pins/leases/detail debt
-> cohesive or arena simulation-cell cover
-> scheduler-owned Nemesis agent binds exact committed event, pressure, or clock anchors to eligible decision owners inside that cover
-> deterministic agenda admission checks anchor visibility, simulation authority, player exclusion, and per-cell decision quota
-> one private Projector/Persona/Interpreter membrane per cell
-> Interpreter agent submits or incrementally edits one private exact-decision draft
-> deterministic draft compiler checks exact ownership, permissions, topology, and bounds
@ -189,17 +191,74 @@ exact campaign revision
-> one atomic campaign/event/news/cover/appraisal commit
```
### Causal follow-through (Nemesis)
- **Owner:** the strategic scheduler owns which already-committed consequence
deserves another decision window. The bounded model agent serving that
decision is Nemesis. It does not own what any subject decides.
- **Inputs:** one frozen campaign revision, its committed public events and
active pressures and clock progress, the durable Nemesis attention history,
the deterministic resolution cover, exact perception routes, simulation
eligibility, player-control boundary, and each cell's action quota.
- **Output:** one bounded follow-through agenda binding exact event, pressure,
or clock anchors to exact eligible decision owners already represented by the
cover, plus the model receipt rebound to the exact campaign snapshot and
admitted agenda.
The agenda is scheduler state checkpointed with that cover, not canonical
world state. An empty agenda is a valid Nemesis judgment.
- **Derived state:** an assigned owner receives the exact anchor in its
permitted cell slice, takes precedence over ordinary rotation for that wave,
and supplies that anchor's exact current committed account to the action's
private outcome context. The anchor is context, not new mutation authority.
Unassigned recent events remain an ambient perception projection.
- **Forbidden writers:** the follow-through agent cannot emit events, mutate
pressures, choose an action or outcome, move a subject, rewrite a cell
Persona, or touch newspaper copy. The outcome organ remains the sole
assessor of selected attempts; `WorldKernel` remains the sole world and
event writer and the sole writer of durable served-window records.
- **Shared paths:** first execution and checkpoint resume consume the identical
accepted agenda and exact receipt binding. `WorldKernel` independently
requires that exact admitted receipt before it commits a nonempty causal
agenda, then records each exact anchor/responder pair atomically with the
wave. Local cell verification and final wave admission both check that
required owners were considered without requiring them to act rather than
choose an attributed inaction. Later discovery excludes an already served
exact pair; a clock's new progress value creates a new anchor.
- **Cut line:** blind tick rotation no longer decides a slot already occupied
by an admitted causal assignee, and the global last-twelve-event truncation
cannot hide that assignee's exact anchor. No prompt downstream may compensate
for a missing scheduler decision window. `response_role` and a claimed
accepted-receipt ID are not part of the admission: the scheduler admits only
the exact anchor/responder assignment, and receipt identity comes from the
actual model invocation.
- **Verification layer:** focused tests prove paged retrieval beyond the initial
event viewport, valid empty judgment, exact-pair replay suppression, player
exclusion, exact owner consideration, exact anchor citation, outcome context
containing only the assigned anchor and its committed account, and kernel
rejection of a forged agenda followed by atomic acceptance and served-window
recording for the exact receipted agenda. Deterministic validators reject
unknown anchors, ineligible or duplicate responders, over-quota agendas,
missing exact receipts, and stale anchor accounts. A strategic smoke remains
the whole-system verification that named competing decisions produce
committed material outcomes before editorial quality is assessed.
The model owns no tick mutation. A provider failure or invalid proposal leaves
the campaign revision and world time untouched. Background inference checks
live-turn pressure before launch and again before commit; return catch-up uses
the same command path with player-turn priority for fictional commands.
The effect and outcome verdict schemas make semantic coherence structural:
`match` carries no mismatch fields, while `mismatch` requires its exact kind or
repair text. Repair prose is ephemeral diagnostic input, not world state; local
code bounds it before correction and never publishes private cell choices to a
player error surface. A rejected wave returns one spoiler-free message while
its exact diagnostic remains operator-only.
The effect and outcome verdict schemas make semantic coherence structural. Each
candidate action receives its own parallel effect-verifier call. Its schema and
local validator both require one index-zero verdict: `match` with no findings,
or `mismatch` with one through six findings whose mismatch kinds are distinct
and whose concrete repair guidance is nonempty, trimmed, and at most 240
characters. The prompt asks for that complete bounded set and the request's
1,200-token ceiling can carry the full schema maximum. Every returned finding
enters one subject-scoped Interpreter repair. Repair prose is ephemeral
diagnostic input, not world state; no verifier chooses the replacement or gains
commit authority, and private cell choices never reach a player error surface.
A rejected wave returns one spoiler-free message while its exact diagnostic
remains operator-only.
The Interpreter is a bounded model agent over a private workbench. Every
model-agent workbench owns the action schema legal at its current state; the
@ -1222,10 +1281,28 @@ the front-page budget, and reader-safe presentation labels. Accepted citations
are then lowered back to exact canonical source-news and event IDs for the
typed issue and audit. A separate copy-desk stage may reject unsupported facts,
unearned attribution, procedural leakage, or mechanical state-ledger copy but
cannot rewrite it. Two same-desk editor corrections are allowed. After both
fail, the composition owner may remove every flagged article and must submit
the surviving page to a fresh whole-page copy-desk review; an empty or rejected
page returns no edition. The typed issue retains exact event IDs, channels,
cannot rewrite it. Its desk includes each account's typed assertion status and
the exact supported identity attributes for every named person, including an
explicitly empty set when canon supplies none. A rejected draft enters one
cheap grounding-reconciliation agent over the same frozen page, desk, and
complete typed finding set. Its sole one-step command is one transactional edit
batch: replace an exact finding phrase in one named headline, deck, dateline,
or paragraph, or delete a finding-bearing article when its story cannot be
supported. Deterministic admission requires every finding to be addressed,
requires each replacement phrase to occur exactly once in its named field,
forbids duplicate targets and simultaneous edit/delete of one article, and
keeps citations, surviving article selection and order, sections, bylines, and
all unaffected text frozen. If the lead is deleted, owner code promotes the
next article to the front page. The agent cannot request a new simulation or
source packet, submit a replacement `EditorialPageDraft`, or act as a second
editor. The same copy desk rechecks the complete repaired page. A rejected
repair, an empty surviving page, or a page rejected on recheck returns no
edition; there is no further repair loop. Thus the editor owns initial copy,
the reconciler owns only this exact repair transaction, the copy desk owns
grounding judgment, and none owns source facts or world state. Focused tests
cover exact same-desk repair with source identity preserved, bounded article
deletion with survivor recheck, and terminal rejection after the single repair
step. The typed issue retains exact event IDs, channels,
reliability, source revision, and model receipts as audit data. Its internal
issue time is derived from the latest cited publication record without exposing
that clock to editorial inference. Terminally rejected attempts semantically

View file

@ -196,4 +196,7 @@
{"note": "Exact pushed source 596e50679244b5d42b4cfdf70d723f815751b8ff completed provider run 38 from the run-37 world at revision 8 without replaying compilation or four committed elaborations. Dynamic per-step schemas recovered 51/52 cells on pulse three and the remaining cell on pulse four; all six waves committed through revision 14. Issues 1 and 3-6 plus the final digest were emitted; wave 2 was withheld for tense inflation. The immutable archive F:\\GameCult\\GhostlightDungeon\\acceptance\\elven-realms-autonomous-596e506-38.tar independently matches SHA-256 38637A8DC14F04EBF1C7B1BB4675B2456379EECB1D59E7982CFF3279C06E9FAF, and BUILD-WITNESS records live_service_mutated=false. This retires push/run38/provider mechanics as the active next action. Editorial acceptance still fails because copy is procedural rather than spicy and no per-wave Issue 2 exists. Before code, map newspaper reconciliation and ownership of strategic drama, novelty, event selection, and grounded editorial voice; do not add a symptom prompt rule.", "status": "ok", "ts": "2026-08-28T21:40:45+00:00", "type": "verification"}
{"note": "Pushed Ghostlight commit 3a69306f3004e4af2cd57bba612a6ad8d1b8132f implements and locally verifies the clock-consequence owner: clocks own declared consequence text and exact observable scope; bounded legacy binding remains proposal-only; WorldKernel alone admits binding and materializes stable threshold-crossing events plus public news through the common atomic mutation path, with binding, event ancestry, receipts, and the next newspaper boundary persisted together. This falsifies architecture mapping as the active next action. Exact-source run 39 is now the active provider acceptance resumed from immutable run 38; launch state is not editorial acceptance, which remains unresolved until actual review of terminal issues and digest.", "status": "ok", "ts": "2026-08-28T22:52:35+00:00", "type": "implementation"}
{"note": "Exact-source run 39 at 3a69306f3004e4af2cd57bba612a6ad8d1b8132f is terminal mechanically complete at world revision 21 with twelve of twelve waves, six new editions 7-12, and a final digest. It resumed run 38 without replaying its six committed waves; SHA256SUMS inspection confirms every inherited wave-01 through wave-06 checkpoint hash matches run 38 exactly. The immutable local archive F:\\GameCult\\GhostlightDungeon\\acceptance\\elven-realms-autonomous-3a69306-39.tar independently matches SHA-256 FA259C699464DF1575022DFAAEA51A3D02E1410770369D14BFE570AC71D24838, and BUILD-WITNESS records live_service_mutated=false. This retires active-run monitoring. Mechanical provider acceptance is complete, but root inspection currently rejects editorial acceptance because the copy is procedural and anemic rather than spicy; independent editorial and provenance reviews remain pending and must own the final judgment.", "status": "ok", "ts": "2026-08-28T23:55:32+00:00", "type": "verification"}
{"ts": "2026-08-29T00:10:33+00:00", "type": "verification", "status": "rejected", "note": "Independent run-39 acceptance is terminally FAIL despite mechanical completion. Blind editorial review found only Issue 7 approaches spicy; Issues 8-12 reduce crisis to plans, filings, inspections, warnings, and abstract relationship deltas without sustained named countermoves, public reaction, betrayal, scandal, reversal, or lived material cost. The smallest owning defect is causal follow-through/outcome ownership upstream of the grounded newsroom. Independent grounding review found Issue 9 deck inflates a planned expedited agenda into completion and Issue 8 invents feminine pronouns for Sela Venn and Eryn Tal. Other checks pass: 208/208 citations resolve, no future events, no replay, player unchanged, 116/116 manifest entries, exact archive, and root-confirmed unchanged live service PIDs/invocations. Next action is map and cut those two ownership seams before code; do not patch spice into the newsroom prompt."}
{"note": "Independent run-39 acceptance is terminally FAIL despite mechanical completion. Blind editorial review found only Issue 7 approaches spicy; Issues 8-12 reduce crisis to plans, filings, inspections, warnings, and abstract relationship deltas without sustained named countermoves, public reaction, betrayal, scandal, reversal, or lived material cost. The smallest owning defect is causal follow-through/outcome ownership upstream of the grounded newsroom. Independent grounding review found Issue 9 deck inflates a planned expedited agenda into completion and Issue 8 invents feminine pronouns for Sela Venn and Eryn Tal. Other checks pass: 208/208 citations resolve, no future events, no replay, player unchanged, 116/116 manifest entries, exact archive, and root-confirmed unchanged live service PIDs/invocations. Next action is map and cut those two ownership seams before code; do not patch spice into the newsroom prompt.", "status": "rejected", "ts": "2026-08-29T00:10:33+00:00", "type": "verification"}
{"note": "Current uncommitted Ghostlight source falsifies mapping/implementation as the next action for the run-39 acceptance defects. It implements a scheduler-owned causal-follow-through agent over exact committed anchors and eligible cover-resident decision owners with deterministic visibility, authority, player-exclusion, quota, checkpoint, and consideration admission; a complete bounded action-effect mismatch set returned to one private Interpreter correction; and a ModelAgentTool newspaper grounding reconciler that may replace only reader copy against the same frozen desk, authoritative assertion status, exhaustive supported identity attributes, and complete typed findings before fresh whole-page verification. Focused owner tests admitted_agenda_is_scheduler_only_and_excludes_the_player, effect_verifier_delivers_multiple_findings_to_one_bounded_correction, and copy_desk_rejection_enters_the_grounding_agent_on_the_same_source_packet pass. Full audit, commit/push, provider continuation from run39 without replay, and independent editorial/provenance acceptance remain pending; run39 FAIL verdicts stay authoritative.", "status": "ok", "ts": "2026-08-29T01:24:17+00:00", "type": "implementation"}
{"note": "Current uncommitted source sharpens the run-39 repair ownership: Nemesis, not an anonymous scheduler agent, owns causal attention. Nemesis may bind exact committed anchors to eligible cover-resident autonomous decision owners or return an empty judgment, but cannot choose action or outcome. Scheduler admission binds the agenda; WorldKernel requires the exact admitted Nemesis receipt and durably records served anchor/responder pairs to suppress replay; the outcome resolver receives the exact causal account. The verifier returns one bounded complete mismatch set. Grounding reconciliation is one ModelAgentTool pass limited to exact uniquely occurring phrases named by complete findings or deletion of a flagged article, followed by fresh whole-page verification. Focused tests for these boundaries pass; the full package gate is still running. Commit/push, exact-source run40 from run39 revision21 without replay, and independent editorial/provenance acceptance remain pending. Run39 FAIL and immutable provenance remain authoritative.", "status": "ok", "ts": "2026-08-29T02:31:52+00:00", "type": "correction"}
{"ts": "2026-08-29T02:37:26+00:00", "type": "verification", "status": "ok", "note": "Local package verification for the uncommitted Nemesis/causal-context/complete-mismatch/grounding-reconciliation cut is complete. All 464 library tests pass. The package binary run passed 42 of 44 tests; its two failures were fixture-only because test clocks bound the externally controlled player. The shared fixture now binds exact observable consequence scope to one non-active aggregate institution, and both failed binary tests pass when resumed individually. Gate-running steering is retired. Next action is commit/push, then exact-source run40 from immutable run39 revision21 without replay. Run39 independent editorial and grounding FAILs remain authoritative until new reviews reverse them."}

View file

@ -198,3 +198,6 @@
{"key": "2026-08-28T225235Z0000-0196-2aaad9238e0e", "payload": "eyJub3RlIjogIlB1c2hlZCBHaG9zdGxpZ2h0IGNvbW1pdCAzYTY5MzA2ZjMwMDRlNGFmMmNkNTdiYmE2MTJhNmFkOGQxYjgxMzJmIGltcGxlbWVudHMgYW5kIGxvY2FsbHkgdmVyaWZpZXMgdGhlIGNsb2NrLWNvbnNlcXVlbmNlIG93bmVyOiBjbG9ja3Mgb3duIGRlY2xhcmVkIGNvbnNlcXVlbmNlIHRleHQgYW5kIGV4YWN0IG9ic2VydmFibGUgc2NvcGU7IGJvdW5kZWQgbGVnYWN5IGJpbmRpbmcgcmVtYWlucyBwcm9wb3NhbC1vbmx5OyBXb3JsZEtlcm5lbCBhbG9uZSBhZG1pdHMgYmluZGluZyBhbmQgbWF0ZXJpYWxpemVzIHN0YWJsZSB0aHJlc2hvbGQtY3Jvc3NpbmcgZXZlbnRzIHBsdXMgcHVibGljIG5ld3MgdGhyb3VnaCB0aGUgY29tbW9uIGF0b21pYyBtdXRhdGlvbiBwYXRoLCB3aXRoIGJpbmRpbmcsIGV2ZW50IGFuY2VzdHJ5LCByZWNlaXB0cywgYW5kIHRoZSBuZXh0IG5ld3NwYXBlciBib3VuZGFyeSBwZXJzaXN0ZWQgdG9nZXRoZXIuIFRoaXMgZmFsc2lmaWVzIGFyY2hpdGVjdHVyZSBtYXBwaW5nIGFzIHRoZSBhY3RpdmUgbmV4dCBhY3Rpb24uIEV4YWN0LXNvdXJjZSBydW4gMzkgaXMgbm93IHRoZSBhY3RpdmUgcHJvdmlkZXIgYWNjZXB0YW5jZSByZXN1bWVkIGZyb20gaW1tdXRhYmxlIHJ1biAzODsgbGF1bmNoIHN0YXRlIGlzIG5vdCBlZGl0b3JpYWwgYWNjZXB0YW5jZSwgd2hpY2ggcmVtYWlucyB1bnJlc29sdmVkIHVudGlsIGFjdHVhbCByZXZpZXcgb2YgdGVybWluYWwgaXNzdWVzIGFuZCBkaWdlc3QuIiwgInN0YXR1cyI6ICJvayIsICJ0cyI6ICIyMDI2LTA4LTI4VDIyOjUyOjM1KzAwOjAwIiwgInR5cGUiOiAiaW1wbGVtZW50YXRpb24ifQ==", "stored_at": "2026-08-28T22:52:35.766755+00:00", "type": "ghostlight.evidence_record.v0"}
{"key": "2026-08-28T235532Z0000-0197-90c7b3096851", "payload": "eyJub3RlIjogIkV4YWN0LXNvdXJjZSBydW4gMzkgYXQgM2E2OTMwNmYzMDA0ZTRhZjJjZDU3YmJhNjEyYTZhZDhkMWI4MTMyZiBpcyB0ZXJtaW5hbCBtZWNoYW5pY2FsbHkgY29tcGxldGUgYXQgd29ybGQgcmV2aXNpb24gMjEgd2l0aCB0d2VsdmUgb2YgdHdlbHZlIHdhdmVzLCBzaXggbmV3IGVkaXRpb25zIDctMTIsIGFuZCBhIGZpbmFsIGRpZ2VzdC4gSXQgcmVzdW1lZCBydW4gMzggd2l0aG91dCByZXBsYXlpbmcgaXRzIHNpeCBjb21taXR0ZWQgd2F2ZXM7IFNIQTI1NlNVTVMgaW5zcGVjdGlvbiBjb25maXJtcyBldmVyeSBpbmhlcml0ZWQgd2F2ZS0wMSB0aHJvdWdoIHdhdmUtMDYgY2hlY2twb2ludCBoYXNoIG1hdGNoZXMgcnVuIDM4IGV4YWN0bHkuIFRoZSBpbW11dGFibGUgbG9jYWwgYXJjaGl2ZSBGOlxcR2FtZUN1bHRcXEdob3N0bGlnaHREdW5nZW9uXFxhY2NlcHRhbmNlXFxlbHZlbi1yZWFsbXMtYXV0b25vbW91cy0zYTY5MzA2LTM5LnRhciBpbmRlcGVuZGVudGx5IG1hdGNoZXMgU0hBLTI1NiBGQTI1OUM2OTk0NjRERjE1NzUwMjJERkFBRUE1MUEzRDAyRTE0MTA3NzAzNjlEMTRCRkU1NzBBQzcxRDI0ODM4LCBhbmQgQlVJTEQtV0lUTkVTUyByZWNvcmRzIGxpdmVfc2VydmljZV9tdXRhdGVkPWZhbHNlLiBUaGlzIHJldGlyZXMgYWN0aXZlLXJ1biBtb25pdG9yaW5nLiBNZWNoYW5pY2FsIHByb3ZpZGVyIGFjY2VwdGFuY2UgaXMgY29tcGxldGUsIGJ1dCByb290IGluc3BlY3Rpb24gY3VycmVudGx5IHJlamVjdHMgZWRpdG9yaWFsIGFjY2VwdGFuY2UgYmVjYXVzZSB0aGUgY29weSBpcyBwcm9jZWR1cmFsIGFuZCBhbmVtaWMgcmF0aGVyIHRoYW4gc3BpY3k7IGluZGVwZW5kZW50IGVkaXRvcmlhbCBhbmQgcHJvdmVuYW5jZSByZXZpZXdzIHJlbWFpbiBwZW5kaW5nIGFuZCBtdXN0IG93biB0aGUgZmluYWwganVkZ21lbnQuIiwgInN0YXR1cyI6ICJvayIsICJ0cyI6ICIyMDI2LTA4LTI4VDIzOjU1OjMyKzAwOjAwIiwgInR5cGUiOiAidmVyaWZpY2F0aW9uIn0=", "stored_at": "2026-08-28T23:55:32.352546+00:00", "type": "ghostlight.evidence_record.v0"}
{"key": "2026-08-29T001033Z0000-0198-69611ef5d48a", "payload": "eyJub3RlIjogIkluZGVwZW5kZW50IHJ1bi0zOSBhY2NlcHRhbmNlIGlzIHRlcm1pbmFsbHkgRkFJTCBkZXNwaXRlIG1lY2hhbmljYWwgY29tcGxldGlvbi4gQmxpbmQgZWRpdG9yaWFsIHJldmlldyBmb3VuZCBvbmx5IElzc3VlIDcgYXBwcm9hY2hlcyBzcGljeTsgSXNzdWVzIDgtMTIgcmVkdWNlIGNyaXNpcyB0byBwbGFucywgZmlsaW5ncywgaW5zcGVjdGlvbnMsIHdhcm5pbmdzLCBhbmQgYWJzdHJhY3QgcmVsYXRpb25zaGlwIGRlbHRhcyB3aXRob3V0IHN1c3RhaW5lZCBuYW1lZCBjb3VudGVybW92ZXMsIHB1YmxpYyByZWFjdGlvbiwgYmV0cmF5YWwsIHNjYW5kYWwsIHJldmVyc2FsLCBvciBsaXZlZCBtYXRlcmlhbCBjb3N0LiBUaGUgc21hbGxlc3Qgb3duaW5nIGRlZmVjdCBpcyBjYXVzYWwgZm9sbG93LXRocm91Z2gvb3V0Y29tZSBvd25lcnNoaXAgdXBzdHJlYW0gb2YgdGhlIGdyb3VuZGVkIG5ld3Nyb29tLiBJbmRlcGVuZGVudCBncm91bmRpbmcgcmV2aWV3IGZvdW5kIElzc3VlIDkgZGVjayBpbmZsYXRlcyBhIHBsYW5uZWQgZXhwZWRpdGVkIGFnZW5kYSBpbnRvIGNvbXBsZXRpb24gYW5kIElzc3VlIDggaW52ZW50cyBmZW1pbmluZSBwcm9ub3VucyBmb3IgU2VsYSBWZW5uIGFuZCBFcnluIFRhbC4gT3RoZXIgY2hlY2tzIHBhc3M6IDIwOC8yMDggY2l0YXRpb25zIHJlc29sdmUsIG5vIGZ1dHVyZSBldmVudHMsIG5vIHJlcGxheSwgcGxheWVyIHVuY2hhbmdlZCwgMTE2LzExNiBtYW5pZmVzdCBlbnRyaWVzLCBleGFjdCBhcmNoaXZlLCBhbmQgcm9vdC1jb25maXJtZWQgdW5jaGFuZ2VkIGxpdmUgc2VydmljZSBQSURzL2ludm9jYXRpb25zLiBOZXh0IGFjdGlvbiBpcyBtYXAgYW5kIGN1dCB0aG9zZSB0d28gb3duZXJzaGlwIHNlYW1zIGJlZm9yZSBjb2RlOyBkbyBub3QgcGF0Y2ggc3BpY2UgaW50byB0aGUgbmV3c3Jvb20gcHJvbXB0LiIsICJzdGF0dXMiOiAicmVqZWN0ZWQiLCAidHMiOiAiMjAyNi0wOC0yOVQwMDoxMDozMyswMDowMCIsICJ0eXBlIjogInZlcmlmaWNhdGlvbiJ9", "stored_at": "2026-08-29T00:10:33.376902+00:00", "type": "ghostlight.evidence_record.v0"}
{"key": "2026-08-29T012417Z0000-0199-7a68f4d4bac3", "payload": "eyJub3RlIjogIkN1cnJlbnQgdW5jb21taXR0ZWQgR2hvc3RsaWdodCBzb3VyY2UgZmFsc2lmaWVzIG1hcHBpbmcvaW1wbGVtZW50YXRpb24gYXMgdGhlIG5leHQgYWN0aW9uIGZvciB0aGUgcnVuLTM5IGFjY2VwdGFuY2UgZGVmZWN0cy4gSXQgaW1wbGVtZW50cyBhIHNjaGVkdWxlci1vd25lZCBjYXVzYWwtZm9sbG93LXRocm91Z2ggYWdlbnQgb3ZlciBleGFjdCBjb21taXR0ZWQgYW5jaG9ycyBhbmQgZWxpZ2libGUgY292ZXItcmVzaWRlbnQgZGVjaXNpb24gb3duZXJzIHdpdGggZGV0ZXJtaW5pc3RpYyB2aXNpYmlsaXR5LCBhdXRob3JpdHksIHBsYXllci1leGNsdXNpb24sIHF1b3RhLCBjaGVja3BvaW50LCBhbmQgY29uc2lkZXJhdGlvbiBhZG1pc3Npb247IGEgY29tcGxldGUgYm91bmRlZCBhY3Rpb24tZWZmZWN0IG1pc21hdGNoIHNldCByZXR1cm5lZCB0byBvbmUgcHJpdmF0ZSBJbnRlcnByZXRlciBjb3JyZWN0aW9uOyBhbmQgYSBNb2RlbEFnZW50VG9vbCBuZXdzcGFwZXIgZ3JvdW5kaW5nIHJlY29uY2lsZXIgdGhhdCBtYXkgcmVwbGFjZSBvbmx5IHJlYWRlciBjb3B5IGFnYWluc3QgdGhlIHNhbWUgZnJvemVuIGRlc2ssIGF1dGhvcml0YXRpdmUgYXNzZXJ0aW9uIHN0YXR1cywgZXhoYXVzdGl2ZSBzdXBwb3J0ZWQgaWRlbnRpdHkgYXR0cmlidXRlcywgYW5kIGNvbXBsZXRlIHR5cGVkIGZpbmRpbmdzIGJlZm9yZSBmcmVzaCB3aG9sZS1wYWdlIHZlcmlmaWNhdGlvbi4gRm9jdXNlZCBvd25lciB0ZXN0cyBhZG1pdHRlZF9hZ2VuZGFfaXNfc2NoZWR1bGVyX29ubHlfYW5kX2V4Y2x1ZGVzX3RoZV9wbGF5ZXIsIGVmZmVjdF92ZXJpZmllcl9kZWxpdmVyc19tdWx0aXBsZV9maW5kaW5nc190b19vbmVfYm91bmRlZF9jb3JyZWN0aW9uLCBhbmQgY29weV9kZXNrX3JlamVjdGlvbl9lbnRlcnNfdGhlX2dyb3VuZGluZ19hZ2VudF9vbl90aGVfc2FtZV9zb3VyY2VfcGFja2V0IHBhc3MuIEZ1bGwgYXVkaXQsIGNvbW1pdC9wdXNoLCBwcm92aWRlciBjb250aW51YXRpb24gZnJvbSBydW4zOSB3aXRob3V0IHJlcGxheSwgYW5kIGluZGVwZW5kZW50IGVkaXRvcmlhbC9wcm92ZW5hbmNlIGFjY2VwdGFuY2UgcmVtYWluIHBlbmRpbmc7IHJ1bjM5IEZBSUwgdmVyZGljdHMgc3RheSBhdXRob3JpdGF0aXZlLiIsICJzdGF0dXMiOiAib2siLCAidHMiOiAiMjAyNi0wOC0yOVQwMToyNDoxNyswMDowMCIsICJ0eXBlIjogImltcGxlbWVudGF0aW9uIn0=", "stored_at": "2026-08-29T01:24:17.306063+00:00", "type": "ghostlight.evidence_record.v0"}
{"key": "2026-08-29T023152Z0000-0200-57ab8035aa4c", "payload": "eyJub3RlIjogIkN1cnJlbnQgdW5jb21taXR0ZWQgc291cmNlIHNoYXJwZW5zIHRoZSBydW4tMzkgcmVwYWlyIG93bmVyc2hpcDogTmVtZXNpcywgbm90IGFuIGFub255bW91cyBzY2hlZHVsZXIgYWdlbnQsIG93bnMgY2F1c2FsIGF0dGVudGlvbi4gTmVtZXNpcyBtYXkgYmluZCBleGFjdCBjb21taXR0ZWQgYW5jaG9ycyB0byBlbGlnaWJsZSBjb3Zlci1yZXNpZGVudCBhdXRvbm9tb3VzIGRlY2lzaW9uIG93bmVycyBvciByZXR1cm4gYW4gZW1wdHkganVkZ21lbnQsIGJ1dCBjYW5ub3QgY2hvb3NlIGFjdGlvbiBvciBvdXRjb21lLiBTY2hlZHVsZXIgYWRtaXNzaW9uIGJpbmRzIHRoZSBhZ2VuZGE7IFdvcmxkS2VybmVsIHJlcXVpcmVzIHRoZSBleGFjdCBhZG1pdHRlZCBOZW1lc2lzIHJlY2VpcHQgYW5kIGR1cmFibHkgcmVjb3JkcyBzZXJ2ZWQgYW5jaG9yL3Jlc3BvbmRlciBwYWlycyB0byBzdXBwcmVzcyByZXBsYXk7IHRoZSBvdXRjb21lIHJlc29sdmVyIHJlY2VpdmVzIHRoZSBleGFjdCBjYXVzYWwgYWNjb3VudC4gVGhlIHZlcmlmaWVyIHJldHVybnMgb25lIGJvdW5kZWQgY29tcGxldGUgbWlzbWF0Y2ggc2V0LiBHcm91bmRpbmcgcmVjb25jaWxpYXRpb24gaXMgb25lIE1vZGVsQWdlbnRUb29sIHBhc3MgbGltaXRlZCB0byBleGFjdCB1bmlxdWVseSBvY2N1cnJpbmcgcGhyYXNlcyBuYW1lZCBieSBjb21wbGV0ZSBmaW5kaW5ncyBvciBkZWxldGlvbiBvZiBhIGZsYWdnZWQgYXJ0aWNsZSwgZm9sbG93ZWQgYnkgZnJlc2ggd2hvbGUtcGFnZSB2ZXJpZmljYXRpb24uIEZvY3VzZWQgdGVzdHMgZm9yIHRoZXNlIGJvdW5kYXJpZXMgcGFzczsgdGhlIGZ1bGwgcGFja2FnZSBnYXRlIGlzIHN0aWxsIHJ1bm5pbmcuIENvbW1pdC9wdXNoLCBleGFjdC1zb3VyY2UgcnVuNDAgZnJvbSBydW4zOSByZXZpc2lvbjIxIHdpdGhvdXQgcmVwbGF5LCBhbmQgaW5kZXBlbmRlbnQgZWRpdG9yaWFsL3Byb3ZlbmFuY2UgYWNjZXB0YW5jZSByZW1haW4gcGVuZGluZy4gUnVuMzkgRkFJTCBhbmQgaW1tdXRhYmxlIHByb3ZlbmFuY2UgcmVtYWluIGF1dGhvcml0YXRpdmUuIiwgInN0YXR1cyI6ICJvayIsICJ0cyI6ICIyMDI2LTA4LTI5VDAyOjMxOjUyKzAwOjAwIiwgInR5cGUiOiAiY29ycmVjdGlvbiJ9", "stored_at": "2026-08-29T02:31:52.158599+00:00", "type": "ghostlight.evidence_record.v0"}
{"key": "2026-08-29T023726Z0000-0201-443d8b0ce686", "payload": "eyJub3RlIjogIkxvY2FsIHBhY2thZ2UgdmVyaWZpY2F0aW9uIGZvciB0aGUgdW5jb21taXR0ZWQgTmVtZXNpcy9jYXVzYWwtY29udGV4dC9jb21wbGV0ZS1taXNtYXRjaC9ncm91bmRpbmctcmVjb25jaWxpYXRpb24gY3V0IGlzIGNvbXBsZXRlLiBBbGwgNDY0IGxpYnJhcnkgdGVzdHMgcGFzcy4gVGhlIHBhY2thZ2UgYmluYXJ5IHJ1biBwYXNzZWQgNDIgb2YgNDQgdGVzdHM7IGl0cyB0d28gZmFpbHVyZXMgd2VyZSBmaXh0dXJlLW9ubHkgYmVjYXVzZSB0ZXN0IGNsb2NrcyBib3VuZCB0aGUgZXh0ZXJuYWxseSBjb250cm9sbGVkIHBsYXllci4gVGhlIHNoYXJlZCBmaXh0dXJlIG5vdyBiaW5kcyBleGFjdCBvYnNlcnZhYmxlIGNvbnNlcXVlbmNlIHNjb3BlIHRvIG9uZSBub24tYWN0aXZlIGFnZ3JlZ2F0ZSBpbnN0aXR1dGlvbiwgYW5kIGJvdGggZmFpbGVkIGJpbmFyeSB0ZXN0cyBwYXNzIHdoZW4gcmVzdW1lZCBpbmRpdmlkdWFsbHkuIEdhdGUtcnVubmluZyBzdGVlcmluZyBpcyByZXRpcmVkLiBOZXh0IGFjdGlvbiBpcyBjb21taXQvcHVzaCwgdGhlbiBleGFjdC1zb3VyY2UgcnVuNDAgZnJvbSBpbW11dGFibGUgcnVuMzkgcmV2aXNpb24yMSB3aXRob3V0IHJlcGxheS4gUnVuMzkgaW5kZXBlbmRlbnQgZWRpdG9yaWFsIGFuZCBncm91bmRpbmcgRkFJTHMgcmVtYWluIGF1dGhvcml0YXRpdmUgdW50aWwgbmV3IHJldmlld3MgcmV2ZXJzZSB0aGVtLiIsICJzdGF0dXMiOiAib2siLCAidHMiOiAiMjAyNi0wOC0yOVQwMjozNzoyNiswMDowMCIsICJ0eXBlIjogInZlcmlmaWNhdGlvbiJ9", "stored_at": "2026-08-29T02:37:26.864129+00:00", "type": "ghostlight.evidence_record.v0"}

View file

@ -326,5 +326,6 @@ data_flow:
current_status:
summary: Ghostlight's generic consumer boundary admits sparse WorldSeeds, runs the hundreds-class parallel cell machinery used by Dungeon, and projects grounded newspapers from committed public events. Local acceptance proves 1,000 subjects across 200 cells and two-wave durable named-person emergence. Exact-source provider run 38 at `596e50679244b5d42b4cfdf70d723f815751b8ff` resumed the preserved world at revision 8 without replaying compilation or four committed locality elaborations, recovered 51 of 52 strategic-wave cells on pulse three and the final cell on pulse four, then committed all six waves through revision 14. Pushed commit `3a69306f3004e4af2cd57bba612a6ad8d1b8132f` implements the mapped clock-consequence owner and is verified locally: world clocks own declared consequence text and exact observable scope; a bounded agent may propose legacy scope binding, while `WorldKernel` alone admits it and materializes stable threshold-crossing events and public news through the common mutation path. Binding, emitted-event ancestry, mutation receipts, and the next newspaper boundary persist atomically. Exact-source run 39 resumed run 38 without replaying its six committed waves, bound clock consequences, committed six new waves through revision 21, and emitted Issues 7 through 12 plus a final digest. This completes the mechanical provider acceptance path; all inherited wave 1-6 checkpoint hashes match run 38 exactly and live services were unchanged. Independent blind editorial review returns FAIL: only Issue 7 approaches spicy, while Issues 8-12 are dominated by plans, filings, inspections, warnings, and abstract relationship deltas without betrayal, scandal, public reaction, sustained reversal, or material lived cost. The defect belongs upstream in causal follow-through and outcome ownership, not in newsroom spice prompting. Independent grounding review also returns FAIL: Issue 9 inflates a planned expedited agenda into completion, while Issue 8 assigns unsupported feminine pronouns to Sela Venn and Eryn Tal. Other grounding mechanics pass: 208/208 citations resolve, no future events appear, no replay occurred, the player remained unchanged, all 116/116 manifest entries verify, the archive is exact, and root independently confirmed the live service PIDs and invocation IDs remained unchanged. Editorial and grounding acceptance are terminally failed for run 39. Eight titled elaborators use the generic agent harness under deterministic weighted scheduling, bounded parallelism, and Luna/Terra/Sol routing. Workers remain proposal-only; deterministic admission binds exact frozen schedules, dispatch, receipts, conflicts, and semantic verification, and `WorldKernel` alone owns atomic CultCache persistence. Destination reconciliation is a private transactional workbench, provider schema compatibility is lowered once at the shared model-connector boundary, and durable elaboration and strategic-pulse checkpoints bind to their canonical mutation proofs. The generic ModelAgent harness remains consumer-neutral transport. Provider run 23 remains stopped; earlier failed runs and checkpoint archives remain immutable provenance. The live daemons remain outside the acceptance body. Dungeon play remains regression pressure, the Delvehold game-side adapter remains unimplemented, and unpublished Mars and Kalsa destination previews remain unapproved.
provider_acceptance_checkpoint: Exact-source run 39 at `3a69306f3004e4af2cd57bba612a6ad8d1b8132f` is mechanically complete at revision 21 with twelve of twelve waves. Its archive and no-replay lineage remain verified. Independent editorial acceptance is FAIL because Issues 8-12 lack causal follow-through, lived cost, reversals, scandal, betrayal, and public reaction. Independent grounding acceptance is FAIL because Issue 9 converts a planned expedited agenda into completion and Issue 8 uses unsupported feminine pronouns for Sela Venn and Eryn Tal. Citation resolution, temporal bounds, player immutability, manifest integrity, archive integrity, and live-service isolation otherwise pass.
next_action: Before editing code, map and cut the missing causal follow-through and outcome ownership upstream of the newsroom, using the independent review findings as exact falsifiers. Separately map the grounding reconciliation owner that must reject completion inflation and unsupported identity attributes before publication. Do not add a newsroom spice prompt rule. Preserve the immutable run-38 and run-39 archives, stopped run 23, exact acceptance conditions, and unchanged live daemons.
implementation_checkpoint: Current uncommitted source names Nemesis as the causal-attention owner. Nemesis may bind exact committed pressure anchors to eligible autonomous decision owners already represented in the frozen cover, or return an empty judgment; it cannot choose their actions or outcomes. Deterministic scheduler admission enforces visibility, simulation authority, player exclusion, cell quota, and checkpoint binding. `WorldKernel` requires the exact admitted Nemesis receipt before commit and persists the served anchor/responder pair so durable continuation suppresses replay. The outcome resolver receives the exact assigned causal account as context rather than a generic demand for drama. The action-effect verifier returns one bounded complete mismatch set for one private Interpreter correction. Newspaper grounding repair is a `ModelAgentTool` transaction over the same frozen desk and complete finding set: one bounded pass may replace only an exact uniquely occurring phrase named by a finding or delete its flagged article, then must undergo fresh whole-page verification. Focused tests pass for exact-receipt kernel admission, exact causal outcome context, legitimate empty judgment, durable replay suppression, narrow one-pass exact-phrase grounding repair, and bounded complete mismatch feedback. Local package verification is complete: all 464 library tests pass; 42 of 44 binary tests passed in the package run, and the two fixture-only failures caused by clocks binding the externally controlled player both pass after the shared fixture was corrected to use one non-active aggregate institution as exact observable consequence scope. The cut is not yet committed, pushed, provider-proven, or editorially accepted; run 39's independent FAIL verdicts remain authoritative.
next_action: Commit and push the locally verified Nemesis, causal-context, complete-mismatch, and grounding-reconciliation source. Then launch exact-source run 40 as a continuation from immutable run 39 at revision 21 without replaying prior waves. Submit the strongest unedited run-40 issue plus final digest to fresh independent editorial and provenance review. Preserve run 39's FAIL verdicts until those reviews reverse them; preserve immutable runs 38/39, stopped run 23, exact acceptance conditions, and unchanged live daemons.
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.