Make interpretation and elaboration agentic
This commit is contained in:
parent
c757e5a09d
commit
71c274b0b8
11 changed files with 2067 additions and 710 deletions
|
|
@ -46,6 +46,13 @@ pub struct ModelAgentToolContext {
|
|||
}
|
||||
|
||||
pub enum ModelAgentToolOutcome<Output, Finding> {
|
||||
/// The typed action was applied to the tool's private workbench, but the
|
||||
/// agent has not yet produced a terminal result. Canonical state remains
|
||||
/// untouched; the observation describes the updated draft or next need.
|
||||
Continue {
|
||||
observation: Finding,
|
||||
receipts: Vec<ModelStageReceipt>,
|
||||
},
|
||||
Accepted {
|
||||
output: Output,
|
||||
receipts: Vec<ModelStageReceipt>,
|
||||
|
|
@ -87,7 +94,7 @@ pub async fn run_model_agent<Tool: ModelAgentTool>(
|
|||
|
||||
let mut receipts = Vec::new();
|
||||
let mut transcript = String::new();
|
||||
let mut last_finding = None;
|
||||
let mut last_observation = None;
|
||||
for step in 0..spec.max_steps {
|
||||
let source_receipt_ids = causal_source_ids(&spec.source_receipt_ids, &receipts);
|
||||
let request = ModelStageRequest {
|
||||
|
|
@ -126,8 +133,13 @@ pub async fn run_model_agent<Tool: ModelAgentTool>(
|
|||
"message":"agent returned no typed action",
|
||||
});
|
||||
mark_model_receipt_semantic_invalid(&mut stage.receipt, &finding);
|
||||
transcript.push_str(&tool_observation(step, &serde_json::Value::Null, &finding));
|
||||
last_finding = Some(finding);
|
||||
transcript.push_str(&tool_observation(
|
||||
step,
|
||||
"rejected",
|
||||
&serde_json::Value::Null,
|
||||
&finding,
|
||||
));
|
||||
last_observation = Some(finding);
|
||||
receipts.push(stage.receipt);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -140,8 +152,8 @@ pub async fn run_model_agent<Tool: ModelAgentTool>(
|
|||
"message":error.to_string(),
|
||||
});
|
||||
mark_model_receipt_semantic_invalid(&mut stage.receipt, &finding);
|
||||
transcript.push_str(&tool_observation(step, &action_value, &finding));
|
||||
last_finding = Some(finding);
|
||||
transcript.push_str(&tool_observation(step, "rejected", &action_value, &finding));
|
||||
last_observation = Some(finding);
|
||||
receipts.push(stage.receipt);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -157,6 +169,33 @@ pub async fn run_model_agent<Tool: ModelAgentTool>(
|
|||
),
|
||||
};
|
||||
match tool.invoke(action, &tool_context).await {
|
||||
ModelAgentToolOutcome::Continue {
|
||||
observation,
|
||||
receipts: tool_receipts,
|
||||
} => {
|
||||
let observation = match serde_json::to_value(observation) {
|
||||
Ok(observation) => observation,
|
||||
Err(error) => {
|
||||
let message = format!(
|
||||
"model agent {} could not serialize its typed tool observation: {error}",
|
||||
spec.stage
|
||||
);
|
||||
mark_model_receipt_semantic_invalid(&mut stage.receipt, &message);
|
||||
receipts.push(stage.receipt);
|
||||
receipts.extend(tool_receipts);
|
||||
return Err(ModelAgentFailure { message, receipts });
|
||||
}
|
||||
};
|
||||
transcript.push_str(&tool_observation(
|
||||
step,
|
||||
"continued",
|
||||
&action_value,
|
||||
&observation,
|
||||
));
|
||||
last_observation = Some(observation);
|
||||
receipts.push(stage.receipt);
|
||||
receipts.extend(tool_receipts);
|
||||
}
|
||||
ModelAgentToolOutcome::Accepted {
|
||||
output,
|
||||
receipts: tool_receipts,
|
||||
|
|
@ -183,8 +222,8 @@ pub async fn run_model_agent<Tool: ModelAgentTool>(
|
|||
}
|
||||
};
|
||||
mark_model_receipt_semantic_invalid(&mut stage.receipt, &finding);
|
||||
transcript.push_str(&tool_observation(step, &action_value, &finding));
|
||||
last_finding = Some(finding);
|
||||
transcript.push_str(&tool_observation(step, "rejected", &action_value, &finding));
|
||||
last_observation = Some(finding);
|
||||
receipts.push(stage.receipt);
|
||||
receipts.extend(tool_receipts);
|
||||
}
|
||||
|
|
@ -202,18 +241,21 @@ pub async fn run_model_agent<Tool: ModelAgentTool>(
|
|||
|
||||
Err(ModelAgentFailure {
|
||||
message: format!(
|
||||
"model agent {} exhausted {} semantic steps; final tool finding: {}",
|
||||
"model agent {} exhausted {} semantic steps; final tool observation: {}",
|
||||
spec.stage,
|
||||
spec.max_steps,
|
||||
last_finding
|
||||
.map(|finding| finding.to_string())
|
||||
last_observation
|
||||
.map(|observation| observation.to_string())
|
||||
.unwrap_or_else(|| "none".into()),
|
||||
),
|
||||
receipts,
|
||||
})
|
||||
}
|
||||
|
||||
fn causal_source_ids(base: &[String], receipts: &[ModelStageReceipt]) -> Vec<String> {
|
||||
/// Builds one deterministic causal ancestry set for every model stage. This is
|
||||
/// model/tool provenance only; callers must not reuse it as canonical world
|
||||
/// evidence.
|
||||
pub(crate) fn causal_source_ids(base: &[String], receipts: &[ModelStageReceipt]) -> Vec<String> {
|
||||
base.iter()
|
||||
.cloned()
|
||||
.chain(
|
||||
|
|
@ -228,14 +270,15 @@ fn causal_source_ids(base: &[String], receipts: &[ModelStageReceipt]) -> Vec<Str
|
|||
|
||||
fn tool_observation(
|
||||
step: usize,
|
||||
rejected_action: &serde_json::Value,
|
||||
finding: &serde_json::Value,
|
||||
status: &str,
|
||||
action: &serde_json::Value,
|
||||
observation: &serde_json::Value,
|
||||
) -> String {
|
||||
format!(
|
||||
"\n\nTOOL OBSERVATION AFTER AGENT STEP {}:\n{}\nPREVIOUS REJECTED ACTION:\n{}\nReturn the next complete typed tool action. Preserve frozen identity and useful valid work; change what the finding actually rejects.",
|
||||
"\n\nTOOL OBSERVATION AFTER AGENT STEP {} ({status}):\n{}\nPREVIOUS TOOL ACTION:\n{}\nReturn the next complete typed tool action. Preserve frozen identity and useful valid draft work; change only what the observation actually rejects or requests.",
|
||||
step + 1,
|
||||
serde_json::to_string(finding).unwrap_or_else(|_| "null".into()),
|
||||
serde_json::to_string(rejected_action).unwrap_or_else(|_| "null".into()),
|
||||
serde_json::to_string(observation).unwrap_or_else(|_| "null".into()),
|
||||
serde_json::to_string(action).unwrap_or_else(|_| "null".into()),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -257,6 +300,7 @@ mod tests {
|
|||
#[derive(Clone, Debug, Serialize)]
|
||||
#[serde(tag = "kind", rename_all = "snake_case")]
|
||||
enum ExactFinding {
|
||||
DraftStored { value: String },
|
||||
WrongValue { received: String },
|
||||
}
|
||||
|
||||
|
|
@ -303,6 +347,13 @@ mod tests {
|
|||
output: action.value,
|
||||
receipts: Vec::new(),
|
||||
}
|
||||
} else if action.value == "drafted" {
|
||||
ModelAgentToolOutcome::Continue {
|
||||
observation: ExactFinding::DraftStored {
|
||||
value: action.value,
|
||||
},
|
||||
receipts: Vec::new(),
|
||||
}
|
||||
} else {
|
||||
ModelAgentToolOutcome::Rejected {
|
||||
finding: ExactFinding::WrongValue {
|
||||
|
|
@ -376,10 +427,45 @@ mod tests {
|
|||
);
|
||||
let requests = model.requests.lock().unwrap();
|
||||
assert!(requests[1].lived_stream.contains("wrong_value"));
|
||||
assert!(requests[1].lived_stream.contains("PREVIOUS TOOL ACTION"));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn successful_nonterminal_tool_action_preserves_draft_progress() {
|
||||
let model = ScriptedModel {
|
||||
outputs: Mutex::new(vec![
|
||||
r#"{"value":"drafted"}"#.into(),
|
||||
r#"{"value":"accepted"}"#.into(),
|
||||
]),
|
||||
requests: Mutex::new(Vec::new()),
|
||||
};
|
||||
let spec = ModelAgentSpec {
|
||||
stage: "fixture_agent".into(),
|
||||
model: MODEL_BALANCED.into(),
|
||||
snapshot_binding: "snapshot:1".into(),
|
||||
instructions: "Use the tool.".into(),
|
||||
action_schema: serde_json::to_value(schema_for!(CandidateAction)).unwrap(),
|
||||
source_receipt_ids: vec!["source:one".into()],
|
||||
temperature: Some(0.0),
|
||||
max_output_tokens: Some(128),
|
||||
max_steps: 2,
|
||||
};
|
||||
|
||||
let run = run_model_agent(&model, &spec, &mut ExactTool)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(run.output, "accepted");
|
||||
assert_eq!(run.receipts.len(), 2);
|
||||
assert_eq!(run.receipts[0].validation_result, "valid");
|
||||
assert_eq!(run.receipts[1].validation_result, "valid");
|
||||
let requests = model.requests.lock().unwrap();
|
||||
assert!(requests[1].lived_stream.contains("continued"));
|
||||
assert!(requests[1].lived_stream.contains("draft_stored"));
|
||||
assert!(
|
||||
requests[1]
|
||||
.lived_stream
|
||||
.contains("PREVIOUS REJECTED ACTION")
|
||||
.source_receipt_ids
|
||||
.contains(&run.receipts[0].storage_key().to_owned())
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7621,7 +7621,7 @@ mod tests {
|
|||
&& request.lived_stream.contains("duplicate_statement")
|
||||
&& request.lived_stream.contains("fact:refuge_authority")
|
||||
&& request.lived_stream.contains("fact:refuge_resources")
|
||||
&& request.lived_stream.contains("PREVIOUS REJECTED ACTION"),
|
||||
&& request.lived_stream.contains("PREVIOUS TOOL ACTION"),
|
||||
Ordering::SeqCst,
|
||||
);
|
||||
reconciliation["candidate"]["facts"][1]["statement"] = serde_json::json!(
|
||||
|
|
|
|||
799
crates/ghostlight-dungeon/src/elaboration.rs
Normal file
799
crates/ghostlight-dungeon/src/elaboration.rs
Normal file
|
|
@ -0,0 +1,799 @@
|
|||
use anyhow::{Result, anyhow};
|
||||
use async_trait::async_trait;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::{BTreeMap, BTreeSet, HashMap};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub const MAX_ELABORATOR_WEIGHT: u16 = 100;
|
||||
|
||||
#[derive(
|
||||
Clone, Copy, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq, PartialOrd, Ord, Hash,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ElaboratorTitle {
|
||||
/// Ordinary objects, customs, nicknames, local jokes, and other reusable
|
||||
/// low-stakes texture.
|
||||
Patina,
|
||||
/// Government, law, offices, selection, succession, and redress.
|
||||
Charter,
|
||||
/// Resources, labor, trade, infrastructure, scarcity, and class pressure.
|
||||
Ledger,
|
||||
/// Kinship, daily life, care, obligation, belonging, and neighborhood ties.
|
||||
Hearth,
|
||||
/// Factions, alliances, rivalries, leverage, and political maneuvering.
|
||||
Tangle,
|
||||
/// Secrets, rumors, misinformation, taboos, and unevenly held knowledge.
|
||||
Veil,
|
||||
/// Active disputes, hazards, instability, escalation, and urgent pressure.
|
||||
Ember,
|
||||
/// Religion, magic, ritual, awe, cosmology, and the genuinely strange.
|
||||
Numen,
|
||||
}
|
||||
|
||||
impl ElaboratorTitle {
|
||||
pub const ALL: [Self; 8] = [
|
||||
Self::Patina,
|
||||
Self::Charter,
|
||||
Self::Ledger,
|
||||
Self::Hearth,
|
||||
Self::Tangle,
|
||||
Self::Veil,
|
||||
Self::Ember,
|
||||
Self::Numen,
|
||||
];
|
||||
|
||||
pub fn mandate(self) -> &'static str {
|
||||
match self {
|
||||
Self::Patina => {
|
||||
"Add durable, locally grounded, low-stakes texture that later events may acquire meaning from."
|
||||
}
|
||||
Self::Charter => {
|
||||
"Elaborate legible institutions, offices, procedures, succession, public authority, and redress."
|
||||
}
|
||||
Self::Ledger => {
|
||||
"Elaborate material dependencies: work, resources, infrastructure, exchange, scarcity, and class pressure."
|
||||
}
|
||||
Self::Hearth => {
|
||||
"Elaborate ordinary social life: kinship, care, neighborhood, obligation, belonging, and private stakes."
|
||||
}
|
||||
Self::Tangle => {
|
||||
"Elaborate political relationships: factions, alliances, rivalries, leverage, constituencies, and plots."
|
||||
}
|
||||
Self::Veil => {
|
||||
"Elaborate uneven knowledge: secrets, rumors, taboos, misinformation, mysteries, and disclosure paths."
|
||||
}
|
||||
Self::Ember => {
|
||||
"Elaborate active pressure: disputes, hazards, instability, escalation paths, and urgent consequences."
|
||||
}
|
||||
Self::Numen => {
|
||||
"Elaborate numinous meaning: religion, ritual, magic, cosmology, wonder, and bounded strangeness."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn display_name(self) -> &'static str {
|
||||
match self {
|
||||
Self::Patina => "Patina",
|
||||
Self::Charter => "Charter",
|
||||
Self::Ledger => "Ledger",
|
||||
Self::Hearth => "Hearth",
|
||||
Self::Tangle => "Tangle",
|
||||
Self::Veil => "Veil",
|
||||
Self::Ember => "Ember",
|
||||
Self::Numen => "Numen",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct ElaboratorDescriptor {
|
||||
pub title: ElaboratorTitle,
|
||||
pub display_name: String,
|
||||
pub mandate: String,
|
||||
}
|
||||
|
||||
pub fn elaborator_catalog() -> Vec<ElaboratorDescriptor> {
|
||||
ElaboratorTitle::ALL
|
||||
.into_iter()
|
||||
.map(|title| ElaboratorDescriptor {
|
||||
title,
|
||||
display_name: title.display_name().into(),
|
||||
mandate: title.mandate().into(),
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct ElaboratorControl {
|
||||
pub title: ElaboratorTitle,
|
||||
/// Relative scheduler weight. Zero disables this elaborator. Positive
|
||||
/// values are normalized across the titles eligible for each dispatch.
|
||||
#[schemars(range(min = 0, max = 100))]
|
||||
pub weight: u16,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct WorldElaborationProfile {
|
||||
pub schema: String,
|
||||
pub controls: Vec<ElaboratorControl>,
|
||||
}
|
||||
|
||||
impl Default for WorldElaborationProfile {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
schema: "ghostlight.world_elaboration_profile.v1".into(),
|
||||
controls: ElaboratorTitle::ALL
|
||||
.into_iter()
|
||||
.map(|title| ElaboratorControl { title, weight: 50 })
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl WorldElaborationProfile {
|
||||
pub fn weights(&self) -> Result<BTreeMap<ElaboratorTitle, u16>> {
|
||||
if self.schema != "ghostlight.world_elaboration_profile.v1" {
|
||||
return Err(anyhow!("world elaboration profile schema is unsupported"));
|
||||
}
|
||||
let mut weights = BTreeMap::new();
|
||||
for control in &self.controls {
|
||||
if control.weight > MAX_ELABORATOR_WEIGHT
|
||||
|| weights.insert(control.title, control.weight).is_some()
|
||||
{
|
||||
return Err(anyhow!(
|
||||
"world elaboration profile requires unique titles with weights from zero to {MAX_ELABORATOR_WEIGHT}"
|
||||
));
|
||||
}
|
||||
}
|
||||
if weights.values().all(|weight| *weight == 0) {
|
||||
return Err(anyhow!(
|
||||
"world elaboration profile must enable at least one titled elaborator"
|
||||
));
|
||||
}
|
||||
Ok(weights)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct ElaborationDispatchState {
|
||||
pub schema: String,
|
||||
pub profile_digest: String,
|
||||
/// Smooth weighted-round-robin credit across every enabled title. Blocked
|
||||
/// selections consume their configured slots without invoking an agent,
|
||||
/// so their share is never donated to another elaborator.
|
||||
pub current_scores: BTreeMap<ElaboratorTitle, i64>,
|
||||
pub dispatch_counts: BTreeMap<ElaboratorTitle, u64>,
|
||||
pub total_budget_slots: u64,
|
||||
pub total_dispatches: u64,
|
||||
}
|
||||
|
||||
impl Default for ElaborationDispatchState {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
schema: "ghostlight.elaboration_dispatch_state.v1".into(),
|
||||
profile_digest: String::new(),
|
||||
current_scores: BTreeMap::new(),
|
||||
dispatch_counts: BTreeMap::new(),
|
||||
total_budget_slots: 0,
|
||||
total_dispatches: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct ElaborationDispatch {
|
||||
pub schema: String,
|
||||
pub budget_ordinal: u64,
|
||||
pub ordinal: u64,
|
||||
pub title: ElaboratorTitle,
|
||||
pub title_weight: u16,
|
||||
pub total_enabled_weight: u32,
|
||||
/// Requested share of the complete configured invocation budget.
|
||||
pub requested_share_millionths: u32,
|
||||
pub title_dispatch_count: u64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct ElaborationScheduleReceipt {
|
||||
pub schema: String,
|
||||
pub requested_invocations: u32,
|
||||
pub unused_invocations: u32,
|
||||
pub eligible_titles: BTreeSet<ElaboratorTitle>,
|
||||
/// Actual invocations allocated inside this receipt's budget window.
|
||||
pub dispatch_counts: BTreeMap<ElaboratorTitle, u32>,
|
||||
/// Configured allocations that could not invoke their titled agent. These
|
||||
/// remain unused instead of being redistributed to another slider.
|
||||
pub unused_counts: BTreeMap<ElaboratorTitle, u32>,
|
||||
pub dispatches: Vec<ElaborationDispatch>,
|
||||
pub final_state: ElaborationDispatchState,
|
||||
}
|
||||
|
||||
enum ElaborationBudgetAllocation {
|
||||
Dispatch(ElaborationDispatch),
|
||||
Unused(ElaboratorTitle),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct ElaborationWaveBinding {
|
||||
pub schema: String,
|
||||
/// Content-addressed or revision-addressed identity for the immutable
|
||||
/// world projection shared by every invocation in this wave.
|
||||
pub snapshot_binding: String,
|
||||
}
|
||||
|
||||
impl ElaborationWaveBinding {
|
||||
pub fn validate(&self) -> Result<()> {
|
||||
if self.schema != "ghostlight.elaboration_wave_binding.v1" {
|
||||
return Err(anyhow!("elaboration wave binding schema is unsupported"));
|
||||
}
|
||||
if self.snapshot_binding.trim().is_empty() {
|
||||
return Err(anyhow!("elaboration wave snapshot binding cannot be empty"));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct ElaborationSubAgentInvocation {
|
||||
pub wave: ElaborationWaveBinding,
|
||||
pub dispatch: ElaborationDispatch,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ElaborationInvocation<Proposal> {
|
||||
pub wave: ElaborationWaveBinding,
|
||||
pub dispatch: ElaborationDispatch,
|
||||
/// A proposal against the frozen elaboration snapshot. The invocation
|
||||
/// cannot commit canonical world state; admission and conflict handling
|
||||
/// remain downstream owners.
|
||||
pub proposal: Proposal,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ElaborationWaveRun<Proposal> {
|
||||
pub wave: ElaborationWaveBinding,
|
||||
pub schedule: ElaborationScheduleReceipt,
|
||||
pub invocations: Vec<ElaborationInvocation<Proposal>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct ElaborationInvocationFailure {
|
||||
pub dispatch: Option<ElaborationDispatch>,
|
||||
pub diagnostic: String,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ElaborationWaveFailure<Proposal> {
|
||||
pub wave: Option<ElaborationWaveBinding>,
|
||||
pub schedule: Option<ElaborationScheduleReceipt>,
|
||||
pub completed_invocations: Vec<ElaborationInvocation<Proposal>>,
|
||||
pub invocation_failures: Vec<ElaborationInvocationFailure>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
pub trait ElaborationSubAgentPort<Proposal>: Send + Sync {
|
||||
async fn invoke(&self, invocation: ElaborationSubAgentInvocation) -> Result<Proposal>;
|
||||
}
|
||||
|
||||
pub struct ElaborationScheduler {
|
||||
weights: BTreeMap<ElaboratorTitle, u16>,
|
||||
state: ElaborationDispatchState,
|
||||
}
|
||||
|
||||
impl ElaborationScheduler {
|
||||
pub fn new(profile: &WorldElaborationProfile) -> Result<Self> {
|
||||
Self::from_state(profile, ElaborationDispatchState::default())
|
||||
}
|
||||
|
||||
pub fn from_state(
|
||||
profile: &WorldElaborationProfile,
|
||||
mut state: ElaborationDispatchState,
|
||||
) -> Result<Self> {
|
||||
let weights = profile.weights()?;
|
||||
let profile_digest = crate::legacy_transition::digest_serializable(&(
|
||||
"ghostlight.world_elaboration_profile.v1",
|
||||
&weights,
|
||||
))?;
|
||||
if state.schema != "ghostlight.elaboration_dispatch_state.v1" {
|
||||
return Err(anyhow!("elaboration dispatch state schema is unsupported"));
|
||||
}
|
||||
if state.profile_digest.is_empty() {
|
||||
state.profile_digest = profile_digest;
|
||||
} else if state.profile_digest != profile_digest {
|
||||
return Err(anyhow!(
|
||||
"elaboration dispatch state belongs to a different slider profile"
|
||||
));
|
||||
}
|
||||
state
|
||||
.current_scores
|
||||
.retain(|title, _| weights.contains_key(title));
|
||||
state
|
||||
.dispatch_counts
|
||||
.retain(|title, _| weights.contains_key(title));
|
||||
Ok(Self { weights, state })
|
||||
}
|
||||
|
||||
pub fn state(&self) -> &ElaborationDispatchState {
|
||||
&self.state
|
||||
}
|
||||
|
||||
fn next_allocation(
|
||||
&mut self,
|
||||
eligible_titles: &BTreeSet<ElaboratorTitle>,
|
||||
) -> ElaborationBudgetAllocation {
|
||||
let enabled = self
|
||||
.weights
|
||||
.iter()
|
||||
.filter(|(_, weight)| **weight > 0)
|
||||
.map(|(title, weight)| (*title, *weight))
|
||||
.collect::<Vec<_>>();
|
||||
let total_enabled_weight = enabled
|
||||
.iter()
|
||||
.map(|(_, weight)| u32::from(*weight))
|
||||
.sum::<u32>();
|
||||
debug_assert!(total_enabled_weight > 0);
|
||||
|
||||
let mut selected = None;
|
||||
for (title, weight) in &enabled {
|
||||
let score = self.state.current_scores.entry(*title).or_default();
|
||||
*score = score.saturating_add(i64::from(*weight));
|
||||
let candidate = (*title, *score);
|
||||
if selected.is_none_or(|best: (ElaboratorTitle, i64)| candidate.1 > best.1) {
|
||||
selected = Some(candidate);
|
||||
}
|
||||
}
|
||||
let (title, _) = selected.expect("a valid profile requires one enabled title");
|
||||
*self.state.current_scores.entry(title).or_default() -= i64::from(total_enabled_weight);
|
||||
self.state.total_budget_slots = self.state.total_budget_slots.saturating_add(1);
|
||||
if !eligible_titles.contains(&title) {
|
||||
return ElaborationBudgetAllocation::Unused(title);
|
||||
}
|
||||
|
||||
self.state.total_dispatches = self.state.total_dispatches.saturating_add(1);
|
||||
let title_dispatch_count = self
|
||||
.state
|
||||
.dispatch_counts
|
||||
.entry(title)
|
||||
.and_modify(|count| *count = count.saturating_add(1))
|
||||
.or_insert(1);
|
||||
let title_weight = self.weights[&title];
|
||||
ElaborationBudgetAllocation::Dispatch(ElaborationDispatch {
|
||||
schema: "ghostlight.elaboration_dispatch.v1".into(),
|
||||
budget_ordinal: self.state.total_budget_slots,
|
||||
ordinal: self.state.total_dispatches,
|
||||
title,
|
||||
title_weight,
|
||||
total_enabled_weight,
|
||||
requested_share_millionths: u32::from(title_weight).saturating_mul(1_000_000)
|
||||
/ total_enabled_weight,
|
||||
title_dispatch_count: *title_dispatch_count,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn schedule(
|
||||
&mut self,
|
||||
eligible_titles: &BTreeSet<ElaboratorTitle>,
|
||||
invocation_budget: u32,
|
||||
) -> ElaborationScheduleReceipt {
|
||||
let mut dispatches = Vec::with_capacity(invocation_budget as usize);
|
||||
let mut unused_counts = BTreeMap::new();
|
||||
for _ in 0..invocation_budget {
|
||||
match self.next_allocation(eligible_titles) {
|
||||
ElaborationBudgetAllocation::Dispatch(dispatch) => dispatches.push(dispatch),
|
||||
ElaborationBudgetAllocation::Unused(title) => {
|
||||
*unused_counts.entry(title).or_default() += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
ElaborationScheduleReceipt {
|
||||
schema: "ghostlight.elaboration_schedule_receipt.v1".into(),
|
||||
requested_invocations: invocation_budget,
|
||||
unused_invocations: unused_counts.values().copied().sum(),
|
||||
eligible_titles: eligible_titles.clone(),
|
||||
dispatch_counts: dispatches
|
||||
.iter()
|
||||
.fold(BTreeMap::new(), |mut counts, dispatch| {
|
||||
*counts.entry(dispatch.title).or_default() += 1;
|
||||
counts
|
||||
}),
|
||||
unused_counts,
|
||||
dispatches,
|
||||
final_state: self.state.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Dispatches one immutable-snapshot elaboration wave. Weight determines the
|
||||
/// number of actual sub-agent invocations, not prompt emphasis. Proposals are
|
||||
/// returned in deterministic dispatch order after parallel execution; this
|
||||
/// function has no canonical world-state writer.
|
||||
pub async fn dispatch_elaboration_wave<Worker, Proposal>(
|
||||
scheduler: &mut ElaborationScheduler,
|
||||
wave: ElaborationWaveBinding,
|
||||
eligible_titles: &BTreeSet<ElaboratorTitle>,
|
||||
invocation_budget: u32,
|
||||
parallelism: usize,
|
||||
worker: Arc<Worker>,
|
||||
) -> std::result::Result<ElaborationWaveRun<Proposal>, ElaborationWaveFailure<Proposal>>
|
||||
where
|
||||
Worker: ElaborationSubAgentPort<Proposal> + 'static,
|
||||
Proposal: Send + 'static,
|
||||
{
|
||||
if let Err(error) = wave.validate() {
|
||||
return Err(ElaborationWaveFailure {
|
||||
wave: Some(wave),
|
||||
schedule: None,
|
||||
completed_invocations: Vec::new(),
|
||||
invocation_failures: vec![ElaborationInvocationFailure {
|
||||
dispatch: None,
|
||||
diagnostic: error.to_string(),
|
||||
}],
|
||||
});
|
||||
}
|
||||
if parallelism == 0 {
|
||||
return Err(ElaborationWaveFailure {
|
||||
wave: Some(wave),
|
||||
schedule: None,
|
||||
completed_invocations: Vec::new(),
|
||||
invocation_failures: vec![ElaborationInvocationFailure {
|
||||
dispatch: None,
|
||||
diagnostic: "elaboration wave parallelism must be greater than zero".into(),
|
||||
}],
|
||||
});
|
||||
}
|
||||
let schedule = scheduler.schedule(eligible_titles, invocation_budget);
|
||||
let semaphore = Arc::new(tokio::sync::Semaphore::new(parallelism));
|
||||
let mut jobs = tokio::task::JoinSet::new();
|
||||
let mut task_dispatches = HashMap::new();
|
||||
for dispatch in schedule.dispatches.iter().cloned() {
|
||||
let worker = worker.clone();
|
||||
let semaphore = semaphore.clone();
|
||||
let wave = wave.clone();
|
||||
let task_dispatch = dispatch.clone();
|
||||
let task = jobs.spawn(async move {
|
||||
let _slot =
|
||||
semaphore
|
||||
.acquire_owned()
|
||||
.await
|
||||
.map_err(|_| ElaborationInvocationFailure {
|
||||
dispatch: Some(dispatch.clone()),
|
||||
diagnostic: "elaboration invocation gate closed".into(),
|
||||
})?;
|
||||
let request = ElaborationSubAgentInvocation {
|
||||
wave: wave.clone(),
|
||||
dispatch: dispatch.clone(),
|
||||
};
|
||||
let proposal =
|
||||
worker
|
||||
.invoke(request)
|
||||
.await
|
||||
.map_err(|error| ElaborationInvocationFailure {
|
||||
dispatch: Some(dispatch.clone()),
|
||||
diagnostic: error.to_string().chars().take(2_000).collect(),
|
||||
})?;
|
||||
Ok::<_, ElaborationInvocationFailure>(ElaborationInvocation {
|
||||
wave,
|
||||
dispatch,
|
||||
proposal,
|
||||
})
|
||||
});
|
||||
task_dispatches.insert(task.id(), task_dispatch);
|
||||
}
|
||||
|
||||
let mut invocations = Vec::with_capacity(schedule.dispatches.len());
|
||||
let mut invocation_failures = Vec::new();
|
||||
while let Some(result) = jobs.join_next_with_id().await {
|
||||
match result {
|
||||
Ok((task_id, Ok(invocation))) => {
|
||||
task_dispatches.remove(&task_id);
|
||||
invocations.push(invocation);
|
||||
}
|
||||
Ok((task_id, Err(failure))) => {
|
||||
task_dispatches.remove(&task_id);
|
||||
invocation_failures.push(failure);
|
||||
}
|
||||
Err(error) => invocation_failures.push(ElaborationInvocationFailure {
|
||||
dispatch: task_dispatches.remove(&error.id()),
|
||||
diagnostic: format!("elaboration sub-agent task failed: {error}"),
|
||||
}),
|
||||
}
|
||||
}
|
||||
invocations.sort_by_key(|invocation| invocation.dispatch.ordinal);
|
||||
invocation_failures.sort_by_key(|failure| {
|
||||
failure
|
||||
.dispatch
|
||||
.as_ref()
|
||||
.map(|dispatch| dispatch.ordinal)
|
||||
.unwrap_or(u64::MAX)
|
||||
});
|
||||
if !invocation_failures.is_empty() {
|
||||
return Err(ElaborationWaveFailure {
|
||||
wave: Some(wave),
|
||||
schedule: Some(schedule),
|
||||
completed_invocations: invocations,
|
||||
invocation_failures,
|
||||
});
|
||||
}
|
||||
Ok(ElaborationWaveRun {
|
||||
wave,
|
||||
schedule,
|
||||
invocations,
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
fn profile(weights: &[(ElaboratorTitle, u16)]) -> WorldElaborationProfile {
|
||||
WorldElaborationProfile {
|
||||
schema: "ghostlight.world_elaboration_profile.v1".into(),
|
||||
controls: weights
|
||||
.iter()
|
||||
.map(|(title, weight)| ElaboratorControl {
|
||||
title: *title,
|
||||
weight: *weight,
|
||||
})
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
|
||||
fn wave_binding() -> ElaborationWaveBinding {
|
||||
ElaborationWaveBinding {
|
||||
schema: "ghostlight.elaboration_wave_binding.v1".into(),
|
||||
snapshot_binding: "world:7:seed-sha256".into(),
|
||||
}
|
||||
}
|
||||
|
||||
struct CountingSubAgent {
|
||||
counts: std::sync::Mutex<BTreeMap<ElaboratorTitle, u32>>,
|
||||
active: std::sync::atomic::AtomicUsize,
|
||||
maximum: std::sync::atomic::AtomicUsize,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ElaborationSubAgentPort<String> for CountingSubAgent {
|
||||
async fn invoke(&self, invocation: ElaborationSubAgentInvocation) -> Result<String> {
|
||||
use std::sync::atomic::Ordering;
|
||||
assert_eq!(invocation.wave, wave_binding());
|
||||
let dispatch = invocation.dispatch;
|
||||
let active = self.active.fetch_add(1, Ordering::SeqCst) + 1;
|
||||
self.maximum.fetch_max(active, Ordering::SeqCst);
|
||||
tokio::time::sleep(std::time::Duration::from_millis(2)).await;
|
||||
*self
|
||||
.counts
|
||||
.lock()
|
||||
.unwrap()
|
||||
.entry(dispatch.title)
|
||||
.or_default() += 1;
|
||||
self.active.fetch_sub(1, Ordering::SeqCst);
|
||||
Ok(format!("proposal:{}", dispatch.ordinal))
|
||||
}
|
||||
}
|
||||
|
||||
struct PartiallyFailingSubAgent;
|
||||
|
||||
#[async_trait]
|
||||
impl ElaborationSubAgentPort<String> for PartiallyFailingSubAgent {
|
||||
async fn invoke(&self, invocation: ElaborationSubAgentInvocation) -> Result<String> {
|
||||
if invocation.dispatch.ordinal == 3 {
|
||||
return Err(anyhow!("fixture refusal"));
|
||||
}
|
||||
if invocation.dispatch.ordinal == 4 {
|
||||
panic!("fixture panic");
|
||||
}
|
||||
Ok(format!("proposal:{}", invocation.dispatch.ordinal))
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn weighted_schedule_dispatches_in_proportion_to_slider_share() {
|
||||
let profile = profile(&[(ElaboratorTitle::Patina, 20), (ElaboratorTitle::Tangle, 80)]);
|
||||
let mut scheduler = ElaborationScheduler::new(&profile).unwrap();
|
||||
let eligible = BTreeSet::from([ElaboratorTitle::Patina, ElaboratorTitle::Tangle]);
|
||||
|
||||
let receipt = scheduler.schedule(&eligible, 100);
|
||||
|
||||
assert_eq!(receipt.unused_invocations, 0);
|
||||
assert_eq!(receipt.dispatch_counts[&ElaboratorTitle::Patina], 20);
|
||||
assert_eq!(receipt.dispatch_counts[&ElaboratorTitle::Tangle], 80);
|
||||
assert_eq!(
|
||||
receipt.final_state.dispatch_counts[&ElaboratorTitle::Patina],
|
||||
20
|
||||
);
|
||||
assert_eq!(
|
||||
receipt.final_state.dispatch_counts[&ElaboratorTitle::Tangle],
|
||||
80
|
||||
);
|
||||
assert!(receipt.dispatches.iter().all(|dispatch| {
|
||||
dispatch.requested_share_millionths
|
||||
== match dispatch.title {
|
||||
ElaboratorTitle::Patina => 200_000,
|
||||
ElaboratorTitle::Tangle => 800_000,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn weighted_share_controls_actual_parallel_sub_agent_invocations() {
|
||||
use std::sync::atomic::Ordering;
|
||||
let profile = profile(&[(ElaboratorTitle::Patina, 30), (ElaboratorTitle::Tangle, 70)]);
|
||||
let mut scheduler = ElaborationScheduler::new(&profile).unwrap();
|
||||
let eligible = BTreeSet::from([ElaboratorTitle::Patina, ElaboratorTitle::Tangle]);
|
||||
let worker = Arc::new(CountingSubAgent {
|
||||
counts: std::sync::Mutex::new(BTreeMap::new()),
|
||||
active: std::sync::atomic::AtomicUsize::new(0),
|
||||
maximum: std::sync::atomic::AtomicUsize::new(0),
|
||||
});
|
||||
|
||||
let run = dispatch_elaboration_wave(
|
||||
&mut scheduler,
|
||||
wave_binding(),
|
||||
&eligible,
|
||||
100,
|
||||
6,
|
||||
worker.clone(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(run.wave, wave_binding());
|
||||
assert_eq!(run.invocations.len(), 100);
|
||||
assert!(
|
||||
run.invocations
|
||||
.iter()
|
||||
.all(|invocation| invocation.wave == wave_binding())
|
||||
);
|
||||
assert_eq!(run.invocations[0].dispatch.ordinal, 1);
|
||||
assert_eq!(run.invocations[99].dispatch.ordinal, 100);
|
||||
let counts = worker.counts.lock().unwrap();
|
||||
assert_eq!(counts[&ElaboratorTitle::Patina], 30);
|
||||
assert_eq!(counts[&ElaboratorTitle::Tangle], 70);
|
||||
assert!(worker.maximum.load(Ordering::SeqCst) > 1);
|
||||
assert!(worker.maximum.load(Ordering::SeqCst) <= 6);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn failed_wave_preserves_consumed_schedule_and_completed_evidence() {
|
||||
let profile = profile(&[(ElaboratorTitle::Patina, 100)]);
|
||||
let mut scheduler = ElaborationScheduler::new(&profile).unwrap();
|
||||
let failure = dispatch_elaboration_wave(
|
||||
&mut scheduler,
|
||||
wave_binding(),
|
||||
&BTreeSet::from([ElaboratorTitle::Patina]),
|
||||
4,
|
||||
2,
|
||||
Arc::new(PartiallyFailingSubAgent),
|
||||
)
|
||||
.await
|
||||
.unwrap_err();
|
||||
|
||||
assert_eq!(failure.wave, Some(wave_binding()));
|
||||
assert_eq!(failure.schedule.as_ref().unwrap().dispatches.len(), 4);
|
||||
assert_eq!(failure.completed_invocations.len(), 2);
|
||||
assert_eq!(failure.invocation_failures.len(), 2);
|
||||
assert_eq!(
|
||||
failure.invocation_failures[0]
|
||||
.dispatch
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.ordinal,
|
||||
3
|
||||
);
|
||||
assert_eq!(
|
||||
failure.invocation_failures[1]
|
||||
.dispatch
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.ordinal,
|
||||
4
|
||||
);
|
||||
assert_eq!(scheduler.state().total_budget_slots, 4);
|
||||
assert!(failure.completed_invocations.iter().all(|invocation| {
|
||||
invocation.wave == wave_binding() && invocation.dispatch.ordinal != 3
|
||||
}));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ineligible_titles_consume_their_share_without_catchup_debt() {
|
||||
let profile = profile(&[(ElaboratorTitle::Patina, 20), (ElaboratorTitle::Tangle, 80)]);
|
||||
let mut scheduler = ElaborationScheduler::new(&profile).unwrap();
|
||||
|
||||
let patina_only = BTreeSet::from([ElaboratorTitle::Patina]);
|
||||
let first = scheduler.schedule(&patina_only, 5);
|
||||
assert_eq!(
|
||||
first.final_state.dispatch_counts[&ElaboratorTitle::Patina],
|
||||
1
|
||||
);
|
||||
assert_eq!(first.unused_invocations, 4);
|
||||
assert_eq!(first.unused_counts[&ElaboratorTitle::Tangle], 4);
|
||||
|
||||
let both = BTreeSet::from([ElaboratorTitle::Patina, ElaboratorTitle::Tangle]);
|
||||
let second = scheduler.schedule(&both, 100);
|
||||
assert_eq!(second.dispatch_counts[&ElaboratorTitle::Patina], 20);
|
||||
assert_eq!(second.dispatch_counts[&ElaboratorTitle::Tangle], 80);
|
||||
assert_eq!(
|
||||
second.final_state.dispatch_counts[&ElaboratorTitle::Patina],
|
||||
21
|
||||
);
|
||||
assert_eq!(
|
||||
second.final_state.dispatch_counts[&ElaboratorTitle::Tangle],
|
||||
80
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn disabled_or_blocked_elaborators_leave_budget_visibly_unused() {
|
||||
let profile = profile(&[(ElaboratorTitle::Patina, 100)]);
|
||||
let mut scheduler = ElaborationScheduler::new(&profile).unwrap();
|
||||
let receipt = scheduler.schedule(&BTreeSet::from([ElaboratorTitle::Veil]), 7);
|
||||
|
||||
assert!(receipt.dispatches.is_empty());
|
||||
assert_eq!(receipt.unused_invocations, 7);
|
||||
assert_eq!(receipt.unused_counts[&ElaboratorTitle::Patina], 7);
|
||||
assert_eq!(receipt.final_state.total_budget_slots, 7);
|
||||
assert_eq!(receipt.final_state.total_dispatches, 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_partially_blocked_profile_does_not_donate_its_share() {
|
||||
let profile = profile(&[(ElaboratorTitle::Patina, 20), (ElaboratorTitle::Tangle, 80)]);
|
||||
let mut scheduler = ElaborationScheduler::new(&profile).unwrap();
|
||||
let receipt = scheduler.schedule(&BTreeSet::from([ElaboratorTitle::Patina]), 100);
|
||||
|
||||
assert_eq!(receipt.dispatch_counts[&ElaboratorTitle::Patina], 20);
|
||||
assert_eq!(receipt.unused_counts[&ElaboratorTitle::Tangle], 80);
|
||||
assert_eq!(receipt.unused_invocations, 80);
|
||||
assert_eq!(receipt.final_state.total_budget_slots, 100);
|
||||
assert_eq!(receipt.final_state.total_dispatches, 20);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn profile_rejects_duplicate_titles_and_an_all_zero_budget() {
|
||||
assert!(
|
||||
profile(&[(ElaboratorTitle::Patina, 10), (ElaboratorTitle::Patina, 20),])
|
||||
.weights()
|
||||
.is_err()
|
||||
);
|
||||
assert!(profile(&[(ElaboratorTitle::Patina, 0)]).weights().is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn persisted_scheduler_state_binds_semantic_weights_not_control_order() {
|
||||
let first = profile(&[(ElaboratorTitle::Patina, 25), (ElaboratorTitle::Tangle, 75)]);
|
||||
let scheduler = ElaborationScheduler::new(&first).unwrap();
|
||||
let state = scheduler.state().clone();
|
||||
let reordered = profile(&[(ElaboratorTitle::Tangle, 75), (ElaboratorTitle::Patina, 25)]);
|
||||
assert!(ElaborationScheduler::from_state(&reordered, state.clone()).is_ok());
|
||||
|
||||
let changed = profile(&[(ElaboratorTitle::Patina, 75), (ElaboratorTitle::Tangle, 25)]);
|
||||
assert!(ElaborationScheduler::from_state(&changed, state).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn catalog_exposes_every_titled_slider_with_a_distinct_mandate() {
|
||||
let catalog = elaborator_catalog();
|
||||
assert_eq!(catalog.len(), ElaboratorTitle::ALL.len());
|
||||
assert_eq!(
|
||||
catalog
|
||||
.iter()
|
||||
.map(|entry| entry.title)
|
||||
.collect::<BTreeSet<_>>()
|
||||
.len(),
|
||||
ElaboratorTitle::ALL.len()
|
||||
);
|
||||
assert!(catalog.iter().all(|entry| !entry.mandate.trim().is_empty()));
|
||||
assert!(catalog.iter().any(|entry| {
|
||||
entry.title == ElaboratorTitle::Patina && entry.mandate.contains("low-stakes texture")
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@ pub mod compiler;
|
|||
pub mod consumer;
|
||||
pub mod d20;
|
||||
pub mod domain;
|
||||
pub mod elaboration;
|
||||
pub mod gestalt;
|
||||
pub mod idunn_health;
|
||||
pub mod initiative;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -96,9 +96,6 @@ pub struct StrategicResolutionOutput {
|
|||
#[derive(Clone, Debug, Serialize)]
|
||||
pub struct PrivateCellTrace {
|
||||
pub cell_id: String,
|
||||
pub pipeline_attempts: usize,
|
||||
pub rejected_pipeline_errors: Vec<String>,
|
||||
pub rejected_pipeline_receipt_hashes: Vec<String>,
|
||||
pub terminal_pipeline_receipt_hashes: Vec<String>,
|
||||
pub lived_stream: String,
|
||||
pub persona_output: String,
|
||||
|
|
@ -129,8 +126,6 @@ struct CellPipelineExhaustion {
|
|||
stage_receipts: Vec<ModelStageReceipt>,
|
||||
}
|
||||
|
||||
const MAX_CELL_PIPELINE_ATTEMPTS: usize = 3;
|
||||
|
||||
pub async fn propose_resolution_wave(
|
||||
model: Arc<dyn ModelPort>,
|
||||
permit: Arc<dyn ExecutionPermit>,
|
||||
|
|
@ -177,54 +172,27 @@ pub async fn propose_resolution_wave_with_policy(
|
|||
jobs.spawn(async move {
|
||||
let cell_id = cell.id;
|
||||
let subject_ids = cell.subject_ids;
|
||||
let mut rejected_pipeline_errors = Vec::new();
|
||||
let mut rejected_pipeline_receipts = Vec::new();
|
||||
let terminal = loop {
|
||||
let Ok(_provider_slot) = semaphore.clone().acquire_owned().await else {
|
||||
return Err(CellPipelineExhaustion {
|
||||
diagnostic: "provider concurrency gate closed".into(),
|
||||
stage_receipts: rejected_pipeline_receipts,
|
||||
});
|
||||
};
|
||||
match engine.execute(slice.clone()).await {
|
||||
Ok(terminal) => break terminal,
|
||||
Err(error)
|
||||
if rejected_pipeline_errors.len() + 1 < MAX_CELL_PIPELINE_ATTEMPTS =>
|
||||
{
|
||||
if let Some(failure) = error.downcast_ref::<CellPipelineFailure>() {
|
||||
rejected_pipeline_receipts.extend(failure.stage_receipts.clone());
|
||||
}
|
||||
rejected_pipeline_errors
|
||||
.push(format!("{error:#}").chars().take(1_000).collect());
|
||||
}
|
||||
Err(error) => {
|
||||
if let Some(failure) = error.downcast_ref::<CellPipelineFailure>() {
|
||||
rejected_pipeline_receipts.extend(failure.stage_receipts.clone());
|
||||
}
|
||||
rejected_pipeline_errors
|
||||
.push(format!("{error:#}").chars().take(1_000).collect());
|
||||
let terminal_error = rejected_pipeline_errors
|
||||
.last()
|
||||
.cloned()
|
||||
.unwrap_or_else(|| "unknown cell pipeline failure".into());
|
||||
return Err(CellPipelineExhaustion {
|
||||
diagnostic: format!(
|
||||
"simulation cell {cell_id} subjects {} pipeline failed after {} attempts: {terminal_error}",
|
||||
serde_json::to_string(&subject_ids)
|
||||
.unwrap_or_else(|_| "[unavailable]".into()),
|
||||
MAX_CELL_PIPELINE_ATTEMPTS
|
||||
),
|
||||
stage_receipts: rejected_pipeline_receipts,
|
||||
});
|
||||
}
|
||||
}
|
||||
let Ok(_provider_slot) = semaphore.acquire_owned().await else {
|
||||
return Err(CellPipelineExhaustion {
|
||||
diagnostic: "provider concurrency gate closed".into(),
|
||||
stage_receipts: Vec::new(),
|
||||
});
|
||||
};
|
||||
Ok::<_, CellPipelineExhaustion>((
|
||||
cell_id,
|
||||
terminal,
|
||||
rejected_pipeline_errors,
|
||||
rejected_pipeline_receipts,
|
||||
))
|
||||
let terminal = engine.execute(slice).await.map_err(|error| {
|
||||
let stage_receipts = error
|
||||
.downcast_ref::<CellPipelineFailure>()
|
||||
.map(|failure| failure.stage_receipts.clone())
|
||||
.unwrap_or_default();
|
||||
CellPipelineExhaustion {
|
||||
diagnostic: format!(
|
||||
"simulation cell {cell_id} subjects {} pipeline failed: {error:#}",
|
||||
serde_json::to_string(&subject_ids)
|
||||
.unwrap_or_else(|_| "[unavailable]".into())
|
||||
),
|
||||
stage_receipts,
|
||||
}
|
||||
})?;
|
||||
Ok::<_, CellPipelineExhaustion>((cell_id, terminal))
|
||||
});
|
||||
}
|
||||
let mut terminals = Vec::new();
|
||||
|
|
@ -246,12 +214,7 @@ pub async fn propose_resolution_wave_with_policy(
|
|||
.chain(
|
||||
terminals
|
||||
.iter()
|
||||
.flat_map(|(_, terminal, _, rejected_receipts)| {
|
||||
rejected_receipts
|
||||
.iter()
|
||||
.chain(terminal.stage_receipts.iter())
|
||||
.cloned()
|
||||
}),
|
||||
.flat_map(|(_, terminal)| terminal.stage_receipts.iter().cloned()),
|
||||
)
|
||||
.collect::<Vec<_>>();
|
||||
stage_receipts.extend(
|
||||
|
|
@ -270,42 +233,23 @@ pub async fn propose_resolution_wave_with_policy(
|
|||
terminals.sort_by(|left, right| left.0.cmp(&right.0));
|
||||
let appraisals = terminals
|
||||
.iter()
|
||||
.map(|(_, terminal, _, _)| terminal.appraisal.clone())
|
||||
.map(|(_, terminal)| terminal.appraisal.clone())
|
||||
.collect();
|
||||
let private_cell_traces = terminals
|
||||
.iter()
|
||||
.map(
|
||||
|(cell_id, terminal, rejected_pipeline_errors, rejected_pipeline_receipts)| {
|
||||
PrivateCellTrace {
|
||||
cell_id: cell_id.clone(),
|
||||
pipeline_attempts: rejected_pipeline_errors.len() + 1,
|
||||
rejected_pipeline_errors: rejected_pipeline_errors.clone(),
|
||||
rejected_pipeline_receipt_hashes: rejected_pipeline_receipts
|
||||
.iter()
|
||||
.map(|receipt| receipt.storage_key().to_owned())
|
||||
.collect(),
|
||||
terminal_pipeline_receipt_hashes: terminal
|
||||
.stage_receipts
|
||||
.iter()
|
||||
.map(|receipt| receipt.storage_key().to_owned())
|
||||
.collect(),
|
||||
lived_stream: terminal.lived_stream.text.clone(),
|
||||
persona_output: terminal.persona_output.clone(),
|
||||
}
|
||||
},
|
||||
)
|
||||
.map(|(cell_id, terminal)| PrivateCellTrace {
|
||||
cell_id: cell_id.clone(),
|
||||
terminal_pipeline_receipt_hashes: terminal
|
||||
.stage_receipts
|
||||
.iter()
|
||||
.map(|receipt| receipt.storage_key().to_owned())
|
||||
.collect(),
|
||||
lived_stream: terminal.lived_stream.text.clone(),
|
||||
persona_output: terminal.persona_output.clone(),
|
||||
})
|
||||
.collect();
|
||||
let mut committed_stages = stages.clone();
|
||||
for (_, terminal, _, rejected_pipeline_receipts) in terminals {
|
||||
stages.extend(
|
||||
rejected_pipeline_receipts
|
||||
.into_iter()
|
||||
.map(|receipt| ModelStageOutput {
|
||||
narrative: String::new(),
|
||||
structured: None,
|
||||
receipt,
|
||||
}),
|
||||
);
|
||||
for (_, terminal) in terminals {
|
||||
let terminal_stages = terminal
|
||||
.stage_receipts
|
||||
.into_iter()
|
||||
|
|
@ -1607,7 +1551,7 @@ mod tests {
|
|||
.as_ref()
|
||||
.and_then(|schema| {
|
||||
schema
|
||||
.pointer("/properties/decisions/properties")
|
||||
.pointer("/oneOf/0/properties/decisions/properties")
|
||||
.and_then(serde_json::Value::as_object)
|
||||
})
|
||||
.map(|properties| properties.keys().cloned().collect::<Vec<_>>())
|
||||
|
|
@ -1626,6 +1570,7 @@ mod tests {
|
|||
})
|
||||
.collect::<serde_json::Map<_, _>>();
|
||||
Ok(serde_json::json!({
|
||||
"kind":"submit",
|
||||
"decisions":decisions
|
||||
})
|
||||
.to_string())
|
||||
|
|
@ -2249,14 +2194,13 @@ mod tests {
|
|||
output
|
||||
.private_cell_traces
|
||||
.iter()
|
||||
.all(|trace| trace.pipeline_attempts == 1
|
||||
&& trace.rejected_pipeline_errors.is_empty())
|
||||
.all(|trace| !trace.terminal_pipeline_receipt_hashes.is_empty())
|
||||
);
|
||||
validate_and_resolve_wave(&campaign, &output.wave).unwrap();
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn one_transient_cell_failure_retries_only_that_same_snapshot() {
|
||||
async fn cell_failure_is_terminal_and_does_not_replay_the_membrane() {
|
||||
let mut campaign = crate::resolution::tests::campaign(6, 2);
|
||||
campaign.resolution_policy.provider_parallelism = 2;
|
||||
let model = Arc::new(TransientCellFixtureModel {
|
||||
|
|
@ -2266,60 +2210,30 @@ mod tests {
|
|||
malformed_cell: false,
|
||||
},
|
||||
target_binding: Mutex::new(None),
|
||||
failures_remaining: AtomicUsize::new(2),
|
||||
failures_remaining: AtomicUsize::new(4),
|
||||
});
|
||||
|
||||
let output = propose_resolution_wave(model.clone(), Arc::new(AllowAllPermit), &campaign)
|
||||
.await
|
||||
.unwrap();
|
||||
let error =
|
||||
match propose_resolution_wave(model.clone(), Arc::new(AllowAllPermit), &campaign).await
|
||||
{
|
||||
Ok(_) => panic!("the scheduler replayed a failed cell membrane"),
|
||||
Err(error) => error,
|
||||
};
|
||||
let failure = error
|
||||
.downcast_ref::<ResolutionWavePipelineFailure>()
|
||||
.expect("cell failure must retain pipeline receipts");
|
||||
|
||||
assert_eq!(output.wave.cover.cells.len(), 2);
|
||||
let retried = output
|
||||
.private_cell_traces
|
||||
.iter()
|
||||
.filter(|trace| trace.pipeline_attempts == 2)
|
||||
.collect::<Vec<_>>();
|
||||
assert_eq!(retried.len(), 1);
|
||||
assert_eq!(retried[0].rejected_pipeline_errors.len(), 1);
|
||||
assert_eq!(retried[0].rejected_pipeline_receipt_hashes.len(), 1);
|
||||
assert!(retried[0].rejected_pipeline_errors[0].contains(
|
||||
assert_eq!(failure.pipeline_errors.len(), 1);
|
||||
assert!(failure.pipeline_errors[0].contains(
|
||||
"cell Persona model stage failed: model stage cell_persona provider failed twice against the same snapshot"
|
||||
));
|
||||
assert!(output.stages.iter().any(|stage| {
|
||||
retried[0]
|
||||
.rejected_pipeline_receipt_hashes
|
||||
.contains(&stage.receipt.storage_key().to_owned())
|
||||
}));
|
||||
assert!(
|
||||
retried[0]
|
||||
.rejected_pipeline_receipt_hashes
|
||||
.iter()
|
||||
.filter(|hash| output.wave.model_receipt_hashes.contains(hash))
|
||||
.all(|hash| retried[0].terminal_pipeline_receipt_hashes.contains(hash))
|
||||
);
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
let store =
|
||||
crate::persistence::CampaignStore::open(dir.path().join("campaign.cc")).unwrap();
|
||||
let receipts = output
|
||||
.stages
|
||||
.iter()
|
||||
.map(|stage| stage.receipt.clone())
|
||||
.collect::<Vec<_>>();
|
||||
store.persist_model_stage_receipts(&receipts).unwrap();
|
||||
store.persist_model_stage_receipts(&receipts).unwrap();
|
||||
assert_eq!(
|
||||
store.keys("persona_stage_receipt.v1").unwrap().len(),
|
||||
receipts
|
||||
.iter()
|
||||
.map(ModelStageReceipt::storage_key)
|
||||
.collect::<BTreeSet<_>>()
|
||||
.len()
|
||||
model.failures_remaining.load(Ordering::SeqCst),
|
||||
2,
|
||||
"the provider may perform its bounded transport retry, but the scheduler must not replay Projector and Persona"
|
||||
);
|
||||
assert_eq!(model.failures_remaining.load(Ordering::SeqCst), 0);
|
||||
assert!(model.fixture.maximum.load(Ordering::SeqCst) <= 2);
|
||||
validate_and_resolve_wave(&campaign, &output.wave).unwrap();
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn two_hundred_cell_wave_dispatches_in_parallel_under_one_provider_gate() {
|
||||
let mut campaign = crate::resolution::tests::campaign(1_000, 200);
|
||||
|
|
@ -2435,28 +2349,38 @@ mod tests {
|
|||
};
|
||||
let failure = error
|
||||
.downcast_ref::<ResolutionWavePipelineFailure>()
|
||||
.expect("exhausted cell retries must preserve wave failure evidence");
|
||||
.expect("terminal cell failure must preserve wave failure evidence");
|
||||
assert!(!failure.pipeline_errors.is_empty());
|
||||
assert!(
|
||||
failure
|
||||
.pipeline_errors
|
||||
.iter()
|
||||
.all(|error| error.contains("pipeline failed after 3 attempts"))
|
||||
.all(|error| error.contains("pipeline failed: cell Interpreter agent failed"))
|
||||
);
|
||||
assert!(failure.stage_receipts.len() >= 7);
|
||||
assert!(failure.stage_receipts.len() >= 5);
|
||||
assert!(
|
||||
failure
|
||||
.stage_receipts
|
||||
.iter()
|
||||
.any(|receipt| receipt.stage == "resolution_demand")
|
||||
);
|
||||
assert!(
|
||||
assert_eq!(
|
||||
failure
|
||||
.stage_receipts
|
||||
.iter()
|
||||
.filter(|receipt| receipt.stage == "cell_projector")
|
||||
.count()
|
||||
>= 3
|
||||
.count(),
|
||||
2,
|
||||
"the scheduler must not replay a completed Projector"
|
||||
);
|
||||
assert_eq!(
|
||||
failure
|
||||
.stage_receipts
|
||||
.iter()
|
||||
.filter(|receipt| receipt.stage == "cell_persona")
|
||||
.count(),
|
||||
2,
|
||||
"the scheduler must not replay a completed Persona"
|
||||
);
|
||||
assert_eq!(campaign, before);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -598,31 +598,83 @@ stale DeepSeek route and received HTTP 402 because this machine has neither a
|
|||
Codex Connector service nor a usable key. That is not provider acceptance or a
|
||||
harness failure; the provider smoke belongs on Yggdrasil.
|
||||
|
||||
Reconciliation is the harness's first executable proof. Patina remains the
|
||||
named next consumer: an agent whose bounded tools can introduce durable,
|
||||
locally grounded low-stakes texture which later events may organically
|
||||
appropriate, without granting the texture agent independent commit authority.
|
||||
No Patina implementation is claimed.
|
||||
Exact-source run 22 exercised commit `842e265` through Codex Connector. The
|
||||
world compiled and locality 1 committed. At locality 2 the Sol destination
|
||||
compile, Terra reconciliation action, and fresh Sol civic verifier all
|
||||
accepted; WorldKernel then rejected admission with `region admission evidence
|
||||
receipts were not supplied`. The run ended at one of four elaborations and zero
|
||||
of six strategic waves, so it produced no newspaper. The unchanged root is
|
||||
archived at
|
||||
`F:\GameCult\GhostlightDungeon\acceptance\elven-realms-autonomous-842e265-22.tar`,
|
||||
whose SHA-256 is
|
||||
`90972df1c90eaff699469357ff5de026838940ac07ec5f5faefbaf5d1d266ed9`.
|
||||
This retires run 21 as the current blocker while preserving it as prior failure
|
||||
history. Run 22 proves the provider-backed agentic reconciliation path reached
|
||||
fresh semantic acceptance; the remaining rejection came from mixing causal
|
||||
ModelAgent receipt IDs into canonical profile and relation evidence fields.
|
||||
Commit `c757e5a09d884d263ae3533f537a71ce69010e94` owns the focused
|
||||
namespace split and is pushed: model-causal ancestry remains available to
|
||||
the harness and verifier receipts, while profiles and relations lower only the
|
||||
canonical admission-evidence receipt IDs. Provider verification remains
|
||||
pending.
|
||||
|
||||
1. Commit and push this phase-boundary Mind update with implementation commit
|
||||
`842e265`.
|
||||
2. Dispatch exact source `842e265` on Yggdrasil through Codex Connector for a
|
||||
fresh four-elaboration/six-wave provider run. If it completes, preserve
|
||||
and verify the immutable artifact manifest without mutating the live daemon
|
||||
or any prior run root.
|
||||
3. Only after all six waves commit and an immutable manifest exists, dispatch a
|
||||
The current verified working tree makes the strategic Interpreter another
|
||||
consumer of the same generic harness. Shared `causal_source_ids` bind both actor
|
||||
and cell Projector-to-Persona-to-Interpreter chains. One agent incrementally
|
||||
edits a private draft against the frozen Persona decision. The deterministic
|
||||
draft compiler owns exact structure, permissions, topology, and bounds; the
|
||||
independent semantic verifier returns subject-scoped findings; unchanged
|
||||
accepted actions retain their exact verifier binding. Missing cell decisions
|
||||
reuse one exact `CellProjectedMoment`: one Projector call feeds two Persona and
|
||||
two Interpreter attempts, and the second attempts cite the first. Draft
|
||||
admission rejects whole resubmission and edits to unrelated decisions. The
|
||||
former bespoke correction prompt, whole-cell retry ownership, and dead retry
|
||||
trace fields are retired. All 419 library tests pass, and the second bounded
|
||||
Modeling audit found no P1 or P2 issue.
|
||||
|
||||
World elaboration now has a typed catalog of eight named workers: Patina,
|
||||
Charter, Ledger, Hearth, Tangle, Veil, Ember, and Numen. Persisted semantic
|
||||
profile weights allocate against the complete enabled profile and control actual
|
||||
invocation frequency through a deterministic smooth weighted scheduler. An
|
||||
ineligible or blocked title keeps its scheduled share visibly unused; the
|
||||
scheduler does not redistribute those slots among eligible titles or accrue
|
||||
catch-up debt. With Patina 20 and blocked Tangle 80, a 100-slot window therefore
|
||||
invokes Patina 20 times and reports 80 unused slots. A bounded invocation port
|
||||
runs scheduled sub-agents in parallel against one frozen snapshot and restores
|
||||
deterministic ordinal order. Every invocation and proposal carries an exact
|
||||
`ElaborationWaveBinding`. Typed failures retain the consumed schedule,
|
||||
completed invocations, and exact failed dispatch for ordinary worker errors and
|
||||
task panic or cancellation; task-ID mapping preserves dispatch identity even
|
||||
when the task produces no normal payload.
|
||||
This is not yet an end-to-end elaboration path. World-domain proposal types,
|
||||
admission and conflict/merge ownership, and canonical WorldKernel integration
|
||||
remain unimplemented. Patina is therefore a real named control and schedulable
|
||||
title, but not a canonical writer. Provider run 23 remains stopped and no new
|
||||
newspaper acceptance is claimed.
|
||||
|
||||
1. Commit and push the verified agentic Interpreter plus elaboration scheduling
|
||||
cut.
|
||||
2. Map and implement the missing world-domain elaboration proposal,
|
||||
deterministic admission/conflict/merge boundary, and canonical WorldKernel
|
||||
integration without granting any titled worker commit authority.
|
||||
3. Keep provider run 23 stopped until that domain path is verified. Then dispatch
|
||||
the resulting exact source on Yggdrasil through Codex Connector for
|
||||
a fresh four-elaboration/six-wave provider run. If it completes, preserve and
|
||||
verify the immutable artifact manifest without mutating the live daemon or
|
||||
any prior run root.
|
||||
4. Only after all six waves commit and an immutable manifest exists, dispatch a
|
||||
fresh blind reviewer with only the strongest unedited page and a neutral
|
||||
editorial brief, then independently audit it against committed public events.
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -167,8 +167,10 @@ exact campaign revision
|
|||
-> connected agency graph + budget/pins/leases/detail debt
|
||||
-> cohesive or arena simulation-cell cover
|
||||
-> one private Projector/Persona/Interpreter membrane per cell
|
||||
-> model proposes exact constituent-attributed actions or explicit inaction
|
||||
-> independent effect verifier checks the typed action against the Persona choice
|
||||
-> Interpreter agent submits or incrementally edits one private exact-decision draft
|
||||
-> deterministic draft compiler checks exact ownership, permissions, topology, and bounds
|
||||
-> independent per-action effect verifier checks the typed action against the Persona choice
|
||||
-> accepted unchanged actions retain their exact verifier binding across local draft repair
|
||||
-> runtime selects compatible attempts and content-addresses each activity
|
||||
-> parallel per-activity fast outcome candidates choose bounded typed consequences
|
||||
-> one local binder plus selective semantic verifier admit or reject each frozen candidate
|
||||
|
|
@ -192,14 +194,28 @@ code bounds it before correction and never publishes private cell choices to a
|
|||
player error surface. A rejected wave returns one spoiler-free message while
|
||||
its exact diagnostic remains operator-only.
|
||||
|
||||
On the one same-snapshot Interpreter correction, Ghostlight also removes each
|
||||
exact subject/effect pair rejected by either per-action local validation or the
|
||||
independent effect verifier from the output schema. Neither validator chooses
|
||||
the replacement or gains commit authority; the correction constraint only
|
||||
makes an already-known-invalid mapping impossible to repeat. The Interpreter
|
||||
must use another permitted typed lane, omit the action, or fail the whole wave
|
||||
without mutation. Cross-action failures do not guess at an offender and remain
|
||||
ordinary semantic corrections.
|
||||
The Interpreter is a bounded model agent over a private workbench. Its efficient
|
||||
first action may submit the complete exact decision map only while the draft is
|
||||
empty. A rejected draft stays in the tool; later actions may upsert or remove
|
||||
only the exact decisions named as missing or rejected, or inspect the draft.
|
||||
The tool structurally rejects whole-draft replacement and edits to unrelated
|
||||
accepted decisions. Local validation returns a typed `local_validation`
|
||||
finding and the semantic verifier returns exact subject-scoped mismatch
|
||||
findings. Neither validator chooses the replacement or gains commit authority.
|
||||
Verifier matches are cached by the exact snapshot-and-action binding, so
|
||||
repairing one action does not repay inference for unchanged accepted actions.
|
||||
An `undecided` result returns to the Persona owner instead of letting the
|
||||
Interpreter invent a choice.
|
||||
|
||||
The strategic scheduler dispatches every simulation cell membrane once and
|
||||
owns no cell retry. The cell engine projects one exact lived moment. If the
|
||||
Persona supplies no explicit decision, the engine retries only Persona and
|
||||
Interpreter against that same projected stream; Projector does not rerun. The
|
||||
second Persona cites the first Persona and Interpreter attempt as causal
|
||||
ancestry. Provider transport retains its separately bounded same-request retry,
|
||||
and Interpreter draft repair remains workbench-local. Actor and cell membranes
|
||||
share one causal-source derivation primitive for Projector to Persona to
|
||||
Interpreter, while canonical evidence remains a separate namespace.
|
||||
|
||||
The effect verifier receives the same exact typed permission slice used by the
|
||||
Interpreter. That slice is its sole map of canonical locations, reachable actor
|
||||
|
|
@ -673,8 +689,8 @@ Ghostlight owns exact verdict coverage and derives the aggregate rejected set;
|
|||
the model cannot reject one arena constituent merely because another
|
||||
constituent's mapping failed, omit a candidate, duplicate an index, or publish
|
||||
a global decision that contradicts its per-action rationale. Rejected actions
|
||||
receive one same-snapshot Interpreter correction and may not be returned
|
||||
unchanged.
|
||||
return to the same private Interpreter draft as exact subject-scoped findings;
|
||||
unchanged accepted actions retain their verifier binding.
|
||||
|
||||
Population scale uses reversible individuation:
|
||||
|
||||
|
|
@ -994,11 +1010,33 @@ admission. Completed compiler, action, tool, and verifier receipts survive
|
|||
terminal failure and are persisted by both the strategic harness and the
|
||||
Dungeon API. Generic harness tests prove that a later action cites both the
|
||||
rejected action and tool receipts, and that exhaustion returns every completed
|
||||
action and tool receipt. Accepted civic systems persist as versioned component
|
||||
action and tool receipt. A tool may also return `Continue`: the valid action
|
||||
updates only consumer-owned private draft state, its receipt remains valid, and
|
||||
the typed observation requests the next step without pretending the task was
|
||||
rejected or complete. Accepted civic systems persist as versioned component
|
||||
state, so a later pass receives the current institutions, populations, facts,
|
||||
and relations and must extend that apparatus instead of inventing a parallel
|
||||
government.
|
||||
|
||||
World-elaboration tone has one typed catalog of titled workers. `Patina` owns
|
||||
reusable low-stakes local texture; `Charter` civic institutions and procedure;
|
||||
`Ledger` material economy; `Hearth` ordinary relationships and belonging;
|
||||
`Tangle` factions and political leverage; `Veil` uneven knowledge; `Ember`
|
||||
active pressure; and `Numen` ritual, magic, and wonder. Each user slider is a
|
||||
zero-to-one-hundred relative dispatch weight, not prompt decoration. The
|
||||
deterministic smooth weighted scheduler apportions every invocation-budget slot
|
||||
against the complete enabled profile. It records requested share, actual
|
||||
dispatch count, and per-title unused allocations; when a selected title is
|
||||
blocked, that slot remains unused instead of increasing another title's
|
||||
frequency or creating catch-up debt. A bounded wave invokes the scheduled
|
||||
sub-agents in parallel. One typed wave binding names the immutable snapshot and
|
||||
is passed to every invocation and returned with every proposal. Successful
|
||||
proposals return in deterministic ordinal order. A failed wave returns the
|
||||
consumed schedule, every completed proposal, and the exact failed dispatches,
|
||||
so persisted fairness state cannot advance without an explanatory receipt.
|
||||
Those proposals are not canonical mutations; a later admission and conflict
|
||||
owner must compile and atomically commit them through `WorldKernel`.
|
||||
|
||||
Both destination paths synthesize the smallest compatible branch-local routes,
|
||||
geometry, people, supplies, procedures, capacity, responsibility, and doctrine
|
||||
needed for play. Those choices remain visible as `branch_assumptions`; they may
|
||||
|
|
|
|||
|
|
@ -165,4 +165,9 @@
|
|||
{"note": "Supersedes only the transient root-absent portion of the preceding run-20 dispatch record. The result root now exists at /var/lib/gamecult/ghostlight-dungeon/acceptance/elven-realms-autonomous-2875e45-20. Its isolated release BUILD-WITNESS binds exact source 2875e45b3abd9c8c5e207d85444c797884c57136, binary SHA-256 f3015218baaa8f6d70596f5be8a793f7444ce47b93558a44c7958e2b58841c68, and live_service_mutated=false. status.json remains at compiling_world with updated_at 2026-08-27T20:57:14.217251532Z, and the service remains active. No provider result, locality elaboration, strategic wave, newspaper, manifest, or provider acceptance is claimed.", "status": "ok", "ts": "2026-08-27T20:59:56+00:00", "type": "correction"}
|
||||
{"note": "Falsifies run 20 compiling_world as the live steering state. Exact-source run 20 at /var/lib/gamecult/ghostlight-dungeon/acceptance/elven-realms-autonomous-2875e45-20 committed one locality elaboration through revision 1, then Downstream Grain-Pump Station civic reconciliation failed ordinary fact validation with destination expansion facts must have new IDs and non-empty unique statements. No strategic wave, newspaper, or result-root SHA256SUMS exists. The unchanged failure root is archived at F:\\GameCult\\GhostlightDungeon\\acceptance\\elven-realms-autonomous-2875e45-20.tar; its independently rechecked SHA-256 is 6cc564ec70dd6e0279180fb547610d9355418ecdf1ff2cc4f083480ce7841b43. Exact pushed commit 965c9faadcde9a8dced158b00e37d9491d589cde centralizes a maximum-two Terra reconciliation budget in one scheduler across application, structural-validation, and civic-verifier findings, never reruns Sol, and retains ordinary validation as admission owner; 409 library tests and the strategic smoke check pass. Exact-source run 21 is active as ghostlight-newspaper-965c9fa-21.service for /var/lib/gamecult/ghostlight-dungeon/acceptance/elven-realms-autonomous-965c9fa-21. No provider or fantasy-newspaper acceptance is claimed while it is active.", "status": "ok", "ts": "2026-08-27T21:50:50+00:00", "type": "correction"}
|
||||
{"note": "Falsifies the active run-21 steering claim. Exact source 965c9faadcde9a8dced158b00e37d9491d589cde terminated during the second of four locality elaborations at loc:pump_house after one elaboration and zero strategic waves. Both bounded Terra reconciliation actions still yielded destination facts rejected by ordinary namespace validation; no newspaper or completed result-root SHA256SUMS exists. The unchanged root is archived at F:\\GameCult\\GhostlightDungeon\\acceptance\\elven-realms-autonomous-965c9fa-21.tar, independently rechecked SHA-256 2f4d48d47acd3733c99ab8899427e1d33bd4b5cde93da52efa67a3baf98da8e3. Current source surgery correctly treats the fixed retry scheduler as the obsolete owner: the intended replacement is one provider-neutral hand-rolled model-agent harness above ModelPort with bounded observe/action/tool-result steps and causal receipts, plus a destination adapter that applies, lowers, validates, and independently verifies through existing authority. This direction is not yet implementation acceptance; it requires focused and full tests, commit/push, then a fresh four-elaboration/six-wave provider run and separate blind editorial and grounding gates.", "status": "ok", "ts": "2026-08-27T22:32:33+00:00", "type": "correction"}
|
||||
{"ts": "2026-08-27T23:12:58+00:00", "type": "verification", "status": "ok", "note": "Local phase boundary for commit 842e265f2969d7047e6b2a35fcca7cc371de5c6b: the provider-neutral hand-rolled model-agent harness now owns bounded observe/action/tool-result steps and causal receipts above ModelPort; the destination adapter owns complete candidate application, one canonical fact-namespace checker, ordinary lowering/validation, and a fresh one-shot civic verifier; compiler branches no longer own reconciliation retries and WorldKernel admission remains final. The focused regression proves exact initial fact collision, a different first Terra collision, typed tool finding, causally corrected second action, frozen institution identity, and fresh-verifier acceptance. All 411 library tests pass, and the bounded Modeling re-audit passed all four authority boundaries. The local strategic smoke binary builds but runtime provider execution is not accepted: this workstation selected stale DeepSeek and received HTTP 402 because it has neither Codex Connector service nor a usable key. Provider verification remains pending on Yggdrasil through Codex Connector. Patina remains a planned future harness consumer and is not implemented."}
|
||||
{"note": "Local phase boundary for commit 842e265f2969d7047e6b2a35fcca7cc371de5c6b: the provider-neutral hand-rolled model-agent harness now owns bounded observe/action/tool-result steps and causal receipts above ModelPort; the destination adapter owns complete candidate application, one canonical fact-namespace checker, ordinary lowering/validation, and a fresh one-shot civic verifier; compiler branches no longer own reconciliation retries and WorldKernel admission remains final. The focused regression proves exact initial fact collision, a different first Terra collision, typed tool finding, causally corrected second action, frozen institution identity, and fresh-verifier acceptance. All 411 library tests pass, and the bounded Modeling re-audit passed all four authority boundaries. The local strategic smoke binary builds but runtime provider execution is not accepted: this workstation selected stale DeepSeek and received HTTP 402 because it has neither Codex Connector service nor a usable key. Provider verification remains pending on Yggdrasil through Codex Connector. Patina remains a planned future harness consumer and is not implemented.", "status": "ok", "ts": "2026-08-27T23:12:58+00:00", "type": "verification"}
|
||||
{"note": "Falsifies run 21 as the current provider blocker. Exact source 842e265f2969d7047e6b2a35fcca7cc371de5c6b ran through Codex Connector for run 22: the world compiled, locality 1 committed, and locality 2 Sol destination compile, Terra reconciliation action, and fresh Sol civic verifier all accepted before WorldKernel rejected admission with region admission evidence receipts were not supplied. The run ended at 1/4 locality elaborations and 0/6 strategic waves with no newspaper. The unchanged archive is F:\\GameCult\\GhostlightDungeon\\acceptance\\elven-realms-autonomous-842e265-22.tar, SHA-256 90972df1c90eaff699469357ff5de026838940ac07ec5f5faefbaf5d1d266ed9. Root diagnosis: causal ModelAgent receipt IDs were incorrectly copied into canonical profile and relation evidence fields. A focused receipt-namespace split is implemented locally but remains uncommitted and provider-unverified. No later provider run or fantasy-newspaper acceptance is claimed.", "status": "ok", "ts": "2026-08-27T23:40:54+00:00", "type": "correction"}
|
||||
{"note": "Supersedes only the uncommitted status of the run-22 receipt-namespace diagnosis. Commit c757e5a09d884d263ae3533f537a71ce69010e94 is pushed and separates model-causal source receipt ancestry from canonical admission-evidence receipt IDs. Destination compile, reconciliation, and verification retain causal receipts; population and institution profiles plus migration and local relations lower only canonical admission evidence. Source inspection confirms the regression asserts both namespaces. Provider verification remains pending, and no later run or fantasy-newspaper acceptance is claimed. Patina remains a planned future harness consumer, not an implemented authority.", "status": "ok", "ts": "2026-08-27T23:46:16+00:00", "type": "correction"}
|
||||
{"note": "Post-verification local boundary: all 417 ghostlight-dungeon library tests pass for the current uncommitted working tree. The generic ModelAgent harness now drives incremental strategic Interpreter draft repair against a frozen Persona decision; deterministic compilation owns structural authority, the independent semantic verifier returns subject-scoped findings, and unchanged accepted actions retain their verifier binding. A typed eight-title elaborator catalog (Patina, Charter, Ledger, Hearth, Tangle, Veil, Ember, Numen), persisted semantic profile and dispatch state, deterministic smooth weighted scheduling, and an actual bounded parallel ElaborationSubAgentPort now exist. Tests prove configured weights change real call counts and blocked work leaves budget unused without catch-up debt. This is not canonical world integration: world-domain elaboration proposal types, deterministic admission/conflict/merge, and WorldKernel integration remain unimplemented. Provider run 23 remains stopped; no provider or fantasy-newspaper acceptance is claimed.", "status": "ok", "ts": "2026-08-28T00:45:02+00:00", "type": "verification"}
|
||||
{"note": "Corrects two claims in the immediately preceding post-verification record. The full ghostlight-dungeon library suite now passes 418 tests, not 417. Elaborator allocation is against the complete enabled profile, not renormalized across currently eligible titles: scheduled shares for blocked or ineligible titles remain visibly unused with no redistribution or catch-up debt. For Patina 20 and blocked Tangle 80, a 100-slot budget invokes Patina 20 times and records 80 unused slots. All other ownership, missing canonical-integration, stopped run-23, and non-acceptance claims remain unchanged.", "status": "ok", "ts": "2026-08-28T00:47:07+00:00", "type": "correction"}
|
||||
{"ts": "2026-08-28T01:18:47+00:00", "type": "verification", "status": "ok", "note": "Final local post-audit boundary: all 419 ghostlight-dungeon library tests pass, and the second bounded Modeling audit reports no P1 or P2 issue. Shared causal_source_ids bind actor and cell Projector-to-Persona-to-Interpreter chains. Missing cell-decision recovery reuses one exact CellProjectedMoment: one Projector call, two Persona attempts, two Interpreter attempts, with each second attempt citing the first. Interpreter draft admission rejects whole resubmission and unrelated decision edits; dead scheduler retry trace fields are removed. Every elaboration invocation and proposal now carries ElaborationWaveBinding. Typed ordinary-error and task-panic/cancellation failures retain the consumed schedule, completed invocations, and exact failed dispatch through task-ID mapping. Complete-profile proportional allocation and visibly unused blocked shares remain unchanged. World-domain elaboration proposal/admission/conflict/merge and WorldKernel integration remain unimplemented; provider run 23 remains stopped and no provider or fantasy-newspaper acceptance is claimed."}
|
||||
|
|
|
|||
|
|
@ -167,3 +167,8 @@
|
|||
{"key": "2026-08-27T215050Z0000-0165-41519b59ae83", "payload": "eyJub3RlIjogIkZhbHNpZmllcyBydW4gMjAgY29tcGlsaW5nX3dvcmxkIGFzIHRoZSBsaXZlIHN0ZWVyaW5nIHN0YXRlLiBFeGFjdC1zb3VyY2UgcnVuIDIwIGF0IC92YXIvbGliL2dhbWVjdWx0L2dob3N0bGlnaHQtZHVuZ2Vvbi9hY2NlcHRhbmNlL2VsdmVuLXJlYWxtcy1hdXRvbm9tb3VzLTI4NzVlNDUtMjAgY29tbWl0dGVkIG9uZSBsb2NhbGl0eSBlbGFib3JhdGlvbiB0aHJvdWdoIHJldmlzaW9uIDEsIHRoZW4gRG93bnN0cmVhbSBHcmFpbi1QdW1wIFN0YXRpb24gY2l2aWMgcmVjb25jaWxpYXRpb24gZmFpbGVkIG9yZGluYXJ5IGZhY3QgdmFsaWRhdGlvbiB3aXRoIGRlc3RpbmF0aW9uIGV4cGFuc2lvbiBmYWN0cyBtdXN0IGhhdmUgbmV3IElEcyBhbmQgbm9uLWVtcHR5IHVuaXF1ZSBzdGF0ZW1lbnRzLiBObyBzdHJhdGVnaWMgd2F2ZSwgbmV3c3BhcGVyLCBvciByZXN1bHQtcm9vdCBTSEEyNTZTVU1TIGV4aXN0cy4gVGhlIHVuY2hhbmdlZCBmYWlsdXJlIHJvb3QgaXMgYXJjaGl2ZWQgYXQgRjpcXEdhbWVDdWx0XFxHaG9zdGxpZ2h0RHVuZ2VvblxcYWNjZXB0YW5jZV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GJlY2F1c2UgaXQgaGFzIG5laXRoZXIgQ29kZXggQ29ubmVjdG9yIHNlcnZpY2Ugbm9yIGEgdXNhYmxlIGtleS4gUHJvdmlkZXIgdmVyaWZpY2F0aW9uIHJlbWFpbnMgcGVuZGluZyBvbiBZZ2dkcmFzaWwgdGhyb3VnaCBDb2RleCBDb25uZWN0b3IuIFBhdGluYSByZW1haW5zIGEgcGxhbm5lZCBmdXR1cmUgaGFybmVzcyBjb25zdW1lciBhbmQgaXMgbm90IGltcGxlbWVudGVkLiIsICJzdGF0dXMiOiAib2siLCAidHMiOiAiMjAyNi0wOC0yN1QyMzoxMjo1OCswMDowMCIsICJ0eXBlIjogInZlcmlmaWNhdGlvbiJ9", "stored_at": "2026-08-27T23:12:58.254241+00:00", "type": "ghostlight.evidence_record.v0"}
|
||||
{"key": "2026-08-27T234054Z0000-0168-6e2b83f619ec", "payload": "eyJub3RlIjogIkZhbHNpZmllcyBydW4gMjEgYXMgdGhlIGN1cnJlbnQgcHJvdmlkZXIgYmxvY2tlci4gRXhhY3Qgc291cmNlIDg0MmUyNjVmMjk2OWQ3MDQ3ZTZiMmEzNWZjY2E3Y2MzNzFkZTVjNmIgcmFuIHRocm91Z2ggQ29kZXggQ29ubmVjdG9yIGZvciBydW4gMjI6IHRoZSB3b3JsZCBjb21waWxlZCwgbG9jYWxpdHkgMSBjb21taXR0ZWQsIGFuZCBsb2NhbGl0eSAyIFNvbCBkZXN0aW5hdGlvbiBjb21waWxlLCBUZXJyYSByZWNvbmNpbGlhdGlvbiBhY3Rpb24sIGFuZCBmcmVzaCBTb2wgY2l2aWMgdmVyaWZpZXIgYWxsIGFjY2VwdGVkIGJlZm9yZSBXb3JsZEtlcm5lbCByZWplY3RlZCBhZG1pc3Npb24gd2l0aCByZWdpb24gYWRtaXNzaW9uIGV2aWRlbmNlIHJlY2VpcHRzIHdlcmUgbm90IHN1cHBsaWVkLiBUaGUgcnVuIGVuZGVkIGF0IDEvNCBsb2NhbGl0eSBlbGFib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b3Bvc2FsIHR5cGVzLCBkZXRlcm1pbmlzdGljIGFkbWlzc2lvbi9jb25mbGljdC9tZXJnZSwgYW5kIFdvcmxkS2VybmVsIGludGVncmF0aW9uIHJlbWFpbiB1bmltcGxlbWVudGVkLiBQcm92aWRlciBydW4gMjMgcmVtYWlucyBzdG9wcGVkOyBubyBwcm92aWRlciBvciBmYW50YXN5LW5ld3NwYXBlciBhY2NlcHRhbmNlIGlzIGNsYWltZWQuIiwgInN0YXR1cyI6ICJvayIsICJ0cyI6ICIyMDI2LTA4LTI4VDAwOjQ1OjAyKzAwOjAwIiwgInR5cGUiOiAidmVyaWZpY2F0aW9uIn0=", "stored_at": "2026-08-28T00:45:02.928339+00:00", "type": "ghostlight.evidence_record.v0"}
|
||||
{"key": "2026-08-28T004707Z0000-0171-d3e19f6efd7f", "payload": "eyJub3RlIjogIkNvcnJlY3RzIHR3byBjbGFpbXMgaW4gdGhlIGltbWVkaWF0ZWx5IHByZWNlZGluZyBwb3N0LXZlcmlmaWNhdGlvbiByZWNvcmQuIFRoZSBmdWxsIGdob3N0bGlnaHQtZHVuZ2VvbiBsaWJyYXJ5IHN1aXRlIG5vdyBwYXNzZXMgNDE4IHRlc3RzLCBub3QgNDE3LiBFbGFib3JhdG9yIGFsbG9jYXRpb24gaXMgYWdhaW5zdCB0aGUgY29tcGxldGUgZW5hYmxlZCBwcm9maWxlLCBub3QgcmVub3JtYWxpemVkIGFjcm9zcyBjdXJyZW50bHkgZWxpZ2libGUgdGl0bGVzOiBzY2hlZHVsZWQgc2hhcmVzIGZvciBibG9ja2VkIG9yIGluZWxpZ2libGUgdGl0bGVzIHJlbWFpbiB2aXNpYmx5IHVudXNlZCB3aXRoIG5vIHJlZGlzdHJpYnV0aW9uIG9yIGNhdGNoLXVwIGRlYnQuIEZvciBQYXRpbmEgMjAgYW5kIGJsb2NrZWQgVGFuZ2xlIDgwLCBhIDEwMC1zbG90IGJ1ZGdldCBpbnZva2VzIFBhdGluYSAyMCB0aW1lcyBhbmQgcmVjb3JkcyA4MCB1bnVzZWQgc2xvdHMuIEFsbCBvdGhlciBvd25lcnNoaXAsIG1pc3NpbmcgY2Fub25pY2FsLWludGVncmF0aW9uLCBzdG9wcGVkIHJ1bi0yMywgYW5kIG5vbi1hY2NlcHRhbmNlIGNsYWltcyByZW1haW4gdW5jaGFuZ2VkLiIsICJzdGF0dXMiOiAib2siLCAidHMiOiAiMjAyNi0wOC0yOFQwMDo0NzowNyswMDowMCIsICJ0eXBlIjogImNvcnJlY3Rpb24ifQ==", "stored_at": "2026-08-28T00:47:07.037174+00:00", "type": "ghostlight.evidence_record.v0"}
|
||||
{"key": "2026-08-28T011847Z0000-0172-d239fd681a50", "payload": "eyJub3RlIjogIkZpbmFsIGxvY2FsIHBvc3QtYXVkaXQgYm91bmRhcnk6IGFsbCA0MTkgZ2hvc3RsaWdodC1kdW5nZW9uIGxpYnJhcnkgdGVzdHMgcGFzcywgYW5kIHRoZSBzZWNvbmQgYm91bmRlZCBNb2RlbGluZyBhdWRpdCByZXBvcnRzIG5vIFAxIG9yIFAyIGlzc3VlLiBTaGFyZWQgY2F1c2FsX3NvdXJjZV9pZHMgYmluZCBhY3RvciBhbmQgY2VsbCBQcm9qZWN0b3ItdG8tUGVyc29uYS10by1JbnRlcnByZXRlciBjaGFpbnMuIE1pc3NpbmcgY2VsbC1kZWNpc2lvbiByZWNvdmVyeSByZXVzZXMgb25lIGV4YWN0IENlbGxQcm9qZWN0ZWRNb21lbnQ6IG9uZSBQcm9qZWN0b3IgY2FsbCwgdHdvIFBlcnNvbmEgYXR0ZW1wdHMsIHR3byBJbnRlcnByZXRlciBhdHRlbXB0cywgd2l0aCBlYWNoIHNlY29uZCBhdHRlbXB0IGNpdGluZyB0aGUgZmlyc3QuIEludGVycHJldGVyIGRyYWZ0IGFkbWlzc2lvbiByZWplY3RzIHdob2xlIHJlc3VibWlzc2lvbiBhbmQgdW5yZWxhdGVkIGRlY2lzaW9uIGVkaXRzOyBkZWFkIHNjaGVkdWxlciByZXRyeSB0cmFjZSBmaWVsZHMgYXJlIHJlbW92ZWQuIEV2ZXJ5IGVsYWJvcmF0aW9uIGludm9jYXRpb24gYW5kIHByb3Bvc2FsIG5vdyBjYXJyaWVzIEVsYWJvcmF0aW9uV2F2ZUJpbmRpbmcuIFR5cGVkIG9yZGluYXJ5LWVycm9yIGFuZCB0YXNrLXBhbmljL2NhbmNlbGxhdGlvbiBmYWlsdXJlcyByZXRhaW4gdGhlIGNvbnN1bWVkIHNjaGVkdWxlLCBjb21wbGV0ZWQgaW52b2NhdGlvbnMsIGFuZCBleGFjdCBmYWlsZWQgZGlzcGF0Y2ggdGhyb3VnaCB0YXNrLUlEIG1hcHBpbmcuIENvbXBsZXRlLXByb2ZpbGUgcHJvcG9ydGlvbmFsIGFsbG9jYXRpb24gYW5kIHZpc2libHkgdW51c2VkIGJsb2NrZWQgc2hhcmVzIHJlbWFpbiB1bmNoYW5nZWQuIFdvcmxkLWRvbWFpbiBlbGFib3JhdGlvbiBwcm9wb3NhbC9hZG1pc3Npb24vY29uZmxpY3QvbWVyZ2UgYW5kIFdvcmxkS2VybmVsIGludGVncmF0aW9uIHJlbWFpbiB1bmltcGxlbWVudGVkOyBwcm92aWRlciBydW4gMjMgcmVtYWlucyBzdG9wcGVkIGFuZCBubyBwcm92aWRlciBvciBmYW50YXN5LW5ld3NwYXBlciBhY2NlcHRhbmNlIGlzIGNsYWltZWQuIiwgInN0YXR1cyI6ICJvayIsICJ0cyI6ICIyMDI2LTA4LTI4VDAxOjE4OjQ3KzAwOjAwIiwgInR5cGUiOiAidmVyaWZpY2F0aW9uIn0=", "stored_at": "2026-08-28T01:18:47.318353+00:00", "type": "ghostlight.evidence_record.v0"}
|
||||
|
|
|
|||
|
|
@ -323,6 +323,6 @@ 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 exposes a grounded newspaper projection over committed public events. Local acceptance proves 1,000 subjects across 200 cells and two-wave durable named-person emergence, but fantasy-newspaper presentation remains unaccepted. Exact-source run 21 terminated during the second of four locality elaborations at `loc:pump_house`; one elaboration committed, zero strategic waves ran, and both bounded Terra reconciliation actions still produced facts rejected by ordinary namespace validation. No newspaper or completed result-root manifest exists. The unchanged run is archived at `F:\GameCult\GhostlightDungeon\acceptance\elven-realms-autonomous-965c9fa-21.tar`, SHA-256 `2f4d48d47acd3733c99ab8899427e1d33bd4b5cde93da52efa67a3baf98da8e3`. Commit `842e265f2969d7047e6b2a35fcca7cc371de5c6b` replaces compiler-owned reconciliation retries with a hand-rolled, provider-neutral model-agent harness above `ModelPort`; the harness owns bounded observe/action/tool-result steps and causal receipts, while the destination adapter applies the complete candidate, uses one canonical fact-namespace checker, lowers through the ordinary path, and asks a fresh one-shot civic verifier. WorldKernel admission remains final. The focused regression proves an initial exact fact collision, a different first Terra collision, the resulting typed tool finding, a corrected second action, and fresh-verifier acceptance while institution identity remains frozen. All 411 library tests pass, and the Modeling re-audit found the transport, harness, destination adapter, and kernel boundaries coherent. The strategic smoke binary builds, but this workstation selected its stale DeepSeek route and received HTTP 402 because it has neither the Codex Connector service nor a usable key; provider smoke is therefore pending on Yggdrasil, not locally accepted. Reconciliation is the first harness consumer. Patina remains a planned later consumer whose typed tools may add durable, locally grounded low-stakes texture that later events can reuse; no Patina implementation or acceptance is claimed. The live Ghostlight daemon is not the test body. Dungeon play remains regression pressure, the Delvehold game-side adapter remains unimplemented, and unpublished Mars and Kalsa destination previews remain unapproved.
|
||||
next_action: Commit and push this phase-boundary Mind update with implementation commit `842e265`, then run the exact source on Yggdrasil through Codex Connector. Require four locality elaborations, six committed strategic waves, and an immutable artifact manifest. Only then send the strongest unedited page to separate blind editorial and grounding audits. Do not treat the local DeepSeek HTTP 402 as a harness failure or claim provider acceptance before the Yggdrasil run and both review gates pass.
|
||||
summary: Ghostlight's generic consumer boundary admits sparse WorldSeeds, runs the hundreds-class parallel cell machinery used by Dungeon, and exposes a grounded newspaper projection over committed public events. Local acceptance proves 1,000 subjects across 200 cells and two-wave durable named-person emergence, but fantasy-newspaper presentation remains unaccepted. Commit `842e265f2969d7047e6b2a35fcca7cc371de5c6b` introduced the provider-neutral model-agent harness, and pushed commit `c757e5a09d884d263ae3533f537a71ce69010e94` separates model-causal ancestry from canonical admission evidence after run 22 reached semantic acceptance and failed only at WorldKernel evidence admission. The current verified working tree extends that harness into the strategic Interpreter: shared `causal_source_ids` bind both actor and cell Projector-to-Persona-to-Interpreter chains; the agent incrementally edits one private frozen-decision draft; deterministic compilation owns structure and authority; the independent semantic verifier returns subject-scoped findings; and unchanged accepted actions retain their binding. Missing cell decisions reuse one exact `CellProjectedMoment`: one Projector call feeds two Persona and two Interpreter attempts, and the second attempts cite the first. Draft admission rejects whole resubmission and edits to unrelated decisions; dead scheduler retry trace fields are removed. A typed eight-title elaborator catalog includes Patina, Charter, Ledger, Hearth, Tangle, Veil, Ember, and Numen; persisted profile weights allocate the complete enabled-profile budget. Ineligible or blocked scheduled slots remain visibly unused instead of being redistributed or accruing catch-up debt. Every invocation and proposal carries an `ElaborationWaveBinding`; bounded parallel execution returns deterministic ordinal results, while typed ordinary-error and task-panic/cancellation failures retain the consumed schedule, completed invocations, and exact failed dispatch through task-ID mapping. All 419 library tests pass, and the second bounded Modeling audit found no P1 or P2 issue. This is still control-plane and proposal machinery only: world-domain elaboration proposal types, admission/conflict/merge ownership, and integration of accepted elaboration into canonical WorldKernel state remain unimplemented. Patina exists as a named weighted control and schedulable sub-agent title, not as a canonical world writer or an end-to-end admitted elaborator. Provider run 23 remains stopped; no new provider or newspaper acceptance is claimed. The live Ghostlight daemon is not the test body. Dungeon play remains regression pressure, the Delvehold game-side adapter remains unimplemented, and unpublished Mars and Kalsa destination previews remain unapproved.
|
||||
next_action: Commit and push the verified agentic Interpreter plus elaboration scheduling cut, then map and implement the missing world-domain elaboration proposal, deterministic admission/conflict/merge boundary, and canonical WorldKernel integration without granting any titled worker commit authority. Keep provider run 23 stopped until that domain path is verified. Then resume the four-elaboration/six-wave Codex Connector acceptance run and require an immutable manifest plus separate blind editorial and grounding audits.
|
||||
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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue