feat(debugger): evaluate snippets like a REPL entry #400

Merged
argus merged 6 commits from loop/39-evaluate-snippet into main 2026-10-23 08:12:05 +00:00
Collaborator

Closes #39

What

In the debug console (evaluate with context: repl), a text the restricted evaluator (parseWatch) refuses is now compiled as a snippet and run in the stopped program: names.length(), point.distance(origin), double(count). Hover, watch, clipboard, logpoints and conditions keep the read-only evaluator.

  • compiler/src/debugger/snippet.trb (new): the frame's file with its statements blanked, plus one hosted function whose parameters are the frame's locals that the expression names (written with the type text variables shows, except a list, map or set the frame holds as storage, which is written as its implementation ArrayList, TrieMap, TrieSet - the trait would be a boxed payload and crashed the debuggee) and whose body is the expression; the value leaves through a var parameter. A local whose type the file cannot write answers <name> is not available in the snippet. Compile errors are rendered relative to the snippet.
  • The continuation is appended to the running program (growProgram, emitBytecode with after) and called above every frame of the stop (callSandboxed with the new above parameter, same for releaseSandboxed), in an unrestricted sandbox with a budget of 100M steps / 10 s. A panic, Process.exit or a limit answers success: false; the program stays stopped and intact.
  • While a snippet runs nothing stops the program (breakpoints, stepping, pause, panic hook) and requests wait. Output of the snippet is console output: the debuggee brackets the run with torbscript/snippetBegin / torbscript/snippetEnd, which the adapter consumes.
  • The result is shown as variables shows a value (result, type, variablesReference); references into it read through the snippet's own inspector (Referenced.Children now carries one). Result registers are released when the program goes on.
  • Scope as decided in the issue: one expression, innermost frame; no protocol additions; seed untouched.

Refactors shared with the REPL / VM

  • repl/session.trb: importsOf and addImports are public (the snippet writes the result type the way an entry does).
  • vm/interpret.trb: callSandboxed / releaseSandboxed take above; new growProgram and runningProgram.
  • vm/run.trb: PreparedRun carries the program's SourceTree.

Tests

Session tests/debug/evaluate-snippet.dap (+ program dir): method call, function call, call on a shared object (state kept across two calls), output of the snippet, panic, compile errors, unavailable name, a list result, and a hover that stays on the restricted path; variables before and after. Session tests/debug/evaluate-snippet-collections.dap covers a snippet naming a list, a map and a set local (the crash class of the first version). Both .expected files are the output of complete sessions. DEBUGGER.md sections 12, 15, 20 updated. Sessions and gates run in CI.

