-
Notifications
You must be signed in to change notification settings - Fork 13
tui: ignore stale verification results from older edits #75
Copy link
Copy link
Open
Labels
area: tuiTextual terminal user interfaceTextual terminal user interfacebugSomething isn't workingSomething isn't workingdev sprintPythonlings Community Dev Sprint August 2026Pythonlings Community Dev Sprint August 2026help wantedExtra attention is neededExtra attention is neededsize: MMedium, self-contained contributionMedium, self-contained contribution
Description
Metadata
Metadata
Assignees
Labels
area: tuiTextual terminal user interfaceTextual terminal user interfacebugSomething isn't workingSomething isn't workingdev sprintPythonlings Community Dev Sprint August 2026Pythonlings Community Dev Sprint August 2026help wantedExtra attention is neededExtra attention is neededsize: MMedium, self-contained contributionMedium, self-contained contribution
Motivation
Verification runs in background threads. A slower result for older text can arrive after a newer result and overwrite the visible state or incorrectly complete the exercise.
Current evidence
A controlled Textual pilot on
devate1d4dae37234b75124bd6a53f06734296ebbbdeereproduced the race twice. The older run was held, a newer failing run was applied, and then the older passing run was released:Textual worker cancellation is advisory for a running thread.
_apply_result()checks attachment and exercise name, but not which edit or run produced the result.Exact scope
Associate each verification with the editor revision or run generation that started it. Only the newest applicable result may update output, failure counts, completion state, resume state, or exercise navigation.
Acceptance checklist
Explicit exclusions
Do not remove subprocess isolation, make verification synchronous, change the five-second timeout, or redesign the output panel.
Likely files
pythonlings/screens/track.pytests/tui/test_app_pilot.pyVerification
Run the controlled old-pass/new-fail and old-fail/new-pass cases repeatedly.
Sprint coordination
See Discussion #37 and tracker #52. This issue is intentionally unassigned. A coordination comment is welcome, but it does not reserve the issue. The first pull request that satisfies every acceptance criterion and verification requirement is considered for merge.