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
@@ -15,6 +15,9 @@ if (track !== "rust" && track !== "ts") fail(`bad track in .course.json: ${track
|
||||
const mods = moduleDirs();
|
||||
const mod = mods.find((m) => m.num === num);
|
||||
if (!mod) fail(`no module ${num} in ${courseRoot()}`);
|
||||
if (!testFiles(mod.path, "rust").length && !testFiles(mod.path, "ts").length) {
|
||||
fail(`Module ${num} has no tests to start: it is made of reading and exercises. Open ${join(mod.path, "lesson.md")}.`);
|
||||
}
|
||||
|
||||
if (num !== "01") {
|
||||
const prevNum = String(Number(num) - 1).padStart(2, "0");
|
||||
|
||||
Reference in new issue
Block a user