// The nine M3 acceptance groups of DESIGN 13 (FIXED by owner decision #12) and the test that proves // each one. `devbox run test` runs every `tools/*.test.mjs`; this map is the checklist the finish // line (#25) records in DESIGN 14. // // #36: an evidence entry is not a title substring. It names the test's exact title (a `${...}` // placeholder marks a title the file builds per case), the minimum number of `assert.*` calls its // body must keep, and any distinctive call the body must keep executing. `tools/groups.test.mjs` // checks those against the source statically; the final step of `tools/test.sh` parses the Node // test runner's reporter output and fails unless every registered title actually ran and passed // (tools/evidence.mjs). A test hollowed out to its title, or one that is registered but never runs, // therefore fails the gate. export const GROUPS = { 'leak+fault': { // The transcript checker and its negative controls, plus the two Walls r1 harnesses whose // guarantees ride the same seam: the differential door equivalence (the `secretgap` control, // #56) and the player marker group (#59/#60). #61's scenario rewrite keeps all of them green. files: ['leak.test.mjs', 'fault.test.mjs', 'doors.test.mjs', 'markers.test.mjs'], evidence: [ { file: 'leak.test.mjs', test: "leak test ${subject}: the subject's whole view matches the GM's truth", minTests: 2, minAsserts: 8, requires: ['runChecker(transcript, subject)'] }, { file: 'fault.test.mjs', test: "fault ${fault}: caught as exactly ${expected.join(' ')}", minAsserts: 2, requires: ['classesOf(check.output)'] }, { file: 'doors.test.mjs', test: 'fault secretgap: the equivalence group fails as exactly SECRETGAP', minAsserts: 1, requires: ["equivalenceClasses(a, b), ['SECRETGAP']"] }, { file: 'markers.test.mjs', test: 'retraction: every cause sends del only, a re-earned marker gets a fresh id (#60)', minAsserts: 12, requires: ['assertMarkerShape(seen)'] }, ], }, tiles: { files: ['tiles.test.mjs', 'oneway.test.mjs', 'import.test.mjs'], evidence: [ { file: 'tiles.test.mjs', test: 'tile gate: leak check (d) matches the independent explored oracle', minAsserts: 6, requires: ['oracle'] }, // #65: off the global lock, and revocation/restart at the gate seam. { file: 'tiles.test.mjs', test: 'tile gate: a burst is answered while a mutation holds the global lock (#65)', minAsserts: 4, requires: ['elapsed < 700'] }, { file: 'tiles.test.mjs', test: 'tile gate: revocation is immediate and sessions survive a restart (#65)', minAsserts: 6, requires: ['rawUpgrade'] }, // #79: the map import CLI writes the tree this gate parses, and a restarted server serves it. { file: 'import.test.mjs', test: 'map import CLI: a fixture slices into v1 tiles, the scene row and a 200 through the gate', minAsserts: 12, requires: ['runImport'] }, { file: 'oneway.test.mjs', test: 'one-way sight: the blind side sees nothing across, the seeing side does (#58)', minAsserts: 12, requires: ['withOneWayStack'] }, ], }, probing: { files: ['probing.test.mjs'], evidence: [ { file: 'probing.test.mjs', test: 'probing over WS: walls beyond cap + radius change no reply', minAsserts: 3, requires: ['assert.deepEqual(shape(ra), shape(rb)'] }, ], }, protocol: { files: ['protocol.test.mjs'], evidence: [ { file: 'protocol.test.mjs', test: 'an unknown type is refused, unknown fields are ignored, and every intent gets one ack', minAsserts: 6, requires: ['assert.equal'] }, ], }, auth: { files: ['auth.test.mjs'], evidence: [ { file: 'auth.test.mjs', test: 'key.replace: old key and old sessions die, live connections close, the new key works', minAsserts: 6, requires: ['assert.notEqual'] }, // #65: the session cache's negative control. A fault that keeps the revoked entry alive must // make the revocation assertion above fail (here: 101 where the clean build answers 401). { file: 'auth.test.mjs', test: 'fault sessioncache: a revoked session kept alive fails the authentication group', minAsserts: 3, requires: ['rawUpgrade'] }, ], }, 'characters and names': { files: ['characters.test.mjs'], evidence: [ { file: 'characters.test.mjs', test: 'encountered: a sighting is kept under the name the player knows, and survives everything', minAsserts: 8, requires: ['encountered'] }, ], }, restart: { files: ['restart.test.mjs'], evidence: [ // #36: both variants take the baseline from the first (as-built) server, before the signal; // the thin wrappers must keep calling the only code path that can prove it. { file: 'restart.test.mjs', test: 'restart: full state, all CRUD, before and after SIGTERM', minAsserts: 0, requires: ['restartGroup(false)'] }, { file: 'restart.test.mjs', test: 'restart: full state, all CRUD, before and after SIGKILL', minAsserts: 0, requires: ['restartGroup(true)'] }, ], }, persistence: { // The schema-7 fixture driven through the real binary (migration mapping, explored round trip) // plus the behaviour-preservation pair: migrated walls vs the same walls authored through // `wall.add`, byte-identical to a player (stories 29/30/77, #52). files: ['persistence.test.mjs', 'wallbehaviour.test.mjs'], evidence: [ { file: 'persistence.test.mjs', test: 'explored round trip: a fresh connection gets the whole grid the server accumulated', minAsserts: 3, requires: ['exploredSnapshot(s.origin, alice)'] }, { file: 'persistence.test.mjs', test: 'migration: a schema-4 DB (fixture) migrates under the real binary to the latest schema', minAsserts: 6, requires: ['assert.equal'] }, { file: 'wallbehaviour.test.mjs', test: 'behaviour preservation: a migrated schema-7 scene and the same scene authored via raw switches are byte-identical to a player', minAsserts: 2, requires: ['assert.deepEqual'] }, ], }, logs: { files: ['logs.test.mjs'], evidence: [ { file: 'logs.test.mjs', test: 'logs: no key, session cookie or session hash reaches the log', minAsserts: 8, requires: ['assert.equal'] }, ], }, } export const GROUP_COUNT = 9