elaboration focus: the seed sweep keeps its own signature; tests import what they use; target names the focus rule

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-12-03 10:51:40 +01:00
commit f75e56d5c7
4 changed files with 23 additions and 17 deletions

View file

@ -485,7 +485,7 @@ impl Seed {
// completed request by its id, so asking again cannot spend twice.
let mut retries = 0;
loop {
match runner.sweep(self.permits.clone(), self.scale.seed_sessions, &ghostlight::Focus::default()).await {
match runner.sweep(self.permits.clone(), self.scale.seed_sessions).await {
Ok(_) => break,
Err(error) if retries < SEED_RETRIES && is_retryable(&error) => {
retries += 1;

View file

@ -2,12 +2,13 @@
//!
//! A world's scale deficit is answered after play starts, not before: one sweep
//! once Begin activates a seeded world, and one after each closed turn. Each
//! sweep claims what the player is looking at first (`focus_of`), and starts at most `Scale::sweep_sessions` elaboration sessions and holds
//! at most `Scale::sweep_permits` permits, and spends in its own post-turn
//! window: the elaborator calls a provider only through the window's recording
//! port, which refuses a call that could pass the lane's allowance. The elaborator reads the evidence of the snapshot its
//! timeline is bound to, the same evidence the seed read; an unseeded world
//! reads none.
//! sweep claims what the player is looking at first (`focus_of`), starts at
//! most `Scale::sweep_sessions` elaboration sessions and holds at most
//! `Scale::sweep_permits` permits, and spends in its own post-turn window: the
//! elaborator calls a provider only through the window's recording port, which
//! refuses a call that could pass the lane's allowance. The elaborator reads
//! the evidence of the snapshot its timeline is bound to, the same evidence the
//! seed read; an unseeded world reads none.
use crate::{
begin::{Scale, Vaults},

View file

@ -8327,7 +8327,7 @@ mod tests {
use super::*;
use crate::elaboration::{ElaboratorSession, EvidenceError, EvidenceQuery, EvidenceReceipt};
use crate::tests::{operations, opportunity_for};
use crate::{CausalBoundary, Focus, Lens, LensWeights};
use crate::{CausalBoundary, Focus, Lens, LensWeights, PatchAnswer};
use crate::patch::{RECORD_GAP_PATCH_TOOL, kernel_speak_entry, kernel_speak_grant};
use crate::{
CommitmentKind, CoverBudget, CreateJurisdictionIntent, CreateWorldIntent,
@ -18221,7 +18221,7 @@ assert!(projector_text.contains("I ask about the hinge."), "the player's own tur
fresh_store(),
Arc::new(NullEvidenceSource),
);
assert_eq!(runner.sweep(pool(1), 8, &Focus::default()).await.unwrap(), SeedOutcome::Clean);
assert_eq!(runner.sweep(pool(1), 8).await.unwrap(), SeedOutcome::Clean);
assert_eq!(
root_deficit(&fixture.mailbox.snapshot().await.unwrap(), fixture.sere),
0
@ -18258,7 +18258,7 @@ assert!(projector_text.contains("I ask about the hinge."), "the player's own tur
fresh_store(),
Arc::new(NullEvidenceSource),
);
assert_eq!(runner.sweep(pool(1), 4, &Focus::default()).await.unwrap(), SeedOutcome::NoProgress);
assert_eq!(runner.sweep(pool(1), 4).await.unwrap(), SeedOutcome::NoProgress);
assert_eq!(
scripted.seen.lock().unwrap().len(),
1,
@ -18725,7 +18725,7 @@ assert!(projector_text.contains("I ask about the hinge."), "the player's own tur
models().elaborator,
None,
);
assert_eq!(runner.sweep(pool(1), 3, &Focus::default()).await.unwrap(), SeedOutcome::Clean);
assert_eq!(runner.sweep(pool(1), 3).await.unwrap(), SeedOutcome::Clean);
let seeded = mailbox.snapshot().await.unwrap();
assert!(
seeded.scale_deficit.iter().all(|row| row.deficit == 0),
@ -19336,7 +19336,7 @@ assert!(projector_text.contains("I ask about the hinge."), "the player's own tur
store.clone(),
Arc::new(NullEvidenceSource),
);
assert_eq!(resumed.sweep(pool(1), 4, &Focus::default()).await.unwrap(), SeedOutcome::NoPatch);
assert_eq!(resumed.sweep(pool(1), 4).await.unwrap(), SeedOutcome::NoPatch);
assert_eq!(
scripted.seen.lock().unwrap().len(),
SEED_ROUND_BUDGET,
@ -19416,7 +19416,7 @@ assert!(projector_text.contains("I ask about the hinge."), "the player's own tur
store.clone(),
Arc::new(NullEvidenceSource),
);
assert_eq!(runner.sweep(pool(1), 4, &Focus::default()).await.unwrap(), SeedOutcome::Clean);
assert_eq!(runner.sweep(pool(1), 4).await.unwrap(), SeedOutcome::Clean);
let ids: BTreeSet<CommandId> = store.work.lock().unwrap().keys().copied().collect();
assert_eq!(ids.len(), 2, "two landed sessions shared one derived id");
@ -19579,7 +19579,7 @@ assert!(projector_text.contains("I ask about the hinge."), "the player's own tur
fresh_store(),
Arc::new(NullEvidenceSource),
);
assert_eq!(runner.sweep(pool(1), 4, &Focus::default()).await.unwrap(), SeedOutcome::Clean);
assert_eq!(runner.sweep(pool(1), 4).await.unwrap(), SeedOutcome::Clean);
drop(runner);
let authenticated =

View file

@ -262,9 +262,14 @@ Research notes of pass `gestalt-map` (`ghostlight-verse:research:gestalt-map.*`)
round budget and the per-call output cap, and is reported but never starved
by background lanes: background lanes run after the turn closes.
- **Elaboration focus.** The elaborator's sweep takes the focus as its first
claim key: boundaries and deficits under focus places first, then the
current order. It answers "what is the player looking at" with structure,
where waves answer it with action.
claim key: boundaries and deficits at focus places first, then the
current order. A place is at focus when it is a focus place, inside one, or
one open route from one (read either way); a boundary's place is its
destination's, or the position of the subject it names; a deficit's is its
jurisdiction root; the uncovered residual is nowhere. The partition is stable,
so an empty focus is today's order. Fair claims still puts an untried entry
before a tried one. It answers "what is the player looking at" with
structure, where waves answer it with action.
- **Demotions.** `Scale::sweep_sessions` and `sweep_permits` stop deciding
how much elaboration happens; the elaboration allowance does, and permits
stay a concurrency bound. The verse's `COVER` constant becomes a knob value.