fix(perf): verify frame-rate degradation and coverage - #316
Conversation
Audit complete — Verdict: FAIL (correctable) · READY_FOR_MAIN: NOI read PR #316 in full, audited the current branch against
The paradox: green gate, not merge-ready
What's actually good ✅
What blocks merge ❌
Path to PASS
Net: the implementation ( |
…r to accept options
…ekaramet/bugfix-A-281-277-230-batch-4 # Conflicts: # docs/implementation/audit-traceability-matrix.md # tests/unit/policy-gate/playwright-no-tests.test.js
fix(perf): verify frame-rate degradation and coverage
📝 Description
🔄 What Changed
createFrameProbeto trackmaxContiguousSlowDurationMsandmemoryAccumulationBytesmetrics over the sampled frame window. Added support forclearBufferreset option to clear pre-injection frame samples. Exposedresetmethod on window__MS_GHOSTMAN_FRAME_PROBE__hook object.src/main.ecs.jssetting the branch floor to 75% to prevent low branch coverage masking.createFrameProbemetrics computation, warmup window steps, and stats calculation correctness.AUDIT-CI-09and reference new performance audit E2E tests.🎯 Why
maxContiguousSlowDurationMsandmemoryAccumulationBytes), which could lead to undetected frame-rate degradation or memory leaks in production. Global-aggregate coverage gates masked low branch coverage inmain.ecs.js.🧪 Verification & Audit
✅ Verification
npm run policy📋 Audit Traceability
[Fully Automatable]| Verification:Performance audit: flags sustained frame drops under artificial delay| Evidence: audit.browser.spec.js[Fully Automatable]| Verification:Performance audit: flags memory accumulation delta under mock leak| Evidence: audit.browser.spec.js✅ PR Gate Checklist
📋 Required Checks
npm run policylocally; all checks pass.<owner>/<TRACK>-<NN>convention.🏗️ Architecture & Security
src/ecs/systems/has no DOM references (exceptrender-dom-system.js).textContentor explicit attribute APIs.🛡️ Security & Architecture Notes
performance.memoryproperties which are read-only properties exposed by the browser runtime context, presenting no injection risk.Closes #281
Closes #277
Closes #230