- tools/groups.mjs evidence entries now name the exact test, a minimum assertion count and the calls its body must keep; groups.test.mjs checks all three. - tools/evidence.mjs parses the spec reporter log and fails the gate unless every registered evidence test ran and passed; test.sh runs it after the Node suite. - restart.test.mjs snapshots the live as-built world on the first server, then compares it to the post-SIGTERM/SIGKILL state (players connect before the GM, so the GM's derived encountered grey is computed on both sides). - Negative controls: a hollowed auth test fails the new evidence check; a planted first-load drop of a token's gm prop bucket fails the new restart baseline while the old restart-to-restart test passed. - Refresh the gate evidence (control + 73 mutations incl. s1-s7, 142 node tests).
117 lines
5.3 KiB
JavaScript
117 lines
5.3 KiB
JavaScript
// 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'],
|
|
evidence: [
|
|
{ file: 'tiles.test.mjs',
|
|
test: 'tile gate: leak check (d) matches the independent explored oracle',
|
|
minAsserts: 6, requires: ['oracle'] },
|
|
{ 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'] },
|
|
],
|
|
},
|
|
'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
|