Repository navigation
raco rivet measure: size budgets and launch survival - #278
Merged
Merged
Conversation
turinglambdaai
force-pushed
the
feat/measure
branch
from
October 16, 2026 16:15
2f80675 to
2aa5a27
Compare
…urvival The migration docs defined stop rules referencing startup/package-size/ latency thresholds, but rivet shipped no measurement tooling, so every host app hand-rolled ad-hoc timing or skipped measuring. raco rivet measure covers the deterministic parts (issue #262): - measure size lists every dist/ artifact with its byte count; with --budget <file> each artifact matches the first glob rule that fits ({"rules": [{"glob": "*.dmg", "max-bytes": N}, ...]}) and the command exits nonzero on any violation, so a bundle-size regression fails the build instead of shipping. Budget files live next to rivet-schema.json in the product repository. - measure startup runs the launch-survival smoke over the packaged artifact and reports the elapsed window, measuring the boot gate rather than assuming it. Per-RPC latency deliberately stays with the integration --benchmark mode, which measures the real embedded runtime end to end; a detached CLI cannot reach into a packaged GUI host, and the doc says so. Empty dist/ trees are a hard error (measuring nothing would read as a green gate), and malformed budget files fail loudly instead of gating nothing.
turinglambdaai
force-pushed
the
feat/measure
branch
from
October 16, 2026 17:09
2aa5a27 to
17c8e34
Compare
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.
Closes #262 (deterministic part; see scope note below).
What
raco rivet measurecovers the two deterministic measurements release CI needs:measure size [--budget <file>] [--artifact <name>]lists everydist/artifact with its byte count. With a budget file ({"rules": [{"glob": "*.dmg", "max-bytes": 100000000}, ...]}, first matching glob wins), any violation exits nonzero — a bundle-size regression fails the build instead of shipping. Emptydist/is a hard error; a malformed budget file fails loudly instead of gating nothing.measure startup [--artifact <name>] [--seconds N]runs the launch-survival smoke over the packaged artifact (the same gatepackage/verifyuse) and reports the elapsed window.Scope note (why #262 stays partially open in wording)
Per-RPC latency deliberately stays with the integration
--benchmarkmode: that measures the real embedded runtime end to end, which a detached CLI cannot reach into a packaged GUI host.docs/benchmarks.mdnow documents both the budget file format and this boundary; the issue stays open only if maintainers want an embedded-runner aggregation command on top.Tests
12 tests in
rivet/tests/measure.rkt: plain listings, glob gating with first-match-wins, violation detail (artifact + bytes + budget), relaxation clearing the gate, empty-dist hard error, malformed/missing budget files, and artifact filtering. Full suite: 9874 pass.