Repository navigation
test: fix the thread-head and dependency-sampler flakes - #129
Merged
Merged
Conversation
thread-head-stale-edit.spec.ts:55 used replyButton.click({ force: true }).
virtua sets pointer-events: none on the list while it scrolls, and the
timeline re-pins after opening #general, so the forced click could land on
the scroller or where the row used to be. The panel then never opened. The
spec now waits for the head refresh and presses the button by keyboard, using
the same lines as upstream block#8682. Its assertions are unchanged.
startup_owns_the_dependency_sampler asserted on the first scrape that showed
the completion gauge. The exporter renders counters before gauges, so that
scrape can overlap the first sample and hold the gauge without the counter.
The assertions now read a second scrape, whose render starts after the gauge
was seen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Factory-Task: fix two listed flakes (
desktop-thread-head-stale-edit-55,pg-boot-sampler-scrape-race)Built-by: claude-code/claude-opus-5-5
Undo:
git revertthe merge commit. This PR changes test code only, so nothing in the product moves. Put the two flake entries back if they were already removed.Fixes two tests that keep throwing out unrelated PRs. Both flake entries can go once this merges. The thread-head test also moves from
:55to:56, so that entry's signature stops matching anyway.1.
thread-head-stale-edit.spec.tsCause. The reply button is only clickable while its row is hovered, and the spec used
click({ force: true }). A forced click doesn't wait, so it could land while the row wasn't a hit target:VListsetspointer-events: noneon the list while it scrolls. Sampling the click point every frame showed the hit target as themessage-timelinescroller, withpointer-events: nonecomputed on the row and its parent, for about 40 to 150 ms. The geometry didn't change during that window. A run that failed had the scroller at the click point just before the click.scrollTop296 to 258), after the click point had been read.Either way the click misses and the panel never opens, which is the CI signature.
Fix. The spec calls
openGeneral(waits for the head refresh and the bottom pin) andpressRowAction(focus + Enter on the same button). The action bar also shows on focus-within, so this needs no pointer.What the test proves is unchanged. The thread-replies gate and every assertion stay as they were.
Not the normal click you might expect. A hover + normal click also passed 15/15 unforced, but it timed out 4/4 under the forcing below, because
hovercan't finish once the row has moved under the composer. The keyboard version passed. Both files also end up byte-identical to upstream block#8682, so they merge cleanly on the next sync.2.
startup_owns_the_dependency_samplerCause.
metrics-exporter-prometheusreads counters, then gauges, then histograms. A scrape overlapping the first sample can hold the completion gauge but not the counter that was written before it.Fix. After the gauge is seen, the test scrapes again through the same helper and asserts on that second scrape. Its render starts after the first one finished, so it holds everything
samplewrote before the gauge.What was exercised
Spec, on a frozen e2e build of main. Private port,
--workers=1, no retries. Before is main's spec, after is this branch's.cargobuildAll 6 failures were the CI signature:
message-thread-panelnever visible.headAuxdropped): the new spec fails 3/3 at the head assertion, on the stale "these two PRs?" text. It still catches the original bug.Sampler test, real relay binary. Throwaway Postgres 17 and Redis 7 containers, 24 CPU spinners.
sampleOther checks:
rustfmt --check,clippy -D warningson this test target, biome on both TS files,tsc, desktop file sizes, and a cleangit merge-treewith current main.Known limits
env_clear()removesSystemRootand the relay exits at once. I added a local passthrough to run it and did not commit it.psqlasschema/schema.sqldescribes, and ran one test binary on one database rather than through nextest and its per-test wrapper.boot_lifecycle.rsconflicts with upstream's own fix (fix(relay): revoke invitations and restrict claims block/buzz#8237), which waits for all three series in one scrape. Resolve it by taking upstream's block.auxiliary-pane-close-visibility.spec.ts:89andchannel-shared-header-backdrop.spec.ts:82force the reply button, andmention-clipboard.spec.ts:554and:815,message-copy-link.spec.ts:24andmessaging.spec.ts:2611force more-actions. None of them is on the task list, so I left them.🤖 Generated with Claude Code