Closes #39 ## What In the debug console (`evaluate` with `context: repl`), a text the restricted evaluator (`parseWatch`) refuses is now compiled as a snippet and run in the stopped program: `names.length()`, `point.distance(origin)`, `double(count)`. Hover, watch, clipboard, logpoints and conditions keep the read-only evaluator. - `compiler/src/debugger/snippet.trb` (new): the frame's file with its statements blanked, plus one hosted function whose parameters are the frame's locals that the expression names (written with the type text `variables` shows, except a list, map or set the frame holds as storage, which is written as its implementation `ArrayList`, `TrieMap`, `TrieSet` - the trait would be a boxed payload and crashed the debuggee) and whose body is the expression; the value leaves through a `var` parameter. A local whose type the file cannot write answers `<name> is not available in the snippet`. Compile errors are rendered relative to the snippet. - The continuation is appended to the running program (`growProgram`, `emitBytecode` with `after`) and called above every frame of the stop (`callSandboxed` with the new `above` parameter, same for `releaseSandboxed`), in an unrestricted sandbox with a budget of 100M steps / 10 s. A panic, `Process.exit` or a limit answers `success: false`; the program stays stopped and intact. - While a snippet runs nothing stops the program (breakpoints, stepping, pause, panic hook) and requests wait. Output of the snippet is console output: the debuggee brackets the run with `torbscript/snippetBegin` / `torbscript/snippetEnd`, which the adapter consumes. - The result is shown as `variables` shows a value (`result`, `type`, `variablesReference`); references into it read through the snippet's own inspector (`Referenced.Children` now carries one). Result registers are released when the program goes on. - Scope as decided in the issue: one expression, innermost frame; no protocol additions; seed untouched. ## Refactors shared with the REPL / VM - `repl/session.trb`: `importsOf` and `addImports` are public (the snippet writes the result type the way an entry does). - `vm/interpret.trb`: `callSandboxed` / `releaseSandboxed` take `above`; new `growProgram` and `runningProgram`. - `vm/run.trb`: `PreparedRun` carries the program's `SourceTree`. ## Tests Session `tests/debug/evaluate-snippet.dap` (+ program dir): method call, function call, call on a shared object (state kept across two calls), output of the snippet, panic, compile errors, unavailable name, a list result, and a hover that stays on the restricted path; `variables` before and after. Session `tests/debug/evaluate-snippet-collections.dap` covers a snippet naming a list, a map and a set local (the crash class of the first version). Both `.expected` files are the output of complete sessions. DEBUGGER.md sections 12, 15, 20 updated. Sessions and gates run in CI.
A debug console evaluate whose text the restricted evaluator refuses is compiled as a function of the frame's file, with the frame's locals as parameters, appended to the running program and called above its frames in a sandbox. A panic or a limit answers success false and the program stays stopped. Output of the snippet goes to the console. importsOf and addImports of the REPL session are public for it.
docs(design): the debugger evaluates snippets (section 12, 15, 20)
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 5s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 11s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 5m54s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m31s
ci / tier A (linux-x64) (pull_request) Failing after 4m42s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
67fcb0cefd
test(debugger): a placeholder expectation for the snippet session
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 5m40s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m55s
ci / tier A (linux-x64) (pull_request) Failing after 5m41s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
327827cb04
test(debugger): the snippet session's helper module beside its file
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m10s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / tier A (linux-x64) (pull_request) Failing after 5m0s
ci / gates (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
e0f098529c
test(debugger): the snippet session needs no second module
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m17s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 16s
ci / tier A (linux-x64) (pull_request) Failing after 5m3s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Failing after 2m42s
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
059d3ecacc
chore(debugger): trace the snippet stages (temporary, to localize a crash in CI)
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 16s
ci / bootstrap (linux-x64) (pull_request) Successful in 2m12s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 5m0s
ci / gates (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
b3ee54281f
chore(vm): trace callSandboxed (temporary)
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
pdisc / pdisc (pull_request) Successful in 10s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m11s
ci / tier A (linux-x64) (pull_request) Failing after 5m33s
ci / gates (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
677fc15b5a
chore(tools): trace the VM in the snippet session (temporary)
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 5s
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 15s
ci / bootstrap (linux-x64) (pull_request) Successful in 2m27s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 5m13s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Failing after 2m42s
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
32a37c9eb3
orion force-pushed loop/39-evaluate-snippet from 32a37c9eb3
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 5s
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 15s
ci / bootstrap (linux-x64) (pull_request) Successful in 2m27s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 5m13s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Failing after 2m42s
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
to a86daa868c
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 11s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m37s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 5m14s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m30s
ci / every host emits the same C (pull_request) Successful in 4m47s
ci / tier B (linux-x64) (pull_request) Successful in 13m7s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Successful in 1m54s
ci / gates (pull_request) Failing after 0s
2026-10-23 04:21:45 +00:00
Compare
argus requested changes 2026-10-23 05:26:22 +00:00
Dismissed
argus left a comment

Review of a86daa8. CI is final and red (ci / tier A (linux-x64) -> gates); the log shows a real defect, not only a missing fixture.

  1. [blocker] The debuggee crashes on the first snippet evaluate. In the tier A log, tests/debug for evaluate-snippet ends after request 9 (the hover names.length(), correctly refused by the restricted evaluator) with {"event":"exited","body":{"exitCode":139}} (SIGSEGV), then terminated. Request 10 (names.length(), context: repl) never gets a response, and nothing after it (point.distance, double, counter, shout, explode, compile error, unavailable name, list result) was exercised. The claim "the program stays stopped and intact" does not hold for the happy path. Likely area: the new growProgram / callSandboxed(above) path in vm/interpret.trb or the continuation in debugger/snippet.trb on the real debuggee. Please reproduce with torb debug on tests/debug/evaluate-snippet, fix the crash, and make sure every request of the session gets its response.
  2. [blocker] tests/debug/evaluate-snippet.expected is still # placeholder: filled from the CI output. Fill it from a run in which the full session completes, and review that content for the intended results (e.g. double(count) = 42, the counter keeping its state across the two bump() calls, the panic/compile-error/unavailable-name messages, the snippet output as console output). Do not paste the current crashed output.
  3. [blocker] format --check fails: ./compiler/src/ir/lower/lower.trb (1 of 1340 files would change). Run torb format on it.

Checked and fine: scope matches #39 (one expression, innermost frame, no protocol additions, seed untouched, hover/watch/logpoints/conditions stay on the restricted evaluator); DEBUGGER.md updated; pdisc green; no secrets, no new permissions or external services. Once the session passes, the only thing left to look at in the next round is items 1-3.

Review of a86daa8. CI is final and red (`ci / tier A (linux-x64)` -> `gates`); the log shows a real defect, not only a missing fixture. 1. **[blocker] The debuggee crashes on the first snippet evaluate.** In the tier A log, `tests/debug` for `evaluate-snippet` ends after request 9 (the hover `names.length()`, correctly refused by the restricted evaluator) with `{"event":"exited","body":{"exitCode":139}}` (SIGSEGV), then `terminated`. Request 10 (`names.length()`, `context: repl`) never gets a response, and nothing after it (point.distance, double, counter, shout, explode, compile error, unavailable name, list result) was exercised. The claim "the program stays stopped and intact" does not hold for the happy path. Likely area: the new `growProgram` / `callSandboxed(above)` path in `vm/interpret.trb` or the continuation in `debugger/snippet.trb` on the real debuggee. Please reproduce with `torb debug` on `tests/debug/evaluate-snippet`, fix the crash, and make sure every request of the session gets its response. 2. **[blocker] `tests/debug/evaluate-snippet.expected` is still `# placeholder: filled from the CI output`.** Fill it from a run in which the full session completes, and review that content for the intended results (e.g. `double(count)` = 42, the counter keeping its state across the two `bump()` calls, the panic/compile-error/unavailable-name messages, the snippet output as console output). Do not paste the current crashed output. 3. **[blocker] `format --check` fails:** `./compiler/src/ir/lower/lower.trb` (1 of 1340 files would change). Run `torb format` on it. Checked and fine: scope matches #39 (one expression, innermost frame, no protocol additions, seed untouched, hover/watch/logpoints/conditions stay on the restricted evaluator); DEBUGGER.md updated; pdisc green; no secrets, no new permissions or external services. Once the session passes, the only thing left to look at in the next round is items 1-3.
wip(debugger): format lower.trb, trace the snippet stages for the crash
Some checks failed
pdisc / pdisc (pull_request) Successful in 10s
ci / commit messages (pull_request) Failing after 5s
ci / what the change touches (pull_request) Successful in 5s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / which runners exist (pull_request) Has been cancelled
ci / bootstrap (linux-x64) (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / bootstrap and conformance (windows-x64) (pull_request) Has been cancelled
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been cancelled
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
d46ae94005
orion force-pushed loop/39-evaluate-snippet from d46ae94005
Some checks failed
pdisc / pdisc (pull_request) Successful in 10s
ci / commit messages (pull_request) Failing after 5s
ci / what the change touches (pull_request) Successful in 5s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / which runners exist (pull_request) Has been cancelled
ci / bootstrap (linux-x64) (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / bootstrap and conformance (windows-x64) (pull_request) Has been cancelled
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been cancelled
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
to d57665b22f
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 9s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 5m58s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 5m41s
ci / gates (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
2026-10-23 06:13:59 +00:00
Compare
This reverts commit d57665b22f.
chore(debugger): trace the VM instructions of the snippet session (temporary)
Some checks failed
ci / commit messages (pull_request) Failing after 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 9s
ci / gates (pull_request) Has been cancelled
ci / which runners exist (pull_request) Has been cancelled
ci / bootstrap (linux-x64) (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / bootstrap and conformance (windows-x64) (pull_request) Has been cancelled
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been cancelled
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
06566d9c18
orion force-pushed loop/39-evaluate-snippet from 06566d9c18
Some checks failed
ci / commit messages (pull_request) Failing after 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 9s
ci / gates (pull_request) Has been cancelled
ci / which runners exist (pull_request) Has been cancelled
ci / bootstrap (linux-x64) (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / bootstrap and conformance (windows-x64) (pull_request) Has been cancelled
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been cancelled
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been cancelled
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
to b78ba7beca
All checks were successful
ci / tier A (linux-x64) (pull_request) Successful in 5m41s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 3m5s
ci / every host emits the same C (pull_request) Successful in 4m59s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m21s
ci / tier B (linux-x64) (pull_request) Successful in 14m30s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
ci / commit messages (pull_request) Successful in 3s
ci / what the change touches (pull_request) Successful in 3s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 9s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 5m37s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
2026-10-23 07:04:26 +00:00
Compare
argus approved these changes 2026-10-23 08:12:03 +00:00
argus left a comment

Review of b78ba7b (re-review: checked my earlier blockers from a86daa8 and the lines changed since). CI is green on exactly this head, including tier A, tier B, gates, bootstrap, pdisc.

Earlier findings:

  1. Crash on the first snippet evaluate: resolved. The session now answers all 24 requests, ends with continue -> program output -> exited 0. The collection crash class is covered by its own session (evaluate-snippet-collections) and finishLowering(lowering, closed: !debugging) keeps the witness-table slots a snippet calls through.
  2. .expected placeholder: resolved. I checked the content by hand: point.distance(origin) = 25, double(count) = 42, counter.bump() 1 then 2 and counter.hits = 2 (state kept, variables after shows hits: 2), origin.distance(point) + double(count) = 67, names.map(...) = [3, 5, 5], snippet output arrives as a console event, panic / compile error / unavailable-name messages are relative to <snippet>, hover stays on the restricted path. Collections session: 3, 5, 40, 9 match 3/2/4 elements.
  3. format --check: resolved (gates green).

Checklist: tests match the change (two complete sessions); correctness ok; scope = #39 (one expression, innermost frame, no protocol additions, seed untouched); no secrets/permissions/external services; no stored-data change; DEBUGGER.md sections 12/15/20 updated; no workflow changes; no new boundary beyond the internal above parameter and growProgram, documented in the design doc.

Non-blocking: none.

Review of b78ba7b (re-review: checked my earlier blockers from a86daa8 and the lines changed since). CI is green on exactly this head, including `tier A`, `tier B`, `gates`, `bootstrap`, pdisc. Earlier findings: 1. Crash on the first snippet evaluate: resolved. The session now answers all 24 requests, ends with `continue` -> program output -> `exited` 0. The collection crash class is covered by its own session (`evaluate-snippet-collections`) and `finishLowering(lowering, closed: !debugging)` keeps the witness-table slots a snippet calls through. 2. `.expected` placeholder: resolved. I checked the content by hand: `point.distance(origin)` = 25, `double(count)` = 42, `counter.bump()` 1 then 2 and `counter.hits` = 2 (state kept, `variables` after shows `hits: 2`), `origin.distance(point) + double(count)` = 67, `names.map(...)` = [3, 5, 5], snippet output arrives as a console event, panic / compile error / unavailable-name messages are relative to `<snippet>`, hover stays on the restricted path. Collections session: 3, 5, 40, 9 match 3/2/4 elements. 3. `format --check`: resolved (gates green). Checklist: tests match the change (two complete sessions); correctness ok; scope = #39 (one expression, innermost frame, no protocol additions, seed untouched); no secrets/permissions/external services; no stored-data change; DEBUGGER.md sections 12/15/20 updated; no workflow changes; no new boundary beyond the internal `above` parameter and `growProgram`, documented in the design doc. Non-blocking: none.
argus merged commit ede8684d97 into main 2026-10-23 08:12:05 +00:00
argus deleted branch loop/39-evaluate-snippet 2026-10-23 08:12:06 +00:00
Sign in to join this conversation.
No reviewers
No labels
loop
ready
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!400
No description provided.