fix: require runtime evidence in budget gate
This commit is contained in:
@@ -4,11 +4,13 @@ This runbook separates executable developer evidence from the two physical relea
|
||||
|
||||
## Automated build and transfer gate
|
||||
|
||||
Run `npm run build:preview`. The build ends with `npm run check:budgets`, which classifies every shipped file exactly once, measures Brotli transfer bytes (or raw bytes for already-compressed formats), verifies that the live Three.js scene remains behind a dynamic import, and applies the exact section 14 thresholds. Unknown files fail closed. Every non-empty manifest media file is hash-checked and deterministically decoded: Sharp verifies image dimensions and `ffprobe` verifies video dimensions and duration against the manifest. Missing probe evidence, disagreement, or an unprobeable asset fails the gate.
|
||||
Run `npm run build:preview`. The build ends with the explicitly named `npm run check:budgets:transfer`, which classifies every shipped file exactly once, measures Brotli transfer bytes (or raw bytes for already-compressed formats), verifies that the live Three.js scene remains behind a dynamic import, and applies the static section 14 thresholds. Unknown files fail closed. Every non-empty manifest media file is hash-checked and deterministically decoded: Sharp verifies image dimensions and `ffprobe` verifies video dimensions and duration against the manifest. Missing probe evidence, disagreement, or an unprobeable asset fails the check. Its report is marked `transfer-only-non-gating` with runtime evidence pending; this static build check is not the full performance budget gate.
|
||||
|
||||
Runtime budgets are not read from a hand-edited estimate. The authenticated test build records the actual production `SceneResourceBag`: owned texture dimensions/pixel layout/mipmap state, the byte lengths of unique geometry buffers, live render-target dimensions/attachments/samples, and the production framebuffer. A dedicated production-path capture derives peak image/scene and video concurrency from completed browser Resource Timing intervals. The evaluator recomputes decoded bytes, adds the fixed 32 MB allowance, and enforces the Low/High GPU, concurrency, and 2048-pixel mobile texture caps. Adding a production resource or eager request therefore changes the measured ledger.
|
||||
|
||||
Run `npm run capture:runtime-budgets`. It loads the real High scene at a device DPR of 2, verifies that the renderer actually reaches its 1.5 DPR cap, and writes `runtime-budget-trace.v1.json` beneath the ignored Playwright result directory. Then verify that exact capture with `npm run check:budgets -- --runtime-trace <runtime-budget-trace.v1.json>`. The checker rejects the former standalone evidence schema, a tier/profile mismatch, a missing DPR-cap observation, or framebuffer dimensions that do not match the observed viewport. Supplied totals are ignored and recomputed from raw allocations.
|
||||
Run `npm run verify:runtime-budgets` for the full executable budget gate. One Node orchestrator runs the authenticated Chromium production-path capture, writes the stable ignored `test-results/runtime-budget-trace.v1.json`, and immediately invokes the full checker with it. It loads the real High scene at a device DPR of 2 and verifies that the renderer actually reaches its 1.5 DPR cap. The checker rejects the former standalone evidence schema, a tier/profile mismatch, a missing DPR-cap observation, or framebuffer dimensions that do not match the observed viewport. Supplied totals are ignored and recomputed from raw allocations. Direct `npm run check:budgets` without `--runtime-trace` fails closed; use `--transfer-only` only through the explicitly non-gating static check.
|
||||
|
||||
`npm run verify:phase3` runs this full runtime gate followed by the complete browser suite. It is the Phase 3 release verification command; `build:preview` alone is deliberately not presented as the full runtime gate.
|
||||
|
||||
High-tier-only chunks use the `high-tier-*`/`environment-high-*` bucket and are capped separately.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user