Skip to content

test(wasm): raise the engine and combined gzip budgets by 50 KB - #970

Merged
HuiJun merged 1 commit into
developfrom
test/wasm-size-budgets
Oct 6, 2026
Merged

HuiJun merged 1 commit into
developfrom
test/wasm-size-budgets

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

What and why

develop at 4552bed (exact Rationals, #838) is over the WebAssembly size budgets. CircleCI's Go gates and binaries job on that commit measured

combined_test.go:153: gzipped sysml-wasm.wasm is 8309493 bytes, over the 8300000-byte budget
--- FAIL: TestWasmRuns/js/fits_the_combined_size_budget
engine_test.go:164: gzipped sysml-engine.wasm is 7647486 bytes, under the 7650000-byte budget

so TestWasmRuns in tests/wasm fails on develop itself and every branch containing #838 fails the WebAssembly gate check; the engine budget is ~2.5 KB from its own limit. Both budgets bound growth only (TestEngineDependencies catches a forbidden dependency), so this lifts both by 50 KB in one round:

  • tests/wasm/combined_test.go: combinedGzipBudget 8,300,000 → 8,350,000
  • tests/wasm/engine_test.go: engineGzipBudget 7,650,000 → 7,700,000 — the figure the existing wasm-engine-dependency-check.changed.md fragment already states
  • changes/unreleased/wasm-size-budgets.changed.md

docs/ and tests/wasm state no budget figure (only measured sizes in docs/reference/wasm.md), so no doc or generated count moved.

How it was verified

go test -count=1 -v -run 'TestWasmRuns' ./tests/wasm with Node v24.19.0 and go1.25.11, so the js subtests ran rather than skipped.

Before editing, on origin/develop (2d1fc0f):

engine_test.go:164: gzipped sysml-engine.wasm is 7637664 bytes, under the 7650000-byte budget
syntax_test.go:173: gzipped sysml-syntax.wasm is 1480306 bytes, under the 1540000-byte budget
core_test.go:195: gzipped sysml-core.wasm is 5926768 bytes, under the 6300000-byte budget
combined_test.go:155: sysml-wasm.wasm is 33441641 raw bytes and 8293016 bytes gzipped -9
--- PASS: TestWasmRuns (51.09s)

This local build lands ~10–16 KB smaller than CircleCI's cimg/go:1.25-node build of the same tree (combined 8,293,016 vs 8,309,493; engine 7,637,664 vs 7,647,486), so the combined subtest passes here by 7 KB where CI fails it by 9 KB — the budgets are within toolchain noise either way, which is why both move at once.

After editing:

engine_test.go:164: gzipped sysml-engine.wasm is 7637651 bytes, under the 7700000-byte budget
syntax_test.go:173: gzipped sysml-syntax.wasm is 1480298 bytes, under the 1540000-byte budget
core_test.go:195: gzipped sysml-core.wasm is 5926768 bytes, under the 6300000-byte budget
combined_test.go:155: sysml-wasm.wasm is 33441660 raw bytes and 8292993 bytes gzipped -9
--- PASS: TestWasmRuns (54.77s)

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

Checklist

  • go build ./..., go vet ./..., gofmt -l . 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 4552bed (exact Rationals) is over the WebAssembly size
budgets: the Go gates job measured the gzipped js build of sysml-wasm at
8,309,493 bytes against the 8,300,000-byte budget, failing
TestWasmRuns/js/fits_the_combined_size_budget, and sysml-engine at
7,647,486 bytes, 2.5 KB under its 7,650,000-byte budget.

Raise combinedGzipBudget to 8,350,000 and engineGzipBudget to 7,700,000
so both bound growth again. The engine figure is the one the existing
changelog fragment for the dependency check already states.

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 6, 2026 20:53

@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 31d5b82 into develop Oct 6, 2026
24 checks passed
@HuiJun
HuiJun deleted the test/wasm-size-budgets branch October 6, 2026 21:01
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