Skip to content

test: nothing checks conveyor results against the spec's prototype #951

Closed as not planned

Description

@bpowers

The conveyor corpus test only checks that the VM, the wasm backend, and the XMILE and protobuf round trips all agree with the VM.
A bug in the VM's conveyor pass that the wasm backend copies would pass it.
test/conveyors/reference_prototype.py, a Python transcription of the spec's per-step rules, is the independent check, but nothing runs it.

What already covers it

src/simlin-engine/src/conveyor_tests.rs checks the VM against expected values transcribed by hand from the prototype (s1-s15).
Those cover transport, capacity, inflow limit, linear and exponential leak, staggered leak zones, discrete admission with two inflows, and arrest.
The prototype already covers leak zones and discrete admission; it does not cover a queue feeding a conveyor.

The README and docs/design/conveyors.md describe this accurately.

Fix

Options, cheapest first:

  1. Add hand-worked expected values for the queue-to-conveyor case to conveyor_tests.rs, derived from the spec rather than copied from VM output. Wait for engine: queue-fed discrete conveyor holds fractional amounts #950 first, since it decides what that case should produce.
  2. Extend the prototype to the queue case and run it from a Rust test against the corpus fixtures. This adds a Python dependency to cargo test.

Pointers

Activity

  1. added
    engine
    hygiene
    on Oct 12, 2026
  2. changed the title [-]test: the conveyor corpus has no independent numeric oracle -- a lockstep VM+wasm drift would pass every test[/-] [+]test: nothing checks conveyor results against the spec's prototype[/+] on Oct 12, 2026
  3. added
    wontfix
    on Oct 12, 2026
  4. bpowers commented on Oct 12, 2026

    @bpowers
    OwnerAuthor

    Closing as won't fix.

    conveyor_tests.rs s1-s15 already pin VM numerics with hand-transcribed prototype values, including zones and discrete admission (the prototype already covers both). The stale README and doc claims are already fixed. Only the queue-fed case is unpinned, and #950 must decide its semantics first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enginehygienewontfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions