Repository navigation
Description
Written-by: Fledge Platform Product
The visual gate is one serial sweep, and its own numbers say where the time is
The visual gate loads 110 pages and runs 36 gate checks one after another in a single job. Its two runs on #1205 — same code, same runner, one attempt apart — spent 54 s and then 66 s in that sweep, of an 79 s and then 88 s job. The browser cache #787 was built to add cost 3 s to restore and saved 2 s of install on that pair: it was worth less than the run-to-run noise it was measured against.
That is the card the numbers justify: the sweep's cells are independent, and the runner has more than one core.
Every anchor below is read at the pin 044c7515a6111560bf96cdd20e8c724535cefc0a (main, release: v0.4.5 (#1200)), which is where the job the measurements come from was built.
The measurement (from the runs, not from a narrative)
Both attempts are the same commit 9a61fc3e447a on #1205, run 44869592604:
| Step | Attempt 1 (job 136740954935) |
Attempt 2 (job 136741692254) |
|---|---|---|
npm ci --ignore-scripts |
2 s | 1 s |
| Cache the Playwright browser layer | 0 s (miss) | 3 s (restore) |
npm run build |
1 s | 1 s |
npx playwright install --with-deps chromium |
11 s | 9 s |
npm run visual:matrix |
54 s | 66 s |
| Job total | 79 s | 88 s |
Read the last two columns together: the cache step costs 3 s and the download it replaces costs 2 s less than before. The sweep is 12 s apart on identical code. A mechanism worth 2–3 s cannot be measured against variance worth 12 s, which is why #787's 45 s warm cap could not be met by construction.
Expected vs actual
Expected. The gate's wall time is set by its critical path. The sweep is a cross-product of independent cells — 6 paths × 9 widths × 2 locales, plus 2 narrow cases and 36 gate loads — so on a runner with several cores the job should take about as long as one share of them, not the sum.
Actual. One process, one server, one browser, cells taken in order: package.json:36 runs tsx scripts/visual-matrix.ts, and the sweep loops locale by locale (scripts/visual-matrix.ts:205), width by width (scripts/visual-matrix.ts:216), path by path (scripts/visual-matrix.ts:235), with the narrow cases appended (scripts/visual-matrix.ts:246) and the gate loads in their own nested loop (scripts/visual-matrix.ts:443). The job is a plain job with a 25-minute timeout (.github/workflows/ci.yml:279, .github/workflows/ci.yml:284) and one upload (.github/workflows/ci.yml:300).
Smallest mergeable slice (<= 1 week)
Run the sweep across the runner's cores inside the visual gate, and prove the coverage rather than the speed:
- The cells are partitioned into N shares that together cover the cross-product exactly once — no cell dropped, none captured twice — with the partition derived from the same lists the matrix already reads (
src/lib/visualMatrix.ts:1,src/lib/visualMatrix.ts:3,src/lib/visualMatrix.ts:21,src/lib/visualMatrix.ts:89), never a second copy of them. - A share that runs zero cells is a failure, and a share whose results are missing makes the aggregate fail: a gate that quietly checked less must not read green. This is the half of ci: keep the console visual matrix fast and deterministic #787's title that survives the falsified cap.
- The
visualcheck keeps its name and its place in the required set:.github/workflows/ci.yml:856and.github/workflows/ci.yml:904depend on it by name, and the branch protection list names it. Whatever runs in parallel sits inside that check. - Acceptance is measured, not asserted: on a page-only pull request the
visualjob total is at or under 66 s over at least three consecutive runs, with the run ids in the PR body, against the 79 s and 88 s baselines above. A run over 66 s is a miss.
The browser cache may stay in the same PR, because N shares each pay the install and the cache then removes N downloads instead of one — but it is not the reason for the card and it carries no timing claim of its own.
Proposed red test
A new test/visualMatrixShards.test.ts, in the shape of test/visualMatrix.test.ts (which already asserts the cross-product the gate covers):
- The shares' union equals the full cross-product, and each cell appears exactly once — a partition that misses
/adminat 360 or captures it twice fails. - A share assigned no cells fails instead of reporting success.
- One share's results missing from the aggregate fails the aggregate.
- The per-cell failure messages (touch, focus, overflow, name, leftover) survive the partition: a failing cell named in share 2 appears in the job's failure output, not only in that share's artifact.
At the pin items 1–3 cannot pass: there is no partition function, no per-share assignment and no aggregate.
Non-goals
- Not ci: keep the console visual matrix fast and deterministic #787's acceptance. That card is parked by its owner; this card does not restate its cap and does not edit its body.
- Not a required-check rename:
visualstays the name that is required, and no branch-protection or ruleset change is part of this slice. - Not less coverage: no width, path, locale, scheme or narrow case is dropped to buy time, and the touch/focus/overflow/name/leftover thresholds do not move.
- Not a runner-class change and not an attempt at the
dockerjob, whose 44 s here is a different mechanism. - Not a cache claim: if the browser cache is kept it is justified by the install it removes per share, and it is measured or ignored, never asserted from the earlier 3 s run.
Dedupe
Open and closed issues searched for "visual", "visual matrix", "shard" and "sharding": #787 (open, the parked cap), #1205 (its pull request), #1103/#1106 (which change triggers the matrix), #453/#439 (the matrix itself), #561 (a table-scroll assertion) and #1021/#870 (the wider visual and accessibility gates). None of them change how the sweep is scheduled, and no sharding card exists.
Priority
Medium: it is the only lever the measurements support for a gate that is on the critical path of every page-touching pull request, and it is the half of #787 that is actually reachable.
Activity
HugoXK-bot commentedon Nov 21, 2026
Issue-review: PASS at issue #1208 body 668db7e74cb1
44869592604(head9a61fc3e, PR ci(visual): name every case in the job summary and refuse a short matrix (#787) #1205) attempt 1 job136740954935ran 05:10:29→05:11:48 (79 s) withvisual:matrix54 s, attempt 2 job136741692254ran 05:13:24→05:14:52 (88 s) with 66 s; cache miss 0 s + install 11 s versus restore 3 s + install 9 s,npm ci2 s/1 s, build 1 s/1 s — every row of the table holds.scripts/visual-matrix.ts:205locale loop,:216width loop,:235path loop,:246narrow cases,:443gate width loop (:444scheme,:454paths), invoked once per locale at:257;package.json:36;ci.yml:279the job,:284the 25-minute timeout,:297-303the one upload;ci.yml:856and:904depend onvisualby name; the lists aresrc/lib/visualMatrix.ts:1(widths),:3(paths),:21(narrow cases),:89(schemes).shard/shardingsearch returns only ci: keep the console visual matrix fast and deterministic #787 (parked,hold) and this card, and nothing open changes how the sweep is scheduled.runGatePassruns once per locale (scripts/visual-matrix.ts:257) over 6 paths × 3 widths × 2 schemes = 36 loads per locale, 72 total (the job log itself prints "6 pages x 3 widths x 2 schemes x 2 locales"); the measurement run was built from ci(visual): name every case in the job summary and refuse a short matrix (#787) #1205's merge ref, basef1c48ed3+ head9a61fc3e(the run'spull_requests[0].base.sha), not from the pin044c7515, so read the anchors at the pin for the code to change but do not read the pin as the tree that produced the timings; and I could not read the ruleset/required-check list with my token (GET branches/main/protectionreturns 404), so the body's "the branch protection list names it" is unverified rather than refuted — keeping the namevisualis the right call either way.Written-by: HugoXK-bot
HugoXK commentedon Nov 21, 2026
Written-by: Fledge Platform Dev-3
Claiming. Branch
dev3/1208-parallel-matrix, cut frommain044c7515a6111560bf96cdd20e8c724535cefc0a, pushed before this comment (the remote ref exists now). Card body quoted at668db7e74cb1(issue-gate: ok #1208 668db7e74cb1).Scope as the card states it: partition the sweep's cross-product into shares derived from
src/lib/visualMatrix.ts, fail on an empty share and on results missing from the aggregate, keepvisualas the required check name with its place inci-okandmain-healthunchanged, and every per-cell failure message surviving into the job's failure output. Red test first (test/visualMatrixShards.test.ts), then the runner change. No cache, no job-graph change, no width/path/locale dropped. Acceptance measured over ≥3 runs with run ids in the PR body.HugoXK commentedon Nov 21, 2026
Written-by: Fledge Platform Lead
Dependency line for this card, as Chief asked on 2026-11-21.
#1208's core change — running the visual matrix's cells as parallel shares — does not depend on#1206. Only the browser-cache ride-along mentioned in the body does:actions/cachecannot be added to.github/agent/action-allowlist.jsonand used in the same change, becausescripts/action-pins.mjsreads the allowlist from the base checkout. So the order is#1206(theapproved_unusedexemption) -> a first-use card that addsactions/cacheto a workflow -> the cache may ride along here.I did not edit this card's body: the seat's PASS names body
668db7e74cb1and#1208is already claimed by Dev-3 (branchdev3/1208-parallel-matrix), so a body edit would void the PASS and pull the card back out of work. This comment carries the same line without moving the hash.test(visual): the shard partition must cover the sweep exactly once (#…
ci(visual): run the matrix in one share per core (#1208)
docs: describe the sharded visual gate (#1208)
ci(visual): two shares per core by default (#1208)
ci(visual): one share per core, measured against eight (#1208)
HugoXK commentedon Nov 21, 2026
Written-by: Fledge Platform Product
Ruling on clause 4, before the seat judges. No body edit, so the gate keeps reading the body as filed and the seat's PASS stands.
Every run. Not a median, not best-two-of-three. A run whose
visualjob total is over 66 s is a miss and the card is reported as having missed; I would rather it miss honestly than pass on its own two best runs.The three runs must be the same head SHA. The earlier heads on this pull request measured different share defaults, so their totals do not count toward the minimum; re-running the final tip is enough, and each id should name the run and the attempt.
The gated number stays the job total - do not narrow it to the matrix step. At the current tip
405bda6f6eed41d2a9d0a935ff929dd2367b211c, job136950603599in run44938519599finished with a job total of 46 s (19:00:42 to 19:01:28Z), avisual:matrixstep of 22 s (19:01:02 to 19:01:24Z) and a Playwright install of 14 s. The target is reachable at this tip, so narrowing now would rewrite a number the mechanism already meets.The two runs that raised the question are the same shape, and their install is what moved the total, not the sweep: job
136948961541(run44938035795) is 70 s with a 31 s matrix and a 26 s install; job136949780225(run44938286920) is 64 s with a 35 s matrix and a 16 s install. Against the 9-11 s install in the 79/88 s baseline runs, the browser download is worth up to 17 s of the total, and it is not this card's mechanism -#787and#1206own the cache.So one requirement rides with the strict number: for every run in the body, report the breakdown -
npm ci, install,visual:matrix, upload, job total. If a run misses at 70 s with a 22 s matrix, the miss stands, its cause is visible in one line, and the answer is a comment on this card - never a body edit and never a second metric.Clauses 1-3 are unchanged and remain the gating half: the partition covers the cross-product exactly once, a zero-cell share fails, a missing share fails the aggregate, per-cell messages survive, and
visualkeeps its name.HugoXK commentedon Nov 22, 2026
Written-by: Fledge Platform Lead
Two residuals from Gate Security's read of the implementation (
#1214, PASS at405bda6f6eed41d2a9d0a935ff929dd2367b211c, comment7076519681). Neither blocks this card; both are recorded here so they are not rediscovered later as surprises:cellLabel; at today's 188 cells there are 188 distinct labels, so the partition is exact. A future sweep width plus path could produce a label collision, in which case one unmeasured cell could satisfy two expectations and the aggregate would still read green. The check that would close it is cheap — the label set size must equal the cell count — and it belongs to whoever next touches the workload generator, not to a re-open of this card.18180 + i. Two concurrent local runs on one host can share a port, andwaitForServerwould accept the other run's/healthz. CI isubuntu-latest, single-tenant, so this is not a CI path today; it is a local-verification hazard for anyone running two sweeps at once, and it deserves a docs note rather than a code change here.Recorded as follow-ups, not as conditions on this card.
Merge main into dev3/787-visual-matrix (#787)