Skip to content

raco rivet measure: size budgets and launch survival - #278

Merged
turinglambdaai merged 1 commit into
mainfrom
feat/measure
Oct 16, 2026
Merged

turinglambdaai merged 1 commit into
mainfrom
feat/measure

Conversation

@turinglambdaai

Copy link
Copy Markdown
Owner

Closes #262 (deterministic part; see scope note below).

What

raco rivet measure covers the two deterministic measurements release CI needs:

  • measure size [--budget <file>] [--artifact <name>] lists every dist/ 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. Empty dist/ 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 gate package/verify use) and reports the elapsed window.

Scope note (why #262 stays partially open in wording)

Per-RPC latency deliberately stays with the integration --benchmark mode: that measures the real embedded runtime end to end, which a detached CLI cannot reach into a packaged GUI host. docs/benchmarks.md now 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.

…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
turinglambdaai merged commit 14ece20 into main Oct 16, 2026
20 checks passed
@turinglambdaai
turinglambdaai deleted the feat/measure branch October 16, 2026 17:13
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.

DX: raco rivet measure — startup/size/latency budgets for a host app

1 participant