Commit graph

1,388 commits

Author SHA1 Message Date
Meta Vens
3eb59068c7 grammar-reader fix 1: canonical keys through the one predicate, duplicate factions refused, bin/ext growth tolerated, guards pinned
The reader mints every faction and allegiance ImportKey and refuses a
non-canonical one as a typed NonCanonicalKey naming record and field (0 or 12);
two faction rows under one record key are DuplicateFaction. Payloads decode
through rmpv so a MessagePack bin or ext cell at a higher key (C# byte[],
DateTime) no longer fails the record. Tests pin the record-key sort and a
non-map Allegiance. Schema-version check (item 2) not done: CultLib gap.
All commits build (not yet run; the suite runs next).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 01:13:17 +02:00
Meta Vens
b5edc05b1f grammar-reader: pin every referent code (Person and Population arms survived mutation)
The Aetheria-written fixture binds only Faction, Cargo and Place, so mutants
deleting the Person and Population arms survived. The new test authors each
code at the role's key and reads it back as its own kind. Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 00:14:50 +02:00
Meta Vens
84b8e3d6d5 grammar-reader: read Aetheria's catalog into a GrammarBinding and keyed factions
read_aetheria_catalog opens the catalog read-only, mirrors
aetheria.verse_grammar, aetheria.verse_verb and aetheria.faction by integer
key, and refuses unknown enums, bad verb or role names and a missing grammar
by record key. Fixture written by Aetheria's own fixture writer at master
92b82e9a (provenance beside it). Also the NFD/NFC position sweep for import
keys. Not yet built or run when committed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 23:25:47 +02:00
Meta Vens
c3e16a57c2 Merge ghostlight-verse/import-key 2026-10-10 22:56:19 +02:00
Meta Vens
f167683e8d Merge ghostlight-verse/call-record 2026-10-10 22:56:15 +02:00
Meta Vens
308169ac51 call-record: pin all fifteen keyed fields of the replay key
The replay-key test now covers schema_id, reasoning_summary,
output_format_name, tool_choice and prompt_cache_key beside the ten it
had, over a Vec so a future keyed field is one more row. Tests only;
every commit builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 22:31:20 +02:00
Meta Vens
4126c83eff ghostlight import-key: pin whole-record NFC and the admit_resolved duplicate backstop
Tests only, no production change. Both build. A late NFD sequence and a
late format character in a long lore-shaped path kill an is_nfc-on-prefix
mutant; a resolved effect carrying two subjects with one key kills a
fresh declared set in admit_resolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 22:14:01 +02:00
Meta Vens
ecff1ac25b Call record tests: resumed and exact-cap cases keep one cap per run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 20:46:21 +02:00
Meta Vens
e651d9e863 Call record: fix the moved ledger borrow (previous commit does not build)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 20:33:27 +02:00
Meta Vens
2c5eb95da3 Call record: ledger carries cap and starting world; replay refuses another world
The run ledger is the one owner of what a run began as: its cap and the
world id and state digest it started from. Replay takes the store, the run
and a restored world and refuses a different world up front with a typed
error naming the field. Restores the decode checks the ledger rules do not
imply, makes the replay key an exhaustive destructure, and pins the
over-bound edge. Not yet built or tested at this commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 20:32:17 +02:00
Meta Vens
ee174c68ce Ghostlight import key: behavioural tests for the canonical spelling and the state gate
Soul's forgeries shaped as real keys (NFC vs NFD, ZWSP, NUL, BOM, RLO, BEL,
double space, tab, NBSP), a lore path with spaces admitted, and a loaded
state with a shared or malformed key refused. Test-only commit; builds if
the prior commit does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 20:09:08 +02:00
Meta Vens
1afd942be3 Ghostlight import key: one canonical predicate, one uniqueness function, state gate
The record key is canonical free text per ruling import-key-canonical-text
(NFC, no Cc/Cf, only U+0020 whitespace, no edge or doubled space). The
resolver, admit_resolved and verify_state_shape all call the same predicate
and import_key_fault; admit_resolved's second held-set iteration is deleted.
Adds unicode-normalization and unicode-properties. Not yet verified on
Yggdrasil; build status of this commit unproven.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 19:54:42 +02:00
Meta Vens
c750e21c2d Import key tests: a snapshot reader gets schema and record back separately
Test-only; compile-checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 17:46:46 +02:00
Meta Vens
e085286126 Import key: the door test checks Draft doors in Draft and Active doors in Active; held and declared keys are separate sets
Compile-checked; tests run in the next job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 17:27:14 +02:00
Meta Vens
525666f79b Import key tests: digest pin reads the msgpack the digest is taken over
Test-only; compile-checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 17:25:19 +02:00
Meta Vens
b8465e50d3 Import key: a subject names the record it came from, and admission keeps the mapping one-to-one
ImportKey (schema, record) rides SubjectDeclaration and SubjectState as an
optional field (serde default, skipped when None, so keyless worlds keep their
digests) and is exposed on SubjectSnapshot. resolve_patch, the one resolution
owner for genesis and the owner, consumer, Play and elaborator doors, refuses a
malformed key, a key declared twice in one patch, and a key any existing subject
holds, retired included. admit_resolved, the subjects map's only writer, holds
the same injectivity as an invariant. Typed mismatches name the handle only.

