From 5c07d49edb550bc0047f1b0bae422f186bd25ad6 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 29 Aug 2026 12:04:10 +0200 Subject: [PATCH] Give the Canopy Ledger narrative judgment --- crates/ghostlight-dungeon/src/mesh.rs | 4 +- .../ghostlight-dungeon/src/native_cultmesh.rs | 2 +- crates/ghostlight-dungeon/src/newspaper.rs | 825 +++++++++++++++--- crates/ghostlight-dungeon/src/registry.rs | 34 +- notes/fresh-workspace-handoff.md | 50 +- notes/ghostlight-current-system-map.md | 121 ++- state/evidence.jsonl | 3 +- state/ghostlight-state.cultcache.jsonl | 1 + state/map.yaml | 6 +- 9 files changed, 874 insertions(+), 172 deletions(-) diff --git a/crates/ghostlight-dungeon/src/mesh.rs b/crates/ghostlight-dungeon/src/mesh.rs index 5ef6858..e2de4d9 100644 --- a/crates/ghostlight-dungeon/src/mesh.rs +++ b/crates/ghostlight-dungeon/src/mesh.rs @@ -595,7 +595,7 @@ fn schema_catalog() -> Value { "ghostlight.external_proposal_acknowledgement.v1": schemars::schema_for!(crate::consumer::ExternalProposalAcknowledgement), "ghostlight.external_proposal_receipt.v1": schemars::schema_for!(crate::consumer::ExternalProposalReceipt), "ghostlight.world_newspaper_request.v2": schemars::schema_for!(crate::consumer::WorldNewspaperRequest), - "ghostlight.world_newspaper_issue.v2": schemars::schema_for!(crate::newspaper::WorldNewspaperIssue) + "ghostlight.world_newspaper_issue.v3": schemars::schema_for!(crate::newspaper::WorldNewspaperIssue) }) } @@ -628,7 +628,7 @@ mod tests { assert!(schemas["ghostlight.session_zero.v1"]["$schema"].is_string()); assert!(schemas["ghostlight.vault_source_manifest.v1"]["$schema"].is_string()); assert!(schemas["ghostlight.world_newspaper_request.v2"]["$schema"].is_string()); - assert!(schemas["ghostlight.world_newspaper_issue.v2"]["$schema"].is_string()); + assert!(schemas["ghostlight.world_newspaper_issue.v3"]["$schema"].is_string()); assert!(!schemas.contains_key("ghostlight.persona_stage_receipt.v1")); assert!(!schemas.contains_key("ghostlight.world_mutation.v1")); drop(catalog); diff --git a/crates/ghostlight-dungeon/src/native_cultmesh.rs b/crates/ghostlight-dungeon/src/native_cultmesh.rs index c85c6e3..8e17bde 100644 --- a/crates/ghostlight-dungeon/src/native_cultmesh.rs +++ b/crates/ghostlight-dungeon/src/native_cultmesh.rs @@ -316,7 +316,7 @@ async fn handle_operation_inner( .registry .compose_world_newspaper(command, model) .await?; - success_response(request, "ghostlight.world_newspaper_issue.v2", &issue) + success_response(request, "ghostlight.world_newspaper_issue.v3", &issue) } _ => bail!("world consumer operation is not advertised by Ghostlight"), }; diff --git a/crates/ghostlight-dungeon/src/newspaper.rs b/crates/ghostlight-dungeon/src/newspaper.rs index 9b2ff72..69b7275 100644 --- a/crates/ghostlight-dungeon/src/newspaper.rs +++ b/crates/ghostlight-dungeon/src/newspaper.rs @@ -25,6 +25,7 @@ use std::{ const MAX_FRONT_PAGE_ARTICLES: usize = 6; const MAX_SOURCE_NEWS_ITEMS: usize = 32; const GROUNDING_RECONCILIATION_ACTIONS_PER_ADVANCE: usize = 3; +const NEWSROOM_CONTRACT_VERSION: &str = "canopy-ledger-narrative-selection.v1"; const EDITION_LABEL: &str = "Current Edition"; const ALLOWED_SECTIONS: [&str; 6] = [ "Front Page", @@ -51,6 +52,7 @@ pub struct WorldNewspaperIssue { pub at: DateTime, pub source_world_revision: u64, pub lead_article_id: Option, + pub editorial_agenda: Option, pub articles: Vec, pub editorial_receipt_ids: Vec, } @@ -64,10 +66,65 @@ pub struct WorldNewspaperArticle { pub byline: String, pub dateline: Option, pub paragraphs: Vec, + pub sources: Vec, +} + +impl WorldNewspaperArticle { + pub fn source_news_ids(&self) -> Vec { + self.sources + .iter() + .flat_map(|source| source.source_news_ids.iter().cloned()) + .collect::>() + .into_iter() + .collect() + } + + pub fn event_ids(&self) -> Vec { + self.sources + .iter() + .flat_map(|source| source.facts.iter()) + .flat_map(|fact| fact.event_ids.iter().cloned()) + .collect::>() + .into_iter() + .collect() + } +} + +#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] +pub struct WorldNewspaperSourceCitation { + pub citation: String, pub source_news_ids: Vec, pub source_channels: Vec, pub source_reliability: Vec, + pub facts: Vec, +} + +#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] +pub struct WorldNewspaperSourceFact { pub event_ids: Vec, + pub account: String, + pub assertion_status: WorldNewspaperAssertionStatus, + pub named_people: Vec, + pub institutions: Vec, + pub populations: Vec, + pub places: Vec, +} + +#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] +#[serde(rename_all = "snake_case")] +pub enum WorldNewspaperAssertionStatus { + AttemptCommittedOutcomeUnknown, + CourseCommittedEmbeddedActionsNotCompleted, + PublicDeclaration, + MaterialChangeCommitted, + PublicAccountStatusUnspecified, +} + +#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] +pub struct WorldNewspaperNamedPerson { + pub name: String, + /// Empty until the canonical subject state owns an explicit attribute. + pub supported_identity_attributes: Vec, } #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] @@ -149,6 +206,8 @@ pub struct WorldNewspaperReconciliationCheckpoint { previous_checkpoint_id: Option, origin: WorldNewspaperCheckpointOrigin, source_witness_digest: Option, + #[serde(default)] + editorial_agenda: Option, draft: EditorialPageDraft, verdict: WorldNewspaperGroundingVerdict, model_receipt_ids: Vec, @@ -182,6 +241,8 @@ impl WorldNewspaperReconciliationCheckpoint { pub struct WorldNewspaperReconciliationImport { schema: String, source_witness_digest: String, + #[serde(default)] + editorial_agenda: Option, draft: EditorialPageDraft, verdict: WorldNewspaperGroundingVerdict, model_receipts: Vec, @@ -225,30 +286,13 @@ struct NewsroomSource { struct NewsroomEvent { event_ids: BTreeSet, summary: String, - assertion_status: NewsroomAssertionStatus, - named_people: Vec, + assertion_status: WorldNewspaperAssertionStatus, + named_people: Vec, institution_names: Vec, population_names: Vec, place_names: Vec, } -#[derive(Clone, Debug, Serialize, PartialEq, Eq)] -#[serde(rename_all = "snake_case")] -enum NewsroomAssertionStatus { - AttemptCommittedOutcomeUnknown, - CourseCommittedEmbeddedActionsNotCompleted, - PublicDeclaration, - MaterialChangeCommitted, - PublicAccountStatusUnspecified, -} - -#[derive(Clone, Debug, Serialize, PartialEq, Eq)] -struct NewsroomNamedPerson { - name: String, - /// Empty until the canonical subject state owns an explicit attribute. - supported_identity_attributes: Vec, -} - #[derive(Serialize)] struct NewsroomDeskNote<'a> { citation: &'a str, @@ -258,13 +302,232 @@ struct NewsroomDeskNote<'a> { #[derive(Serialize)] struct NewsroomFact<'a> { account: &'a str, - assertion_status: &'a NewsroomAssertionStatus, - named_people: &'a [NewsroomNamedPerson], + assertion_status: &'a WorldNewspaperAssertionStatus, + named_people: &'a [WorldNewspaperNamedPerson], institutions: &'a [String], populations: &'a [String], places: &'a [String], } +#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] +#[serde(deny_unknown_fields)] +pub struct WorldNewspaperEditorialAgenda { + #[schemars(length(min = 1, max = 500))] + pub dominant_throughline: String, + #[schemars(length(min = 1, max = 500))] + pub reader_stake: String, + #[schemars(length(min = 1, max = 6))] + pub story_pitches: Vec, +} + +#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] +#[serde(deny_unknown_fields)] +pub struct WorldNewspaperStoryPitch { + pub lead: bool, + #[schemars(length(min = 1, max = 32))] + pub citations: Vec, + #[schemars(length(min = 1, max = 500))] + pub angle: String, + #[schemars(length(min = 1, max = 500))] + pub tension: String, + #[schemars(length(min = 1, max = 500))] + pub public_question: String, +} + +#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] +#[serde(tag = "tool", rename_all = "snake_case", deny_unknown_fields)] +enum NarrativeSelectionAction { + SubmitAgenda { + #[schemars(length(min = 1, max = 500))] + dominant_throughline: String, + #[schemars(length(min = 1, max = 500))] + reader_stake: String, + #[schemars(length(min = 1, max = 6))] + story_pitches: Vec, + }, +} + +#[derive(Clone, Debug, Serialize, PartialEq, Eq)] +#[serde(tag = "kind", rename_all = "snake_case")] +enum NarrativeSelectionFinding { + AgendaRejected { reason: String }, +} + +struct NarrativeSelectionWorkbench<'a> { + sources: &'a [NewsroomSource], + max_articles: usize, +} + +#[async_trait] +impl ModelAgentTool for NarrativeSelectionWorkbench<'_> { + type Action = NarrativeSelectionAction; + type Output = WorldNewspaperEditorialAgenda; + type Finding = NarrativeSelectionFinding; + + fn action_schema(&self) -> std::result::Result { + let citations = self + .sources + .iter() + .map(|source| source.citation.clone()) + .collect::>(); + let story_budget = self.max_articles.min(self.sources.len()); + let mut schema = serde_json::json!({ + "type":"object", + "additionalProperties":false, + "required":[ + "tool", + "dominant_throughline", + "reader_stake", + "story_pitches" + ], + "properties":{ + "tool":{"const":"submit_agenda"}, + "dominant_throughline":{"type":"string","minLength":1,"maxLength":500}, + "reader_stake":{"type":"string","minLength":1,"maxLength":500}, + "story_pitches":{ + "type":"array", + "minItems":1, + "maxItems":story_budget, + "items":{ + "type":"object", + "additionalProperties":false, + "required":[ + "lead", + "citations", + "angle", + "tension", + "public_question" + ], + "properties":{ + "lead":{"type":"boolean"}, + "citations":{ + "type":"array", + "minItems":1, + "maxItems":32, + "uniqueItems":true, + "items":{"type":"string","enum":citations} + }, + "angle":{"type":"string","minLength":1,"maxLength":500}, + "tension":{"type":"string","minLength":1,"maxLength":500}, + "public_question":{"type":"string","minLength":1,"maxLength":500} + } + } + } + } + }); + crate::model_connector::project_strict_responses_schema(&mut schema) + .map_err(|error| error.to_string())?; + Ok(schema) + } + + async fn invoke( + &mut self, + action: Self::Action, + _context: &ModelAgentToolContext, + ) -> ModelAgentToolOutcome { + let NarrativeSelectionAction::SubmitAgenda { + dominant_throughline, + reader_stake, + story_pitches, + } = action; + let agenda = WorldNewspaperEditorialAgenda { + dominant_throughline, + reader_stake, + story_pitches, + }; + match validate_editorial_agenda(self.sources, &agenda, self.max_articles) { + Ok(()) => ModelAgentToolOutcome::Accepted { + output: agenda, + receipts: Vec::new(), + }, + Err(error) => ModelAgentToolOutcome::Rejected { + finding: NarrativeSelectionFinding::AgendaRejected { + reason: error.to_string().chars().take(500).collect(), + }, + receipts: Vec::new(), + }, + } + } +} + +fn validate_editorial_frame(value: &str, label: &str) -> Result<()> { + if value.trim().is_empty() + || value.trim() != value + || value.chars().count() > 500 + || value.chars().any(char::is_control) + || value.contains(['\r', '\n', '`']) + { + return Err(anyhow!("{label} is not a bounded editorial frame")); + } + Ok(()) +} + +fn validate_editorial_agenda( + sources: &[NewsroomSource], + agenda: &WorldNewspaperEditorialAgenda, + max_articles: usize, +) -> Result<()> { + validate_editorial_frame(&agenda.dominant_throughline, "dominant throughline")?; + validate_editorial_frame(&agenda.reader_stake, "reader stake")?; + if agenda.story_pitches.is_empty() + || agenda.story_pitches.len() > max_articles.min(sources.len()) + { + return Err(anyhow!("editorial agenda exceeded its story budget")); + } + let known_sources = sources + .iter() + .map(|source| source.citation.as_str()) + .collect::>(); + let mut used_sources = BTreeSet::new(); + for (index, pitch) in agenda.story_pitches.iter().enumerate() { + if pitch.lead != (index == 0) { + return Err(anyhow!( + "editorial agenda must designate exactly its first pitch as lead" + )); + } + if pitch.citations.is_empty() { + return Err(anyhow!("editorial pitch {index} has no citation")); + } + for citation in &pitch.citations { + if !known_sources.contains(citation.as_str()) { + return Err(anyhow!( + "editorial pitch {index} cites unknown newsroom note {citation}" + )); + } + if !used_sources.insert(citation.as_str()) { + return Err(anyhow!( + "newsroom note {citation} appears in more than one editorial pitch" + )); + } + } + validate_editorial_frame(&pitch.angle, "story angle")?; + validate_editorial_frame(&pitch.tension, "story tension")?; + validate_editorial_frame(&pitch.public_question, "public question")?; + } + Ok(()) +} + +fn validate_editorial_alignment( + draft: &EditorialPageDraft, + agenda: &WorldNewspaperEditorialAgenda, +) -> Result<()> { + if draft.articles.len() != agenda.story_pitches.len() { + return Err(anyhow!( + "editorial page does not implement the admitted story selection" + )); + } + for (index, (article, pitch)) in draft.articles.iter().zip(&agenda.story_pitches).enumerate() { + let article_citations = article.citations.iter().collect::>(); + let pitch_citations = pitch.citations.iter().collect::>(); + if article_citations != pitch_citations { + return Err(anyhow!( + "article {index} does not implement its admitted citation grouping" + )); + } + } + Ok(()) +} + #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[serde(deny_unknown_fields)] pub struct EditorialPageDraft { @@ -389,7 +652,6 @@ struct PreparedNewspaper { editorial_voice: String, sources: Vec, source_receipt_ids: Vec, - editorial_schema: serde_json::Value, source_json: String, publication_task_binding: String, binding: String, @@ -426,7 +688,6 @@ fn prepare_newspaper( .iter() .flat_map(|source| source.news_ids.iter().cloned()) .collect::>(); - let editorial_schema = editorial_schema(&sources, max_articles)?; let source_json = serde_json::to_string_pretty(&newsroom_desk(&sources))?; let publication_task_binding = publication_task_binding(campaign, &title, &editorial_voice, max_articles)?; @@ -436,13 +697,41 @@ fn prepare_newspaper( editorial_voice, sources, source_receipt_ids, - editorial_schema, source_json, publication_task_binding, binding, }) } +async fn select_editorial_agenda( + model: &dyn ModelPort, + prepared: &PreparedNewspaper, + max_articles: usize, +) -> std::result::Result< + crate::agent::ModelAgentRun, + crate::agent::ModelAgentFailure, +> { + let instructions = format!( + "You are the narrative editor of `{}`. Construct one compelling editorial agenda from the frozen fact desk. A newspaper is not a neutral transcript: select a dominant throughline that matters to this publication's readers, juxtapose facts that illuminate one another, and identify conflict, hypocrisy, lived stakes, scandal, named opposition, or public consequence where the desk actually supports them. Do not cover a note merely because it exists. Prefer one strong dossier over several administrative summaries, and use fewer pitches when the desk lacks distinct stories. The first pitch is the lead and must set lead=true; every later pitch must set lead=false. Each citation may appear in exactly one pitch. angle, tension, public_question, dominant_throughline, and reader_stake are editorial framing and hypotheses, not evidence. They may be pointed, skeptical, or insinuating, but they must not invent an event, person, institution, place, motive, quotation, outcome, private knowledge, or factual status. The downstream editor may state facts only from the desk and will be constrained to your exact citation groupings. The copy desk will judge factual claims independently. Submit the complete agenda to the workbench.\n\nPUBLICATION VOICE:\n{}\n\nFROZEN NEWSROOM FACT DESK:\n{}", + prepared.title, prepared.editorial_voice, prepared.source_json, + ); + let spec = ModelAgentSpec { + stage: "newspaper_narrative_selection_agent_action".into(), + model: MODEL_CAPABLE.into(), + snapshot_binding: prepared.binding.clone(), + instructions, + source_receipt_ids: prepared.source_receipt_ids.clone(), + temperature: Some(0.8), + max_output_tokens: Some(2_000), + max_steps: 2, + }; + let mut tool = NarrativeSelectionWorkbench { + sources: &prepared.sources, + max_articles, + }; + crate::agent::run_model_agent(model, &spec, &mut tool).await +} + fn checkpoint_receipt_chain_digest(receipt_ids: &[String]) -> Result { Ok(format!( "sha256:{:x}", @@ -457,6 +746,7 @@ fn checkpoint_identity( previous_checkpoint_id: Option<&str>, origin: &WorldNewspaperCheckpointOrigin, source_witness_digest: Option<&str>, + editorial_agenda: Option<&WorldNewspaperEditorialAgenda>, draft: &EditorialPageDraft, verdict: &WorldNewspaperGroundingVerdict, model_receipt_ids: &[String], @@ -471,6 +761,7 @@ fn checkpoint_identity( previous_checkpoint_id, origin, source_witness_digest, + editorial_agenda, draft, verdict, model_receipt_ids, @@ -487,6 +778,7 @@ fn new_reconciliation_checkpoint( previous_checkpoint_id: Option, origin: WorldNewspaperCheckpointOrigin, source_witness_digest: Option, + editorial_agenda: Option, draft: EditorialPageDraft, verdict: WorldNewspaperGroundingVerdict, receipts: &[ModelStageReceipt], @@ -503,13 +795,14 @@ fn new_reconciliation_checkpoint( previous_checkpoint_id.as_deref(), &origin, source_witness_digest.as_deref(), + editorial_agenda.as_ref(), &draft, &verdict, &model_receipt_ids, &receipt_chain_digest, )?; Ok(WorldNewspaperReconciliationCheckpoint { - schema: "ghostlight.world_newspaper_reconciliation_checkpoint.v1".into(), + schema: "ghostlight.world_newspaper_reconciliation_checkpoint.v2".into(), id, publication_task_binding: publication_task_binding.into(), editorial_binding: binding.into(), @@ -517,6 +810,7 @@ fn new_reconciliation_checkpoint( previous_checkpoint_id, origin, source_witness_digest, + editorial_agenda, draft, verdict, model_receipt_ids, @@ -528,7 +822,7 @@ fn persist_reconciliation_checkpoint( store: &CampaignStore, checkpoint: &WorldNewspaperReconciliationCheckpoint, ) -> Result<()> { - let kind = "world_newspaper_reconciliation_checkpoint.v1"; + let kind = "world_newspaper_reconciliation_checkpoint.v2"; if let Some((_, existing)) = store.load::(kind, checkpoint.id())? { @@ -542,7 +836,7 @@ fn persist_reconciliation_checkpoint( } store.insert( kind, - "ghostlight.world_newspaper_reconciliation_checkpoint.v1", + "ghostlight.world_newspaper_reconciliation_checkpoint.v2", checkpoint.id(), checkpoint, )?; @@ -605,7 +899,7 @@ fn validate_reconciliation_checkpoint( max_articles: usize, receipts: &[ModelStageReceipt], ) -> Result<()> { - if checkpoint.schema != "ghostlight.world_newspaper_reconciliation_checkpoint.v1" + if checkpoint.schema != "ghostlight.world_newspaper_reconciliation_checkpoint.v2" || checkpoint.publication_task_binding != prepared.publication_task_binding || checkpoint.editorial_binding != prepared.binding || checkpoint.verdict.accepted @@ -635,6 +929,7 @@ fn validate_reconciliation_checkpoint( checkpoint.previous_checkpoint_id.as_deref(), &checkpoint.origin, checkpoint.source_witness_digest.as_deref(), + checkpoint.editorial_agenda.as_ref(), &checkpoint.draft, &checkpoint.verdict, &checkpoint.model_receipt_ids, @@ -645,18 +940,61 @@ fn validate_reconciliation_checkpoint( "newspaper reconciliation checkpoint receipt binding is invalid" )); } - if receipts.first().map(|receipt| receipt.stage.as_str()) != Some("newspaper_editor") + let ancestry_valid = match checkpoint.origin { + WorldNewspaperCheckpointOrigin::LegacyTerminalImport => { + if checkpoint.editorial_agenda.is_some() { + let editor_index = receipts + .iter() + .position(|receipt| receipt.stage == "newspaper_editor"); + editor_index.is_some_and(|index| { + index > 0 + && receipts[..index].iter().all(|receipt| { + receipt.stage == "newspaper_narrative_selection_agent_action" + }) + && receipts + .get(index + 1) + .map(|receipt| receipt.stage.as_str()) + == Some("newspaper_copy_desk") + }) + } else { + receipts.first().map(|receipt| receipt.stage.as_str()) == Some("newspaper_editor") + && receipts.get(1).map(|receipt| receipt.stage.as_str()) + == Some("newspaper_copy_desk") + } + } + WorldNewspaperCheckpointOrigin::InitialCopyDesk + | WorldNewspaperCheckpointOrigin::Reconciliation => { + let editor_index = receipts + .iter() + .position(|receipt| receipt.stage == "newspaper_editor"); + checkpoint.editorial_agenda.is_some() + && editor_index.is_some_and(|index| { + index > 0 + && receipts[..index].iter().all(|receipt| { + receipt.stage == "newspaper_narrative_selection_agent_action" + }) + && receipts + .get(index + 1) + .map(|receipt| receipt.stage.as_str()) + == Some("newspaper_copy_desk") + }) + } + }; + if !ancestry_valid || receipts .first() .map(|receipt| receipt.snapshot_binding.as_str()) != Some(prepared.binding.as_str()) - || receipts.get(1).map(|receipt| receipt.stage.as_str()) != Some("newspaper_copy_desk") { return Err(anyhow!( - "newspaper reconciliation checkpoint lost its editor and copy-desk ancestry" + "newspaper reconciliation checkpoint lost its narrative, editor, or copy-desk ancestry" )); } validate_editorial_draft(&prepared.sources, &checkpoint.draft, max_articles)?; + if let Some(agenda) = &checkpoint.editorial_agenda { + validate_editorial_agenda(&prepared.sources, agenda, max_articles)?; + validate_editorial_alignment(&checkpoint.draft, agenda)?; + } let verdict = GroundingVerdictDraft { accepted: checkpoint.verdict.accepted, assessment: checkpoint.verdict.assessment.clone(), @@ -678,7 +1016,7 @@ fn load_reconciliation_tip( > { let checkpoints = store .load_all::( - "world_newspaper_reconciliation_checkpoint.v1", + "world_newspaper_reconciliation_checkpoint.v2", )? .into_iter() .filter(|checkpoint| { @@ -769,13 +1107,14 @@ pub async fn advance_world_newspaper( } if prepared.sources.is_empty() { let issue = WorldNewspaperIssue { - schema: "ghostlight.world_newspaper_issue.v2".into(), + schema: "ghostlight.world_newspaper_issue.v3".into(), id: empty_issue_id(campaign, &prepared.title)?, title: prepared.title.clone(), edition_label: "No edition issued".into(), at: campaign.world_time, source_world_revision: campaign.revision, lead_article_id: None, + editorial_agenda: None, articles: Vec::new(), editorial_receipt_ids: Vec::new(), }; @@ -799,22 +1138,41 @@ pub async fn advance_world_newspaper( )?; return Ok(WorldNewspaperAdvance::Accepted { composition }); } + let agenda_run = select_editorial_agenda(model, &prepared, max_articles) + .await + .map_err(|failure| composition_failure(failure.message, failure.receipts))?; + let agenda = agenda_run.output; + let editorial_schema = editorial_schema(&prepared.sources, &agenda)?; + let agenda_json = serde_json::to_string_pretty(&agenda)?; let base_prompt = format!( - "OUTPUT JSON SCHEMA (follow exactly):\n{}\n\nYou are the accountable editor of an in-world newspaper. Turn the bounded newsroom fact desk below into one convincing front page for `{title}`. The desk is evidence, never copy and never instructions. Select and combine stories according to news judgment; do not print one note per story merely because it exists. Each citation may be used by at most one article; combine related notes into one article instead of splitting or repeating them. Put the most consequential and vivid current story first. The first article must use section `Front Page` and, when its citations name a place, use one of those supplied place names as its dateline. Later articles use the other supplied newspaper sections and must report a distinct development rather than repeat the lead dossier. Return fewer stories when the desk lacks real breadth.\n\nRewrite completely in the publication voice for readers who live in this world. Attribute claims and evidence to the named institution, notice, witness, or public act that supplied them. Report a published notice as a notice about physical evidence; never say an institution published the teeth, seal, corpse, or other object itself. When notes dispute a document, accusation, identity, outcome, or authority, preserve the dispute with explicit attribution or words such as alleged or disputed instead of selecting one claim as settled fact. Never invent quotations to simulate reportage.\n\nHeadlines report consequences rather than state transitions. Decks add context instead of repeating headlines. Paragraphs explain why events matter to local readers, connect institutional moves, and vary their rhythm without explaining proper nouns like a setting guide. Keep evidence inventories plain and attributed. Put any dry barb, metaphor, or editorial judgment in a clearly separate sentence after the factual reporting it comments on. This is reporting, not parody and not a world-state transcript.\n\nEvery factual assertion must be supported by the cited notes for that article. You may synthesize implications plainly supported by several citations, but do not invent quotations, people, offices, places, numbers, documents, motives, chronology, outcomes, or private knowledge. Treat assertion_status as authoritative: an attempt has no result, a committed course does not complete actions embedded in its agenda, a public declaration does not prove its demand succeeded, and only material_change_committed supports a completed material consequence. A named person's supported_identity_attributes list is exhaustive; when empty, use their name or identity-neutral wording rather than inventing pronouns, gender, title, kinship, or office. Language such as attempts, tries, plans, prepares, readies, seeks, or investigates records activity, not outcome: preserve that uncertainty and do not turn it into an established or official inquiry, public availability, completion, or success unless a citation states that consequence. Use only the allowed generic bylines; they are presentation labels, not new people. Use only a supplied place name as a dateline, or the empty string. The newspaper contract owns a neutral edition label; do not invent or print a calendar, date, price, circulation claim, weather report, advertisement, or notice absent from the desk. Do not make the fact desk, citations, or verification process part of the reader-facing copy. Never end a headline with an ellipsis.\n\nPUBLICATION VOICE:\n{editorial_voice}\n\nNEWSROOM FACT DESK:\n{source_json}", - serde_json::to_string(&prepared.editorial_schema)?, + "OUTPUT JSON SCHEMA (follow exactly):\n{}\n\nYou are the accountable copy editor of an in-world newspaper. Turn the admitted narrative agenda and bounded newsroom fact desk below into one convincing front page for `{title}`. The narrative agenda owns selection, article order, and exact citation groupings. Implement every pitch in order and use exactly that pitch's citations for the corresponding article. The agenda's angle, tension, public_question, dominant_throughline, and reader_stake are framing instructions, not source evidence. You may express their interpretation or insinuation as clearly editorial language, but every concrete factual assertion must come from the cited desk notes. Do not recover omitted sources or invent a connective fact merely because the agenda suggests one. The first article must use section `Front Page` and, when its citations name a place, use one of those supplied place names as its dateline. Later articles use the other supplied newspaper sections.\n\nRewrite completely in the publication voice for readers who live in this world. Build a readable throughline: lead with the vivid consequence, identify opposing named actors and countermoves when the cited facts supply them, make lived material stakes legible, and let later stories echo or complicate the lead. Attribute claims and evidence to the named institution, notice, witness, or public act that supplied them. Report a published notice as a notice about physical evidence; never say an institution published the teeth, seal, corpse, or other object itself. When notes dispute a document, accusation, identity, outcome, or authority, preserve the dispute with explicit attribution or words such as alleged or disputed instead of selecting one claim as settled fact. Never invent quotations to simulate reportage.\n\nHeadlines report consequences rather than state transitions. Decks add context instead of repeating headlines. Paragraphs explain why events matter to local readers, connect institutional moves, and vary their rhythm without explaining proper nouns like a setting guide. Keep evidence inventories plain and attributed. Dry barbs, metaphor, political characterization, and rhetorical judgment are welcome when they introduce no new concrete entity, occurrence, status, motive, quotation, number, or private knowledge. This is a newspaper with a point of view, not parody and not a world-state transcript.\n\nEvery factual assertion must be supported by the cited notes for that article. You may synthesize implications plainly supported by several citations, but do not invent quotations, people, offices, places, numbers, documents, motives, chronology, outcomes, or private knowledge. Treat assertion_status as authoritative: an attempt has no result, a committed course does not complete actions embedded in its agenda, a public declaration does not prove its demand succeeded, and only material_change_committed supports a completed material consequence. A named person's supported_identity_attributes list is exhaustive; when empty, use their name or identity-neutral wording rather than inventing pronouns, gender, title, kinship, or office. Language such as attempts, tries, plans, prepares, readies, seeks, or investigates records activity, not outcome: preserve that uncertainty and do not turn it into an established or official inquiry, public availability, completion, or success unless a citation states that consequence. Use only the allowed generic bylines; they are presentation labels, not new people. Use only a supplied place name as a dateline, or the empty string. The newspaper contract owns a neutral edition label; do not invent or print a calendar, date, price, circulation claim, weather report, advertisement, or notice absent from the desk. Do not make the fact desk, citations, agenda, or verification process part of the reader-facing copy. Never end a headline with an ellipsis.\n\nPUBLICATION VOICE:\n{editorial_voice}\n\nADMITTED NARRATIVE AGENDA:\n{agenda_json}\n\nNEWSROOM FACT DESK:\n{source_json}", + serde_json::to_string(&editorial_schema)?, title = prepared.title, editorial_voice = prepared.editorial_voice, + agenda_json = agenda_json, source_json = prepared.source_json, ); - let mut receipts = Vec::new(); + let mut receipts = agenda_run.receipts; + let editor_sources = prepared + .source_receipt_ids + .iter() + .cloned() + .chain( + receipts + .iter() + .map(|receipt| receipt.storage_key().to_owned()), + ) + .collect::>() + .into_iter() + .collect(); let request = ModelStageRequest { stage: "newspaper_editor".into(), model: MODEL_CAPABLE.into(), snapshot_binding: prepared.binding.clone(), lived_stream: base_prompt, - output_schema: Some(prepared.editorial_schema.clone()), - source_receipt_ids: prepared.source_receipt_ids.clone(), - temperature: Some(0.65), + output_schema: Some(editorial_schema), + source_receipt_ids: editor_sources, + temperature: Some(0.75), max_output_tokens: Some(4_500), }; let editor_output = run_validated_stage(model, &request).await?; @@ -841,6 +1199,10 @@ pub async fn advance_world_newspaper( mark_semantic_invalid(&mut receipts[editor_receipt_index], &error); return Err(composition_failure(error.to_string(), receipts)); } + if let Err(error) = validate_editorial_alignment(&draft, &agenda) { + mark_semantic_invalid(&mut receipts[editor_receipt_index], &error); + return Err(composition_failure(error.to_string(), receipts)); + } store.persist_model_stage_receipts(&receipts)?; let editor_receipt_id = receipts[editor_receipt_index].storage_key().to_owned(); let editor_output_hash = receipts[editor_receipt_index].output_hash.clone(); @@ -867,6 +1229,7 @@ pub async fn advance_world_newspaper( campaign, prepared.title.clone(), &prepared.sources, + Some(agenda.clone()), draft, &receipts, )?; @@ -892,6 +1255,7 @@ pub async fn advance_world_newspaper( None, WorldNewspaperCheckpointOrigin::InitialCopyDesk, None, + Some(agenda), draft, verdict, &receipts, @@ -971,6 +1335,7 @@ pub fn admit_world_newspaper_reconciliation_import( None, WorldNewspaperCheckpointOrigin::LegacyTerminalImport, Some(import.source_witness_digest), + import.editorial_agenda, import.draft, import.verdict, &import.model_receipts, @@ -1027,6 +1392,7 @@ async fn advance_reconciliation( campaign, prepared.title.clone(), &prepared.sources, + checkpoint.editorial_agenda.clone(), run.output.draft, &receipts, )?; @@ -1055,6 +1421,7 @@ async fn advance_reconciliation( Some(checkpoint.id.clone()), WorldNewspaperCheckpointOrigin::Reconciliation, None, + checkpoint.editorial_agenda.clone(), draft, verdict, &receipts, @@ -1653,20 +2020,100 @@ pub fn render_world_newspaper_audit_markdown(issue: &WorldNewspaperIssue) -> Str issue.source_world_revision, escaped_join(&issue.editorial_receipt_ids) ); + if let Some(agenda) = &issue.editorial_agenda { + rendered.push_str(&format!( + "\n## Editorial agenda\n\n- Dominant throughline: {}\n- Reader stake: {}\n", + escape_markdown_text(&agenda.dominant_throughline), + escape_markdown_text(&agenda.reader_stake), + )); + for (index, pitch) in agenda.story_pitches.iter().enumerate() { + rendered.push_str(&format!( + "\n### Pitch {}{}\n\n- Citations: {}\n- Angle: {}\n- Tension: {}\n- Public question: {}\n", + index + 1, + if pitch.lead { " (lead)" } else { "" }, + escaped_join(&pitch.citations), + escape_markdown_text(&pitch.angle), + escape_markdown_text(&pitch.tension), + escape_markdown_text(&pitch.public_question), + )); + } + } for article in &issue.articles { rendered.push_str(&format!( - "\n## {}\n\n- Article ID: {}\n- Source news: {}\n- Source channels: {}\n- Source reliability: {}\n- Committed events: {}\n", + "\n## {}\n\n- Article ID: {}\n", escape_markdown_text(&article.headline), escape_markdown_text(&article.id), - escaped_join(&article.source_news_ids), - escaped_join(&article.source_channels), - escaped_join(&article.source_reliability), - escaped_join(&article.event_ids) )); + for source in &article.sources { + rendered.push_str(&format!( + "\n### Citation {}\n\n- Source news: {}\n- Source channels: {}\n- Source reliability: {}\n", + escape_markdown_text(&source.citation), + escaped_join(&source.source_news_ids), + escaped_join(&source.source_channels), + escaped_join(&source.source_reliability), + )); + for (fact_index, fact) in source.facts.iter().enumerate() { + let named_people = if fact.named_people.is_empty() { + "None asserted".into() + } else { + fact.named_people + .iter() + .map(|person| { + let attributes = if person.supported_identity_attributes.is_empty() { + "none asserted".into() + } else { + escaped_join(&person.supported_identity_attributes) + }; + format!( + "{} (supported identity attributes: {})", + escape_markdown_text(&person.name), + attributes + ) + }) + .collect::>() + .join(", ") + }; + rendered.push_str(&format!( + "\n#### Fact {}\n\n- Exact committed account: {}\n- Assertion status: {}\n- Committed events: {}\n- Named people: {}\n- Institutions: {}\n- Populations: {}\n- Places: {}\n", + fact_index + 1, + escape_markdown_text(&fact.account), + assertion_status_label(&fact.assertion_status), + escaped_join(&fact.event_ids), + named_people, + escaped_or_none(&fact.institutions), + escaped_or_none(&fact.populations), + escaped_or_none(&fact.places), + )); + } + } } rendered } +fn assertion_status_label(status: &WorldNewspaperAssertionStatus) -> &'static str { + match status { + WorldNewspaperAssertionStatus::AttemptCommittedOutcomeUnknown => { + "attempt_committed_outcome_unknown" + } + WorldNewspaperAssertionStatus::CourseCommittedEmbeddedActionsNotCompleted => { + "course_committed_embedded_actions_not_completed" + } + WorldNewspaperAssertionStatus::PublicDeclaration => "public_declaration", + WorldNewspaperAssertionStatus::MaterialChangeCommitted => "material_change_committed", + WorldNewspaperAssertionStatus::PublicAccountStatusUnspecified => { + "public_account_status_unspecified" + } + } +} + +fn escaped_or_none(values: &[String]) -> String { + if values.is_empty() { + "None asserted".into() + } else { + escaped_join(values) + } +} + fn escaped_join(values: &[String]) -> String { values .iter() @@ -1744,7 +2191,7 @@ fn newsroom_source( .iter() .filter_map(|id| campaign.actors.get(id)) .filter(|actor| summary_mentions_name(&summary, &actor.name)) - .map(|actor| NewsroomNamedPerson { + .map(|actor| WorldNewspaperNamedPerson { name: actor.name.clone(), supported_identity_attributes: Vec::new(), }) @@ -1790,20 +2237,22 @@ fn newsroom_source( }) } -fn newsroom_assertion_status(kind: &str) -> NewsroomAssertionStatus { +fn newsroom_assertion_status(kind: &str) -> WorldNewspaperAssertionStatus { match kind { "actor_activity" | "gestalt_activity" | "gestalt_member_activity" => { - NewsroomAssertionStatus::AttemptCommittedOutcomeUnknown + WorldNewspaperAssertionStatus::AttemptCommittedOutcomeUnknown } - "institution_action" => NewsroomAssertionStatus::CourseCommittedEmbeddedActionsNotCompleted, - "gestalt_action" | "public_notice" => NewsroomAssertionStatus::PublicDeclaration, + "institution_action" => { + WorldNewspaperAssertionStatus::CourseCommittedEmbeddedActionsNotCompleted + } + "gestalt_action" | "public_notice" => WorldNewspaperAssertionStatus::PublicDeclaration, "strategic_activity_outcome" | "actor_movement" | "gestalt_migration" | "gestalt_member_migration" | "clock_consequence" - | "group_travel" => NewsroomAssertionStatus::MaterialChangeCommitted, - _ => NewsroomAssertionStatus::PublicAccountStatusUnspecified, + | "group_travel" => WorldNewspaperAssertionStatus::MaterialChangeCommitted, + _ => WorldNewspaperAssertionStatus::PublicAccountStatusUnspecified, } } @@ -1845,14 +2294,20 @@ fn newsroom_desk(sources: &[NewsroomSource]) -> Vec> { .collect() } -fn editorial_schema(sources: &[NewsroomSource], max_articles: usize) -> Result { +fn editorial_schema( + sources: &[NewsroomSource], + agenda: &WorldNewspaperEditorialAgenda, +) -> Result { let mut schema = serde_json::to_value(schema_for!(EditorialPageDraft))?; - let citations = sources + let selected_citations = agenda + .story_pitches .iter() - .map(|source| source.citation.clone()) - .collect::>(); + .flat_map(|pitch| pitch.citations.iter().cloned()) + .collect::>(); + let citations = selected_citations.iter().cloned().collect::>(); let mut datelines = sources .iter() + .filter(|source| selected_citations.contains(&source.citation)) .flat_map(|source| source.events.iter()) .flat_map(|event| event.place_names.iter().cloned()) .collect::>(); @@ -1860,7 +2315,11 @@ fn editorial_schema(sources: &[NewsroomSource], max_articles: usize) -> Result, draft: EditorialPageDraft, receipts: &[ModelStageReceipt], ) -> Result { @@ -2101,32 +2561,30 @@ fn lower_editorial_page( .ok_or_else(|| anyhow!("editorial lowering lost citation {citation}")) }) .collect::>>()?; - let source_news_ids = selected_sources + let audit_sources = selected_sources .iter() - .flat_map(|source| source.news_ids.iter().cloned()) - .collect::>() - .into_iter() - .collect::>(); - let source_channels = selected_sources - .iter() - .flat_map(|source| source.channels.iter().cloned()) - .collect::>() - .into_iter() - .collect::>(); - let source_reliability = selected_sources - .iter() - .flat_map(|source| source.reliability.iter().cloned()) - .collect::>() - .into_iter() - .collect::>(); - let event_ids = selected_sources - .iter() - .flat_map(|source| source.events.iter()) - .flat_map(|event| event.event_ids.iter().cloned()) - .collect::>() - .into_iter() + .map(|source| WorldNewspaperSourceCitation { + citation: source.citation.clone(), + source_news_ids: source.news_ids.iter().cloned().collect(), + source_channels: source.channels.iter().cloned().collect(), + source_reliability: source.reliability.iter().cloned().collect(), + facts: source + .events + .iter() + .map(|event| WorldNewspaperSourceFact { + event_ids: event.event_ids.iter().cloned().collect(), + account: event.summary.clone(), + assertion_status: event.assertion_status.clone(), + named_people: event.named_people.clone(), + institutions: event.institution_names.clone(), + populations: event.population_names.clone(), + places: event.place_names.clone(), + }) + .collect(), + }) .collect::>(); let identity = rmp_serde::to_vec_named(&( + NEWSROOM_CONTRACT_VERSION, campaign.id, campaign.revision, index, @@ -2136,10 +2594,7 @@ fn lower_editorial_page( &article.byline, &article.dateline, &article.paragraphs, - &source_news_ids, - &source_channels, - &source_reliability, - &event_ids, + &audit_sources, ))?; articles.push(WorldNewspaperArticle { id: format!("article:sha256:{:x}", Sha256::digest(identity)), @@ -2149,10 +2604,7 @@ fn lower_editorial_page( byline: article.byline, dateline: (!article.dateline.is_empty()).then_some(article.dateline), paragraphs: article.paragraphs, - source_news_ids, - source_channels, - source_reliability, - event_ids, + sources: audit_sources, }); } let receipt_ids = receipts @@ -2169,6 +2621,7 @@ fn lower_editorial_page( campaign.revision, &title, EDITION_LABEL, + &editorial_agenda, articles .iter() .map(|article| &article.id) @@ -2176,13 +2629,14 @@ fn lower_editorial_page( &receipt_ids, ))?; Ok(WorldNewspaperIssue { - schema: "ghostlight.world_newspaper_issue.v2".into(), + schema: "ghostlight.world_newspaper_issue.v3".into(), id: format!("newspaper:sha256:{:x}", Sha256::digest(identity)), title, edition_label: EDITION_LABEL.into(), at, source_world_revision: campaign.revision, lead_article_id: articles.first().map(|article| article.id.clone()), + editorial_agenda, articles, editorial_receipt_ids: receipt_ids, }) @@ -2194,8 +2648,14 @@ fn publication_task_binding( voice: &str, max_articles: usize, ) -> Result { - let bytes = - rmp_serde::to_vec_named(&(campaign.id, campaign.revision, title, voice, max_articles))?; + let bytes = rmp_serde::to_vec_named(&( + NEWSROOM_CONTRACT_VERSION, + campaign.id, + campaign.revision, + title, + voice, + max_articles, + ))?; Ok(format!( "campaign:{}:revision:{}:newspaper-task:sha256:{:x}", campaign.id, @@ -2227,6 +2687,7 @@ fn editorial_binding( }) .collect::>(); let bytes = rmp_serde::to_vec_named(&( + NEWSROOM_CONTRACT_VERSION, campaign.id, campaign.revision, campaign.world_time, @@ -2245,7 +2706,13 @@ fn editorial_binding( } fn empty_issue_id(campaign: &Campaign, title: &str) -> Result { - let identity = rmp_serde::to_vec_named(&(campaign.id, campaign.revision, title, "no-edition"))?; + let identity = rmp_serde::to_vec_named(&( + NEWSROOM_CONTRACT_VERSION, + campaign.id, + campaign.revision, + title, + "no-edition", + ))?; Ok(format!("newspaper:sha256:{:x}", Sha256::digest(identity))) } @@ -2447,6 +2914,8 @@ mod tests { campaign } + const ONE_STORY_AGENDA: &str = r#"{"tool":"submit_agenda","dominant_throughline":"The court made its private gambling debt a public crisis of custody and punished the official who exposed it.","reader_stake":"Readers must decide whether dismissal protects the seal or merely the court from its own confession.","story_pitches":[{"lead":true,"citations":["1"],"angle":"Lead with the pawned royal seal and the treasurer's dismissal as one scandal.","tension":"The court admits the loss while directing the immediate consequence at the bearer of that admission.","public_question":"Who is being held accountable for the missing seal?"}]}"#; + const TWO_STORY_AGENDA: &str = r#"{"tool":"submit_agenda","dominant_throughline":"Court custody fails at both the royal seal and the western gate.","reader_stake":"Readers depend on institutions that announce damage only after access or authority has already been compromised.","story_pitches":[{"lead":true,"citations":["1"],"angle":"Lead with the pawned seal and dismissal as the court's crisis of custody.","tension":"The confession exposes the loss while the treasurer absorbs the immediate institutional consequence.","public_question":"Who is being held accountable for the missing seal?"},{"lead":false,"citations":["2"],"angle":"Treat the gate closure as a practical echo of neglected custody.","tension":"A cracked hinge will close a route at moonrise while travellers wait for a reopening time.","public_question":"How long will the western route remain closed?"}]}"#; const ACCEPTED_PAGE: &str = r#"{"articles":[{"section":"Front Page","headline":"Court Sells the Crown's Seal, Then the Treasurer","deck":"A gambling debt reaches the throne room and leaves one official carrying the blame.","byline":"By the political editor","dateline":"Room","citations":["1"],"paragraphs":["The Thorn Court has admitted that its royal seal was pawned to cover a dragon's gambling debt, a confession that turns private embarrassment into a public question of custody.","The treasurer who delivered that admission in open court was dismissed soon afterward. The court has explained the firing; it has not made the seal any less pawned."]}]}"#; const TWO_ARTICLE_PAGE: &str = r#"{"articles":[{"section":"Front Page","headline":"Court Sells the Crown's Seal, Then the Treasurer","deck":"A gambling debt reaches the throne room and leaves one official carrying the blame.","byline":"By the political editor","dateline":"Room","citations":["1"],"paragraphs":["The Thorn Court has admitted that its royal seal was pawned to cover a dragon's gambling debt, a confession that turns private embarrassment into a public question of custody.","The treasurer who delivered that admission in open court was dismissed soon afterward. The court has explained the firing; it has not made the seal any less pawned."]},{"section":"Dispatches","headline":"West Gate to Close at Moonrise","deck":"Masons will replace a cracked hinge after the palace bell keeper's warning.","byline":"Staff report","dateline":"Yard","citations":["2"],"paragraphs":["Officials warn the west gate is unsafe, and the palace bell keeper says it will close at moonrise while masons replace the cracked hinge.","Travellers using the gate have been told when it will close, though no reopening hour was included in the announcement."]}]}"#; const EMPTY_REPAIR_ACTION: &str = @@ -2469,6 +2938,7 @@ mod tests { let directory = tempfile::tempdir().unwrap(); let store = CampaignStore::open(directory.path().join("campaign.cc")).unwrap(); let model = ScriptedNewspaperModel::new([ + ONE_STORY_AGENDA, ACCEPTED_PAGE, REJECTED, EMPTY_REPAIR_ACTION, @@ -2503,6 +2973,75 @@ mod tests { } } + #[test] + fn narrative_workbench_owns_lead_and_unique_citation_grouping() { + let sources = newsroom_sources(&campaign_with_two_news()).unwrap(); + let invalid = WorldNewspaperEditorialAgenda { + dominant_throughline: "Two failures of court custody.".into(), + reader_stake: "Readers depend on both institutions.".into(), + story_pitches: vec![ + WorldNewspaperStoryPitch { + lead: false, + citations: vec!["1".into()], + angle: "The pawned seal opens the custody crisis.".into(), + tension: "Admission and dismissal point in different directions.".into(), + public_question: "Who answers for the seal?".into(), + }, + WorldNewspaperStoryPitch { + lead: true, + citations: vec!["1".into()], + angle: "The gate repeats the pattern.".into(), + tension: "Access closes while repair begins.".into(), + public_question: "When will the route reopen?".into(), + }, + ], + }; + + assert!( + validate_editorial_agenda(&sources, &invalid, 4) + .unwrap_err() + .to_string() + .contains("exactly its first pitch as lead") + ); + + let agenda: NarrativeSelectionAction = serde_json::from_str(TWO_STORY_AGENDA).unwrap(); + let NarrativeSelectionAction::SubmitAgenda { + dominant_throughline, + reader_stake, + story_pitches, + } = agenda; + let admitted = WorldNewspaperEditorialAgenda { + dominant_throughline, + reader_stake, + story_pitches, + }; + validate_editorial_agenda(&sources, &admitted, 4).unwrap(); + let mut duplicate = admitted.clone(); + duplicate.story_pitches[1].citations = vec!["1".into()]; + assert!( + validate_editorial_agenda(&sources, &duplicate, 4) + .unwrap_err() + .to_string() + .contains("more than one editorial pitch") + ); + + let mut widened: EditorialPageDraft = serde_json::from_str(ACCEPTED_PAGE).unwrap(); + widened.articles[0].citations = vec!["2".into()]; + assert!( + validate_editorial_alignment( + &widened, + &WorldNewspaperEditorialAgenda { + dominant_throughline: admitted.dominant_throughline.clone(), + reader_stake: admitted.reader_stake.clone(), + story_pitches: vec![admitted.story_pitches[0].clone()], + }, + ) + .unwrap_err() + .to_string() + .contains("admitted citation grouping") + ); + } + #[test] fn grounding_repair_applies_distinct_same_target_findings_atomically() { let draft: EditorialPageDraft = serde_json::from_str(ACCEPTED_PAGE).unwrap(); @@ -2704,7 +3243,8 @@ mod tests { #[tokio::test] async fn newspaper_is_editorial_copy_with_separate_provenance() { let campaign = campaign_with_news(); - let model = ScriptedNewspaperModel::new([ACCEPTED_PAGE, ACCEPTING_COPY_DESK]); + let model = + ScriptedNewspaperModel::new([ONE_STORY_AGENDA, ACCEPTED_PAGE, ACCEPTING_COPY_DESK]); let composition = compose_world_newspaper( &model, &campaign, @@ -2719,14 +3259,14 @@ mod tests { assert_eq!( composition.issue.schema, - "ghostlight.world_newspaper_issue.v2" + "ghostlight.world_newspaper_issue.v3" ); assert_eq!( - composition.issue.articles[0].event_ids, + composition.issue.articles[0].event_ids(), ["event:seal-scandal"] ); assert_eq!( - composition.issue.articles[0].source_news_ids, + composition.issue.articles[0].source_news_ids(), ["news:seal-scandal"] ); assert_eq!(composition.issue.edition_label, EDITION_LABEL); @@ -2738,8 +3278,31 @@ mod tests { assert!(!page.contains("committed public channel")); assert!(audit.contains("event:seal-scandal")); assert!(audit.contains("Source world revision: 3")); - assert_eq!(composition.model_receipts.len(), 2); + assert!(audit.contains("Editorial agenda")); + assert!(audit.contains("court made its private gambling debt")); + assert!(audit.contains("Exact committed account: The Thorn Court admits")); + assert!( + audit.contains("Assertion status: course_committed_embedded_actions_not_completed") + ); + assert!(audit.contains("Named people: None asserted")); + assert_eq!(composition.model_receipts.len(), 3); let requests = model.requests(); + assert_eq!( + requests[0].stage, + "newspaper_narrative_selection_agent_action" + ); + assert_eq!(requests[0].model, MODEL_CAPABLE); + assert_eq!(requests[1].stage, "newspaper_editor"); + assert!( + requests[1] + .lived_stream + .contains("ADMITTED NARRATIVE AGENDA") + ); + assert!( + requests[1] + .source_receipt_ids + .contains(&composition.model_receipts[0].storage_key().to_owned()) + ); assert!(requests[0].lived_stream.contains("\"citation\": \"1\"")); assert!(requests[0].lived_stream.contains("\"citations\"")); assert!(!requests[0].lived_stream.contains("published_at")); @@ -2799,16 +3362,17 @@ mod tests { &campaign, "The Underdeep Clarion".into(), &sources, + None, draft, &[], ) .unwrap(); assert_eq!( - issue.articles[0].source_news_ids, + issue.articles[0].source_news_ids(), ["news:seal-scandal", "news:seal-scandal-duplicate"] ); assert_eq!( - issue.articles[0].event_ids, + issue.articles[0].event_ids(), ["event:seal-scandal", "event:seal-scandal-duplicate"] ); } @@ -2906,6 +3470,7 @@ mod tests { const REJECTED: &str = r#"{"accepted":false,"assessment":"The deck overstates where the admitted debt reached.","findings":[{"article_index":0,"category":"unsupported_fact","claim_or_phrase":"A gambling debt reaches the throne room and leaves one official carrying the blame.","reason":"The cited source records the pawned seal and dismissal but does not locate the debt in the throne room."}]}"#; let campaign = campaign_with_news(); let model = ScriptedNewspaperModel::new([ + ONE_STORY_AGENDA, ACCEPTED_PAGE, REJECTED, REPAIR_DECK_ACTION, @@ -2921,21 +3486,22 @@ mod tests { .await .unwrap(); - assert_eq!(composition.model_receipts.len(), 4); + assert_eq!(composition.model_receipts.len(), 5); let requests = model.requests(); - assert_eq!(requests[0].temperature, Some(0.65)); - assert_eq!(requests[2].temperature, Some(0.1)); - assert_eq!(requests[2].model, MODEL_BALANCED); + assert_eq!(requests[0].temperature, Some(0.8)); + assert_eq!(requests[1].temperature, Some(0.75)); + assert_eq!(requests[3].temperature, Some(0.1)); + assert_eq!(requests[3].model, MODEL_BALANCED); assert_eq!( - requests[2].stage, + requests[3].stage, "newspaper_grounding_reconciliation_agent_action" ); assert!( - requests[2] + requests[3] .lived_stream .contains("A gambling debt reaches the throne room") ); - let repair_schema_value = requests[2].output_schema.as_ref().unwrap(); + let repair_schema_value = requests[3].output_schema.as_ref().unwrap(); assert_eq!( repair_schema_value .pointer("/properties/replacements/items/properties/finding_ref/enum"), @@ -2954,11 +3520,11 @@ mod tests { assert!(!repair_schema.contains("article_index")); assert!(!repair_schema.contains("paragraph_index")); assert_eq!( - composition.issue.articles[0].source_news_ids, + composition.issue.articles[0].source_news_ids(), ["news:seal-scandal"] ); - assert!(requests[1].lived_stream.contains("publication role labels")); - assert!(requests[1].lived_stream.contains("Metaphor, dry wit")); + assert!(requests[2].lived_stream.contains("publication role labels")); + assert!(requests[2].lived_stream.contains("Metaphor, dry wit")); assert!(composition.grounding.accepted); } @@ -2967,6 +3533,7 @@ mod tests { const REJECTED_SECOND: &str = r#"{"accepted":false,"assessment":"The dispatch adds a claim absent from its source.","findings":[{"article_index":1,"category":"unsupported_fact","claim_or_phrase":"the west gate is unsafe","reason":"The cited source records a cracked hinge and closure, not a safety finding."}]}"#; let campaign = campaign_with_two_news(); let model = ScriptedNewspaperModel::new([ + TWO_STORY_AGENDA, TWO_ARTICLE_PAGE, REJECTED_SECOND, DELETE_SECOND_ARTICLE_ACTION, @@ -2990,7 +3557,7 @@ mod tests { assert!( !render_world_newspaper_markdown(&composition.issue).contains("west gate is unsafe") ); - assert_eq!(composition.model_receipts.len(), 4); + assert_eq!(composition.model_receipts.len(), 5); let final_copy_desk = composition.model_receipts.last().unwrap(); assert_eq!(final_copy_desk.stage, "newspaper_copy_desk"); assert!( @@ -2998,7 +3565,7 @@ mod tests { .snapshot_binding .contains("grounding-reconciliation") ); - assert!(composition.model_receipts[..3].iter().any(|receipt| { + assert!(composition.model_receipts[..4].iter().any(|receipt| { receipt.stage == "newspaper_copy_desk" && final_copy_desk .source_receipt_ids @@ -3019,6 +3586,7 @@ mod tests { const REJECTED_AFTER_REPAIR: &str = r#"{"accepted":false,"assessment":"The revised deck still overstates blame.","findings":[{"article_index":0,"category":"unsupported_fact","claim_or_phrase":"one official carrying the blame","reason":"The cited source records dismissal but does not establish how blame was allocated."}]}"#; let campaign = campaign_with_news(); let model = ScriptedNewspaperModel::new([ + ONE_STORY_AGENDA, ACCEPTED_PAGE, REJECTED, REPAIR_DECK_ACTION, @@ -3035,7 +3603,7 @@ mod tests { ) .await .unwrap(); - assert_eq!(composition.model_receipts.len(), 6); + assert_eq!(composition.model_receipts.len(), 7); assert!(composition.grounding.accepted); let requests = model.requests(); assert_eq!( @@ -3055,11 +3623,11 @@ mod tests { 2 ); assert!( - requests[4] + requests[5] .lived_stream .contains("revised deck still overstates blame") ); - assert!(requests[4].lived_stream.contains("\"finding_ref\"")); + assert!(requests[5].lived_stream.contains("\"finding_ref\"")); } #[tokio::test] @@ -3068,6 +3636,7 @@ mod tests { const REJECTED_AFTER_REPAIR: &str = r#"{"accepted":false,"assessment":"The revised deck still overstates blame.","findings":[{"article_index":0,"category":"unsupported_fact","claim_or_phrase":"one official carrying the blame","reason":"The cited source records dismissal but does not establish how blame was allocated."}]}"#; let campaign = campaign_with_news(); let model = ScriptedNewspaperModel::new([ + ONE_STORY_AGENDA, ACCEPTED_PAGE, REJECTED, EMPTY_REPAIR_ACTION, @@ -3086,7 +3655,7 @@ mod tests { .await .unwrap(); - assert_eq!(composition.model_receipts.len(), 7); + assert_eq!(composition.model_receipts.len(), 8); assert!(composition.grounding.accepted); let requests = model.requests(); assert_eq!( @@ -3115,16 +3684,16 @@ mod tests { .count(), 2 ); - assert!(requests[3].lived_stream.contains("was not admitted")); + assert!(requests[4].lived_stream.contains("was not admitted")); assert!( - requests[5] + requests[6] .lived_stream .contains("revised deck still overstates blame") ); let final_copy_desk = composition.model_receipts.last().unwrap(); assert_eq!(final_copy_desk.stage, "newspaper_copy_desk"); assert_eq!(final_copy_desk.validation_result, "valid"); - assert!(composition.model_receipts[..6].iter().all(|receipt| { + assert!(composition.model_receipts[..7].iter().all(|receipt| { final_copy_desk .source_receipt_ids .contains(&receipt.storage_key().to_owned()) @@ -3139,6 +3708,7 @@ mod tests { const REJECTED_AFTER_THIRD_REPAIR: &str = r#"{"accepted":false,"assessment":"The third revision still overstates identification.","findings":[{"article_index":0,"category":"unsupported_fact","claim_or_phrase":"identified as the dismissed treasurer","reason":"The source records a dismissal but does not establish that the deck's subject was identified in this way."}]}"#; let campaign = campaign_with_news(); let model = ScriptedNewspaperModel::new([ + ONE_STORY_AGENDA, ACCEPTED_PAGE, REJECTED, REPAIR_DECK_ACTION, @@ -3162,7 +3732,7 @@ mod tests { .expect("terminal editorial rejection must retain its receipts"); assert!(failure.message.contains("pending after 3 semantic steps")); - assert_eq!(failure.model_receipts.len(), 8); + assert_eq!(failure.model_receipts.len(), 9); assert_eq!( failure .model_receipts @@ -3200,6 +3770,7 @@ mod tests { let directory = tempfile::tempdir().unwrap(); let store = CampaignStore::open(directory.path().join("campaign.cc")).unwrap(); let first_model = ScriptedNewspaperModel::new([ + ONE_STORY_AGENDA, ACCEPTED_PAGE, REJECTED, REPAIR_DECK_ACTION, @@ -3228,10 +3799,10 @@ mod tests { panic!("three rejected actions must yield typed pending state") }; assert_eq!(checkpoint.generation(), 3); - assert_eq!(prior_receipts.len(), 8); + assert_eq!(prior_receipts.len(), 9); assert_eq!( store - .keys("world_newspaper_reconciliation_checkpoint.v1") + .keys("world_newspaper_reconciliation_checkpoint.v2") .unwrap() .len(), 4 @@ -3273,13 +3844,13 @@ mod tests { .source_receipt_ids .contains(&checkpoint.id().to_owned()) ); - assert_eq!(accepted.model_receipts.len(), 10); + assert_eq!(accepted.model_receipts.len(), 11); assert_eq!( &accepted.model_receipts[..prior_receipts.len()], prior_receipts.as_slice() ); let final_copy_desk = accepted.model_receipts.last().unwrap(); - assert!(accepted.model_receipts[..9].iter().all(|receipt| { + assert!(accepted.model_receipts[..10].iter().all(|receipt| { final_copy_desk .source_receipt_ids .contains(&receipt.storage_key().to_owned()) @@ -3314,6 +3885,7 @@ mod tests { let source_store = CampaignStore::open(source_directory.path().join("campaign.cc")).unwrap(); let source_model = ScriptedNewspaperModel::new([ + ONE_STORY_AGENDA, ACCEPTED_PAGE, REJECTED, REPAIR_DECK_ACTION, @@ -3342,6 +3914,7 @@ mod tests { let import = WorldNewspaperReconciliationImport { schema: "ghostlight.world_newspaper_reconciliation_import.v1".into(), source_witness_digest: format!("sha256:{}", "a".repeat(64)), + editorial_agenda: checkpoint.editorial_agenda.clone(), draft: checkpoint.draft.clone(), verdict: checkpoint.verdict.clone(), model_receipts: model_receipts.clone(), @@ -3421,6 +3994,7 @@ mod tests { sibling.previous_checkpoint_id.as_deref(), &sibling.origin, sibling.source_witness_digest.as_deref(), + sibling.editorial_agenda.as_ref(), &sibling.draft, &sibling.verdict, &sibling.model_receipt_ids, @@ -3449,7 +4023,8 @@ mod tests { async fn reader_projection_escapes_model_and_consumer_markdown() { const MARKDOWN_PAGE: &str = r#"{"articles":[{"section":"Front Page","headline":"[Court](https://headline.invalid) Faces ","deck":"The *royal* debt now reaches every keeper of the seal.","byline":"By the political editor","dateline":"Room","citations":["1"],"paragraphs":["- The Thorn Court admitted the royal seal was pawned to cover a dragon's gambling debt; cannot make the confession ~~prettier~~.","1. The dismissed treasurer leaves readers with a [public record](https://copy.invalid) and the court with a seal that remains pawned."]}]}"#; let campaign = campaign_with_news(); - let model = ScriptedNewspaperModel::new([MARKDOWN_PAGE, ACCEPTING_COPY_DESK]); + let model = + ScriptedNewspaperModel::new([ONE_STORY_AGENDA, MARKDOWN_PAGE, ACCEPTING_COPY_DESK]); let composition = compose_world_newspaper( &model, &campaign, @@ -3497,7 +4072,7 @@ mod tests { const ALTERNATE_PAGE: &str = r#"{"articles":[{"section":"Front Page","headline":"Court Sells the Crown's Seal, Then the Treasurer","deck":"The same scandal leaves the throne defending both its custody and its judgment.","byline":"By the political editor","dateline":"Room","citations":["1"],"paragraphs":["The Thorn Court has admitted that its royal seal was pawned to cover a dragon's gambling debt, a confession that turns private embarrassment into a public question of custody.","The treasurer who delivered that admission in open court was dismissed soon afterward. The court has explained the firing; it has not made the seal any less pawned."]}]}"#; let campaign = campaign_with_news(); let first = compose_world_newspaper( - &ScriptedNewspaperModel::new([ACCEPTED_PAGE, ACCEPTING_COPY_DESK]), + &ScriptedNewspaperModel::new([ONE_STORY_AGENDA, ACCEPTED_PAGE, ACCEPTING_COPY_DESK]), &campaign, "The Underdeep Clarion", "A skeptical court broadsheet with dry restraint.", @@ -3506,7 +4081,7 @@ mod tests { .await .unwrap(); let second = compose_world_newspaper( - &ScriptedNewspaperModel::new([ALTERNATE_PAGE, ACCEPTING_COPY_DESK]), + &ScriptedNewspaperModel::new([ONE_STORY_AGENDA, ALTERNATE_PAGE, ACCEPTING_COPY_DESK]), &campaign, "The Underdeep Clarion", "A skeptical court broadsheet with dry restraint.", diff --git a/crates/ghostlight-dungeon/src/registry.rs b/crates/ghostlight-dungeon/src/registry.rs index ba821c5..ec83576 100644 --- a/crates/ghostlight-dungeon/src/registry.rs +++ b/crates/ghostlight-dungeon/src/registry.rs @@ -684,6 +684,30 @@ mod tests { struct RejectingRegistryNewspaperModel; + fn registry_newspaper_narrative_response(request: &ModelStageRequest) -> Result { + let citation = request + .output_schema + .as_ref() + .and_then(|schema| { + schema.pointer("/properties/story_pitches/items/properties/citations/items/enum/0") + }) + .and_then(serde_json::Value::as_str) + .ok_or_else(|| anyhow!("newspaper fixture lost its narrative citation enum"))?; + Ok(serde_json::json!({ + "tool":"submit_agenda", + "dominant_throughline":"The inner court has converted an audit dispute into a public crisis of accusation and arithmetic.", + "reader_stake":"Readers depend on whether the court can distinguish an allegation from a judgment.", + "story_pitches":[{ + "lead":true, + "citations":[citation], + "angle":"Lead with the singular accusation against three auditors.", + "tension":"The court's wording collapses three people into one accused figure.", + "public_question":"What process can answer an accusation framed this way?" + }] + }) + .to_string()) + } + fn registry_newspaper_editor_response(request: &ModelStageRequest) -> Result { let citation = request .output_schema @@ -713,6 +737,9 @@ mod tests { #[async_trait] impl ModelPort for RegistryNewspaperModel { async fn run(&self, request: &ModelStageRequest) -> Result { + if request.stage == "newspaper_narrative_selection_agent_action" { + return registry_newspaper_narrative_response(request); + } if request.stage == "newspaper_copy_desk" { return Ok(serde_json::json!({ "accepted":true, @@ -732,6 +759,9 @@ mod tests { #[async_trait] impl ModelPort for RejectingRegistryNewspaperModel { async fn run(&self, request: &ModelStageRequest) -> Result { + if request.stage == "newspaper_narrative_selection_agent_action" { + return registry_newspaper_narrative_response(request); + } if request.stage == "newspaper_copy_desk" { let claim = if request .lived_stream @@ -1616,7 +1646,7 @@ mod tests { assert_eq!(newspaper.source_world_revision, 3); assert_eq!(newspaper.articles.len(), 1); assert_eq!( - newspaper.articles[0].event_ids, + newspaper.articles[0].event_ids(), ["strategic:3:institution:inner-court"] ); assert!( @@ -1664,7 +1694,7 @@ mod tests { else { panic!("registry must preserve typed pending reconciliation state") }; - assert_eq!(model_receipts.len(), 8); + assert_eq!(model_receipts.len(), 9); assert_eq!(checkpoint.generation(), 3); let stored_after_rejection = runtime.store.keys("persona_stage_receipt.v1").unwrap(); let newly_observed_failure_receipts = model_receipts diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 3b176ab..3d33a3d 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -979,8 +979,7 @@ Mechanical provider acceptance is complete. Independent blind editorial review returns FAIL: only Issue 7 approaches spicy, while Issues 8 through 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 +material lived cost. 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. Citation resolution, temporal bounds, player immutability, @@ -1160,30 +1159,47 @@ descriptions, assertion status, and identity evidence, and the copy contains status inflation. Mechanical completion is proven; editorial and grounding acceptance are not. +The newsroom-only ownership cut is locally verified. A capable +narrative-selection agent now submits one typed agenda through the generic +agent harness; its deterministic workbench owns lead selection, story budget, +unique exact citations, bounded framing, and exact per-pitch grouping. The +editor may compose only from that admitted selection, while the existing copy +desk and grounding-reconciliation agent retain factual judgment and bounded +repair. Issue v3 persists the agenda and one semantic citation projection with +exact committed accounts, assertion status, supported identity attributes, and +canonical provenance; the duplicate flat audit fields are gone. Contract-bound +checkpoint v2 preserves agenda and narrative/editor/copy-desk ancestry so +reconciliation resume cannot replay either upstream agent. Gates pass 23/23 +focused newspaper tests, 478/478 library tests, and 13/13 strategic-smoke tests. +No dependency, crate, binary, daemon, target, or world-simulation pass was +added. + 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. Map a newsroom-only architectural cut over run 51's immutable fact substrate: - one Canopy Ledger narrative-selection owner for sustained throughlines, lived - costs, and countermoves; and a self-contained semantic provenance surface for - source descriptions, assertion status, identity evidence, and exact factual - support. Grounding remains authoritative over assertions without flattening - editorial framing. Do not resimulate the world. -2. Implement and verify one good Canopy Ledger before multiple publication - Personas. Defer TeX layout and engraved cuts until editorial acceptance. - Preserve run 51, revision 27, stopped run 23, exact acceptance conditions, - and unchanged live daemons. -3. Have the game-side adapter lower its authored hierarchy into the published +1. Commit and push the verified newsroom cut, then create one immutable + newsroom-only acceptance root from run 51's exact revision-27 campaign and + accepted per-wave publications. Recompose only the final Canopy Ledger; do + not invoke compilation, elaboration, Nemesis, strategic cells, outcomes, + clocks, or per-wave publication. +2. Preserve every narrative/editor/copy-desk/reconciliation checkpoint and run + exact provenance, archive/hash, independent blind editorial, independent + grounding, and unchanged-live-service checks. Deliver the actual copy only + after both reviews accept it. Keep run 51, stopped run 23, and all earlier + immutable acceptance roots unchanged. +3. Defer multiple publication Personas, TeX layout, and engraved cuts until the + single Canopy Ledger copy passes. +4. 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 +5. Prove one consumer-owned effect crosses that public API, changes two foreign political layers, causes one durable named figure to emerge and later act, and returns attributed news or intent without mutating Delvehold-owned truth. -5. Measure provider cost and continuity on the existing 200-cell authored-world +6. Measure provider cost and continuity on the existing 200-cell authored-world path without coupling wave width to the provider concurrency ceiling. -6. Leave the unpublished Mars seed and Kalsa refuge expansion unapproved unless +7. Leave the unpublished Mars seed and Kalsa refuge expansion unapproved unless the operator explicitly admits either; retain Kalsa as regression evidence. -7. Keep `gamecult-ops` synchronized with every executable deployment and model +8. Keep `gamecult-ops` synchronized with every executable deployment and model transport change. Use Idunn on Yggdrasil for all builds and deployments. Do not weaken actor custody, private projection, unanimous approval, diff --git a/notes/ghostlight-current-system-map.md b/notes/ghostlight-current-system-map.md index bab214e..c0510f4 100644 --- a/notes/ghostlight-current-system-map.md +++ b/notes/ghostlight-current-system-map.md @@ -1286,13 +1286,27 @@ actor, institution, population, or ambiguous multi-place scope into an asserted fact or dateline; a single event location may supply its canonical dateline, while a multi-place event must name the place in its public account. News IDs, event IDs and kinds, channels, reliability, source headlines, and wall-clock -timestamps remain internal. A capable editor model owns selection, -grouping, headline, deck, byline class, dateline, and article prose as a -proposal. Edition chrome is contract-derived, not model copy. Local validation -binds every article to opaque citations, places supplied by those cited facts, -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, +timestamps remain internal. One bounded narrative-selection agent owns the +Canopy Ledger's editorial agenda over that frozen desk: it chooses a dominant +throughline, reader stake, article groupings, and rhetorical angles, then +submits a typed agenda whose story pitches reference only exact newsroom +citations. A deterministic workbench owns the article budget, exact citation +membership, uniqueness, lead selection, and bounded reader-facing framing +fields. The agenda is interpretation and selection, never evidence: it cannot +create an event, person, institution, place, motive, quotation, outcome, or +world mutation. The editor receives the admitted agenda plus the same desk and +may compose only from the agenda's selected citations. It owns headline, deck, +byline class, dateline, and article prose as a proposal; it does not silently +recover citations the narrative owner omitted. Edition chrome is +contract-derived, not model copy. Local validation binds every article to +agenda-selected opaque citations, places supplied by those cited facts, the +front-page budget, and reader-safe presentation labels. Accepted citations are +then lowered once to exact canonical source-news/event IDs and a semantic audit +projection containing the cited accounts, assertion status, named people and +their exhaustive supported identity attributes, institutions, populations, +and places. That projection is derived from the same selected `NewsroomSource` +records; it is not a second fact authority. A separate copy-desk stage may +reject unsupported facts, unearned attribution, procedural leakage, or mechanical state-ledger copy but cannot rewrite it. Its desk includes each account's typed assertion status and the exact supported identity attributes for every named person, including an @@ -1322,6 +1336,68 @@ 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. +The newsroom narrative-selection boundary has this authority map: + +- **Owner:** the narrative-selection agent plus its deterministic workbench own + the single publication's current editorial agenda. The editor owns prose + proposal, the copy desk owns factual judgment, and `WorldKernel` remains the + only world-event authority. +- **Inputs:** exact immutable newsroom desk, publication title and voice, + article budget, source receipt ancestry, and the newsroom contract version. + The workbench may inspect only those inputs and the typed agenda action. +- **Outputs:** one typed agenda with a dominant throughline, reader stake, and + one or more ordered story pitches. Each pitch declares whether it is the lead, + names exact citation IDs, and supplies bounded angle, tension, and public + question fields. The editor schema exposes only the union of citations + selected by the agenda; deterministic post-inference alignment, not the + schema alone, requires each article to use exactly its corresponding pitch's + citation set. +- **Derived state:** salience, juxtaposition, pitch order, rhetorical + interpretation, and insinuation are editorial framing. They are not committed + events or source evidence. Semantic audit rows are a deterministic projection + of the selected frozen sources and do not become another desk. +- **Forbidden writers:** the narrative agent cannot write campaign state, + events, `NewsIssue`, copy-desk verdicts, copy, checkpoints, or accepted + compositions. The editor cannot widen the admitted citation set. Renderers + cannot infer missing provenance or change assertion status. +- **Shared paths:** fresh composition runs narrative selection once, then editor + and copy desk. A rejected page persists the complete receipt ancestry before + reconciliation. Resume starts from that checkpoint and never reruns narrative + selection or the editor. Accepted-composition idempotence returns the exact + stored issue. +- **Persistence and ancestry:** reconciliation checkpoint v2 binds the admitted + agenda, draft, rejected verdict, task and exact desk bindings, immutable + receipt IDs, receipt-chain digest, generation, and parent. Resume reloads the + typed receipts, validates narrative/editor/copy-desk stage order, exact + checkpoint identity, agenda admission and editor alignment, and strict receipt + prefix growth before inference. Fresh-path and resume tests separately prove + that the editor consumes the narrative receipt and resumed reconciliation + consumes the complete earlier receipt set plus checkpoint ID. The common + legacy-import validator does not independently reconstruct every historical + `source_receipt_ids` edge; that older chain remains bounded by the explicit + typed import witness rather than being generalized as current newsroom state. +- **Schema/version cut:** `canopy-ledger-narrative-selection.v1` participates in + publication-task and exact editorial bindings plus article and empty-issue + identity. New issues and CultMesh/native publication use + `ghostlight.world_newspaper_issue.v3`; resumable state uses + `ghostlight.world_newspaper_reconciliation_checkpoint.v2`. The accepted + composition envelope remains v1 but its contract-versioned key and editorial + binding prevent a pre-cut composition from winning current idempotence. + Checkpoint v1 is not a live resume source; the explicit typed legacy import is + the only admitted bridge for the named pre-cut run. +- **Cut line:** the one-shot editor no longer owns both story selection and copy + composition. No multi-publication Persona, publication memory, layout engine, + new service, second event authority, or alternate audit store is added in this + cut. +- **Verification and build budget:** 23 focused `ghostlight-dungeon` library + tests prove deterministic agenda admission, citation restriction, + receipt/checkpoint ancestry, semantic audit projection, and existing + reconciliation resume; the complete library gate is 478/478. The 13/13 + strategic-smoke binary tests prove that its bounded recovery and checkpoint + helpers remain compatible, not the newsroom semantics themselves. The cut + adds no dependency, crate, binary, daemon, target platform, code-generation + path, or world-simulation pass. + The resumable reconciliation boundary is now live: - **Owner:** `newspaper::advance_world_newspaper` is the single composition, @@ -1342,22 +1418,24 @@ The resumable reconciliation boundary is now live: persistence, and checkpoint-conflict errors remain failures and leave the last admitted checkpoint available. - **Persistent and derived state:** the initial copy-desk rejection persists its - editor and copy-desk receipts, then publishes generation zero before any - repair action. Each later rejected action persists its new receipts before + narrative-selection, editor, and copy-desk receipts, then publishes + generation zero before any repair action. Each later rejected action persists + its new receipts before appending one checkpoint with task and editorial bindings, generation, - parent id, typed origin, current private draft, rejected verdict, ordered - receipt ids, and receipt-chain digest. The current finding catalog, exact - target spans, action schema, and chain tip are derived and validated; they are - not parallel state owners. Three actions per call are only the current - advance cadence. Reaching that boundary returns `Pending` and does not make - rejection terminal. + parent id, typed origin, admitted editorial agenda, current private draft, + rejected verdict, ordered receipt ids, and receipt-chain digest. The current + finding catalog, exact target spans, action schema, and chain tip are derived + and validated; they are not parallel state owners. Three actions per call are + only the current advance cadence. Reaching that boundary returns `Pending` + and does not make rejection terminal. - **Resume and idempotence:** every call checks the accepted composition marker before checkpoint discovery. Otherwise it loads the unique checkpoint tip, reloads every typed receipt, validates checkpoint identity, task and exact editorial bindings, generation and parent links, strict receipt-prefix - growth, draft, rejected verdict and finding targets, then reconstructs the - same workbench. A resumed action includes the checkpoint id and every prior - receipt in its causal ancestry and never invokes the editor. Acceptance + growth, agenda admission and editor alignment, draft, rejected verdict and + finding targets, then reconstructs the same workbench. A resumed action + includes the checkpoint id and every prior receipt in its causal ancestry and + never invokes the editor. Acceptance persists its receipts and a composition linked to the source checkpoint; later calls return that composition without model work even though the historical pending chain remains immutable. @@ -1396,9 +1474,10 @@ The resumable reconciliation boundary is now live: copy-desk ancestry, accepted-composition idempotence without inference, same-task source-drift rejection and fork rejection before inference, typed legacy import through the common validator, and Registry preservation of - pending state. The current verified gate is 477/477 library tests and 13/13 - strategic-smoke binary tests, including same-task source-drift and fork - rejection before inference. Provider runs 47 through 49 prove exact-chain + pending state. The current verified gates are 478/478 library tests and 13/13 + strategic-smoke binary tests. Same-task source-drift and fork rejection before + inference are library proofs; the binary tests cover the acceptance driver's + recovery/checkpoint helpers. Provider runs 47 through 49 prove exact-chain resume and accepted-publication idempotence through Issue 16; Issue 17 reached generation 24 without editor or world replay and exposed the nested-finding admission case now owned by the workbench. Run 50 then admitted Issue 17 and diff --git a/state/evidence.jsonl b/state/evidence.jsonl index bcf52a3..988a081 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -218,4 +218,5 @@ {"note": "The final resumable-newspaper gate is 475/475 library tests and 13/13 strategic-smoke tests, including same-task source-drift and fork rejection before inference. Clarification: pending checkpoints bind task/editorial identity, exact draft, rejected verdict/findings, parent generation, and ordered receipt ancestry. Accepted composition and strategic artifact records separately bind issue and rendered-file ancestry; rendered files are not checkpoint workbench state. Run47 remains unlaunched.", "status": "ok", "ts": "2026-08-29T07:42:40+00:00", "type": "correction"} {"note": "Provider runs 47-49 at db48bef proved checkpointed newspaper reconciliation resumes without editor, world, or accepted-issue replay through Issue 16. Run 49 advanced Issue 17 to generation 24 and exposed nested exact findings: the agent supplied both a paragraph repair and its contained phrase repair, while deterministic admission treated them as competing overlaps. The workbench now deterministically gives the outer span ownership, covers contained repairs, rejects partial overlaps, and passes 21 newspaper tests plus 476 library tests.", "status": "ok", "ts": "2026-08-29T08:27:17+00:00", "type": "verification"} {"note": "Run 50 at 8b1db89 resumed Issue 17 generation 24, admitted it on the first bounded repair, and advanced Issue 18 to generation 24 without editor, simulation, or accepted-issue replay. Two honest empty replacements repeatedly failed only because raw phrase deletion left a trailing ASCII space that the reader-copy validator correctly rejected. Empty replacement seam ownership now lives in the grounding workbench, with four focused repair tests and 477 library tests passing.", "status": "ok", "ts": "2026-08-29T08:43:50+00:00", "type": "verification"} -{"ts": "2026-08-29T09:05:39+00:00", "type": "correction", "status": "ok", "note": "Exact-source run51 at ccc51df is mechanically complete at world revision27 with accepted Issues13-18 and final newspaper SHA-256 250131C321C5D90C48854FDBA032591B51B51AA1D5B7060BB9D419944625CA7D. Immutable local archive F:\\GameCult\\GhostlightDungeon\\acceptance\\elven-realms-autonomous-ccc51df-51.tar independently hashes FC7A930C73E6B22FDD11D137616B6A38B4EDA19AA837B25DA6DAEF7B7C0611F2; exact live services remained unchanged. Blind editorial review FAILS because the procedural digest lacks sustained throughline, material lived cost, and countermoves. Independent grounding review FAILS because the audit omits semantic source descriptions, assertion status, and identity evidence, and flags status inflation. Run51-launch/reconciliation steering is retired. Next action is a newsroom-only architecture cut over immutable facts: one single-publication narrative-selection owner plus self-contained semantic provenance, no world resimulation; multiple publications and TeX/layout/engraved cuts remain deferred until one Canopy Ledger earns editorial acceptance."} +{"note": "Exact-source run51 at ccc51df is mechanically complete at world revision27 with accepted Issues13-18 and final newspaper SHA-256 250131C321C5D90C48854FDBA032591B51B51AA1D5B7060BB9D419944625CA7D. Immutable local archive F:\\GameCult\\GhostlightDungeon\\acceptance\\elven-realms-autonomous-ccc51df-51.tar independently hashes FC7A930C73E6B22FDD11D137616B6A38B4EDA19AA837B25DA6DAEF7B7C0611F2; exact live services remained unchanged. Blind editorial review FAILS because the procedural digest lacks sustained throughline, material lived cost, and countermoves. Independent grounding review FAILS because the audit omits semantic source descriptions, assertion status, and identity evidence, and flags status inflation. Run51-launch/reconciliation steering is retired. Next action is a newsroom-only architecture cut over immutable facts: one single-publication narrative-selection owner plus self-contained semantic provenance, no world resimulation; multiple publications and TeX/layout/engraved cuts remain deferred until one Canopy Ledger earns editorial acceptance.", "status": "ok", "ts": "2026-08-29T09:05:39+00:00", "type": "correction"} +{"ts": "2026-08-29T10:03:50+00:00", "type": "implementation", "status": "ok", "note": "Newsroom ownership cut verified locally: one capable narrative-selection agent and deterministic workbench own a typed single-publication agenda over the frozen fact desk; the editor is restricted to exact admitted citation groupings; copy desk and bounded reconciliation retain factual judgment; checkpoint v2 preserves narrative/editor/copy-desk ancestry across resume; Issue v3 persists the agenda and one semantic provenance projection with exact accounts, assertion status, and supported identity attributes. Verified 23 focused newspaper tests, 478 library tests, and 13 strategic-smoke tests. No world simulation was rerun and no dependency, crate, binary, daemon, or target was added."} diff --git a/state/ghostlight-state.cultcache.jsonl b/state/ghostlight-state.cultcache.jsonl index 888f778..78d4c9b 100644 --- a/state/ghostlight-state.cultcache.jsonl +++ b/state/ghostlight-state.cultcache.jsonl @@ -220,3 +220,4 @@ {"key": "2026-08-29T082717Z0000-0218-6eb8dbfd35e3", "payload": "eyJub3RlIjogIlByb3ZpZGVyIHJ1bnMgNDctNDkgYXQgZGI0OGJlZiBwcm92ZWQgY2hlY2twb2ludGVkIG5ld3NwYXBlciByZWNvbmNpbGlhdGlvbiByZXN1bWVzIHdpdGhvdXQgZWRpdG9yLCB3b3JsZCwgb3IgYWNjZXB0ZWQtaXNzdWUgcmVwbGF5IHRocm91Z2ggSXNzdWUgMTYuIFJ1biA0OSBhZHZhbmNlZCBJc3N1ZSAxNyB0byBnZW5lcmF0aW9uIDI0IGFuZCBleHBvc2VkIG5lc3RlZCBleGFjdCBmaW5kaW5nczogdGhlIGFnZW50IHN1cHBsaWVkIGJvdGggYSBwYXJhZ3JhcGggcmVwYWlyIGFuZCBpdHMgY29udGFpbmVkIHBocmFzZSByZXBhaXIsIHdoaWxlIGRldGVybWluaXN0aWMgYWRtaXNzaW9uIHRyZWF0ZWQgdGhlbSBhcyBjb21wZXRpbmcgb3ZlcmxhcHMuIFRoZSB3b3JrYmVuY2ggbm93IGRldGVybWluaXN0aWNhbGx5IGdpdmVzIHRoZSBvdXRlciBzcGFuIG93bmVyc2hpcCwgY292ZXJzIGNvbnRhaW5lZCByZXBhaXJzLCByZWplY3RzIHBhcnRpYWwgb3ZlcmxhcHMsIGFuZCBwYXNzZXMgMjEgbmV3c3BhcGVyIHRlc3RzIHBsdXMgNDc2IGxpYnJhcnkgdGVzdHMuIiwgInN0YXR1cyI6ICJvayIsICJ0cyI6ICIyMDI2LTA4LTI5VDA4OjI3OjE3KzAwOjAwIiwgInR5cGUiOiAidmVyaWZpY2F0aW9uIn0=", "stored_at": "2026-08-29T08:27:17.596963+00:00", "type": "ghostlight.evidence_record.v0"} {"key": "2026-08-29T084350Z0000-0219-a286f942b1d5", "payload": "eyJub3RlIjogIlJ1biA1MCBhdCA4YjFkYjg5IHJlc3VtZWQgSXNzdWUgMTcgZ2VuZXJhdGlvbiAyNCwgYWRtaXR0ZWQgaXQgb24gdGhlIGZpcnN0IGJvdW5kZWQgcmVwYWlyLCBhbmQgYWR2YW5jZWQgSXNzdWUgMTggdG8gZ2VuZXJhdGlvbiAyNCB3aXRob3V0IGVkaXRvciwgc2ltdWxhdGlvbiwgb3IgYWNjZXB0ZWQtaXNzdWUgcmVwbGF5LiBUd28gaG9uZXN0IGVtcHR5IHJlcGxhY2VtZW50cyByZXBlYXRlZGx5IGZhaWxlZCBvbmx5IGJlY2F1c2UgcmF3IHBocmFzZSBkZWxldGlvbiBsZWZ0IGEgdHJhaWxpbmcgQVNDSUkgc3BhY2UgdGhhdCB0aGUgcmVhZGVyLWNvcHkgdmFsaWRhdG9yIGNvcnJlY3RseSByZWplY3RlZC4gRW1wdHkgcmVwbGFjZW1lbnQgc2VhbSBvd25lcnNoaXAgbm93IGxpdmVzIGluIHRoZSBncm91bmRpbmcgd29ya2JlbmNoLCB3aXRoIGZvdXIgZm9jdXNlZCByZXBhaXIgdGVzdHMgYW5kIDQ3NyBsaWJyYXJ5IHRlc3RzIHBhc3NpbmcuIiwgInN0YXR1cyI6ICJvayIsICJ0cyI6ICIyMDI2LTA4LTI5VDA4OjQzOjUwKzAwOjAwIiwgInR5cGUiOiAidmVyaWZpY2F0aW9uIn0=", "stored_at": "2026-08-29T08:43:50.173548+00:00", "type": "ghostlight.evidence_record.v0"} {"key": "2026-08-29T090539Z0000-0220-b2a5cfda8820", "payload": "eyJub3RlIjogIkV4YWN0LXNvdXJjZSBydW41MSBhdCBjY2M1MWRmIGlzIG1lY2hhbmljYWxseSBjb21wbGV0ZSBhdCB3b3JsZCByZXZpc2lvbjI3IHdpdGggYWNjZXB0ZWQgSXNzdWVzMTMtMTggYW5kIGZpbmFsIG5ld3NwYXBlciBTSEEtMjU2IDI1MDEzMUMzMjFDNUQ5MEM0ODg1NEZEQkEwMzI1OTFCNTFCNTFBQTFENUI3MDYwQkI5RDQxOTk0NDYyNUNBN0QuIEltbXV0YWJsZSBsb2NhbCBhcmNoaXZlIEY6XFxHYW1lQ3VsdFxcR2hvc3RsaWdodER1bmdlb25cXGFjY2VwdGFuY2VcXGVsdmVuLXJlYWxtcy1hdXRvbm9tb3VzLWNjYzUxZGYtNTEudGFyIGluZGVwZW5kZW50bHkgaGFzaGVzIEZDN0E5MzBDNzNFNkIyMkZERDExRDEzNzYxNkI2QTM4QjRFREExOUFBODM3QjI1REE2REFFRjdCN0MwNjExRjI7IGV4YWN0IGxpdmUgc2VydmljZXMgcmVtYWluZWQgdW5jaGFuZ2VkLiBCbGluZCBlZGl0b3JpYWwgcmV2aWV3IEZBSUxTIGJlY2F1c2UgdGhlIHByb2NlZHVyYWwgZGlnZXN0IGxhY2tzIHN1c3RhaW5lZCB0aHJvdWdobGluZSwgbWF0ZXJpYWwgbGl2ZWQgY29zdCwgYW5kIGNvdW50ZXJtb3Zlcy4gSW5kZXBlbmRlbnQgZ3JvdW5kaW5nIHJldmlldyBGQUlMUyBiZWNhdXNlIHRoZSBhdWRpdCBvbWl0cyBzZW1hbnRpYyBzb3VyY2UgZGVzY3JpcHRpb25zLCBhc3NlcnRpb24gc3RhdHVzLCBhbmQgaWRlbnRpdHkgZXZpZGVuY2UsIGFuZCBmbGFncyBzdGF0dXMgaW5mbGF0aW9uLiBSdW41MS1sYXVuY2gvcmVjb25jaWxpYXRpb24gc3RlZXJpbmcgaXMgcmV0aXJlZC4gTmV4dCBhY3Rpb24gaXMgYSBuZXdzcm9vbS1vbmx5IGFyY2hpdGVjdHVyZSBjdXQgb3ZlciBpbW11dGFibGUgZmFjdHM6IG9uZSBzaW5nbGUtcHVibGljYXRpb24gbmFycmF0aXZlLXNlbGVjdGlvbiBvd25lciBwbHVzIHNlbGYtY29udGFpbmVkIHNlbWFudGljIHByb3ZlbmFuY2UsIG5vIHdvcmxkIHJlc2ltdWxhdGlvbjsgbXVsdGlwbGUgcHVibGljYXRpb25zIGFuZCBUZVgvbGF5b3V0L2VuZ3JhdmVkIGN1dHMgcmVtYWluIGRlZmVycmVkIHVudGlsIG9uZSBDYW5vcHkgTGVkZ2VyIGVhcm5zIGVkaXRvcmlhbCBhY2NlcHRhbmNlLiIsICJzdGF0dXMiOiAib2siLCAidHMiOiAiMjAyNi0wOC0yOVQwOTowNTozOSswMDowMCIsICJ0eXBlIjogImNvcnJlY3Rpb24ifQ==", "stored_at": "2026-08-29T09:05:39.055725+00:00", "type": "ghostlight.evidence_record.v0"} +{"key": "2026-08-29T100350Z0000-0221-d4342a66fce8", "payload": "eyJub3RlIjogIk5ld3Nyb29tIG93bmVyc2hpcCBjdXQgdmVyaWZpZWQgbG9jYWxseTogb25lIGNhcGFibGUgbmFycmF0aXZlLXNlbGVjdGlvbiBhZ2VudCBhbmQgZGV0ZXJtaW5pc3RpYyB3b3JrYmVuY2ggb3duIGEgdHlwZWQgc2luZ2xlLXB1YmxpY2F0aW9uIGFnZW5kYSBvdmVyIHRoZSBmcm96ZW4gZmFjdCBkZXNrOyB0aGUgZWRpdG9yIGlzIHJlc3RyaWN0ZWQgdG8gZXhhY3QgYWRtaXR0ZWQgY2l0YXRpb24gZ3JvdXBpbmdzOyBjb3B5IGRlc2sgYW5kIGJvdW5kZWQgcmVjb25jaWxpYXRpb24gcmV0YWluIGZhY3R1YWwganVkZ21lbnQ7IGNoZWNrcG9pbnQgdjIgcHJlc2VydmVzIG5hcnJhdGl2ZS9lZGl0b3IvY29weS1kZXNrIGFuY2VzdHJ5IGFjcm9zcyByZXN1bWU7IElzc3VlIHYzIHBlcnNpc3RzIHRoZSBhZ2VuZGEgYW5kIG9uZSBzZW1hbnRpYyBwcm92ZW5hbmNlIHByb2plY3Rpb24gd2l0aCBleGFjdCBhY2NvdW50cywgYXNzZXJ0aW9uIHN0YXR1cywgYW5kIHN1cHBvcnRlZCBpZGVudGl0eSBhdHRyaWJ1dGVzLiBWZXJpZmllZCAyMyBmb2N1c2VkIG5ld3NwYXBlciB0ZXN0cywgNDc4IGxpYnJhcnkgdGVzdHMsIGFuZCAxMyBzdHJhdGVnaWMtc21va2UgdGVzdHMuIE5vIHdvcmxkIHNpbXVsYXRpb24gd2FzIHJlcnVuIGFuZCBubyBkZXBlbmRlbmN5LCBjcmF0ZSwgYmluYXJ5LCBkYWVtb24sIG9yIHRhcmdldCB3YXMgYWRkZWQuIiwgInN0YXR1cyI6ICJvayIsICJ0cyI6ICIyMDI2LTA4LTI5VDEwOjAzOjUwKzAwOjAwIiwgInR5cGUiOiAiaW1wbGVtZW50YXRpb24ifQ==", "stored_at": "2026-08-29T10:03:50.763544+00:00", "type": "ghostlight.evidence_record.v0"} diff --git a/state/map.yaml b/state/map.yaml index 725bfb3..099e4ea 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -325,8 +325,8 @@ data_flow: - If state grows faster than understanding, cut it back. 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. + 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. That run-39 diagnosis is superseded for the current phase: run 51 closes the world and reconciliation mechanics, and the active defect belongs to newsroom narrative selection and self-contained semantic provenance over immutable facts. 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 51 at pushed `ccc51df` is mechanically complete at world revision 27 with accepted Issues 13 through 18 and a final newspaper. No world mechanics, editor work, or accepted publications were replayed, and exact live codex-connector and ghostlight-dungeon service identities remained unchanged. Independent blind editorial review returns FAIL: the procedural digest lacks a sustained throughline, material lived cost, and countermoves. Independent grounding review returns FAIL: the audit omits semantic source descriptions, assertion status, and identity evidence, and the copy contains status inflation. Mechanical completion does not satisfy editorial or grounding acceptance. - implementation_checkpoint: Pushed `ccc51df` closes the resumable reconciliation mechanics through Issue 18 and the final digest. The immutable local archive is `F:\GameCult\GhostlightDungeon\acceptance\elven-realms-autonomous-ccc51df-51.tar` with SHA-256 `FC7A930C73E6B22FDD11D137616B6A38B4EDA19AA837B25DA6DAEF7B7C0611F2`; its manifest binds the final `newspaper.md` to SHA-256 `250131C321C5D90C48854FDBA032591B51B51AA1D5B7060BB9D419944625CA7D`. Plan commit `4916638` admits persistent political/editorial publication Personas, but the immediate cut remains one Canopy Ledger narrative owner rather than multi-publication expansion. - next_action: Map a newsroom-only architectural cut over the immutable run-51 fact substrate: one single-publication narrative-selection owner must choose and sustain throughlines, lived costs, and countermoves, while a self-contained semantic provenance surface exposes source descriptions, assertion status, identity evidence, and exact factual support. Grounding remains authoritative over assertions without flattening editorial framing. Do not resimulate the world. Implement and verify one good Canopy Ledger before multiple publication Personas; defer TeX layout and engraved cuts until editorial acceptance. Preserve run 51, the immutable revision-27 lineage, stopped run 23, exact acceptance conditions, and unchanged live daemons. + implementation_checkpoint: The newsroom-only cut is locally verified: a capable narrative-selection agent uses the generic harness and deterministic workbench to own one typed agenda over the frozen desk; the editor is restricted to its exact citation groupings; the copy desk retains factual judgment; contract-bound checkpoint v2 preserves agenda and narrative/editor/copy-desk ancestry across exact resume; and Issue v3 persists the agenda plus one self-contained semantic provenance projection rather than duplicate flat audit truth. Gates pass 23/23 focused newspaper tests, 478/478 library tests, and 13/13 strategic-smoke tests. The cut adds no dependency, crate, binary, daemon, target, or world-simulation pass. Run 51 and its archive remain immutable. + next_action: Commit and push the verified newsroom cut, then create one immutable newsroom-only acceptance root from run 51's exact revision-27 campaign and accepted per-wave publications. Recompose only the final Canopy Ledger over the same facts; do not replay compilation, elaboration, Nemesis, strategic waves, clocks, or per-wave newspaper work. Preserve every newsroom checkpoint, run exact provenance/archive/hash and unchanged-service verification, and obtain independent blind editorial plus grounding acceptance before delivering the actual copy. Defer multiple publication Personas, TeX layout, and engraved cuts until this single publication passes. 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.