Task editor scroll-sync test fails intermittently in CI
Maintainer antworten meist innerhalb von 1 Tag
@melonpuff arbeitet bereits daran.
Seit 12.11.2026.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 78/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- javascript, playwright
- Bereich
- testing
Rechercherichtung
Lies die abschließende Scroll-Assertion in tests/browser/task-workspace.test.js um Zeile 599 und die vorausgehende Wartebedingung. Das Issue weist auf einen möglichen Race hin: Die Wartebedingung prüft, ob die Highlight-Ebene überhaupt gescrollt wurde; das kann bereits zutreffen, bevor sie die neue Position des Textbereichs erreicht. Aktualisiere die Synchronisierungsbedingung so, dass die Assertion wartet, bis alle drei Scroll-Positionen übereinstimmen. Führe anschließend den Browser-Test aus und bestätige, dass die Positionen übereinstimmen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Observed behavior
The browser test "the task editor paints syntax colours and line numbers behind the textarea" (tests/browser/task-workspace.test.js, the final scroll assertion) failed once in CI on a change that does not touch web/. The three scroll positions it compares were [900, 2276, 2276]: the textarea at the 900 the test had just set, the highlight layer and the line-number gutter at 2276. The same job passed on a rerun, and the identical tree had passed in the previous run of the pull request, so the failure depends on timing and not on the code under test.
Expected behavior
The test passes whenever the layers do follow the textarea, and fails only when they do not. A passing run and a failing run of the same tree should not differ.
Reproduction
I have not reproduced it locally, so this is a single observation, not a measured rate.
- Run the three-shard browser lane (
gates (browser 2/3)) on GitHub Actions for a pull request whose diff does not touchweb/. - The test fails when the highlight layer and gutter have not yet followed the textarea to the position the test set (
scrollTop = 900).
What I saw: run 42952178222, job 130298787099, head 5736b690e196636785aa06bd3844b4e581d3fae6, one failure, then a pass on rerun of the failed job. How often it happens elsewhere is unknown.
CodeTrial version
Not a runtime report. The failing revision is 5736b690e196636785aa06bd3844b4e581d3fae6 (a pull request that changes skill scripts and their Python tests only).
Environment
- GitHub Actions,
ubunturunner,gates (browser 2/3)shard of the browser lane - Chromium through Playwright, headless
Hypothesis (not confirmed)
After page.fill of the 120-line buffer the caret sits at the end, so the textarea is already scrolled to the bottom and the layers follow it there (2276 here). The test then sets scrollTop = 900 and waits with waitForFunction until the highlight layer's scrollTop > 0. That condition can already be true from the earlier scroll position, so the wait can return before the layers have followed to 900, and the assertion reads the stale 2276 from the layers. Waiting for the layers' scrollTop to equal the textarea's, instead of > 0, would remove the race; I have not tried it.
Sanitized evidence
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
actual: [ 900, 2276, 2276 ]
expected: [ 900, 900, 900 ]
at tests/browser/task-workspace.test.js:599:12
failed gates: browser-tests
- Vorherrschende Sprache
- Rust
- Sterne
- 228
- Forks
- 150
- Ø Merge
- 1 T. 3 Std.
- Gemergte PRs (30 T.)
- 226
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus sysprog21/codetrial
-
Spot Capacity Round Trips tests accept the two largest rising runsEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
Diagnostic category comment disagrees with its testsEvtl. vergeben @woohsin hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
sysprog21/codetrial#666 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Local recording ends at Finish, before the learning reviewEvtl. vergeben @richard81115 hat das vor 2 Tagen übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 84/100
sysprog21/codetrial#663 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
sysprog21/codetrial#646 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in sysprog21/codetrial
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
horizon-rust/horizon#16176 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
asonnino/blockchain-validator#88 ·
Maintainer antworten meist innerhalb von 1 Tag
-
BUG-MERGE-TO-HDR-RESULT-NAMEEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
storytold/photocraft#14025 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
-
ExtrudeOffenarea:kernel bug needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
bherbruck/solvecraft#16273 · 1 Kommentar · 1 Reaktion ·