Problem
vm.test.vm: optimizer executes a global environment load natively intermittently fails after the optimizer artifact has been published:
expected <environment address>, found 0
src/vm.zig:17384The test assumes one direct call after artifact publication must execute the optimizer and publish the global-binding proof cache. Under a full 10-shard unit run that call can still use a lower tier; a focused 20-run loop reproduced the zero environment_token failure.
Evidence
- Full gate: 2,582 passed, 1 skipped, 1 failed, 0 leaked; only this test failed.
- Immediate focused rerun passed in 75 ms.
- Repeated focused runs reproduced the failure in 3.477 s.
- The artifact and native-operation descriptor exist in both outcomes; only the environment proof remains unpublished in the failing outcome.
Definition of done
- The witness waits for or deterministically drives optimizer execution rather than assuming one post-publication call is sufficient.
- It still proves that the native global-load callback populated the exact environment and shape tokens.
- It retains bounded compile-count and exact step-accounting assertions.
- Repeated focused runs pass.
- The full sharded unit suite passes with zero failures and leaks.