test: move slow emit-zig behavioral smoke out of default zig build test#77
Merged
Merged
Conversation
…est` The dev-loop `zig build test` ran ~221s, dominated by two emit-zig behavioral suites that spawn a nested `zig build wasm` per fixture (~33 cache-missing wasm compiles). Their circuit-behavior coverage is fully duplicated by the production-path serializer_fixtures_test (prebuilt runtime + topology sections, no per-fixture compile). Trim those suites to a small emit-backend smoke and split the build into `test` (fast dev loop), `test-emit` (opt-in emit smoke), and `test-all` (CI gate = both); point pr-tests.yml at `test-all`. Add a build-once guard to the CLI integration test. Dev-loop `test` drops from ~221s to ~31s with no loss of behavioral coverage.
Contributor
Engine bench: deltas vs
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The dev-loop
zig build testhad grown to ~221 s (warm), and almost all of it was a single serial tail. Two emit-zig behavioral suites (tests/emit/behavior_test.zig,tests/emit/project_behavior_test.zig) each spawn a nestedzig build wasmper fixture — ~33 cache-missing WebAssembly compiles per run, one of which alone accounted for ~180 s.Those suites compile a circuit through the experimental
--emit-zigbackend (standalone Zig source → wasm) and assert its runtime behavior. But that same behavior, over the same 32-fixture corpus and the same expected vectors, is already validated far more cheaply bytests/e2e/serializer_fixtures_test.zig, which drives the production path: splice topology sections into the prebuilt embedded runtime and run via Node, with no per-fixture compile. The two emit suites were therefore ~100% redundant for behavioral coverage; their only unique value is smoke-testing the emit-zig backend itself.Change
zig build test— fast dev-loop suite (default); full circuit-behavior coverage retained viaserializer_fixtures_test.zig build test-emit— opt-in emit-zig backend smoke (the nested-build suites).zig build test-all—test+test-emit; the full gate.pr-tests.ymlattest-allso emit-backend regressions still block merges (the job name is unchanged to preserve the required-check identity).tests/cli/integration_test.zig, which was invokingzig build circ-compile16 times per run.Result
zig build test(dev loop)zig build test-all(CI)Coverage was verified intact: deliberately breaking the AND-gate evaluator turns the fast
testred viaserializer_fixtures_test(plus the truth-table suites).A prior round of test-speed work (96 s → 25 s, via a persistent wasm workspace) is recorded in
DOCS/archive/plan-test-speed.md. A natural follow-up — grouping the ~57 per-module test binaries and reusing the installed CLI binary in the integration test instead of rebuilding it — would push the dev loop below ~31 s.