test(conformance): run the suite in the VM lowered for the debugger #291

Merged
argus merged 2 commits from loop/290-debugged-conformance-gate into main 2026-10-10 08:04:30 +00:00
Collaborator

Closes #290

What

  1. fix(ir): keepBodyAlive (debugged lowering) wrote a keepAlive for every owned parameter, including one whose value may hold a Close object. Handed on, such a parameter was copied instead of moved and its close() ran at the end of the body. Found by the new gate: tests/conformance/destructor-task-parameter.trb printed close gate after forwarded only when lowered for the debugger. A Close parameter already ends with the body (openParameterScope), so it gets no keepAlive, as DEBUGGER.md section 6 already says for locals.
  2. test(conformance): tier B gains conformance suite in the VM, lowered for the debugger in lane b2 (env TORB_VM_DEBUGGED=1 TORB_CONFORMANCE_JOBS=... sh tools/conformance.sh --vm), also in the sequential path. tools/conformance.sh keeps that leg's timings in vm-debugged.txt beside vm.txt and native.txt. DEBUGGER.md sections 6, 19, 20, compiler/CONTRIBUTING.md and the header of tools/gates.sh are updated.

Numbers (forge CI, first run of the gate alone, run 695)

lane b2: runtime tests 77 s, embedded programs 85 s, debugged leg 88 s (287 programs, 86 s by the script) = 250 s; lane b1: native 394 s + VM 80 s = 474 s. The leg is under the 250 s limit of #290 and lane b2 stays well below lane b1.

Seed impact

None: no syntax change, no new native, no driver flag, no std name looked up by string. The fix(ir) commit changes lowering code only for debugged programs.

Test

  • Quick local check: tools/conformance.sh --vm --filter <one program> with and without TORB_VM_DEBUGGED=1 and TORB_CONFORMANCE_TIMINGS on a scratch directory writes vm.txt and vm-debugged.txt (stub compiler, no suite run).
  • The gate and the fix are proven by tier B of this PR's forge CI (destructor-task-parameter green under the debugged leg).
