tests/wasm size budget measures a different artifact when the stdlib snapshot is embedded
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 43/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- build-system, testing
Hướng nghiên cứu
Start with tests/wasm and read TestWasmRuns/js/fits_the_engine_size_budget and fits_the_core_size_budget, then inspect internal/workspace/libs/snapshot_embedded.go and the go-gates CI job to see how the snapshot affects the measured binaries. Choose and implement one of the two proposed approaches, then verify the tests measure the same defined artifact consistently with or without a prior make build.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
tests/wasm (TestWasmRuns/js/fits_the_engine_size_budget, fits_the_core_size_budget) gzips whichever sysml-engine.wasm and sysml-core.wasm the tree builds and checks them against fixed budgets (9,400,000 and 7,300,000 bytes). The artifact it measures depends on state outside the test: when make stdlib-snapshot has run (every make build-* target runs it), internal/workspace/libs/snapshot_embedded.go embeds stdlib.snapshot (4,106,931 bytes) into both binaries; when it has not, package libs compiles without the embed. CI's go-gates job never generates the snapshot, so CI measures the smaller artifact, while a developer who ran make build before go test ./tests/wasm measures the larger one and can fail a gate CI passes.
Gzipped sizes measured in clean worktrees under go1.27.3:
| Tree | engine, no snapshot | engine, snapshot | core, no snapshot | core, snapshot |
|---|---|---|---|---|
| develop 4464eedb78 | — | 9,387,717 | — | 7,289,686 |
| a feature branch merged with that develop | 7,750,091 | 9,402,589 | 5,649,507 | 7,302,134 |
| the same branch two commits later | 7,753,441 | 9,406,206 | 5,657,298 | 7,309,050 |
The engine budget's comment records 9,105,348 bytes on 2026-10-27, which is the with-snapshot size, so the budgets were calibrated against the artifact CI does not build. With the snapshot, develop is 12 KB under the engine budget and 10 KB under the core budget; an ordinary 18 KB of new semantics code crosses both. Without it, there is 1.6 MB of headroom and the budgets bound nothing.
Proposal, either of:
- The test builds the artifact it measures from a known state: it decides whether the snapshot is embedded (generating it with
go generate ./internal/workspace/libsinto a temporary copy, or building with the embed excluded) rather than inheriting whatever the tree holds, and the budgets are stated for that artifact. - CI embeds the snapshot too, so the gate and the released binaries measure the same thing, and the budgets are re-stated with their date and the artifact they bound.
Until one of these lands, a budget failure after make build is not evidence that a change grew the engine; compare against develop built the same way.
- Ngôn ngữ chính
- Go
- Star
- 56
- Fork
- 17
- Merge trung bình
- 12 giờ 50 phút
- Pull request đã merge (30 ngày)
- 905
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Open-MBEE/OpenSysML
-
dependencies
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Open-MBEE/OpenSysML#1951 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug spec compliance
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug spec compliance
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Open-MBEE/OpenSysML#2033 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Open-MBEE/OpenSysML#2029 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement spec compliance
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Open-MBEE/OpenSysML#2028 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Open-MBEE/OpenSysML
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
nebari-dev/nebi#652 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nightgauge/nightgauge#3077 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
debug-adapter language server
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
open-policy-agent/regal#2161 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày