Skip to content

Move tests to packages/server and add regtest infrastructure#1

Open
danielbodart wants to merge 1 commit intomasterfrom
claude/move-tests-to-server-KhEpC
Open

Move tests to packages/server and add regtest infrastructure#1
danielbodart wants to merge 1 commit intomasterfrom
claude/move-tests-to-server-KhEpC

Conversation

@danielbodart
Copy link
Member

  • Move tests/ directory to packages/server/tests/ where interpreters are built
  • Add regtest.py (from eblong.com/zarf/plotex/) with modifications for streaming
    RemGlk JSON protocol: read multiple JSON objects per turn, accumulate text
    across streaming updates, handle grid windows with missing lines, handle
    interpreter exit gracefully
  • Add run-regtest.sh test runner that maps game files to interpreters
    (.ulx->glulxe, .z5->bocfel, .hex->hugo) and supports native/wasm modes
  • Add ./run testServer command to run.ts for running regression tests
  • Add ** remformat: yes to regtest files that were missing it
  • Add python to mise.toml (required by regtest.py)
  • Pin zig to 0.14 (0.15 has build-breaking changes)
  • Increase text buffer from 8KB to 64KB and JSON output buffer from 32KB to
    128KB in protocol.zig/state.zig to handle large interpreter output

Test results: 3/6 pass (colossal.hex, coretest.hex, praxix.z5)
Known failures:

  • advent.ulx/z5 menu section: help sub-window content not sent over protocol
  • glulxercise: Unicode case conversion bug in interpreter

https://claude.ai/code/session_01JwXGWTcmp3LCT41CTvCitb

- Move tests/ directory to packages/server/tests/ where interpreters are built
- Add regtest.py (from eblong.com/zarf/plotex/) with modifications for streaming
  RemGlk JSON protocol: read multiple JSON objects per turn, accumulate text
  across streaming updates, handle grid windows with missing lines, handle
  interpreter exit gracefully
- Add run-regtest.sh test runner that maps game files to interpreters
  (.ulx->glulxe, .z5->bocfel, .hex->hugo) and supports native/wasm modes
- Add `./run testServer` command to run.ts for running regression tests
- Add `** remformat: yes` to regtest files that were missing it
- Add python to mise.toml (required by regtest.py)
- Pin zig to 0.14 (0.15 has build-breaking changes)
- Increase text buffer from 8KB to 64KB and JSON output buffer from 32KB to
  128KB in protocol.zig/state.zig to handle large interpreter output

Test results: 3/6 pass (colossal.hex, coretest.hex, praxix.z5)
Known failures:
- advent.ulx/z5 menu section: help sub-window content not sent over protocol
- glulxercise: Unicode case conversion bug in interpreter

https://claude.ai/code/session_01JwXGWTcmp3LCT41CTvCitb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants