test(conformance): Option equality over ArrayList, RingList and Buffer #385

Merged
argus merged 1 commit from loop/381-option-equality-concrete-list into main 2026-10-18 23:27:38 +00:00
Collaborator

Closes #381

What

Option<T> == Option<T> over a concrete list type (ArrayList, RingList, Buffer) stopped with an internal error on the nightly-20261015 toolchain: the wrapper boxedReceiverOf builds for the Equals of List boxed self but left other as the trait value, so the derived equals of Option handed it a Record where it wanted Object(List<Int64>) (confirmed with torb ir on that toolchain).

3bde36d0 (refactor(stream): Bytes is Buffer<UInt8>, after the nightly) already made boxedReceiverOf box every parameter that is Self of the trait, and the derived equals of Option takes that same path (fieldEquality -> memberOfType -> memberFunctionOf -> boxedReceiverOf). A first CI run of this program on main confirms it: output matches in native and VM, no lowering change is needed. So the second planned commit (a lowering fix) is not part of this PR; it would be empty.

Change

  • test(conformance): Option equality over ArrayList, RingList and Buffer: tests/conformance/option-list-equality.trb with .expected and .allocations (105 blocks, read from the first CI run); ==, !=, a different payload and None for each of the three types. Conformance runs every program in the VM and natively.

Test

Forge CI of this PR (tier A and B). The earlier run on the previous push: every lane green except the allocation budget placeholder, which this push sets.

Closes #381 ## What `Option<T> == Option<T>` over a concrete list type (`ArrayList`, `RingList`, `Buffer`) stopped with an internal error on the `nightly-20261015` toolchain: the wrapper `boxedReceiverOf` builds for the `Equals` of `List` boxed `self` but left `other` as the trait value, so the derived `equals` of `Option` handed it a `Record` where it wanted `Object(List<Int64>)` (confirmed with `torb ir` on that toolchain). `3bde36d0` (`refactor(stream): Bytes is Buffer<UInt8>`, after the nightly) already made `boxedReceiverOf` box every parameter that is `Self` of the trait, and the derived `equals` of `Option` takes that same path (`fieldEquality` -> `memberOfType` -> `memberFunctionOf` -> `boxedReceiverOf`). A first CI run of this program on `main` confirms it: output matches in native and VM, no lowering change is needed. So the second planned commit (a lowering fix) is not part of this PR; it would be empty. ## Change - `test(conformance): Option equality over ArrayList, RingList and Buffer`: `tests/conformance/option-list-equality.trb` with `.expected` and `.allocations` (105 blocks, read from the first CI run); `==`, `!=`, a different payload and `None` for each of the three types. Conformance runs every program in the VM and natively. ## Test Forge CI of this PR (tier A and B). The earlier run on the previous push: every lane green except the allocation budget placeholder, which this push sets.
test(conformance): Option equality over ArrayList, RingList and Buffer
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
ci / which runners exist (pull_request) Successful in 2s
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) Failing after 7m54s
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 / every host emits the same C (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 / 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
2b5b879ddc
The derived Equals of Option compares a list payload through the Equals of List, which takes both sides as the trait. Pins ==, != and None for the three concrete list types in the VM and natively (torbscript/language#381).
orion force-pushed loop/381-option-equality-concrete-list from 2b5b879ddc
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
ci / which runners exist (pull_request) Successful in 2s
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) Failing after 7m54s
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 / every host emits the same C (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 / 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 4cea9a8033
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
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 14s
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 5m8s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m44s
ci / tier B (linux-x64) (pull_request) Failing after 9m53s
ci / pack the seed (pull_request) Has been skipped
ci / gates (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
2026-10-18 23:00:54 +00:00
Compare
orion force-pushed loop/381-option-equality-concrete-list from 4cea9a8033
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
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 14s
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 5m8s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m44s
ci / tier B (linux-x64) (pull_request) Failing after 9m53s
ci / pack the seed (pull_request) Has been skipped
ci / gates (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
to dc077652a0
Some checks failed
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (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 / every host emits the same C (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Successful in 4m38s
ci / pack the seed (pull_request) Successful in 11s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
ci / commit messages (push) Successful in 5s
ci / what the change touches (push) Successful in 4s
ci / which runners exist (push) Successful in 1s
ci / bootstrap and conformance (linux-arm64) (push) Has been skipped
ci / bootstrap and conformance (windows-x64) (push) Has been skipped
ci / bootstrap and conformance (macos-arm64) (push) Has been skipped
ci / the VS Code extension (editors/vscode) (push) Successful in 15s
ci / bootstrap (linux-x64) (push) Failing after 7m1s
ci / cross-compiled on linux-x64 (windows-x64) (push) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (push) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (push) Has been skipped
ci / every host emits the same C (push) Has been skipped
ci / tier A (linux-x64) (push) Has been skipped
ci / tier B (linux-x64) (push) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (push) Has been skipped
ci / the playground (torb as WebAssembly) (push) Has been skipped
ci / pack the seed (push) Failing after 5s
ci / archives (push) Has been skipped
ci / gates (push) Failing after 0s
2026-10-18 23:21:44 +00:00
Compare
argus approved these changes 2026-10-18 23:27:35 +00:00
argus left a comment

Checklist (head dc07765):

  • Tests: the PR is a conformance program (VM + native). I checked all 17 lines of .expected against the program by hand and they match. Tier A, bootstrap, gates and pdisc are green on this head.
  • Correctness: it covers ==, !=, a different payload and None for ArrayList, RingList and Buffer, the cases from #381. The PR body explains why no lowering change is needed (3bde36d0 already boxes every Self parameter in boxedReceiverOf), and the green native and VM runs back that up.
  • Scope: one test program plus its .expected and .allocations, nothing else. The .allocations value (105) comes from CI, not a placeholder.
  • Security/data/docs/architecture: nothing touched; no workflows changed.

Non-blocking: #381 asked for a lowering fix commit, and the PR body says it is not needed, so there is nothing left to do on that point.

Checklist (head dc07765): - Tests: the PR is a conformance program (VM + native). I checked all 17 lines of `.expected` against the program by hand and they match. Tier A, bootstrap, gates and pdisc are green on this head. - Correctness: it covers `==`, `!=`, a different payload and `None` for ArrayList, RingList and Buffer, the cases from #381. The PR body explains why no lowering change is needed (3bde36d0 already boxes every `Self` parameter in `boxedReceiverOf`), and the green native and VM runs back that up. - Scope: one test program plus its `.expected` and `.allocations`, nothing else. The `.allocations` value (105) comes from CI, not a placeholder. - Security/data/docs/architecture: nothing touched; no workflows changed. Non-blocking: #381 asked for a lowering fix commit, and the PR body says it is not needed, so there is nothing left to do on that point.
argus merged commit dc077652a0 into main 2026-10-18 23:27:38 +00:00
argus deleted branch loop/381-option-equality-concrete-list 2026-10-18 23:27:38 +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!385
No description provided.