Skip to content

wasm: publish conveyor container-access values at step start #923

Closed

Description

@bpowers

Sub-issue of #884. Follows the conveyor belt pass.

Problem

Conveyor container-access variables (conv[j], SUM(conv), MEAN, MIN, MAX, SIZE, STDDEV -- docs/design/conveyors.md section 10) are published by publish_container_values (conveyor_compile.rs:2889) into a synthesized hidden stock at step start, before the Flows phase, from the belt's start-of-step state. The wasm backend does not lower them.

The queue equivalent landed in d043434: ContainerPlan entries are unrolled at emit time and published from a second hook point distinct from the admit-then-serve pass. Reuse that structure.

Why the hook point matters

Step-start publishing is not an implementation detail. Ordinary equations read these values during the Flows phase, so publishing them between Flows and Stocks (where the step pass runs) would feed every consumer the previous step's belt state. The queue lowering keeps the two hook points separate for exactly this reason; do not collapse them.

Scope

  • ContainerPlan (shared with the queue side) carries a resolved slot offset and an access kind.
  • Publish from the belt's start-of-step slat vector, before the Flows phase.
  • The kinds are compile-time constants, so unroll: one open-coded reduction per container variable, no runtime dispatch on the kind.
  • The only runtime loop should be over the dynamic slat count.

Acceptance

  • A conveyor model with container-access variables produces the same series from the wasm backend as from the VM, at existing epsilons.
  • Mutation-verify the gate: perturb one published value and confirm the parity test goes red.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions