Commit graph Aetheria/tests/Aetheria.Shared.Tests/VerseGrammarTests.cs
Author SHA1 Message Date
Meta Vens
859ecad83a verse-grammar apply: the grammar update builds a new record instead of editing the cached one; replace test compares fields
The command mutated the cache's own VerseGrammar before the batch upsert, so the upsert was redundant and two Soul
mutants (update branch dropped; Same ignoring description or render path) survived: the replace test judged the result
with the same Same() the command uses. The test now reads the fields. Unrun until the full job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 14:39:44 +02:00
Meta Vens
c5e8e45e61 VerseGrammarTests: Author keeps its own grammar parameter (6c1b448c renamed it too; the test project did not compile)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 14:05:04 +02:00
Meta Vens
6c1b448c0e VerseGrammarTests: RootWith parameter does not shadow the loop variable (972848cb did not compile the test project)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 14:03:57 +02:00
Meta Vens
972848cb5f VerseGrammar: Open refuses a role named actor and two verbs with one name; edge and command-update pins
ValidateAll (one owner, called by AetheriaStores.Open) refuses duplicate verb names; Validate refuses the reserved role
name actor. Tests pin the name-class edges (a z 0 9 _), a null role element, the starter verb replaced when only its
description or render path differs, the grammar global updated in place, and the fixture's second allegiance and zero-role
speak. The test's scoped registry is TestCatalog.Registry(). Builds; unverified until the full run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 14:02:10 +02:00
Meta Vens
b772b13d43 VerseGrammarValidation: canonical names by character class, not Regex
The Regex form could not be mutated on the verification path (the mutant runner collapsed its backslashes), and a
character loop with named length constants states the same rule without the dependency. Adds refusals for a capital
inside a name, a hyphen, and a direct empty-name case. Builds (not yet run when committed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:21:11 +02:00
Meta Vens
0b721d691f Tests: the VerseGrammar global replaces TestCatalogGlobal as the catalog global fixtures author
TestCatalogGlobal existed only to give the test host one [CultGlobal] routed to the catalog. VerseGrammar is the
game's first, so the test-only type is deleted and every fixture authors a VerseGrammar instead (63 call sites; the
missing-global tests assert on aetheria.verse_grammar). Stale comments about the test type are rewritten.
Builds (not yet run when committed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 07:18:00 +02:00
Meta Vens
02145a105c VerseGrammarTests: fixed record keys go through a batch (previous commit did not build)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:43:22 +02:00
Meta Vens
d382d4e062 VerseGrammarTests: the fixture writer is deterministic in content, not bytes
CultCache mints a random record key and a wall-clock storedAt per write, so two writes never match byte for byte.
The writer now fixes every record key and the test compares what a reader consumes (schema, key, content) across two
writes. Builds; the shipped-catalog test still fails at this commit because the catalog lands in the next one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:35:44 +02:00
Meta Vens
623072c711 Verse grammar: VerseGrammar and VerseVerb catalog documents, validation, the verse-grammar AetherDb command, tests
Adds the aetheria.verse_grammar global and aetheria.verse_verb documents (one render path per verb, typed
participant roles), VerseGrammarValidation run by AetheriaStores.Open over every verb, the AetherDb
'verse-grammar [apply]' command (starter set: one ship-action verb per TaskType plus speak; question
verse-social-verbs default speak-only), and VerseGrammarTests with a deterministic fixture writer.

The shipped catalog does not carry the grammar yet: it lands in the next commit, so
The_shipped_catalog_holds_revision_one_and_the_seven_starter_verbs fails at this commit. Not yet built when committed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:23:01 +02:00