Verified locally on September 2, 2026. The completed workbench is served at http://localhost:43103. No publication, remote service, model call, or third-party dependency is involved.
npm test).npm run check).npm run build).The browser checks read rendered DOM values after real interactions. They do not call the compiler or VM through a hidden browser test API. Screenshots were captured from the running workbench and visually inspected.
tests/language.test.mjs exercises source locations, scientific numbers and strings, arithmetic precedence, right-associative exponentiation, boolean precedence, short circuit with observable side effects, shadowing, loop-local scope, assignments, nested branches and loops, hoisted functions, recursion, lexical globals, early returns, and operand-stack preservation across calls.
Failure cases include unknown or uninitialized names, wrong arity, duplicate declarations, invalid function placement, exact syntax error positions, strict runtime types, non-finite arithmetic, and separate instruction, call-frame, drawing, and output budgets. Debugger tests cover statement breakpoints, frame yielding, reset, immutable snapshots, complete-state seek, branching after rewind, replay after history sampling, and checkpoint coverage across long runs. Every study and both debugger cases execute in the suite.
| Flow | Observed result |
|---|---|
| Source → tokens → tree → bytecode → execution | Default source produces 119 lexemes, 68 AST nodes, 84 bytecode instructions, and 240 shapes after 15,863 executed instructions. |
| Edit a parameter | Replacing 137.5 with 127 changes the actual token value, global variable, and rendered sunflower into a different radial pattern. |
| Step and step line | Instruction stepping exposes real operands. A line-14 breakpoint stops at 58 instructions with zero shapes; Step line executes the drawing call and produces exactly one circle at instruction 69. |
| Zero-shape state | The paused breakpoint canvas reads No shapes drawn yet. Reset reads Ready for the first instruction. |
| Run, pause, resume | A paused drawing retained its exact instruction and shape counts between interactions; Run completed the same program correctly. |
| Auto-run toggle and keyboard | With auto-run off, editing leaves a compiled, unexecuted VM. F9 steps one opcode; Control + Enter executes the edited program and prints 42. |
| Time travel | At instruction 7,936 of 15,863, the sunflower has 120 shapes, n = 120, an operand stack of 120 and 240, and no printed output. Latest restores 240 shapes and printed output 240. |
| Recursive frames | A suspended canopy exposes real nested branch frames and their locals. Selecting the main frame exposes only its global bindings. Resuming a retained recursive snapshot reproduces all 255 branches. |
| Invalid source | let y = ; reports line 2, column 9 and clears stale drawing and compiled artifacts. Clicking the diagnostic moves the editor caret to that position. Correcting the source recompiles and prints 15. |
| Infinite loop | The runaway case stops at exactly 60,000 instructions, with 193 shapes and a diagnostic at line 12, column 3. Reset clears the drawing and error. Replacing true with ticks < 240 finishes at 5,489 instructions, draws 16 circles, and prints 240. |
| Keyboard and line numbers | Keyboard breakpoint navigation and Restore keep code lines aligned with the gutter. Guide tabs support arrow keys; Escape closes the guide and returns focus to its opener. |
| Smaller screen | At an emulated 390 × 844 CSS-pixel viewport, the source, canvas, inspector, controls, and guide fit without horizontal page overflow. Editing the angle still recompiles and renders 240 shapes. This was browser emulation, not a physical-device test. |
| Architecture | The diagram links the five actual source modules; source and language notes are available from the same local server. |
while (i <= bars) with bars = 5, draws six bars, and prints 6.i = 5. Both i and bars are visibly 5.LE bytecode. At instruction 204 it leaves true on the operand stack, admitting an unwanted sixth iteration. See the debugger at the faulty boundary.<= to < in the source editor. The compiler emits the strict comparison, the program finishes in 210 instructions, the canvas has five bars, and printed output is 5. See the corrected state.| Study | Executed instructions | Drawing commands |
|---|---|---|
| Phyllotaxis | 15,863 | 240 circles |
| Harmonic weave | 26,674 | 360 line segments |
| Recursive canopy | 24,256 | 255 branches |
| Orbital notation | 52,724 | 657 circles |
| Signal garden | 32,071 | 529 circles |
The coordinator independently tested a newly written recursive factorial(6) program that printed 720 and drew five circles. That review also confirmed rewind-to-start and latest-state restoration, syntax diagnostics, the extra-bar fix, the 60,000-instruction limit, and breakpoint/step-line behavior. Its requested empty-canvas wording refinement has been implemented and verified.
This is a teaching language with numbers, booleans, strings, lexical blocks, top-level functions, and explicit drawing calls. It has no arrays, objects, closures, imports, file or network access. The VM is cooperative on the browser thread and enforces 60,000 instructions, 32 frames, 2,000 active shapes, and 300 printed values. History keeps at most 1,600 exact checkpoints, sampling older execution; not every historical instruction remains seekable. Resuming in the past discards the future. Edits and VM state last for the current page session. The reference grid is drawn by the renderer, while every displayed program mark comes from an executed drawing instruction.
# GLASSBOX validation Verified locally on September 2, 2026. The completed workbench is served at **http://localhost:43103**. No publication, remote service, model call, or third-party dependency is involved. ## Results - **31 behavioral tests passed**, using Node's built-in test runner (`npm test`). - **Syntax checks passed** (`npm run check`). - **Production build passed** through the showcase's shared resource-slot wrapper (`npm run build`). - **26 local delivery URLs passed**, including all screenshots and source-linked modules; all manifest paths exist and the engine source hashes match the build. See [qa/delivery-checks.json](qa/delivery-checks.json). - **39 browser checks passed** using the Browser skill and actual editor, button, keyboard, select, and timeline interactions. The recorded observations are in [qa/browser-checks.json](qa/browser-checks.json). - The guided pipeline reached its completed drawing and edit handoff in **11.2 seconds**. - Browser console inspection returned **no warnings or errors**. - One Node server listens on **127.0.0.1:43103**. The server refuses to fall back to another port. The browser checks read rendered DOM values after real interactions. They do not call the compiler or VM through a hidden browser test API. Screenshots were captured from the running workbench and visually inspected. ## Engine coverage [tests/language.test.mjs](tests/language.test.mjs) exercises source locations, scientific numbers and strings, arithmetic precedence, right-associative exponentiation, boolean precedence, short circuit with observable side effects, shadowing, loop-local scope, assignments, nested branches and loops, hoisted functions, recursion, lexical globals, early returns, and operand-stack preservation across calls. Failure cases include unknown or uninitialized names, wrong arity, duplicate declarations, invalid function placement, exact syntax error positions, strict runtime types, non-finite arithmetic, and separate instruction, call-frame, drawing, and output budgets. Debugger tests cover statement breakpoints, frame yielding, reset, immutable snapshots, complete-state seek, branching after rewind, replay after history sampling, and checkpoint coverage across long runs. Every study and both debugger cases execute in the suite. ## Browser observations | Flow | Observed result | | --- | --- | | Source → tokens → tree → bytecode → execution | Default source produces 119 lexemes, 68 AST nodes, 84 bytecode instructions, and 240 shapes after 15,863 executed instructions. | | Edit a parameter | Replacing `137.5` with `127` changes the actual token value, global variable, and rendered sunflower into a different radial pattern. | | Step and step line | Instruction stepping exposes real operands. A line-14 breakpoint stops at 58 instructions with zero shapes; Step line executes the drawing call and produces exactly one circle at instruction 69. | | Zero-shape state | The paused breakpoint canvas reads **No shapes drawn yet.** Reset reads **Ready for the first instruction.** | | Run, pause, resume | A paused drawing retained its exact instruction and shape counts between interactions; Run completed the same program correctly. | | Auto-run toggle and keyboard | With auto-run off, editing leaves a compiled, unexecuted VM. F9 steps one opcode; Control + Enter executes the edited program and prints 42. | | Time travel | At instruction 7,936 of 15,863, the sunflower has 120 shapes, `n = 120`, an operand stack of 120 and 240, and no printed output. Latest restores 240 shapes and printed output 240. | | Recursive frames | A suspended canopy exposes real nested branch frames and their locals. Selecting the main frame exposes only its global bindings. Resuming a retained recursive snapshot reproduces all 255 branches. | | Invalid source | `let y = ;` reports line 2, column 9 and clears stale drawing and compiled artifacts. Clicking the diagnostic moves the editor caret to that position. Correcting the source recompiles and prints 15. | | Infinite loop | The runaway case stops at exactly 60,000 instructions, with 193 shapes and a diagnostic at line 12, column 3. Reset clears the drawing and error. Replacing `true` with `ticks < 240` finishes at 5,489 instructions, draws 16 circles, and prints 240. | | Keyboard and line numbers | Keyboard breakpoint navigation and Restore keep code lines aligned with the gutter. Guide tabs support arrow keys; Escape closes the guide and returns focus to its opener. | | Smaller screen | At an emulated 390 × 844 CSS-pixel viewport, the source, canvas, inspector, controls, and guide fit without horizontal page overflow. Editing the angle still recompiles and renders 240 shapes. This was browser emulation, not a physical-device test. | | Architecture | The diagram links the five actual source modules; source and language notes are available from the same local server. | ### Detecting and fixing the extra bar 1. The original case uses `while (i <= bars)` with `bars = 5`, draws **six** bars, and prints **6**. 2. Break at the loop and revisit the boundary until `i = 5`. Both `i` and `bars` are visibly 5. 3. Step the `LE` bytecode. At instruction 204 it leaves **true** on the operand stack, admitting an unwanted sixth iteration. See [the debugger at the faulty boundary](screenshots/04-bug-detected.jpg). 4. Remove the breakpoint and change `<=` to `<` in the source editor. The compiler emits the strict comparison, the program finishes in 210 instructions, the canvas has **five** bars, and printed output is **5**. See [the corrected state](screenshots/05-bug-fixed.jpg). ### Five studies | Study | Executed instructions | Drawing commands | | --- | ---: | ---: | | Phyllotaxis | 15,863 | 240 circles | | Harmonic weave | 26,674 | 360 line segments | | Recursive canopy | 24,256 | 255 branches | | Orbital notation | 52,724 | 657 circles | | Signal garden | 32,071 | 529 circles | The coordinator independently tested a newly written recursive `factorial(6)` program that printed 720 and drew five circles. That review also confirmed rewind-to-start and latest-state restoration, syntax diagnostics, the extra-bar fix, the 60,000-instruction limit, and breakpoint/step-line behavior. Its requested empty-canvas wording refinement has been implemented and verified. ## Screenshot evidence - [01 — Complete workbench](screenshots/01-workbench.jpg) - [02 — Edited angle and real tokens](screenshots/02-edited-angle.jpg) - [03 — Rewound canvas, locals, stack, and trace](screenshots/03-time-travel.jpg) - [04 — Inclusive comparison exposes the bug](screenshots/04-bug-detected.jpg) - [05 — Corrected loop, five bars, output 5](screenshots/05-bug-fixed.jpg) - [06 — Safe budget stop with source diagnostic](screenshots/06-budget-stop.jpg) - [07 — Source-linked architecture](screenshots/07-architecture.jpg) - [08 — Harmonic weave](screenshots/08-harmonic-weave.jpg) - [09 — Recursive canopy](screenshots/09-recursive-canopy.jpg) - [10 — Orbital notation](screenshots/10-orbital-notation.jpg) - [11 — Signal garden](screenshots/11-signal-garden.jpg) ## Deliberate limits This is a teaching language with numbers, booleans, strings, lexical blocks, top-level functions, and explicit drawing calls. It has no arrays, objects, closures, imports, file or network access. The VM is cooperative on the browser thread and enforces 60,000 instructions, 32 frames, 2,000 active shapes, and 300 printed values. History keeps at most 1,600 exact checkpoints, sampling older execution; not every historical instruction remains seekable. Resuming in the past discards the future. Edits and VM state last for the current page session. The reference grid is drawn by the renderer, while every displayed program mark comes from an executed drawing instruction.