perf(frontend): benchmark the wasm envelope seal in Chromium (P34) #255
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.42) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 353 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.351
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #255"
general
weight: 0.35
abendrothj
What and why
Part of #171 (P34): the checkpoint A benchmark. It measures the wasm envelope seal in a real browser and records the results in
docs/BENCHMARKS.md, giving ADR 0012 a measured bound on the size of one sealed upload.scripts/bench-wasm-seal.shbuilds the module and the frontend, then writes synthetic Parquet withsynth-data(wide, seed 1) at about 1 MiB, 100 MiB and 1 GiB. It seals each size in a fresh dedicated worker in headless Chromium (the new vitestbenchproject) and prints a Markdown report with bundle size, module load time, seal time and module peak memory.envelope.tsgainsenvelopeMemoryBytes(), which reads the module's linear memory size. Linear memory only grows, so after a seal this is the module's peak.wasm-sealjob in thebenchworkflow runs the script on PRs that touch the module, the script or the backend. It reports only, like the native benchmarks. It fails only if a seal fails or an envelope is not exactly 52 bytes longer than its plaintext.Results (i7-1355U, Chromium 158, see
docs/BENCHMARKS.md)DATASET_MAX_MIB(at most 512) is under that ceiling, so one object per upload needs no per-object cap for the seal's sake.Targets
@AxolDad, the issue asks for a target agreed with you. The proposed targets are in
docs/BENCHMARKS.mdunder "Targets":Please confirm or adjust them.
Checkpoint B (open) is not in this PR.
How it was tested
scripts/check.shpasses locally, including the white-label guard on the built bundle.scripts/bench-wasm-seal.shran end to end, with all 4 benchmark tests passing. A second run on the same machine gave the same memory figures and timings within ±15 % of the recorded baseline.npm testandnpm run test:browserdo not pick up thebenchproject.Checklist
scripts/check.shpasses locallySECURITY_AUDIT_EVENTcovered byaudit_coverage.rs(n/a)docs/DATA_POLICY.md)CHANGELOG.mdupdated for user-visible changesdocs/adr/if one was made (n/a: none made)