Repository navigation
Conversation
The lifted game as the checker (A), the language (B), the game pushed (C). A0 ran the same day: every probe plays headless in scm-sim's lifted game. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y line - python/trigscript.py, with the triggerMap setting: every trigger tagged with the statement it was lowered from (or eudplib's function, or "eudplib"), and its place in the payload logged once laid out. Off by default; a build without it is unchanged. - scripts/build-fixture.mts: TRIGGER_MAP=1 writes <map>.triggers.json, from eudplib's log read whole from a file. - compiler/allowlist.ts: the allowlist's shape and checkTrace, byte by byte under each access's mask; findings by line, gravest first, said in words. - data/allowlist.json from scripts/allowlist.mts: Magenta's catalogue, three failures seen in the game, and what the 15 played probes touched. - scripts/game-check.mts: build, play in scm-sim's lifted game, check. - docs/v4-plan.md: A1 as built. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Kill Unit, Kill Unit At Location, a unit's kill() and hit points brought to 0 by damage() or a write all counted a death in the simulator. The lifted game counts none of them: only a unit that dies in the game, shot or killed by a spell, is a death (the editor's trigger reference, checked in the game, says the same of Kill Unit). Found by the first tests run in the lifted game. sim.kill() in a test stays a fight, and still counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- compiler/gameSim.ts: GameSim, the world a test is handed in the game, over a GameHandle the host supplies (scm-sim's testGame); place, kill (counted as a fight by the game's own routine), remove, give and move through the game's trigger actions and a scratch location; keys and the mouse as the local machine's memory; a typed line as the chat command; every read from memory. readLocations: the map's locations once eudplib has put them right. - compiler/testing.ts: TestWorldLike and a brand both worlds carry; TestRunOptions.makeWorld. - compiler/gameTests.ts + dist/gametest.js: the compile's JavaScript (CompileResult.modules) run again beside the game, without TypeScript. - scripts/test-game.mts: each test in the game and in the simulator, said twice; probes/game-tests.ts passes in both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run All Tests in the Game (Testing view and palette): the map built as Save builds it, exported whole, handed with dist/gametest.js's text and the compile's JavaScript to the scm-sim plugin's engine through its new test(); each test gets a second mark, "game", red where the two disagree, and the Test Results panel says what the game found. vendor/scmSim.ts is the part of the scm-sim contract TrigScript uses; it never imports the engine. docs/v4-plan.md: A2 as built — a test is not a program, the traps met, the simulator bug the first run found. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the editor Run All Tests in the Game was driven end to end in a built editor (scm-js main under /editor/, scm-sim's analysis page beside it, the local plugin builds): 4 of 5 passed in the game, the fifth — sim.program(), which the game cannot answer yet — shown as a disagreement. The game's mark now sits next to the simulator's icon, where a narrow sidebar still shows it, ringed when the two differ; the scm-sim plugin it needs is 0.9 (0.8.0 is out without test()). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lowering says where each program's variables are when the build asks it to (the variableMap setting): the address of every cell once eudplib has placed the payload, in TRIGSCRIPT-VARS / TRIGSCRIPT-PROGRAM lines of the build's log. compiler/gameVariables.ts reads those lines and reads a program's variables out of the game's memory as the simulator's lookup does, so GameSim answers sim.program(). Run All Tests in the Game and scripts/test-game.mts ask for the map; Output leaves those lines out. probes/game-program.ts passes in the game and the simulator; in a built editor all five tests of the end-to-end run pass in the game. The scm-sim plugin's test() ships in 0.10 (0.9.0 went out with the Replay view's zoom), and the message says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Moved to #3: this work now lives on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This starts TrigScript 4: the lifted 1.16.1 game (scm-sim) checks what TrigScript builds. A script's tests run in the game as well as in the simulator, and a run's memory accesses are checked against what Remastered allows, line by line. The plan, with an "As built" section for each slice, is
docs/v4-plan.md.A1: what a run touches, by line (Node only for now)
triggerMapsetting,python/trigscript.pylabels every trigger with the statement it came from, then logs where each one sits in the payload.data/allowlist.json(191 entries) lists what Remastered lets through. It comes from Magenta's catalogue, three failures seen in the real game, and the traces of the 15 played probes.compiler/allowlist.tschecks a run's trace against the allowlist, byte by byte under the mask, and names the address.scripts/game-check.mtsbuilds, plays and reports by line.A2: tests in the game
GameSim(compiler/gameSim.ts) gives a test the samesimas the simulator, driven through scm-sim's test handle:sim.program()reads a program's variables where the build says they are. With thevariableMapsetting the lowering logs each cell's address, andcompiler/gameVariables.tsreads them by the simulator's lookup rules.dist/gametest.jsruns the compile's JavaScript again beside the game. The plugin never loads it; it hands the text to the host.scripts/test-game.mtsprints the game and simulator results side by side.Simulator fix found by the game
u.kill()and hit points written to 0 counted a death in the simulator. The game counts none of them, and the editor's trigger reference agrees.World.gone(…, fought)), and three tests were corrected to the game's rule.Checked
probes/game-tests.tsandprobes/game-program.tspass in the game and the simulator.Depends on: jeany55/scm-sim#19 deployed to
/play/, and scm-js/plugin-scm-sim#13 released as 0.10.0. Without those the button says what's missing and does nothing else. The build-fixture scripts use scm-js/plugin-eudplib#1 for the log file.After merging: cut a release (4.0.0 per the plan, or a minor if A1's Node-only tools shouldn't count as 4.0), then pin it in scm-js.
🤖 Generated with Claude Code