Keep branch secrets out of player approval

This commit is contained in:
Meta Vens 2026-08-18 20:00:36 +02:00
commit 85938884b8
8 changed files with 35 additions and 37 deletions

View file

@ -14,8 +14,8 @@ use ghostlight_dungeon::{
SuggestedOpenings, SuggestedRoles, WorldCompiler,
},
domain::{
ActionIntent, Campaign, FactScope, GestaltFissionPreview, NarrationProjection,
RegionExpansionPreview, RejectedProposalReceipt, WorldCommand, WorldCompilePreview,
ActionIntent, Campaign, GestaltFissionPreview, NarrationProjection, RegionExpansionPreview,
RejectedProposalReceipt, WorldCommand, WorldCompilePreview,
},
gestalt::GestaltPresencePlanner,
kernel::{CommandResult, KernelError},
@ -1315,19 +1315,6 @@ fn world_compile_preview_projection(preview: &WorldCompilePreview) -> serde_json
})
})
.collect::<Vec<_>>();
let branch_facts = campaign
.facts
.values()
.filter(|fact| fact.scope != FactScope::CanonBaseline)
.map(|fact| {
serde_json::json!({
"id":fact.id,
"scope":fact.scope,
"statement":fact.statement,
"discoverable_at_location_ids":fact.discoverable_at_location_ids,
})
})
.collect::<Vec<_>>();
serde_json::json!({
"schema":preview.schema,
"title":preview.title,
@ -1348,7 +1335,6 @@ fn world_compile_preview_projection(preview: &WorldCompilePreview) -> serde_json
"evidence_coverage":preview.evidence_coverage,
"gaps":preview.gaps,
"branch_assumptions":preview.branch_assumptions,
"branch_facts":branch_facts,
"requires_approval":preview.requires_approval,
})
}
@ -2460,6 +2446,16 @@ mod tests {
player
.relationships
.insert("hidden".into(), "distrust".into());
campaign.facts.insert(
"branch-secret".into(),
ghostlight_dungeon::domain::WorldFact {
id: "branch-secret".into(),
statement: "The apparent ally caused the disaster.".into(),
scope: ghostlight_dungeon::domain::FactScope::BranchLocal,
evidence_receipt_ids: vec![],
discoverable_at_location_ids: BTreeSet::from(["room".into()]),
},
);
let preview = WorldCompilePreview {
schema: "ghostlight.world_compile_preview.v1".into(),
title: "Approval preview".into(),
@ -2482,6 +2478,9 @@ mod tests {
"\"memories\":",
"\"relationships\":",
"\"model_receipts\":",
"\"branch_facts\":",
"branch-secret",
"The apparent ally caused the disaster.",
] {
assert!(!encoded.contains(private_key), "leaked {private_key}");
}

View file

@ -172,6 +172,13 @@ advance atomically while the player remains untouched. The scheduler does not
call the partitioner merely to discover an empty graph, and it retains the same
live-turn commit exclusion as model-backed waves.
Compiler approval is a player decision surface, not an operator spoiler
surface. It exposes topology, public cast, institutions, populations, clocks,
player-role capabilities, evidence coverage, gaps, and branch assumptions. It
does not project branch-local or provisional fact statements—even when they are
discoverable later. Those facts remain canonical inputs to knowledge-gated play
and operator inspection; the browser cannot reveal them before discovery.
`gestalt_migration` records a collective decision by one exact active leaf to
move along an explicit migration relation and reachable route. WorldKernel
changes the leaf's home location and agency-profile location together. The

View file

@ -107,6 +107,13 @@ through a deterministic kernel tick without a model call or fabricated Persona
cell. A regression proves two missed ticks advance time and the clock while
leaving the player byte-identical.
The compiler approval boundary no longer publishes branch-local or provisional
fact statements. Those are knowledge-gated world state, including facts that
may later be discovered at a visible location; showing them under an operator-
spoiler disclosure let the player bypass discovery before approving the seed.
The approval surface retains topology, cast, institutions, populations, clocks,
role capabilities, evidence coverage, gaps, and branch assumptions.
Multiplayer remains outside the current paid-alpha gate but is now an explicit
architectural intention. Do not fork the simulation into a multiplayer room
model. After the solo product and Gestalt agency are proven, extend campaign

View file

@ -89,3 +89,4 @@
{"ts":"2026-08-18T17:27:00Z","type":"deployment","status":"ok","branch":"codex/ghostlight-dungeon-mvp","note":"Starfire activated immutable GhostlightDungeon release 9367ad13292863ed3bf0159e4d5164b3ecb7d77d with executable SHA-256 043bc72b1e00257e5052d62fc071468ffd52945a4bb7a441a7c732313ec4ebe6. Active junction, manifest, binary hash, embedded typed-health commit, one persisted campaign, DeepSeek readiness, HTTP 401 for unauthenticated surface access, browser-rendered invite gate, and explicit stop/start recovery agree. Deployment first exposed that an Odin RUDP connection reset could terminate startup; release 9367ad1 demotes outbound rendezvous to best-effort replication while preserving the canonical local CultMesh projection, with a regression proving unavailable Odin cannot take away health or schema state."}
{"ts":"2026-08-18T17:40:00Z","type":"verification","status":"ok","branch":"codex/ghostlight-dungeon-mvp","note":"Forced provider-backed high-risk outcome witness transferred Dock Labor Guild's exact west winch rerouting plan to the colocated Harbor Neighbors. The strategic outcome resolver and independent semantic verifier each returned first-attempt-valid typed output against digest-bound same-snapshot requests; canonical campaign input remained byte-identical. The initial witness exposed a resource_recipient_id versus other_subject_id prompt/schema mismatch and spent one correction call. After the contract named the exact input-to-output mapping, the accepted rerun completed in 2.945 seconds with exactly two provider calls. Witness: F:\\GameCult\\GhostlightDungeon\\acceptance\\forced-high-risk-outcome-contract-fixed-20260818\\result.json."}
{"ts":"2026-08-18T17:47:00Z","type":"deployment","status":"ok","branch":"codex/ghostlight-dungeon-mvp","note":"Starfire release 0e4b8f4617840d45daec8a6451001192193ca5e0 passed authenticated HTTP and restart rehearsal. A newly rotated invite returned 200 once and 401 on replay; its session saw the compiler surface and empty owned-campaign list. The live opening endpoint returned exactly three pairwise-distinct eras, places, and pressures after the compiler gained one same-evidence semantic correction. A second session remained authenticated across an explicit daemon stop/start. Deployment then rotated back to exactly two unused tester invitations. Manifest and actual executable SHA-256 agree at 2aa75cfa57d5381f6fa1da8a454314efd00c52317cfc003f744bfad855bedf57. Witness: F:\\GameCult\\GhostlightDungeon\\acceptance\\authenticated-release-0e4b8f4-20260818\\result.json."}
{"ts":"2026-08-18T18:00:05Z","type":"verification","status":"ok","branch":"codex/ghostlight-dungeon-mvp","note":"Deployed release c7d950c9ae4f734caa7b8e1ab8e3e5e22826117e processed the real five-minute scheduler pulse for the persisted campaign with no active agency subjects. campaign.cc advanced at 17:59:44Z, exactly on the pulse; the prior 'agency graph has no active subjects' refusal did not recur. Local regression proves the same branch advances two overdue world/clock ticks without a model or resolution wave and leaves the player byte-identical. The scheduler still enters WorldKernel AdvanceStrategicTick and the live-turn commit gate."}

View file

@ -271,5 +271,5 @@ data_flow:
current_status:
summary: Starfire serves immutable release 0e4b8f4617840d45daec8a6451001192193ca5e0 with matching typed health, manifest, executable hash, active junction, persisted campaign, and DeepSeek readiness. A forced live high-risk outcome moved one exact population-owned resource through an independent causal verifier without mutating the input snapshot. The exact deployed auth rehearsal accepted a fresh invite once, rejected replay, served the compiler surface and campaign list, returned three pairwise-distinct grounded openings, preserved the session across restart, and then rotated cleanly back to two unused tester invitations. Invite rotation now clears old auth authority atomically; opening distinctness gets one same-evidence semantic correction.
next_action: Deploy the deterministic empty-agency scheduler cut. With explicit approval to transmit one temporary invite credential to the local in-app browser, complete the visual authenticated journey and inspect rendered opening controls. Then begin supervised human playtesting and treat confusion, composite consequences, or low dramatic yield as live evidence without weakening state admission.
next_action: Deploy the compiler-preview spoiler cut and verify the served bundle lacks branch-fact rendering. With explicit approval to transmit one temporary invite credential to the local in-app browser, complete the visual authenticated journey and inspect rendered opening controls. Then begin supervised human playtesting and treat confusion, composite consequences, or low dramatic yield as live evidence without weakening state admission.
gestalt_population: Gestalt Personas own shared population baselines; persistent member deltas own named individuality; WorldKernel materialization and approval-gated fission preserve lineage and identity. 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.

File diff suppressed because one or more lines are too long

2
web/dist/index.html vendored
View file

@ -1,5 +1,5 @@
<!doctype html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>GhostlightDungeon</title> <script type="module" crossorigin src="/assets/index-CicytASo.js"></script>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>GhostlightDungeon</title> <script type="module" crossorigin src="/assets/index-DmZm_kJC.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DLoOYHpE.css">
</head>
<body><header><p class="eyebrow">STARFIRE / PRIVATE VERSE</p><h1>GhostlightDungeon</h1><p id="status" role="status" aria-live="polite">Reading the world…</p></header><main>

View file

@ -198,22 +198,6 @@ async function showPreview(result: any) {
? `Evidence use: ${evidenceCounts.direct_seed ?? 0} direct · ${evidenceCounts.setting_background ?? 0} background · ${evidenceCounts.excluded ?? 0} excluded`
: "Evidence use: no retrieved sources were admitted to this seed.", "quiet"),
);
const branchFacts = Array.isArray(preview.branch_facts) ? preview.branch_facts : [];
const factDisclosure = node("details");
factDisclosure.append(node("summary", `Branch-local world facts (${branchFacts.length}) · contains operator spoilers`));
if (branchFacts.length) {
const list = node("ul");
for (const fact of branchFacts) {
const locations = Array.isArray(fact.discoverable_at_location_ids) && fact.discoverable_at_location_ids.length
? ` · discoverable at ${fact.discoverable_at_location_ids.join(", ")}`
: " · not directly discoverable";
list.append(node("li", `${fact.statement}${locations}`));
}
factDisclosure.append(list);
} else {
factDisclosure.append(node("p", "No branch-local facts are proposed."));
}
card.append(factDisclosure);
const approve = node("button", "Approve and enter");
approve.type = "button";
approve.addEventListener("click", async () => { await compilerPost(`/api/compiler/approve/${result.preview_id}`, {}); await refresh(); });