Add CI; fix bench/ops.ts against the current mountApp signature - #19
Merged
Conversation
bench/ops.ts still called mountApp({ componentBytes, translator, root,
onError }) — the pre-`source` shape. Every op failed all three attempts
with "Cannot use 'in' operator to search for 'plan' in undefined", and
because bench_worker.ts deliberately turns a failed op into
medianMs: null rather than aborting the run, total breakage rendered as
a table of N/A rather than as a crash.
`deno check` catches it outright (TS2353). Nothing was running
`deno check` over bench/: deno.json's check task covered host/src and
host/tests only. Widened to include bench.
That the hole survived at all is the more general problem — the repo had
no CI, so every gate was "someone remembers to run it". Adds a workflow
running the existing just recipes unchanged, so a green check means what
`just check && just test` means locally. It builds the fixture and
counter components because the suites that load them throw rather than
skip when the .wasm is absent, and it runs both halves of the
cross-language protocol gate: golden_matches_committed pins the Rust
encoder to vectors/, and decoder_test.ts pins the TypeScript decoder to
the same files.
Toolchain versions are pinned, matching how the justfile pins
POLYENGINE_REV and Cargo.toml pins dioxus/wit-bindgen: a floating
toolchain can turn `clippy -D warnings` red with no commit to blame.
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.
bench/ops.tswas callingmountAppwith the pre-sourceoption shape:Every op failed all three attempts with
Cannot use 'in' operator to search for 'plan' in undefined. Becausebench_worker.tsdeliberately converts a failed op intomedianMs: nullrather than aborting the run (one op failing shouldn't kill the whole table), complete breakage rendered as a table ofN/Arather than as a crash.The type checker already knew
deno check benchreports it outright:Nothing was running it.
deno.json'schecktask coveredhost/src host/testsand stopped there. Widened to includebench. The threetranslator: unknownparameters are nowUntranslatedArtifacts["translator"], taken from the embedder's own type so the call site stays pinned to whatmountAppaccepts.CI
The hole surviving is the more general problem: there was no CI at all, so every gate was "someone remembers to run it". This adds
.github/workflows/ci.yml, which runs the existingjustrecipes unchanged — new gates belong in the justfile, not in the workflow.Two things it deliberately does:
host/tests/counter_test.tsandhost/tests/fullstack_test.tsthrow when their.wasmis missing rather than skipping, so these steps are load-bearing: drop one and the suite goes red, not quietly green.cargo test'sgolden_matches_committedpins the Rust encoder tovectors/;deno task test'sdecoder_test.tspins the TypeScript decoder to the same committed files. Neither was running automatically before.Toolchain versions (Rust, Deno, wasm-tools, just) are pinned, matching how the justfile pins
POLYENGINE_REVandCargo.tomlpins dioxus/wit-bindgen. A floating toolchain can turnclippy -D warningsred on a new lint with no commit to blame.Verified locally
Ran the workflow's exact sequence:
just deps(17s from a clean checkout),just check,just fixtures,just example counter,just test— cargo 10 passed +golden_matches_committedok, deno 87 passed including the 4 golden-vector tests.bench/bench_worker.ts remove-row streamnow returns a real median instead ofnull.Independent of the
stream<u8>vsstream<operation>spike (#18), which stays as it is.