[P1] Check the quality gate out from the base branch so a PR cannot judge itself
Author: MajorLiftCreated Sep 25, 2026Updated Sep 25, 2026
LabelsSev2-normalteam-extension-platformINVALID-ISSUE-TEMPLATEsize-Sta-ai-fixableta-triaged
Parent Epic: #7608 Quality Gate: Verdicts Size: S
Problem
run-benchmarks.yml's quality-gate job checks out without a ref:, so it runs the gate code from the pull request's own head. A PR can raise its own threshold, or drop its own metric from the gated set, in the same commit that regresses performance, and the gate will agree with it.
Solution
Pass ref: ${{ github.base_ref }} on the quality-gate job's checkout. The thresholds, the gated-metric list and the comparison script all come from the base branch; only the measurements come from the head.
Acceptance Criteria
- The
quality-gatejob checks out the base branch - A PR that edits
thresholds.tsis still judged against the base branch's values - A test or a control run demonstrates the head's edit is not honoured
Source: MetaMask/metamask-extension