Skip to content

test(wasm): bound the engine and combined gzip budgets at gross growth - #975

Merged
HuiJun merged 1 commit into
developfrom
test/wasm-gross-growth-budgets
Oct 7, 2026
Merged

HuiJun merged 1 commit into
developfrom
test/wasm-gross-growth-budgets

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

What and why

develop at 4ce0260 (#884, grid view and relationship matrix) is over the combined WebAssembly budget #970 set. On CircleCI's cimg/go:1.25-node image the gzipped js build of sysml-wasm is 8,355,865 bytes against the 8,350,000-byte budget, so TestWasmRuns/js/fits_the_combined_size_budget fails the Go gates and binaries and Go coverage shards jobs of every develop pipeline from 3835 on; sysml-engine is 7,686,608 against 7,700,000. A GitHub runner builds the same tree about 11 KB smaller (8,344,612 / 7,686,149), which is why the pull-request WebAssembly gate passed. Before #884 the figures were 8,329,707 / 7,662,571 on CircleCI and 8,314,894 / 7,656,349 on GitHub.

The size as it stands is accepted, and the budgets stop moving 50 KB with each feature (#970 and its predecessors): they now bound gross growth only, keeping the combined build under 10 MB with the engine bounded proportionally.

  • tests/wasm/combined_test.go: combinedGzipBudget 8,350,000 → 10,000,000
  • tests/wasm/engine_test.go: engineGzipBudget 7,700,000 → 9,000,000
  • changes/unreleased/wasm-size-budgets.changed.md: a second list item, since test(wasm): raise the engine and combined gzip budgets by 50 KB #970's fragment is still unreleased and the release notes should carry one budget entry

TestEngineDependencies is the gate that keeps a forbidden dependency out of the engine now that the size bound is loose.

How it was verified

Fail-first is the CircleCI measurement above: the local toolchain builds smaller than cimg/go:1.25-node (as GitHub's runners do), so a local run of the old budget is not evidence either way — on this machine the same tree gzips to 8,345,131, 5 KB under the old budget.

After the edit, go test -count=1 -v -run 'TestWasmRuns|TestEngineDependencies|TestBrowserREPL' ./tests/wasm (go1.25.11, Node v24.19.0, so the js subtests ran):

engine_test.go:164: gzipped sysml-engine.wasm is 7686326 bytes, under the 9000000-byte budget
syntax_test.go:173: gzipped sysml-syntax.wasm is 1482873 bytes, under the 1540000-byte budget
core_test.go:195: gzipped sysml-core.wasm is 5968789 bytes, under the 6300000-byte budget
combined_test.go:155: sysml-wasm.wasm is 33646608 raw bytes and 8345131 bytes gzipped -9
--- PASS: TestBrowserREPLWalkthroughs (30.28s)
--- PASS: TestEngineDependencies (0.34s)
--- PASS: TestWasmRuns (108.33s)
ok  	github.com/Open-MBEE/OpenSysML/tests/wasm	138.968s

TestEngineDependencies still bites: with a one-off, reverted _ "github.com/Open-MBEE/OpenSysML/internal/frontend/stdiorpc" import added to cmd/sysml-engine/main.go, go test -count=1 -run TestEngineDependencies ./tests/wasm fails with forbidden dependency in wasip1 build: google.golang.org/grpc/... and google.golang.org/protobuf/... lines (and the js build likewise) in 0.4 s.

Also: go build ./..., go vet ./tests/wasm/..., gofmt -l tests (prints nothing), python3 scripts/changelog.py check.

Checklist

  • go build ./..., go vet ./tests/wasm/..., gofmt -l tests and the tests/wasm gate pass locally
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (no doc states these budgets)
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • No gate count moved, so no baseline or make docs-counts run
  • No internal work-item labels in the body, docs, or changelog

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/c5331dc511a342859cad8a88d46fa210
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/c5331dc511a342859cad8a88d46fa210?variant=devin
Requested by: @HuiJun

develop at 4ce0260 (grid view and relationship matrix) is over the
combined budget again: on CircleCI's cimg/go:1.25-node image the gzipped
js build of sysml-wasm is 8,355,865 bytes against the 8,350,000-byte
budget, failing TestWasmRuns/js/fits_the_combined_size_budget in the Go
gates and binaries and Go coverage shards jobs of every develop pipeline
from 3835 on, while sysml-engine is 7,686,608 against 7,700,000. A GitHub
runner builds the same tree about 11 KB smaller (8,344,612 / 7,686,149),
so the pull-request gate passed. Before that merge the figures were
8,329,707 / 7,662,571 on CircleCI and 8,314,894 / 7,656,349 on GitHub.

The size as it stands is accepted. Set combinedGzipBudget to 10,000,000
and engineGzipBudget to 9,000,000 so the budgets bound gross growth only
instead of moving 50 KB with each feature; TestEngineDependencies remains
the gate that keeps a forbidden dependency out of the engine.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review October 7, 2026 02:36

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

@HuiJun
HuiJun merged commit 72a278b into develop Oct 7, 2026
24 checks passed
@HuiJun
HuiJun deleted the test/wasm-gross-growth-budgets branch October 7, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant