diff --git a/crates/ghostlight-dungeon/src/newspaper.rs b/crates/ghostlight-dungeon/src/newspaper.rs index 5ac76f8..d3435ee 100644 --- a/crates/ghostlight-dungeon/src/newspaper.rs +++ b/crates/ghostlight-dungeon/src/newspaper.rs @@ -23,11 +23,12 @@ use std::{ }; const MAX_FRONT_PAGE_ARTICLES: usize = 6; -const MAX_SOURCE_NEWS_ITEMS: usize = 32; +const MAX_INITIAL_NEWSROOM_SOURCES: usize = 32; +const MAX_ARCHIVE_CONTEXT_SOURCES: usize = 12; const MAX_EDITORIAL_CITATIONS_PER_STORY: usize = 6; const EDITORIAL_CITATIONS_PER_ARTICLE: usize = 2; const GROUNDING_RECONCILIATION_ACTIONS_PER_ADVANCE: usize = 3; -const NEWSROOM_CONTRACT_VERSION: &str = "canopy-ledger-narrative-selection.v2"; +const NEWSROOM_CONTRACT_VERSION: &str = "canopy-ledger-narrative-selection.v3"; const EDITION_LABEL: &str = "Current Edition"; const ALLOWED_SECTIONS: [&str; 6] = [ "Front Page", @@ -339,9 +340,18 @@ pub struct WorldNewspaperStoryPitch { pub public_question: String, } +#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] +#[serde(deny_unknown_fields)] +struct NarrativeSelectionAction { + command: NarrativeSelectionCommand, +} + #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] #[serde(tag = "tool", rename_all = "snake_case", deny_unknown_fields)] -enum NarrativeSelectionAction { +enum NarrativeSelectionCommand { + RequestArchiveContext { + window: WorldNewspaperArchiveWindow, + }, SubmitAgenda { #[schemars(length(min = 1, max = 500))] dominant_throughline: String, @@ -352,15 +362,72 @@ enum NarrativeSelectionAction { }, } +#[derive( + Clone, Copy, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq, PartialOrd, Ord, +)] +#[serde(rename_all = "snake_case")] +enum WorldNewspaperArchiveWindow { + PrecedingRecent, + Foundational, +} + #[derive(Clone, Debug, Serialize, PartialEq, Eq)] #[serde(tag = "kind", rename_all = "snake_case")] enum NarrativeSelectionFinding { - AgendaRejected { reason: String }, + AgendaRejected { + reason: String, + }, + ArchiveRequestRejected { + reason: String, + }, + ArchiveContext { + window: WorldNewspaperArchiveWindow, + desk: serde_json::Value, + }, } struct NarrativeSelectionWorkbench<'a> { sources: &'a [NewsroomSource], max_articles: usize, + visible_citations: BTreeSet, + requested_windows: BTreeSet, +} + +impl NarrativeSelectionWorkbench<'_> { + fn archive_citations(&self, window: WorldNewspaperArchiveWindow) -> BTreeSet { + let archive_start = MAX_INITIAL_NEWSROOM_SOURCES.min(self.sources.len()); + let range = match window { + WorldNewspaperArchiveWindow::PrecedingRecent => { + archive_start..(archive_start + MAX_ARCHIVE_CONTEXT_SOURCES).min(self.sources.len()) + } + WorldNewspaperArchiveWindow::Foundational => { + self.sources + .len() + .saturating_sub(MAX_ARCHIVE_CONTEXT_SOURCES) + .max(archive_start)..self.sources.len() + } + }; + self.sources[range] + .iter() + .map(|source| source.citation.clone()) + .collect() + } + + fn available_archive_windows(&self) -> Vec { + [ + WorldNewspaperArchiveWindow::PrecedingRecent, + WorldNewspaperArchiveWindow::Foundational, + ] + .into_iter() + .filter(|window| { + !self.requested_windows.contains(window) + && self + .archive_citations(*window) + .iter() + .any(|citation| !self.visible_citations.contains(citation)) + }) + .collect() + } } #[async_trait] @@ -370,14 +437,10 @@ impl ModelAgentTool for NarrativeSelectionWorkbench<'_> { type Finding = NarrativeSelectionFinding; fn action_schema(&self) -> std::result::Result { - let citations = self - .sources - .iter() - .map(|source| source.citation.clone()) - .collect::>(); + let citations = self.visible_citations.iter().cloned().collect::>(); let story_budget = self.max_articles.min(self.sources.len()); - let per_story_citation_budget = MAX_EDITORIAL_CITATIONS_PER_STORY.min(self.sources.len()); - let mut schema = serde_json::json!({ + let per_story_citation_budget = MAX_EDITORIAL_CITATIONS_PER_STORY.min(citations.len()); + let submit_schema = serde_json::json!({ "type":"object", "additionalProperties":false, "required":[ @@ -423,6 +486,34 @@ impl ModelAgentTool for NarrativeSelectionWorkbench<'_> { } } }); + let available_windows = self.available_archive_windows(); + let command_schema = if available_windows.is_empty() { + submit_schema + } else { + serde_json::json!({ + "oneOf":[ + { + "type":"object", + "additionalProperties":false, + "required":["tool","window"], + "properties":{ + "tool":{"const":"request_archive_context"}, + "window":{ + "type":"string", + "enum":available_windows + } + } + }, + submit_schema + ] + }) + }; + let mut schema = serde_json::json!({ + "type":"object", + "additionalProperties":false, + "required":["command"], + "properties":{"command":command_schema} + }); crate::model_connector::project_strict_responses_schema(&mut schema) .map_err(|error| error.to_string())?; Ok(schema) @@ -433,27 +524,78 @@ impl ModelAgentTool for NarrativeSelectionWorkbench<'_> { 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(), - }, + match action.command { + NarrativeSelectionCommand::RequestArchiveContext { window } => { + if !self.available_archive_windows().contains(&window) { + return ModelAgentToolOutcome::Rejected { + finding: NarrativeSelectionFinding::ArchiveRequestRejected { + reason: + "archive window is empty, already visible, or already requested" + .into(), + }, + receipts: Vec::new(), + }; + } + let citations = self.archive_citations(window); + self.requested_windows.insert(window); + self.visible_citations.extend(citations.iter().cloned()); + let desk = match serde_json::to_value(newsroom_desk_for_citations( + self.sources, + &citations, + )) { + Ok(desk) => desk, + Err(error) => { + return ModelAgentToolOutcome::Failed { + message: format!( + "narrative-selection workbench could not project archive context: {error}" + ), + receipts: Vec::new(), + }; + } + }; + ModelAgentToolOutcome::Continue { + observation: NarrativeSelectionFinding::ArchiveContext { window, desk }, + receipts: Vec::new(), + } + } + NarrativeSelectionCommand::SubmitAgenda { + dominant_throughline, + reader_stake, + story_pitches, + } => { + let agenda = WorldNewspaperEditorialAgenda { + dominant_throughline, + reader_stake, + story_pitches, + }; + let invisible_citation = agenda + .story_pitches + .iter() + .flat_map(|pitch| &pitch.citations) + .find(|citation| !self.visible_citations.contains(*citation)); + if let Some(citation) = invisible_citation { + return ModelAgentToolOutcome::Rejected { + finding: NarrativeSelectionFinding::AgendaRejected { + reason: format!( + "agenda cites newsroom note {citation} without retrieving it" + ), + }, + receipts: Vec::new(), + }; + } + 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(), + }, + } + } } } } @@ -684,7 +826,7 @@ struct PreparedNewspaper { editorial_voice: String, sources: Vec, source_receipt_ids: Vec, - source_json: String, + initial_source_json: String, publication_task_binding: String, binding: String, } @@ -720,7 +862,13 @@ fn prepare_newspaper( .iter() .flat_map(|source| source.news_ids.iter().cloned()) .collect::>(); - let source_json = serde_json::to_string_pretty(&newsroom_desk(&sources))?; + let initial_citations = sources + .iter() + .take(MAX_INITIAL_NEWSROOM_SOURCES) + .map(|source| source.citation.clone()) + .collect::>(); + let initial_source_json = + serde_json::to_string_pretty(&newsroom_desk_for_citations(&sources, &initial_citations))?; let publication_task_binding = publication_task_binding(campaign, &title, &editorial_voice, max_articles)?; let binding = editorial_binding(campaign, &title, &editorial_voice, max_articles, &sources)?; @@ -729,7 +877,7 @@ fn prepare_newspaper( editorial_voice, sources, source_receipt_ids, - source_json, + initial_source_json, publication_task_binding, binding, }) @@ -744,8 +892,14 @@ async fn select_editorial_agenda( 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. The paper has a hard news hole: omitted true facts remain true and unreported. 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. Every pitch must choose one focus_citation from its citations: the concrete fact the headline and lede should make impossible to ignore. narrative_claim states the pointed story the publication can responsibly construct around that dossier. narrative_claim, 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, + "You are the narrative editor of `{}`. Construct one compelling editorial agenda from a frozen public-news archive containing {} unique fact dossiers. The initial desk below contains the {} newest dossiers, not the whole archive. If administrative aftermath lacks the cause, conflict, scandal, named opposition, or lived stakes needed to understand it, use request_archive_context before submitting: preceding_recent returns the next {} older dossiers and foundational returns the {} oldest dossiers. Each window is exact frozen evidence, may be requested once, and costs one of your bounded semantic steps. Never cite an archive note until the workbench has shown it to you.\n\nA 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. The paper has a hard news hole: omitted true facts remain true and unreported. 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. Every pitch must choose one focus_citation from its citations: the concrete fact the headline and lede should make impossible to ignore. narrative_claim states the pointed story the publication can responsibly construct around that dossier. narrative_claim, 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 your admitted citations and will be constrained to your exact citation groupings. The copy desk will judge factual claims independently. Submit the complete agenda to the workbench once you have enough evidence.\n\nPUBLICATION VOICE:\n{}\n\nINITIAL FROZEN NEWSROOM FACT DESK:\n{}", + prepared.title, + prepared.sources.len(), + MAX_INITIAL_NEWSROOM_SOURCES.min(prepared.sources.len()), + MAX_ARCHIVE_CONTEXT_SOURCES, + MAX_ARCHIVE_CONTEXT_SOURCES, + prepared.editorial_voice, + prepared.initial_source_json, ); let spec = ModelAgentSpec { stage: "newspaper_narrative_selection_agent_action".into(), @@ -755,11 +909,19 @@ async fn select_editorial_agenda( source_receipt_ids: prepared.source_receipt_ids.clone(), temperature: Some(0.8), max_output_tokens: Some(2_000), - max_steps: 2, + max_steps: 3, }; + let visible_citations = prepared + .sources + .iter() + .take(MAX_INITIAL_NEWSROOM_SOURCES) + .map(|source| source.citation.clone()) + .collect(); let mut tool = NarrativeSelectionWorkbench { sources: &prepared.sources, max_articles, + visible_citations, + requested_windows: BTreeSet::new(), }; crate::agent::run_model_agent(model, &spec, &mut tool).await } @@ -1176,13 +1338,14 @@ pub async fn advance_world_newspaper( let agenda = agenda_run.output; let editorial_schema = editorial_schema(&prepared.sources, &agenda)?; let agenda_json = serde_json::to_string_pretty(&agenda)?; + let selected_source_json = source_json_for_agenda(&prepared.sources, Some(&agenda))?; let base_prompt = format!( "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, focus citation, narrative claim, and exact citation groupings. Implement every pitch in order and use exactly that pitch's citations for the corresponding article. Center each headline and lede on its focus_citation, then use the remaining dossier to substantiate or complicate the narrative_claim. The agenda's narrative_claim, 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, + source_json = selected_source_json, ); let mut receipts = agenda_run.receipts; let editor_sources = prepared @@ -1241,7 +1404,7 @@ pub async fn advance_world_newspaper( let verdict = match run_copy_desk( model, format!("{}:draft:{editor_output_hash}", prepared.binding), - &prepared.source_json, + &selected_source_json, &prepared.source_receipt_ids, std::slice::from_ref(&editor_receipt_id), &draft, @@ -1403,12 +1566,14 @@ async fn advance_reconciliation( ) -> Result { validate_reconciliation_checkpoint(&checkpoint, prepared, max_articles, &receipts)?; for _ in 0..GROUNDING_RECONCILIATION_ACTIONS_PER_ADVANCE { + let selected_source_json = + source_json_for_agenda(&prepared.sources, checkpoint.editorial_agenda.as_ref())?; let progress = run_grounding_reconciliation_step( model, &prepared.sources, max_articles, &prepared.binding, - &prepared.source_json, + &selected_source_json, &prepared.source_receipt_ids, &receipts, checkpoint.id(), @@ -2183,9 +2348,6 @@ fn newsroom_sources(campaign: &Campaign) -> Result> { } continue; } - if sources.len() == MAX_SOURCE_NEWS_ITEMS { - continue; - } source.citation = (sources.len() + 1).to_string(); fact_sources.insert(fact_identity, sources.len()); sources.push(source); @@ -2327,6 +2489,45 @@ fn newsroom_desk(sources: &[NewsroomSource]) -> Vec> { .collect() } +fn newsroom_desk_for_citations<'a>( + sources: &'a [NewsroomSource], + citations: &BTreeSet, +) -> Vec> { + sources + .iter() + .filter(|source| citations.contains(&source.citation)) + .map(|source| NewsroomDeskNote { + citation: &source.citation, + facts: newsroom_facts(&source.events), + }) + .collect() +} + +fn source_json_for_agenda( + sources: &[NewsroomSource], + agenda: Option<&WorldNewspaperEditorialAgenda>, +) -> Result { + let citations = agenda.map_or_else( + || { + sources + .iter() + .take(MAX_INITIAL_NEWSROOM_SOURCES) + .map(|source| source.citation.clone()) + .collect() + }, + |agenda| { + agenda + .story_pitches + .iter() + .flat_map(|pitch| pitch.citations.iter().cloned()) + .collect() + }, + ); + Ok(serde_json::to_string_pretty(&newsroom_desk_for_citations( + sources, &citations, + ))?) +} + fn editorial_schema( sources: &[NewsroomSource], agenda: &WorldNewspaperEditorialAgenda, @@ -2887,6 +3088,43 @@ mod tests { campaign } + fn campaign_with_archive_news() -> Campaign { + let mut campaign = crate::kernel::tests::campaign(); + campaign.revision = 45; + for index in 0..45 { + let at = campaign.world_time + chrono::Duration::minutes(index); + let summary = if index == 0 { + "The oldest public dossier records the speaking child, severed delegation hands, failed grain pumps, a legion refusal, and occupied toll bridges." + .to_owned() + } else { + format!( + "Public aftermath dossier {index} records one distinct administrative response." + ) + }; + let event_id = format!("event:archive:{index:02}"); + campaign.events.push(Event { + id: event_id.clone(), + at, + kind: "public_notice".into(), + summary: summary.clone(), + actor_ids: vec![], + institution_ids: vec![], + gestalt_ids: vec![], + location_ids: vec!["room".into()], + public_channels: vec!["court broadsheet".into()], + }); + campaign.news.push(NewsIssue { + id: format!("news:archive:{index:02}"), + at, + channel: "court broadsheet".into(), + headline: crate::domain::committed_news_headline(&summary), + event_ids: vec![event_id], + reliability: "committed public channel".into(), + }); + } + campaign + } + fn campaign_with_typed_and_duplicate_news() -> Campaign { let mut campaign = campaign_with_news(); let duplicate = campaign.events.last().unwrap().clone(); @@ -2947,8 +3185,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"],"focus_citation":"1","narrative_claim":"The pawned royal seal and the treasurer's dismissal are 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"],"focus_citation":"1","narrative_claim":"The pawned seal and dismissal are 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"],"focus_citation":"2","narrative_claim":"The gate closure is 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 ONE_STORY_AGENDA: &str = r#"{"command":{"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"],"focus_citation":"1","narrative_claim":"The pawned royal seal and the treasurer's dismissal are 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#"{"command":{"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"],"focus_citation":"1","narrative_claim":"The pawned seal and dismissal are 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"],"focus_citation":"2","narrative_claim":"The gate closure is 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 = @@ -3040,11 +3278,14 @@ mod tests { ); let agenda: NarrativeSelectionAction = serde_json::from_str(TWO_STORY_AGENDA).unwrap(); - let NarrativeSelectionAction::SubmitAgenda { + let NarrativeSelectionCommand::SubmitAgenda { dominant_throughline, reader_stake, story_pitches, - } = agenda; + } = agenda.command + else { + panic!("fixture must submit an agenda") + }; let admitted = WorldNewspaperEditorialAgenda { dominant_throughline, reader_stake, @@ -3078,6 +3319,81 @@ mod tests { ); } + #[tokio::test] + async fn narrative_workbench_retrieves_foundational_context_without_widening_the_editor_desk() { + let sources = newsroom_sources(&campaign_with_archive_news()).unwrap(); + assert_eq!(sources.len(), 45); + assert!(sources[44].events[0].summary.contains("speaking child")); + let visible_citations = sources + .iter() + .take(MAX_INITIAL_NEWSROOM_SOURCES) + .map(|source| source.citation.clone()) + .collect::>(); + let mut tool = NarrativeSelectionWorkbench { + sources: &sources, + max_articles: 3, + visible_citations, + requested_windows: BTreeSet::new(), + }; + let initial_schema = tool.action_schema().unwrap().to_string(); + assert!(!initial_schema.contains("\"45\"")); + + let retrieval = tool + .invoke( + NarrativeSelectionAction { + command: NarrativeSelectionCommand::RequestArchiveContext { + window: WorldNewspaperArchiveWindow::Foundational, + }, + }, + &ModelAgentToolContext { + source_receipt_ids: Vec::new(), + current_model_receipt: None, + }, + ) + .await; + let ModelAgentToolOutcome::Continue { observation, .. } = retrieval else { + panic!("foundational archive request must continue the same agent run") + }; + let NarrativeSelectionFinding::ArchiveContext { desk, .. } = observation else { + panic!("archive request must return exact desk notes") + }; + assert!(desk.to_string().contains("speaking child")); + assert!(tool.action_schema().unwrap().to_string().contains("\"45\"")); + + let action = NarrativeSelectionAction { + command: NarrativeSelectionCommand::SubmitAgenda { + dominant_throughline: "The original crisis survived its administrative aftermath." + .into(), + reader_stake: "Readers still bear the consequences of the founding rupture.".into(), + story_pitches: vec![WorldNewspaperStoryPitch { + lead: true, + citations: vec!["45".into()], + focus_citation: "45".into(), + narrative_claim: "The oldest dossier is the fact later notices avoid.".into(), + tension: "Institutions administer consequences without resolving the cause." + .into(), + public_question: "Who benefits when the founding rupture leaves the page?" + .into(), + }], + }, + }; + let ModelAgentToolOutcome::Accepted { output: agenda, .. } = tool + .invoke( + action, + &ModelAgentToolContext { + source_receipt_ids: Vec::new(), + current_model_receipt: None, + }, + ) + .await + else { + panic!("retrieved foundational citation must be admissible") + }; + let editor_desk = source_json_for_agenda(&sources, Some(&agenda)).unwrap(); + assert!(editor_desk.contains("\"citation\": \"45\"")); + assert!(!editor_desk.contains("\"citation\": \"1\"")); + } + #[test] fn narrative_workbench_owns_news_hole_focus_and_legacy_agenda_reading() { let mut sources = newsroom_sources(&campaign_with_two_news()).unwrap(); diff --git a/crates/ghostlight-dungeon/src/registry.rs b/crates/ghostlight-dungeon/src/registry.rs index a10c756..9a1c62a 100644 --- a/crates/ghostlight-dungeon/src/registry.rs +++ b/crates/ghostlight-dungeon/src/registry.rs @@ -689,22 +689,26 @@ mod tests { .output_schema .as_ref() .and_then(|schema| { - schema.pointer("/properties/story_pitches/items/properties/citations/items/enum/0") + schema.pointer( + "/properties/command/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], - "focus_citation":citation, - "narrative_claim":"The singular accusation against three auditors is itself the scandal.", - "tension":"The court's wording collapses three people into one accused figure.", - "public_question":"What process can answer an accusation framed this way?" - }] + "command":{ + "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], + "focus_citation":citation, + "narrative_claim":"The singular accusation against three auditors is itself the scandal.", + "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()) } diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index b6282b5..3dc5e76 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -1207,31 +1207,70 @@ vague angle and travels with the exact admitted plan the editor receives. A read-only serde alias/default exists solely so unrelated historical checkpoint rows deserialize; it is not active compatibility authority. Gates pass 24/24 newspaper tests, 479/479 library tests, and 15/15 strategic-smoke tests. Run 52 -remains immutable; run 53 has not launched. +remains immutable. + +Exact-source run 53 at +`d42caca278c467573f0a4b810d562bd86d29a3f1` uses newsroom implementation +`6a045bc3327860483f71abd5546b7b215e45a3e5` and is mechanically complete at +world revision 27 with 18 waves, no world or wave replay, and exact live +services unchanged. Immutable root is +`/var/lib/gamecult/ghostlight-dungeon/acceptance/elven-realms-autonomous-d42caca-53`. +SHA-256: newspaper +`0358c4e82fa716f0364976aabe3ac79a1426596d9bd9eb4f8f4f61654bceb7e2`; +audit `19b9cfa5da0eb3d20614905b68338e071eeaeb076d803cb87832ba0c9592e34f`; +result `dbc1048e7f77db3b7fc7a77c31f03a7af562e90027ac5f0c8c47789266cb7a38`; +archive `F8940F1EEC46344E2D041022B22A52E36F52907AF88F1A7CB992E098BCF8B60D`. +Every manifest row passes and independent grounding review passes. + +Independent blind editorial review fails. The paper leads with one +five-citation conduit/severed-hands dossier, then falls into cordons, reports, +and reviews without responsibility, opposing motive or countermove, scandal, +lived consequence, or a next-issue hook. + +Source inspection of run 53's exact implementation overturns post-compose +self-review as the current hypothesis. That source caps dossiers at 32, sorts +newest-first, and silently skips each later unique source. Run 53's committed +result still contains the original public `strategic_pressure` complex: the +speaking child, murderer-of-river accusation, forest sale, severed delegation +hands and court seals, pump failures, legion refusal, and bridge seizure. That +material was outside the selector's desk. Post-copy review is not disproven +forever, but it was premature for run 53 because archive context was missing. + +The current uncommitted newsroom archive-context contract v3 retains the +complete deduplicated public source archive inside the existing narrative +workbench while exposing only the 32 newest dossiers initially. The same +narrative-selection agent may spend bounded semantic steps requesting exact +12-item `preceding_recent` and `foundational` windows before agenda submission. +Deterministic admission permits only citations actually retrieved; editor, copy +desk, and reconciliation receive only the exact selected-source projection. No +new agent or event authority is added. Gates pass 25/25 newspaper tests, 480/480 +library tests, and 15/15 strategic-smoke tests. Run 53 and its hashes and review +verdicts remain immutable. 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. Launch one new immutable run 53 from run 52's revision-27 checkpoint with - final-only newsroom composition. Do not invoke compilation, elaboration, - Nemesis, strategic cells, outcomes, clocks, or per-wave publication. - Preserve runs 51 and 52 and unchanged live services. -2. Require final newspaper and archive hashes, exact provenance, +1. Review the newsroom archive-context v3 structural diff, then commit and push + it. +2. Launch one new immutable run 54 from revision 27 with final-only newsroom + composition and no strategic or per-wave replay. Preserve runs 51 through + 53 and unchanged live services. +3. Require final newspaper and archive hashes, exact provenance and manifest, unchanged-service proof, independent grounding, and blind editorial acceptance before delivery. -3. Defer multiple publication Personas, TeX layout, and engraved cuts until the +4. 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 +5. Have the game-side adapter lower its authored hierarchy into the published generic schemas; keep projection and economy translation consumer-owned. -5. Prove one consumer-owned effect crosses that public API, changes two foreign +6. 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. -6. Measure provider cost and continuity on the existing 200-cell authored-world +7. Measure provider cost and continuity on the existing 200-cell authored-world path without coupling wave width to the provider concurrency ceiling. -7. Leave the unpublished Mars seed and Kalsa refuge expansion unapproved unless +8. Leave the unpublished Mars seed and Kalsa refuge expansion unapproved unless the operator explicitly admits either; retain Kalsa as regression evidence. -8. Keep `gamecult-ops` synchronized with every executable deployment and model +9. 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 139a4db..1ee5db1 100644 --- a/notes/ghostlight-current-system-map.md +++ b/notes/ghostlight-current-system-map.md @@ -1294,8 +1294,9 @@ 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, +world mutation. The editor receives the admitted agenda plus a deterministic +projection of only the citations selected by that agenda and may compose only +from those 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 @@ -1342,33 +1343,44 @@ The newsroom narrative-selection boundary has this authority map: 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 deterministic workbench derives a total news hole of at most two selected - desk citations per available article, capped at six citations in any one - story. It may inspect only those inputs and the typed agenda action. +- **Inputs:** the exact complete deduplicated public-news archive, publication + title and voice, article budget, source receipt ancestry, and the newsroom + contract version. The agent initially sees at most the 32 newest sources. + Through the same workbench it may request `preceding_recent`, the next up to + 12 older sources after that initial viewport, or `foundational`, the oldest + up to 12 sources beyond the initial viewport. Each exact window is available + at most once and only while it contains a citation not already visible. The + deterministic workbench derives a total news hole of at most two selected + citations per available article, capped at six citations in any one story. - **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, chooses one of them as its focal citation, and supplies bounded narrative claim, 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. Valid but - omitted desk notes remain true and unreported rather than being forced into - the issue. + editor schema and prompt expose 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. + The copy desk and grounding reconciler receive the same exact selected-source + projection, and lowering resolves only the article citations against the + complete archive. Valid but omitted archive notes remain true and unreported + rather than being forced into the issue. - **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. + of the selected frozen sources and do not become another desk. Archive-window + observations change only the agent's private visible citation set; they do + not publish, mutate, or summarize new world facts. - **Forbidden writers:** the narrative agent cannot write campaign state, events, `NewsIssue`, copy-desk verdicts, copy, checkpoints, or accepted compositions. The editor owns prose only: it cannot choose or widen the admitted citations, change their pitch grouping or order, replace the focal citation, or replace the narrative claim. Renderers cannot infer missing - provenance or change assertion status. + provenance or change assertion status. Neither the selector nor its archive + workbench may read private events, model memories, or unpublished world state. - **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 + and copy desk over the selected-source projection. A rejected page persists + the admitted agenda and complete receipt ancestry before reconciliation. + Resume deterministically reconstructs that same projection from the + checkpointed agenda and complete bound archive; it never reruns narrative selection or the editor. Accepted-composition idempotence returns the exact stored issue. - **Persistence and ancestry:** reconciliation checkpoint v2 binds the admitted @@ -1382,9 +1394,11 @@ The newsroom narrative-selection boundary has this authority map: 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.v2` participates in +- **Schema/version cut:** `canopy-ledger-narrative-selection.v3` participates in publication-task and exact editorial bindings plus article and empty-issue - identity. New issues and CultMesh/native publication use + identity, while the exact editorial binding covers the complete deduplicated + archive and its provenance rather than only the initial or selected viewport. + 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 @@ -1396,19 +1410,20 @@ The newsroom narrative-selection boundary has this authority map: agenda rows can be deserialized. Neither compatibility value appears as an alternative in the current action schema: a current agenda must provide both `narrative_claim` and a focal citation drawn from its exact story dossier, and - must pass v2 agenda validation and binding. Historical decoding therefore - cannot authorize a fresh v2 selection or composition. -- **Cut line:** the existing deterministic selection workbench owns the news - hole and focal-citation constraints; the selector still owns which admitted - facts become stories and the editor still owns only prose. The overlapping - `angle` field is replaced by an explicit `narrative_claim`; no second quality - agent, 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:** 24 focused `ghostlight-dungeon` newspaper + must pass v3 agenda validation and binding. Historical decoding therefore + cannot authorize a fresh v3 selection or composition. +- **Cut line:** the global 32-source truncation is deleted. Thirty-two is now a + bounded initial-view limit, not an archive-deletion rule; the complete archive + remains prepared and bound. The existing selection workbench owns exact archive + window retrieval, visible-citation admission, the news hole, and focal-source + constraints; the selector owns which visible facts become stories and the + editor owns only prose. No post-copy quality agent, 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:** 25 focused `ghostlight-dungeon` newspaper tests prove deterministic agenda admission, citation restriction, receipt/checkpoint ancestry, semantic audit projection, and existing - reconciliation resume; the complete library gate is 479/479. The 15/15 + reconciliation resume; the complete library gate is 480/480. The 15/15 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 diff --git a/state/evidence.jsonl b/state/evidence.jsonl index aeb582b..d9069d1 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -221,4 +221,6 @@ {"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"} {"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.", "status": "ok", "ts": "2026-08-29T10:03:50+00:00", "type": "implementation"} {"note": "Run 52 exposed a historical-artifact ownership defect in strategic newspaper recovery. The acceptance driver now validates accepted Issue v2 recompositions through their original typed issue and exact source/editorial/model-receipt/reader/audit bindings without current-v3 renderer reinterpretation; current Issue v3 reuse still requires typed rerender plus a complete grounding digest. Focused strategic-smoke gate passes 15/15 and the full library gate passes 478/478. Run 51 remains the immutable whole-checkpoint witness for its pre-grounding-digest publications.", "status": "ok", "ts": "2026-08-29T10:30:40+00:00", "type": "verification"} -{"ts": "2026-08-29T11:08:59+00:00", "type": "implementation", "status": "ok", "note": "Run 52 isolated a newsroom selection-owner defect: its three pitches consumed all 32 frozen desk citations and blind editorial review failed despite grounding acceptance. The v2 narrative-selection contract now gives the deterministic workbench a total news hole of at most two citations per available article, caps each story dossier at six, requires a focus citation inside each dossier, and hands the editor an explicit narrative claim. Historical angle-bearing rows remain read-compatible but cannot satisfy the current contract binding. Verified 24/24 newspaper tests, 479/479 ghostlight-dungeon library tests, and 15/15 strategic-smoke tests. Editorial acceptance remains unproven until a new immutable revision-27 newsroom-only run passes blind review."} +{"note": "Run 52 isolated a newsroom selection-owner defect: its three pitches consumed all 32 frozen desk citations and blind editorial review failed despite grounding acceptance. The v2 narrative-selection contract now gives the deterministic workbench a total news hole of at most two citations per available article, caps each story dossier at six, requires a focus citation inside each dossier, and hands the editor an explicit narrative claim. Historical angle-bearing rows remain read-compatible but cannot satisfy the current contract binding. Verified 24/24 newspaper tests, 479/479 ghostlight-dungeon library tests, and 15/15 strategic-smoke tests. Editorial acceptance remains unproven until a new immutable revision-27 newsroom-only run passes blind review.", "status": "ok", "ts": "2026-08-29T11:08:59+00:00", "type": "implementation"} +{"note": "Run 53 is immutable and mechanically complete at d42caca with exact live services unchanged; independent grounding passed and blind editorial review failed because one conduit dossier lacked cause, responsibility, opposition, lived consequence, and a next-issue hook. Source inspection falsified post-copy self-review as the next owner: newsroom_sources silently deleted every unique public fact dossier beyond the newest 32 although the frozen campaign retained the original strategic_pressure crisis.", "status": "ok", "ts": "2026-08-29T11:56:19+00:00", "type": "verification"} +{"ts": "2026-08-29T11:56:19+00:00", "type": "implementation", "status": "ok", "note": "Newsroom contract v3 retains the complete deduplicated public archive, shows the selector only 32 newest dossiers initially, permits exact bounded retrieval of 12 preceding-recent or 12 foundational dossiers, admits only visible citations, and projects only the selected dossier union to editor, copy desk, and reconciliation. No new agent or event authority. Verification passes 25/25 newspaper, 480/480 library, and 15/15 strategic-smoke tests."} diff --git a/state/ghostlight-state.cultcache.jsonl b/state/ghostlight-state.cultcache.jsonl index 1a1bfbd..4a750a7 100644 --- a/state/ghostlight-state.cultcache.jsonl +++ b/state/ghostlight-state.cultcache.jsonl @@ -223,3 +223,5 @@ {"key": "2026-08-29T100350Z0000-0221-d4342a66fce8", "payload": "eyJub3RlIjogIk5ld3Nyb29tIG93bmVyc2hpcCBjdXQgdmVyaWZpZWQgbG9jYWxseTogb25lIGNhcGFibGUgbmFycmF0aXZlLXNlbGVjdGlvbiBhZ2VudCBhbmQgZGV0ZXJtaW5pc3RpYyB3b3JrYmVuY2ggb3duIGEgdHlwZWQgc2luZ2xlLXB1YmxpY2F0aW9uIGFnZW5kYSBvdmVyIHRoZSBmcm96ZW4gZmFjdCBkZXNrOyB0aGUgZWRpdG9yIGlzIHJlc3RyaWN0ZWQgdG8gZXhhY3QgYWRtaXR0ZWQgY2l0YXRpb24gZ3JvdXBpbmdzOyBjb3B5IGRlc2sgYW5kIGJvdW5kZWQgcmVjb25jaWxpYXRpb24gcmV0YWluIGZhY3R1YWwganVkZ21lbnQ7IGNoZWNrcG9pbnQgdjIgcHJlc2VydmVzIG5hcnJhdGl2ZS9lZGl0b3IvY29weS1kZXNrIGFuY2VzdHJ5IGFjcm9zcyByZXN1bWU7IElzc3VlIHYzIHBlcnNpc3RzIHRoZSBhZ2VuZGEgYW5kIG9uZSBzZW1hbnRpYyBwcm92ZW5hbmNlIHByb2plY3Rpb24gd2l0aCBleGFjdCBhY2NvdW50cywgYXNzZXJ0aW9uIHN0YXR1cywgYW5kIHN1cHBvcnRlZCBpZGVudGl0eSBhdHRyaWJ1dGVzLiBWZXJpZmllZCAyMyBmb2N1c2VkIG5ld3NwYXBlciB0ZXN0cywgNDc4IGxpYnJhcnkgdGVzdHMsIGFuZCAxMyBzdHJhdGVnaWMtc21va2UgdGVzdHMuIE5vIHdvcmxkIHNpbXVsYXRpb24gd2FzIHJlcnVuIGFuZCBubyBkZXBlbmRlbmN5LCBjcmF0ZSwgYmluYXJ5LCBkYWVtb24sIG9yIHRhcmdldCB3YXMgYWRkZWQuIiwgInN0YXR1cyI6ICJvayIsICJ0cyI6ICIyMDI2LTA4LTI5VDEwOjAzOjUwKzAwOjAwIiwgInR5cGUiOiAiaW1wbGVtZW50YXRpb24ifQ==", "stored_at": "2026-08-29T10:03:50.763544+00:00", "type": "ghostlight.evidence_record.v0"} {"key": "2026-08-29T103040Z0000-0222-18c6fcc50a9c", "payload": "eyJub3RlIjogIlJ1biA1MiBleHBvc2VkIGEgaGlzdG9yaWNhbC1hcnRpZmFjdCBvd25lcnNoaXAgZGVmZWN0IGluIHN0cmF0ZWdpYyBuZXdzcGFwZXIgcmVjb3ZlcnkuIFRoZSBhY2NlcHRhbmNlIGRyaXZlciBub3cgdmFsaWRhdGVzIGFjY2VwdGVkIElzc3VlIHYyIHJlY29tcG9zaXRpb25zIHRocm91Z2ggdGhlaXIgb3JpZ2luYWwgdHlwZWQgaXNzdWUgYW5kIGV4YWN0IHNvdXJjZS9lZGl0b3JpYWwvbW9kZWwtcmVjZWlwdC9yZWFkZXIvYXVkaXQgYmluZGluZ3Mgd2l0aG91dCBjdXJyZW50LXYzIHJlbmRlcmVyIHJlaW50ZXJwcmV0YXRpb247IGN1cnJlbnQgSXNzdWUgdjMgcmV1c2Ugc3RpbGwgcmVxdWlyZXMgdHlwZWQgcmVyZW5kZXIgcGx1cyBhIGNvbXBsZXRlIGdyb3VuZGluZyBkaWdlc3QuIEZvY3VzZWQgc3RyYXRlZ2ljLXNtb2tlIGdhdGUgcGFzc2VzIDE1LzE1IGFuZCB0aGUgZnVsbCBsaWJyYXJ5IGdhdGUgcGFzc2VzIDQ3OC80NzguIFJ1biA1MSByZW1haW5zIHRoZSBpbW11dGFibGUgd2hvbGUtY2hlY2twb2ludCB3aXRuZXNzIGZvciBpdHMgcHJlLWdyb3VuZGluZy1kaWdlc3QgcHVibGljYXRpb25zLiIsICJzdGF0dXMiOiAib2siLCAidHMiOiAiMjAyNi0wOC0yOVQxMDozMDo0MCswMDowMCIsICJ0eXBlIjogInZlcmlmaWNhdGlvbiJ9", "stored_at": "2026-08-29T10:30:40.801697+00:00", "type": "ghostlight.evidence_record.v0"} {"key": "2026-08-29T110859Z0000-0223-94a3802743e3", "payload": "eyJub3RlIjogIlJ1biA1MiBpc29sYXRlZCBhIG5ld3Nyb29tIHNlbGVjdGlvbi1vd25lciBkZWZlY3Q6IGl0cyB0aHJlZSBwaXRjaGVzIGNvbnN1bWVkIGFsbCAzMiBmcm96ZW4gZGVzayBjaXRhdGlvbnMgYW5kIGJsaW5kIGVkaXRvcmlhbCByZXZpZXcgZmFpbGVkIGRlc3BpdGUgZ3JvdW5kaW5nIGFjY2VwdGFuY2UuIFRoZSB2MiBuYXJyYXRpdmUtc2VsZWN0aW9uIGNvbnRyYWN0IG5vdyBnaXZlcyB0aGUgZGV0ZXJtaW5pc3RpYyB3b3JrYmVuY2ggYSB0b3RhbCBuZXdzIGhvbGUgb2YgYXQgbW9zdCB0d28gY2l0YXRpb25zIHBlciBhdmFpbGFibGUgYXJ0aWNsZSwgY2FwcyBlYWNoIHN0b3J5IGRvc3NpZXIgYXQgc2l4LCByZXF1aXJlcyBhIGZvY3VzIGNpdGF0aW9uIGluc2lkZSBlYWNoIGRvc3NpZXIsIGFuZCBoYW5kcyB0aGUgZWRpdG9yIGFuIGV4cGxpY2l0IG5hcnJhdGl2ZSBjbGFpbS4gSGlzdG9yaWNhbCBhbmdsZS1iZWFyaW5nIHJvd3MgcmVtYWluIHJlYWQtY29tcGF0aWJsZSBidXQgY2Fubm90IHNhdGlzZnkgdGhlIGN1cnJlbnQgY29udHJhY3QgYmluZGluZy4gVmVyaWZpZWQgMjQvMjQgbmV3c3BhcGVyIHRlc3RzLCA0NzkvNDc5IGdob3N0bGlnaHQtZHVuZ2VvbiBsaWJyYXJ5IHRlc3RzLCBhbmQgMTUvMTUgc3RyYXRlZ2ljLXNtb2tlIHRlc3RzLiBFZGl0b3JpYWwgYWNjZXB0YW5jZSByZW1haW5zIHVucHJvdmVuIHVudGlsIGEgbmV3IGltbXV0YWJsZSByZXZpc2lvbi0yNyBuZXdzcm9vbS1vbmx5IHJ1biBwYXNzZXMgYmxpbmQgcmV2aWV3LiIsICJzdGF0dXMiOiAib2siLCAidHMiOiAiMjAyNi0wOC0yOVQxMTowODo1OSswMDowMCIsICJ0eXBlIjogImltcGxlbWVudGF0aW9uIn0=", "stored_at": "2026-08-29T11:08:59.863216+00:00", "type": "ghostlight.evidence_record.v0"} +{"key": "2026-08-29T115619Z0000-0224-f4bec4f20ed0", "payload": "eyJub3RlIjogIlJ1biA1MyBpcyBpbW11dGFibGUgYW5kIG1lY2hhbmljYWxseSBjb21wbGV0ZSBhdCBkNDJjYWNhIHdpdGggZXhhY3QgbGl2ZSBzZXJ2aWNlcyB1bmNoYW5nZWQ7IGluZGVwZW5kZW50IGdyb3VuZGluZyBwYXNzZWQgYW5kIGJsaW5kIGVkaXRvcmlhbCByZXZpZXcgZmFpbGVkIGJlY2F1c2Ugb25lIGNvbmR1aXQgZG9zc2llciBsYWNrZWQgY2F1c2UsIHJlc3BvbnNpYmlsaXR5LCBvcHBvc2l0aW9uLCBsaXZlZCBjb25zZXF1ZW5jZSwgYW5kIGEgbmV4dC1pc3N1ZSBob29rLiBTb3VyY2UgaW5zcGVjdGlvbiBmYWxzaWZpZWQgcG9zdC1jb3B5IHNlbGYtcmV2aWV3IGFzIHRoZSBuZXh0IG93bmVyOiBuZXdzcm9vbV9zb3VyY2VzIHNpbGVudGx5IGRlbGV0ZWQgZXZlcnkgdW5pcXVlIHB1YmxpYyBmYWN0IGRvc3NpZXIgYmV5b25kIHRoZSBuZXdlc3QgMzIgYWx0aG91Z2ggdGhlIGZyb3plbiBjYW1wYWlnbiByZXRhaW5lZCB0aGUgb3JpZ2luYWwgc3RyYXRlZ2ljX3ByZXNzdXJlIGNyaXNpcy4iLCAic3RhdHVzIjogIm9rIiwgInRzIjogIjIwMjYtMDgtMjlUMTE6NTY6MTkrMDA6MDAiLCAidHlwZSI6ICJ2ZXJpZmljYXRpb24ifQ==", "stored_at": "2026-08-29T11:56:19.093827+00:00", "type": "ghostlight.evidence_record.v0"} +{"key": "2026-08-29T115619Z0000-0225-b7b26f978200", "payload": "eyJub3RlIjogIk5ld3Nyb29tIGNvbnRyYWN0IHYzIHJldGFpbnMgdGhlIGNvbXBsZXRlIGRlZHVwbGljYXRlZCBwdWJsaWMgYXJjaGl2ZSwgc2hvd3MgdGhlIHNlbGVjdG9yIG9ubHkgMzIgbmV3ZXN0IGRvc3NpZXJzIGluaXRpYWxseSwgcGVybWl0cyBleGFjdCBib3VuZGVkIHJldHJpZXZhbCBvZiAxMiBwcmVjZWRpbmctcmVjZW50IG9yIDEyIGZvdW5kYXRpb25hbCBkb3NzaWVycywgYWRtaXRzIG9ubHkgdmlzaWJsZSBjaXRhdGlvbnMsIGFuZCBwcm9qZWN0cyBvbmx5IHRoZSBzZWxlY3RlZCBkb3NzaWVyIHVuaW9uIHRvIGVkaXRvciwgY29weSBkZXNrLCBhbmQgcmVjb25jaWxpYXRpb24uIE5vIG5ldyBhZ2VudCBvciBldmVudCBhdXRob3JpdHkuIFZlcmlmaWNhdGlvbiBwYXNzZXMgMjUvMjUgbmV3c3BhcGVyLCA0ODAvNDgwIGxpYnJhcnksIGFuZCAxNS8xNSBzdHJhdGVnaWMtc21va2UgdGVzdHMuIiwgInN0YXR1cyI6ICJvayIsICJ0cyI6ICIyMDI2LTA4LTI5VDExOjU2OjE5KzAwOjAwIiwgInR5cGUiOiAiaW1wbGVtZW50YXRpb24ifQ==", "stored_at": "2026-08-29T11:56:19.307114+00:00", "type": "ghostlight.evidence_record.v0"} diff --git a/state/map.yaml b/state/map.yaml index a871ef9..063493f 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -326,7 +326,7 @@ data_flow: current_status: summary: Ghostlight's generic consumer boundary admits sparse WorldSeeds, runs the hundreds-class parallel cell machinery used by Dungeon, and projects grounded newspapers from committed public events. Local acceptance proves 1,000 subjects across 200 cells and two-wave durable named-person emergence. Exact-source provider run 38 at `596e50679244b5d42b4cfdf70d723f815751b8ff` resumed the preserved world at revision 8 without replaying compilation or four committed locality elaborations, recovered 51 of 52 strategic-wave cells on pulse three and the final cell on pulse four, then committed all six waves through revision 14. Pushed commit `3a69306f3004e4af2cd57bba612a6ad8d1b8132f` implements the mapped clock-consequence owner and is verified locally: world clocks own declared consequence text and exact observable scope; a bounded agent may propose legacy scope binding, while `WorldKernel` alone admits it and materializes stable threshold-crossing events and public news through the common mutation path. Binding, emitted-event ancestry, mutation receipts, and the next newspaper boundary persist atomically. Exact-source run 39 resumed run 38 without replaying its six committed waves, bound clock consequences, committed six new waves through revision 21, and emitted Issues 7 through 12 plus a final digest. This completes the mechanical provider acceptance path; all inherited wave 1-6 checkpoint hashes match run 38 exactly and live services were unchanged. Independent blind editorial review returns FAIL: only Issue 7 approaches spicy, while Issues 8-12 are dominated by plans, filings, inspections, warnings, and abstract relationship deltas without betrayal, scandal, public reaction, sustained reversal, or material lived cost. 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 52 at pushed `420034320c07e86c9c618c098f29d319ce113545` is mechanically complete at world revision 27 with no strategic replay and exact live services unchanged. Final newspaper SHA-256 is `0070CAC0C173FFCF21B05BBE234EAD752234FF3335B12CC027453A48E26A8C45`; archive SHA-256 is `A800F8B4116A5AC7953400F96DC1E764357907D33BA54AD4D8A42E702CC1308C`. Independent grounding review passes. Independent blind editorial review fails: three articles consume all 32 desk citations, render the survival/legitimacy agenda as administrative minutes, bury the severed hands, and lack sharp opposing motives, countermoves, and lived cost. Mechanical and grounding acceptance do not satisfy editorial acceptance. - implementation_checkpoint: Pushed commit `6a045bc3327860483f71abd5546b7b215e45a3e5` owns newsroom selection contract v2 and structural selectivity over the immutable desk. Deterministic admission caps total selected citations at `min(source_count, available_articles * 2)` and each story at six citations; every dossier requires one `focus_citation`; `narrative_claim` replaces the vague angle and travels with the exact admitted plan the editor receives. A read-only serde alias/default exists solely so unrelated historical checkpoint rows deserialize; it is not an active compatibility authority. Gates pass 24/24 newspaper tests, 479/479 library tests, and 15/15 strategic-smoke tests. Run 52 remains immutable and run 53 has not launched. - next_action: Launch one new immutable run 53 from run 52's revision-27 checkpoint with final-only newsroom composition and no world or per-wave replay. Preserve runs 51 and 52 and exact live services; verify final newspaper and archive hashes, exact provenance, unchanged services, independent grounding, and blind editorial acceptance before delivery. Defer multiple publication Personas, TeX layout, and engraved cuts until this single publication passes. + provider_acceptance_checkpoint: Exact-source run 53 at `d42caca278c467573f0a4b810d562bd86d29a3f1` uses newsroom implementation `6a045bc3327860483f71abd5546b7b215e45a3e5` and is mechanically complete at world revision 27 with 18 waves, no world or wave replay, and exact live services unchanged. Immutable root is `/var/lib/gamecult/ghostlight-dungeon/acceptance/elven-realms-autonomous-d42caca-53`. SHA-256: newspaper `0358c4e82fa716f0364976aabe3ac79a1426596d9bd9eb4f8f4f61654bceb7e2`; audit `19b9cfa5da0eb3d20614905b68338e071eeaeb076d803cb87832ba0c9592e34f`; result `dbc1048e7f77db3b7fc7a77c31f03a7af562e90027ac5f0c8c47789266cb7a38`; archive `F8940F1EEC46344E2D041022B22A52E36F52907AF88F1A7CB992E098BCF8B60D`. Every manifest row passes and independent grounding review passes. Independent blind editorial review fails: the paper leads with one five-citation conduit/severed-hands dossier, then falls into cordons, reports, and reviews without responsibility, opposing motive or countermove, scandal, lived consequence, or a next-issue hook. + implementation_checkpoint: The current uncommitted newsroom archive-context contract v3 retains the complete deduplicated public source archive inside the existing narrative workbench while exposing only the 32 newest dossiers initially. The same narrative-selection agent may spend bounded semantic steps requesting exact 12-item `preceding_recent` and `foundational` windows before agenda submission. Deterministic admission permits only citations actually retrieved; editor, copy desk, and reconciliation receive only the exact selected-source projection. No new agent or event authority is added. Gates pass 25/25 newspaper tests, 480/480 library tests, and 15/15 strategic-smoke tests. Run 53 and its hashes and review verdicts remain immutable. + next_action: Review the newsroom archive-context v3 structural diff, then commit and push it. Launch one new immutable run 54 from revision 27 with final-only newsroom composition and no strategic or per-wave replay. Preserve runs 51 through 53 and exact live services; require final newspaper, audit, result, and archive hashes, complete manifest, independent grounding, and blind editorial acceptance before delivery. 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.