feat: Module 11 becomes 13; diff-tracks fuzzer; align the two reference tracks
- Rename course/11-break-your-engine to 13-break-your-engine and update every link and mention; start-module explains that Module 13 has no tests to start. - tools/diff-tracks.mjs (npm run diff:tracks): stages both references of a module, generates a seeded random SpellGrid level and script per seed, pipes it to the Rust and TypeScript CLIs and diffs their output; crashes on one or both sides fail. stagePlay takes a module number. - register_assembled: the TypeScript track compared only the text of an existing Assembled card, so a base re-registered with a new cost (or a different split) silently rewrote the earlier card. It now compares every field the engine reads, as Rust does (Modules 5-10). New test_05_assemble_never_rewrites_an_earlier_card. - SpellGrid CLIs: coordinates and chooser numbers are 1-9 plain digits in both tracks (Rust accepted signs, TypeScript accepted "+2", "0x2", "1e0"); Rust quotes card names verbatim instead of with Debug escapes; Rust joins the minion list with "; " instead of rewriting ", ". Two new CLI tests per track. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b36f4605cc
commit
06a1b34c5d
32 files changed
+645
-55
No files matched your search
@@ -98,3 +98,15 @@ test("start_module_00_not_startable", () => {
|
||||
assert.notEqual(r.code, 0);
|
||||
assert.match(r.out, /naive-engine/);
|
||||
});
|
||||
|
||||
test("start_module_explains_a_module_with_no_tests", () => {
|
||||
// A module made only of reading and exercises (Module 13): no tests for either track.
|
||||
const course = copyFixture("course");
|
||||
mkdirSync(join(course, "06-no-tests"));
|
||||
writeFileSync(join(course, "06-no-tests", "lesson.md"), "# Module 6\n");
|
||||
const ws = copyFixture("ws-start");
|
||||
const r = run("start-module.mjs", ["06", ws], { COURSE_ROOT: course });
|
||||
assert.equal(r.code, 1);
|
||||
assert.match(r.out, /Module 06 has no tests to start/);
|
||||
assert.doesNotMatch(r.out, /finish module/);
|
||||
});
|
||||
Reference in new issue
Block a user