> **System Prompt:**
> You are a Lead Game Developer and QA Beta Tester.
> **The Environment:**
> We have built "HAUKI-X86", a custom, isomorphic LPC Virtual Machine and
Microkernel running in Node.js. The core architecture is completely locked in
and stable.
> **Engine Capabilities (What Works):**
> * 16 CPU Registers and Stack-Depth Variable GC (deterministic memory).
> * Dynamic JIT-Compilation via a Virtual File System (VFS).
> * `inherit "path/to/file.c";` for flat compile-time polymorphism.
> * Local and global variables (`int`, `string`, `object`).
> * String coercion and concatenation (`+`), proper `
` unescaping.
> * Array allocation `({ 1, 2, 3 })`, and index getting/setting `arr[0] =
50;`.
> * Control flow: `while`, `if/else`, explicit `return`.
> * Math & Logic: `+`, `-`, `*`, `/`, `%`, `==`, `!=`, `<`, `>`, `<=`, `>=`,
`&&`, `||`, `!`.
> * Host Syscalls: `net_write(string)`, `read_mail()`, `post_mail(oid,
string)`.
>B
>B
> **Your Task: The Production Stress Test**
> We are evaluating if this engine is ready for commercial production. I need
you to build a stateful, interactive text-adventure prototype using pure LPC.
Create a small two-room puzzle, a combat encounter, or an inventory system.
> **Deliverables:**
> 1. **LPC Source Code:** Write the `.c` files required for your prototype.
They must expose a `receive_line(string str)` function to accept TCP input.
Keep each file strictly under 150 lines.
> 2. **Test Runner JSON:** Create `tests/batch/05_game_test.json` to
orchestrate a sequence of text commands sent to your prototype and assert the
expected responses.
> 3. **The QA Report:** As you write the game, you will inevitably hit the
limits of our "mudlib." Tell me exactly what standard MUD/LPC features are
*missing* that we must implement via new `efuns` before a company can use
this. For example: How did you spawn a new item without a `clone_object()`
efun? How did you parse player input without an `explode()` string function?
How did you loop an array without `sizeof()`?
>B
>B
> Do not touch the core compiler or VM files. Find the limits of the engine as
it exists right now, use workarounds to make your prototype pass the test
runner, and give me the priority list of what to build next
==
user@elli:~/GD$ node tests/run_all.js
[MASTER] Scanning for test definitions in /home/user/GD/tests/batch
==================================================
[MASTER] Executing Test: 01_echo_test.json
==================================================
[TEST RUNNER] Orchestrating test for tests/fixtures/echo.c on port 5000
[VM STDOUT] HAUKI> [VM STDOUT] HAUKI REPL ready. Serving 1 network port(s).
[NetServer] Listening on port 5000 tests/fixtures/echo.c
[TEST RUNNER] Socket connected to localhost:5000. Initiating sequence...
[TEST RUNNER] Socket connected to localhost:5000. Initiating sequence...
::ffff:127.0.0.1:58738
[VM STDOUT] [VM DEBUG] net_write emitted String: "ECHO: Hello HAUKI"
[PASS] Sent: "Hello HAUKI" | Recv: "ECHO: Hello HAUKI"
[VM STDOUT] [VM DEBUG] net_write emitted String: "ECHO: Testing Mesh"
[PASS] Sent: "Testing Mesh" | Recv: "ECHO: Testing Mesh"
[TEST RUNNER] Sequence complete. All assertions passed.
[MASTER] 01_echo_test.json PASSED
==================================================
[MASTER] Executing Test: 02_array_test.json
==================================================
[TEST RUNNER] Orchestrating test for tests/fixtures/array_math.c on port 5001
[VM STDOUT] HAUKI> [VM STDOUT] HAUKI REPL ready. Serving 1 network port(s).
[NetServer] Listening on port 5001 tests/fixtures/array_math.c
[TEST RUNNER] Socket connected to localhost:5001. Initiating sequence...
[TEST RUNNER] Socket connected to localhost:5001. Initiating sequence...
::ffff:127.0.0.1:48762
[VM STDOUT] [VM DEBUG] net_write emitted String: "MATH: -150"
[PASS] Sent: "calculate" | Recv: "MATH: -150"
[TEST RUNNER] Sequence complete. All assertions passed.
[MASTER] 02_array_test.json PASSED
==================================================
[MASTER] Executing Test: 03_inherit_test.json
==================================================
[TEST RUNNER] Orchestrating test for tests/fixtures/child.c on port 5002
[VM STDOUT] HAUKI> [VM STDOUT] HAUKI REPL ready. Serving 1 network port(s).
[NetServer] Listening on port 5002 tests/fixtures/child.c
[TEST RUNNER] Socket connected to localhost:5002. Initiating sequence...
[TEST RUNNER] Socket connected to localhost:5002. Initiating sequence...
::ffff:127.0.0.1:55558
[VM STDOUT] [VM DEBUG] net_write emitted String: "SECRET: "
[VM STDOUT] [VM DEBUG] net_write emitted Integer: "42"
[PASS] Sent: "reveal" | Recv: "SECRET: 42"
[TEST RUNNER] Sequence complete. All assertions passed.
[MASTER] 03_inherit_test.json PASSED
==================================================
[MASTER] Executing Test: 04_stress_test.json
==================================================
[TEST RUNNER] Orchestrating test for tests/fixtures/life.c on port 5003
[VM STDOUT] HAUKI> [VM STDOUT] HAUKI REPL ready. Serving 1 network port(s).
[NetServer] Listening on port 5003 tests/fixtures/life.c
[TEST RUNNER] Socket connected to localhost:5003. Initiating sequence...
[TEST RUNNER] Socket connected to localhost:5003. Initiating sequence...
::ffff:127.0.0.1:54462
[VM STDOUT] [VM DEBUG] net_write emitted String: ".#...
.#...
.#...
.....
.....
"
[PASS] Sent: "step" | Recv: ".#...
.#...
.#...
.....
....."
[TEST RUNNER] Sequence complete. All assertions passed.
[MASTER] 04_stress_test.json PASSED
==================================================
[MASTER] Test Suite Complete.
[MASTER] Passed: 4 | Failed: 0
==================================================