Compile-checked (cargo check --tests) on Starfire; tests not yet run, so no
claim that this commit's tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 17:23:26 +02:00
Meta Vens
8c9b88b519 call-record: drop two record-decode checks the ledger and density rules already make
A record with a run id that is no key segment has no readable ledger, and a
record at sequence zero fails the density rule at open; the two decode_row
conditions were equivalent mutants (cargo-mutants missed both). Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 17:22:02 +02:00
Meta Vens
327cbe3c5e Grammar door test: owner and consumer in Draft, Play and elaborator in Active
A consumer declares unanswered only in Draft, so it joins the owner there.
Test-only; builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 16:46:46 +02:00
Meta Vens
bd8dc756d9 WIP call-record fix1: run ledger owned by the store (does not build until verified)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 16:45:18 +02:00
Meta Vens
fbd8bdb8ca Grammar door tests: owner is checked in Draft, the other doors in Active; distinct kinds in the forged-effect test
The owner declares unanswered only in Draft, and the forged-effect twin refuses
a kind the world already holds. Test-only; builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 16:44:06 +02:00
Meta Vens
e5ae6fe7af Grammar check has one owner; pin later-revision doors and the speak render path
GrammarBinding::refusal is the single grammar predicate. The resolver maps it
to Mismatch, and admit_resolved (the catalog's only writer, reached by
apply_effect) maps it to an Invariant error, so an effect resolved elsewhere
cannot install an out-of-grammar entry. The speak entry must also be bound as
a Conversation verb (Mismatch::SpeakRenderPathDisagreesWithGrammar).

Tests: owner, play, consumer and elaborator doors refuse kind and role
signature after the revision has moved past genesis; speak bound as ShipAction
is refused at bind; apply_effect refuses a forged effect.