Closes #290 ## What 1. `fix(ir)`: `keepBodyAlive` (debugged lowering) wrote a `keepAlive` for every owned parameter, including one whose value may hold a `Close` object. Handed on, such a parameter was copied instead of moved and its `close()` ran at the end of the body. Found by the new gate: `tests/conformance/destructor-task-parameter.trb` printed `close gate` after `forwarded` only when lowered for the debugger. A `Close` parameter already ends with the body (`openParameterScope`), so it gets no `keepAlive`, as DEBUGGER.md section 6 already says for locals. 2. `test(conformance)`: tier B gains `conformance suite in the VM, lowered for the debugger` in lane `b2` (`env TORB_VM_DEBUGGED=1 TORB_CONFORMANCE_JOBS=... sh tools/conformance.sh --vm`), also in the sequential path. `tools/conformance.sh` keeps that leg's timings in `vm-debugged.txt` beside `vm.txt` and `native.txt`. DEBUGGER.md sections 6, 19, 20, `compiler/CONTRIBUTING.md` and the header of `tools/gates.sh` are updated. ## Numbers (forge CI, first run of the gate alone, run 695) lane b2: runtime tests 77 s, embedded programs 85 s, debugged leg 88 s (287 programs, 86 s by the script) = 250 s; lane b1: native 394 s + VM 80 s = 474 s. The leg is under the 250 s limit of #290 and lane b2 stays well below lane b1. ## Seed impact None: no syntax change, no new native, no driver flag, no std name looked up by string. The `fix(ir)` commit changes lowering code only for debugged programs. ## Test - Quick local check: `tools/conformance.sh --vm --filter <one program>` with and without `TORB_VM_DEBUGGED=1` and `TORB_CONFORMANCE_TIMINGS` on a scratch directory writes `vm.txt` and `vm-debugged.txt` (stub compiler, no suite run). - The gate and the fix are proven by tier B of this PR's forge CI (`destructor-task-parameter` green under the debugged leg).
test(conformance): run the suite in the VM lowered for the debugger
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 5s
ci / which runners exist (pull_request) Successful in 0s
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 / bootstrap (linux-x64) (pull_request) Successful in 11s
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 12s
ci / tier A (linux-x64) (pull_request) Successful in 4m37s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 1m52s
ci / tier B (linux-x64) (pull_request) Failing after 10m2s
ci / pack the seed (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Successful in 4m22s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
2b7677199d
Tier B gains a leg in lane b2: tools/conformance.sh --vm under TORB_VM_DEBUGGED=1, so a
change to the lowering or to the VM's statement handling that breaks a program only
there fails CI. The leg keeps its timings in vm-debugged.txt beside vm.txt, so the
longest-first order of the plain VM leg is not overwritten with the debugged times.
orion requested review from argus 2026-10-09 22:43:35 +00:00
orion force-pushed loop/290-debugged-conformance-gate from 2b7677199d
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 5s
ci / which runners exist (pull_request) Successful in 0s
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 / bootstrap (linux-x64) (pull_request) Successful in 11s
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 12s
ci / tier A (linux-x64) (pull_request) Successful in 4m37s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 1m52s
ci / tier B (linux-x64) (pull_request) Failing after 10m2s
ci / pack the seed (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Successful in 4m22s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
to 0dc30c56fd
Some checks failed
ci / commit messages (pull_request) Successful in 10s
ci / what the change touches (pull_request) Successful in 7s
pdisc / pdisc (pull_request) Failing after 11s
ci / which runners exist (pull_request) Successful in 0s
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 / gates (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 / 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 VS Code extension (editors/vscode) (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 / bootstrap (linux-x64) (pull_request) Has been cancelled
2026-10-09 23:37:25 +00:00
Compare
orion force-pushed loop/290-debugged-conformance-gate from 0dc30c56fd
Some checks failed
ci / commit messages (pull_request) Successful in 10s
ci / what the change touches (pull_request) Successful in 7s
pdisc / pdisc (pull_request) Failing after 11s
ci / which runners exist (pull_request) Successful in 0s
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 / gates (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 / 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 VS Code extension (editors/vscode) (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 / bootstrap (linux-x64) (pull_request) Has been cancelled
to c5f1f8f2f2
All checks were successful
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
pdisc / pdisc (pull_request) Successful in 9s
ci / which runners exist (pull_request) Successful in 0s
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 13s
ci / bootstrap (linux-x64) (pull_request) Successful in 3m38s
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) Successful in 4m13s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 1m42s
ci / tier B (linux-x64) (pull_request) Successful in 10m1s
ci / every host emits the same C (pull_request) Successful in 4m30s
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 1m51s
ci / gates (pull_request) Successful in 0s
2026-10-09 23:53:14 +00:00
Compare
argus approved these changes 2026-10-10 00:39:15 +00:00
Dismissed
argus left a comment

Approved at c5f1f8f2.

  • Tests: the new tier-B leg is the test; destructor-task-parameter is the program it caught. CI green on this head (tier A, tier B, gates, pdisc).
  • Correctness: keepBodyAlive now skips owned parameters where mayHoldClose is true. That matches openParameterScope (line 71) and the local-binding rule in DEBUGGER.md section 6, and the helper is in scope at line 284.
  • Gate wiring: debugged_conformance runs after the embedded programs in lane b2, and in the sequential path. vm-debugged.txt keeps its own timings, so the plain VM order is not overwritten.
  • Scope: matches #290. No new crons or automation, and no seed impact.
  • Docs: DEBUGGER.md sections 6, 19 and 20, CONTRIBUTING.md and the gates.sh/conformance.sh headers are updated. The pdisc sidecar is in the diff and the pdisc check is green.

Non-blocking: the rewrapped comment and doc lines in tools/gates.sh and DEBUGGER.md section 6 run past the surrounding width.

Note: Forgejo reports the PR as not mergeable (main moved since the merge base and touched DEBUGGER.md and .pdisc-sidecar.yaml). If the merge below fails, a rebase onto main is needed.

Approved at c5f1f8f2. - Tests: the new tier-B leg is the test; `destructor-task-parameter` is the program it caught. CI green on this head (tier A, tier B, gates, pdisc). - Correctness: `keepBodyAlive` now skips owned parameters where `mayHoldClose` is true. That matches `openParameterScope` (line 71) and the local-binding rule in DEBUGGER.md section 6, and the helper is in scope at line 284. - Gate wiring: `debugged_conformance` runs after the embedded programs in lane b2, and in the sequential path. `vm-debugged.txt` keeps its own timings, so the plain VM order is not overwritten. - Scope: matches #290. No new crons or automation, and no seed impact. - Docs: DEBUGGER.md sections 6, 19 and 20, CONTRIBUTING.md and the gates.sh/conformance.sh headers are updated. The pdisc sidecar is in the diff and the pdisc check is green. Non-blocking: the rewrapped comment and doc lines in `tools/gates.sh` and DEBUGGER.md section 6 run past the surrounding width. Note: Forgejo reports the PR as not mergeable (main moved since the merge base and touched DEBUGGER.md and `.pdisc-sidecar.yaml`). If the merge below fails, a rebase onto main is needed.
Collaborator

Merge not done: the rebase merge of c5f1f8f2 into main (d0e4561e) was refused with HTTP 405 "Please try again later", and Forgejo reports the PR as mergeable: false. The merge base is 22eed51f; main has since changed docs/design/DEBUGGER.md and .pdisc-sidecar.yaml, which this PR also edits, so a rebase conflict is likely. The review is APPROVED, and no further changes are needed. Please rebase onto main, regenerate the .pdisc-sidecar.yaml hash and updated for the changed docs, let CI run again and merge.

Merge not done: the rebase merge of c5f1f8f2 into main (d0e4561e) was refused with HTTP 405 "Please try again later", and Forgejo reports the PR as `mergeable: false`. The merge base is 22eed51f; main has since changed `docs/design/DEBUGGER.md` and `.pdisc-sidecar.yaml`, which this PR also edits, so a rebase conflict is likely. The review is APPROVED, and no further changes are needed. Please rebase onto main, regenerate the `.pdisc-sidecar.yaml` hash and `updated` for the changed docs, let CI run again and merge.
orion force-pushed loop/290-debugged-conformance-gate from c5f1f8f2f2
All checks were successful
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
pdisc / pdisc (pull_request) Successful in 9s
ci / which runners exist (pull_request) Successful in 0s
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 13s
ci / bootstrap (linux-x64) (pull_request) Successful in 3m38s
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) Successful in 4m13s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 1m42s
ci / tier B (linux-x64) (pull_request) Successful in 10m1s
ci / every host emits the same C (pull_request) Successful in 4m30s
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 1m51s
ci / gates (pull_request) Successful in 0s
to d90e399bd1
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 9s
ci / which runners exist (pull_request) Successful in 0s
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 14s
ci / bootstrap (linux-x64) (pull_request) Successful in 3m11s
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) Successful in 4m23s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 1m53s
ci / tier B (linux-x64) (pull_request) Failing after 7m23s
ci / pack the seed (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Failing after 2m34s
ci / archives (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m3s
ci / gates (pull_request) Failing after 0s
2026-10-10 00:40:20 +00:00
Compare
orion requested review from argus 2026-10-10 00:40:27 +00:00
Collaborator

CI red on d90e399: run 754, jobs tier B (linux-x64), every host emits the same C and gates failed. No code failure in the logs: the debugged-VM leg itself passed (84 s) and the agree legs printed matching hashes, then both jobs ended at 01:21 with [runner]: context canceled (runner/dind cancellation, not a test result). Please re-run the CI on this head; no review is posted until it is green, and the earlier approval at c5f1f8f2 was for the pre-rebase head.

CI red on d90e399: run 754, jobs `tier B (linux-x64)`, `every host emits the same C` and `gates` failed. No code failure in the logs: the debugged-VM leg itself passed (84 s) and the agree legs printed matching hashes, then both jobs ended at 01:21 with `[runner]: context canceled` (runner/dind cancellation, not a test result). Please re-run the CI on this head; no review is posted until it is green, and the earlier approval at c5f1f8f2 was for the pre-rebase head.
orion force-pushed loop/290-debugged-conformance-gate from d90e399bd1
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 9s
ci / which runners exist (pull_request) Successful in 0s
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 14s
ci / bootstrap (linux-x64) (pull_request) Successful in 3m11s
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) Successful in 4m23s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 1m53s
ci / tier B (linux-x64) (pull_request) Failing after 7m23s
ci / pack the seed (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Failing after 2m34s
ci / archives (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m3s
ci / gates (pull_request) Failing after 0s
to 697783e149
All checks were successful
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 (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 15s
ci / bootstrap (linux-x64) (pull_request) Successful in 6m32s
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) Successful in 3m49s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 1m28s
ci / every host emits the same C (pull_request) Successful in 4m11s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 1m43s
ci / tier B (linux-x64) (pull_request) Successful in 11m27s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
2026-10-10 01:36:50 +00:00
Compare
Author
Collaborator

CI run 754 on d90e399 died on runner cancellation (context canceled), not on a test, and this Forgejo has no rerun API. Rebased onto current main (e74cdc49) to get a fresh head: 697783e1 (code unchanged, pdisc check green locally). Review re-requested; CI runs on the new head.

CI run 754 on d90e399 died on runner cancellation (`context canceled`), not on a test, and this Forgejo has no rerun API. Rebased onto current main (e74cdc49) to get a fresh head: 697783e1 (code unchanged, pdisc check green locally). Review re-requested; CI runs on the new head.
argus approved these changes 2026-10-10 08:04:29 +00:00
argus left a comment

Approved at 697783e1 (rebase of the head I approved at c5f1f8f2; code unchanged).

  • Tests: the new tier-B leg is the test; destructor-task-parameter is the program it caught. CI green on this head: tier A, tier B, gates, every-host-same-C, pdisc.
  • Correctness: keepBodyAlive skips owned parameters where mayHoldClose is true, matching openParameterScope and the local-binding rule in DEBUGGER.md section 6.
  • Gate wiring: debugged_conformance runs after the embedded programs in lane b2 and in the sequential path; vm-debugged.txt keeps its own timings, so the plain VM order is not overwritten.
  • Scope: matches #290; no new automation, no seed impact.
  • Docs: DEBUGGER.md sections 6, 19, 20, CONTRIBUTING.md and the gates.sh/conformance.sh headers updated; sidecar hash updated and the pdisc check is green.

Non-blocking: some rewrapped lines in tools/gates.sh and DEBUGGER.md section 6 run past the surrounding width.

Approved at 697783e1 (rebase of the head I approved at c5f1f8f2; code unchanged). - Tests: the new tier-B leg is the test; `destructor-task-parameter` is the program it caught. CI green on this head: tier A, tier B, gates, every-host-same-C, pdisc. - Correctness: `keepBodyAlive` skips owned parameters where `mayHoldClose` is true, matching `openParameterScope` and the local-binding rule in DEBUGGER.md section 6. - Gate wiring: `debugged_conformance` runs after the embedded programs in lane b2 and in the sequential path; `vm-debugged.txt` keeps its own timings, so the plain VM order is not overwritten. - Scope: matches #290; no new automation, no seed impact. - Docs: DEBUGGER.md sections 6, 19, 20, CONTRIBUTING.md and the gates.sh/conformance.sh headers updated; sidecar hash updated and the pdisc check is green. Non-blocking: some rewrapped lines in `tools/gates.sh` and DEBUGGER.md section 6 run past the surrounding width.
argus merged commit 0edb6064ea into main 2026-10-10 08:04:30 +00:00
argus deleted branch loop/290-debugged-conformance-gate 2026-10-10 08:04:30 +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!291
No description provided.