Skip to content

test: read the Firefox send flash only from frames that drew the settled card - #5749

Merged
max-sixty merged 3 commits into
mainfrom
fix/issue-5710
Nov 9, 2026
Merged

max-sixty merged 3 commits into
mainfrom
fix/issue-5710

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

test_firefox_paints_the_author_and_words_in_the_same_send_flash failed intermittently: 3 of 10 local runs on main, plus the scheduled run that #5710 cites. Its frame filter let through screencast frames that say nothing about the sent message's grounds. On a loaded runner, its fade-density check also failed on real fades. The assertion that the author's row and the words fade together is unchanged and still catches a head that lags its words. Test-only; no product behavior changes.

Frames that were getting through, from frames captured in failing local runs:

  • Stale page content over the card. Headless Firefox sometimes composites a band of earlier page content (here, the diff widget) over the card. The existing check compares the card's right edge on both rows, but the band can cover the author's row and stop short of that edge, leaving the author's row reading the page's white (255, 255, 255). This is the frame in the failing scheduled run: head (255, 255, 255), words (253, 249, 222), both edges (250, 249, 245).
  • The card still growing. In the first frame of the arrival, the reply field still covers the words. The words' sample, 3px above the message's foot, read a blend of field and highlight, e.g. head (255, 249, 199) against words (253, 251, 230).

The filter now:

  • Samples the words at the middle of their row, beside the short sentence.
  • Reads a frame only when three things hold: the card's edge matches on both rows; the author's row shows a colour the message's ground can take (its yellow, the card's paper, or a mix), which the page's white fails; and the reply field's top ring reads as it does in most of those frames, so the card has grown into place.
  • Takes that ring majority only over frames that already passed the first two checks, because under load the band frames can outnumber the rest.

Fade density. The test required three distinct fade colours at least 12 apart. On this PR's loaded CI runner it captured only two frames inside the fade. Locally, under five busy loops on four cores, it often captured two colours, or several within 8 of each other. The check exists to reject a discrete jump (no intermediate colour) and the constant 0.5 pending blend (one colour plus JPEG jitter). It now requires intermediate colours more than 6 apart, which still rules out both.

Verification (local Linux, --run-nightly -n0):

  • main: 3 of 10 runs failed.
  • This head: 10 of 10 pass idle and 12 of 12 under five busy loops. Before the density change, the filter alone passed 50 of 50 idle and 8 of 8 under two busy loops.
  • Injecting a head that stays 60% highlighted (.lf-margin-preview .lf-msg-head { background: color-mix(in srgb, #fff8c5 60%, var(--paper)) !important }) still fails the head-against-words assertion.

The test came in with #1933, and its edge filter with #3100. The next scheduled ci run will settle the macOS lane.

Closes #5710 — automated triage

…led card

test_firefox_paints_the_author_and_words_in_the_same_send_flash failed in
about a third of local runs. Its native screencast frames include two
kinds the test already meant to skip, which its card-edge filter let
through:

- Headless Firefox sometimes hands over a frame with stale page content
  drawn over the card. The band can cover the author's row yet stop short
  of the card's edge, so both edge samples still matched. The author's row
  then read the page's white while the words read the fade.
- The first frame of the arrival shows the card still growing, with its
  reply field over the words. The words' sample, 3px above the message's
  foot, read a blend of the field and the highlight.

The words are now read at the middle of their row, and a frame counts
only where the reply field's ring stands where most frames show it and
the author's row shows a ground the message can take: its yellow, the
card's paper, or a mix. The head-against-words assertion is unchanged. A
head that lags its words, the defect #1933 fixed, still fails it.

No product behavior changes.

Closes #5710
…w the card

The reply field's settled ring was the most common ring colour across all
frames. On a loaded machine, headless Firefox's stale-band frames, which draw
page content over the card, can outnumber the rest. The ring then settled on
the band's white and every real frame was dropped, so `fading` came out empty
(CI run 42590766036). The majority is now taken only over frames that pass the
edge and author-row checks. The fade and head-against-words assertions are
unchanged.
… loaded machine

The PR's own CI run (42594823513), with other tests running alongside,
captured only two frames inside the fade, and the test required three
distinct colours at least 12 apart. Locally, under five busy loops on
four cores, the fade's frames were often two colours, or several within
8 of each other, all from its tail. The check exists to reject a discrete
jump (no intermediate colour) and the constant .5 pending blend (one
colour with JPEG jitter). Two intermediate colours more than 6 apart rule
out both. The head-against-words assertion is unchanged.
@max-sixty
max-sixty merged commit 28c3b37 into main Nov 9, 2026
6 checks passed
@max-sixty
max-sixty deleted the fix/issue-5710 branch November 9, 2026 10:24
max-sixty pushed a commit that referenced this pull request Nov 18, 2026
…it (#5789)

Sessions that fix a failing test have been polling their own pull
request's CI. With Leaf's `await_ci: false`, tend-land owns that wait.
In one case the polling session also repaired the PR in parallel with
tend-land's own repair job. This change rewords the one `running-tend`
sentence that reads as an order to wait. It now points at `monitor-ci`,
**Which heads to poll**, which says which session waits, instead of
reading as an order to poll. Under Leaf's config, that section hands the
wait to tend-land and tells the session that pushed to record the push
and not poll. The overlay doesn't repeat that rule because the rule
depends on `await_ci`, and a copy here would override the bundled skill
if that setting changed. The merge condition itself is unchanged: CI
must still reach a terminal result on the exact head before the merge.

**Why this sentence.** **Fixing a CI failure's cause** is written as
instructions to whoever merges: "Merge a pull request that fixes tests …
The pull request's CI must reach a terminal result on the exact head
(`monitor-ci`)." It dates from #2379, when the session fixing a test
also merged it. A triage session that opens a test fix reads that
pointer as its own job. Tend's `monitor-ci`, **Which heads to poll**,
says the reverse: after a push to a PR with no human author, record it
and don't poll. #5327 removed a similar instruction from this overlay,
one that made triage sessions wait hours on a dispatched macOS run.

**Effect.** In triage batch 42582881973 (2026-11-09), 8 of the 11
sessions that opened a PR polled its checks, each after loading
`monitor-ci`. The #5710 session spent about 38 of its 125 minutes
polling. While it diagnosed its red CI, tend-land's `repair #5749` job
(42592804291) fixed the same failure and pushed first, and the triage
session then dropped its own work. The 2026-11-08 sweep recorded the
same 12–15 minutes of polling in four other triage sessions (#5641,
#5658, #5657, #5463). Those runs and their analysis are in the monthly
tracker, #5067.

**What remains uncertain.** The session logs redact the reasoning behind
each poll, so the link from this sentence to the polling is inferred
from where it points and from the #5327 precedent. If polling continues
after this lands, the next step is the bundled skill.

This touches agent instructions, so it needs the control-plane owner's
approval before it lands.

---------

Co-authored-by: leaf-agent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_firefox_paints_the_author_and_words_in_the_same_send_flash fails intermittently: one frame paints the author row white

2 participants