Builds (cargo check --tests, Starfire compile only). Merge of origin/main
8d263bb was mechanical (no conflicts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 16:40:33 +02:00
Meta Vens
c11e8a16ba Merge origin/main into grammar-binding 2026-10-10 16:35:54 +02:00
Meta Vens
2e9905f42f Verse call records: the in-flight test cannot hang when the first call is refused
Two reserve mutants timed out because the test spun waiting for a call a
mutant had refused. The wait is now bounded and fails. Builds: yes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 15:39:15 +02:00
Meta Vens
f74dec6675 Verse call records: kill the first mutation round's survivors
The in-memory run tally no longer counts rows (only open used it); the store
test pins a record whose run id is not a key segment; the lend_tool_results
forwarding has a test; the in-flight test fails by timeout instead of hanging
when a held call is let through. Builds: yes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 14:54:33 +02:00
Meta Vens
e28bf3fd55 Verse call records: a recording port owns the run's spend, a replay port serves the stored responses
ProviderCallRecord (ghostlight.verse_provider_call.v1) keyed (run id, sequence),
CallRecordStore over an owned redb CultCache file, RecordingInferencePort
(bound check before the call, real usage charged after, record written before
the output returns) and ReplayInferencePort. InferenceFaultClass gains
BudgetExhausted. Not yet compiled or run: this commit may not build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 14:02:48 +02:00
Meta Vens
b2447e4f99 Hosted lane tests: pin DEL (0x7f) as a key byte that cannot ride a header
Follow-up hosted-key-del-pin: a mutant allowing DEL survived the key-shape
test. The case list gains an interior DEL. Builds: yes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 13:56:43 +02:00
Meta Vens
8d263bb60e Hosted lane: pin the key shape rule and the absent prompt count
Adds hosted_binding_refuses_a_key_shape_that_cannot_ride_a_header (interior
newline, CR, tab, NUL, leading space, trailing space, non-ASCII, leading
newline; typed refusal at open, no key or path echoed) and the missing
prompt_tokens half of the usage-absence test. Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:48:31 +02:00
Meta Vens
b0f57a009b Hosted lane: refuse a key that cannot ride a header at open; a null usage count is an integrity violation again
key-shape-late-fault: the key must be one run of visible ASCII after the trailing
newline is stripped; an interior newline, whitespace, control or non-ASCII byte
is refused at open with HostedKeyUnreadable, which names no value.
null-count-widened: a present-but-null prompt or completion count fails to
decode (BadReply, integrity violation) on both lanes as the local lane did
before the cut; only an absent count or absent usage is a typed absence.
Builds: yes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:56:19 +02:00
Meta Vens
74f3b7011f Bump controller_work rows to v18: the usage field changed the persisted shape (old-rows-not-canonical)
InferenceOutput gained a persisted usage field without a version bump, so a v17
row written before the cut was refused at open as not canonical. Rows now bump
to v18 the way the v16 -> v17 bump did: the earlier version is refused at open
with the store's named fault, not migrated; the recipe slot, its drift check and
the ontology doc move with it. The earlier-version refusal test now pins v17.
Builds: yes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:56:19 +02:00
Meta Vens
b3d5843e71 Hosted lane: key-file test cases get their own files; overlapping hosted claims route longest-first
The empty, newline-only and padded key cases all pointed at one file that the
last write replaced, so the production empty-key check was never exercised
(cargo-mutants survivor 544:23).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 07:57:19 +02:00
Meta Vens
aef08ce3a6 Grammar tests: declare speech-carrying entries so the resolver does not refuse them as inert
Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 07:00:01 +02:00
Meta Vens
f178684391 Bind a grammar to a world at creation and refuse what it lacks
CreateWorld gains an optional GrammarBinding (schema id, revision, content
digest derived from the kind-sorted verbs, never caller-supplied). Genesis
installs it on the empty state, so resolve_patch checks the genesis patch and
every later AdmitPatch against it: an affordance kind the grammar lacks is
AffordanceKindNotInGrammar, a differing role signature (name, referent kind,
order) is AffordanceRolesDisagreeWithGrammar, and the kernel speak entry is
held to the same check. WorldSnapshot reports the grammar's identity and each
AffordanceSnapshot derives its render path from it. Worlds with no grammar
are unchanged: the field is absent from state and command bytes, pinned by a
journal written at base 367e2eb.

Builds: not verified on Yggdrasil yet at this commit (cargo check clean locally).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:43:49 +02:00
Meta Vens
831f10458e SDK lane test: token counts reach InferenceOutput (WIP, unverified)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:37:26 +02:00
Meta Vens
0d28508180 Hosted lane: the usage-absence test replays one prepared request (WIP, unverified)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:34:12 +02:00
Meta Vens
dd80e29484 Hosted lane: test call sites take the endpoint enum (WIP, unverified)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:27:18 +02:00
Meta Vens
7262e72a0d Hosted inference lane and token usage on every model reply (WIP, builds unverified)
The OpenAI-compatible port gains a hosted binding (https endpoint, bearer key
read once from a file); InferenceOutput carries Option<TokenUsage>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:22:14 +02:00
Meta Vens
367e2eb50f Vault root: read through an environment lookup, pinned by a test; fix stale seed comment; README says restart
seed_vault_root_from becomes seed_vault_root_from_environment(lookup): the
only place naming GHOSTLIGHT_SEED_VAULT_ROOT. Open passes std::env::var_os.
A test pins that the root comes from that variable only. The comment at the
bridge test's no-world.seed assertion names AppState.seed_vault_root.
README notes the root is read once at startup. Builds: all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 02:15:46 +02:00
Meta Vens
9f2904ffb8 Bridge fixture: re-captured from the real pinned lowering
Captured by running the drift test's own create/approve/activate/play walk
with a temporary, uncommitted patch that writes the regenerated intents
instead of comparing them (vendor/eve at 672c0c1). Only idempotencyKey and
issuedAt differ from the previous file; the drift test normalizes both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 02:00:03 +02:00
Meta Vens
ea8538761b Bridge test: run the first process on a blocking thread so the test runtime keeps serving
Joining the thread from the test body starved the world mailbox's owner task
and hung the test; spawn_blocking leaves the runtime free. Ignored test,
verified on Starfire.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:58:10 +02:00
Meta Vens
4f92840fe7 Bridge test: the first process is a runtime dropped after the turn opens
A second PlayTable over the same store cannot open while the first is alive
(the store takes an exclusive lock), so the first leg now runs on its own
runtime and dies with it, as a crashed process would. Does not run on the
stopgap (ignored test); verified on Starfire.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:46:43 +02:00
Meta Vens
8ca2c5556c Bridge test: take the world handle before the table closure so the fixture can move
The previous commit does not compile (E0505 in the ignored bridge test's
closure); this one fixes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:38:31 +02:00
Meta Vens
82a0c1b4f0 Play surface fixes: vault root lives in state, cleared optional labels mean none, bridge test drives typed and untouched Play
- AppState carries the seed vault root, read once at open through
  seed_vault_root_from (blank or whitespace is no configuration); tests no
  longer set or remove the environment variable.
- world.create treats a cleared persona or agent label as none, at the one
  place the payload becomes the kernel's intent.
- The real-client bridge test types text to open a turn, restarts over the
  same store, and continues the Running turn with an untouched Play box.

Builds. Bridge tests are ignored and run separately on Starfire.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:35:23 +02:00
Meta Vens
5b6796d1e6 Seed offer test: an empty vault root is no configuration
Builds when the verify job is green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:04:18 +02:00
Meta Vens
0c0e1c73db Untouched-form walk: an empty Play opening is the table's refusal, not a route payload error
The previous commit's walk expected acceptance; with no running turn the table refuses an empty opening, which is the proof the payload arrived. Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:04:05 +02:00
Meta Vens
c47a0785c9 Play surface: an untouched Play box submits an empty continue; seeding is offered only where a vault is configured (PA.f214, PA.f213)
world.play.text carries an authored value "" so the lowering sends text "" for a box left untouched. seed_vault_root() is the one reader of GHOSTLIGHT_SEED_VAULT_ROOT; the surface offers the seed controls, card and descriptor only when it answers, and seed_once reads its root through it. The committed bridge fixture drops its world.seed step, which the real client can no longer produce on an unconfigured server.

Not yet compiled when committed; verification follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:02:25 +02:00
Meta Vens
d79a96ede4 Merge remote-tracking branch 'origin/main' into ghostlight-verse/play-faults 2026-10-10 00:53:47 +02:00
Meta Vens
82a500eedb play-faults fix: every faulted-turn test pins the class on the warn line
The shared faulted-turn assertion now takes the expected class and checks the
warn line carries it (Connect, Timeout, BadReply, Status(404), Status(502)),
with the endpoint and reply canaries still absent. Not yet built or tested at
this commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 00:35:24 +02:00
Meta Vens
b64b61c345 play-faults fix: the warn line carries the fault's typed class, HTTP status included
close_with_fault now takes a TurnFault (detail plus InferenceFaultClass) and
logs the class beside the fixed detail, so a 404 and a 502 read differently
again. absorb_or_close hands the fault's class through; every non-inference
caller is Unclassified. The &'static str comment now says what it does and
does not guarantee (Box::leak defeats it; the per-port canary tests are the
backstop). Not yet built or tested at this commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 00:34:59 +02:00
Meta Vens
189d1d3c2b play-faults fix: the sidecar link errors carry no text
SidecarLinkError::Spawn and Codec held error text that the fault type now
refuses, leaving two never-read payloads; they are unit variants.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 23:40:12 +02:00
Meta Vens
97e39f48fd play-faults fix: bound the stalled-body test so a client that ignores its timeout fails it
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 23:36:51 +02:00