You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(test): replace fixed waits with observable completion #2389
Several tests wait for fixed wall-clock intervals even though completion can be observed or controlled. Examples include Pi TUI polling, Runtime Host fake shutdown, desktop animation waits, and alignment audit settling.
Fixed waits increase wall time and make tests sensitive to machine load.
Outcome
Replace fixed waits with the closest deterministic mechanism:
Controlled clocks for timer behavior.
Explicit barriers for asynchronous lifecycle tests.
Readiness markers or state polling for UI and audit tests.
Preserve tests whose purpose is a real timeout or process deadline. Make changes per workspace in independently reviewable PRs and include before/after timing.
I'd like to take this one. It's a direct continuation of #2394, which removed the same fixed-delay pattern from the computer-use cancellation tests — same methodology (replace elapsed-time guesses with observable synchronization: controlled clocks, barriers, readiness markers), applied to the remaining workspaces (Pi TUI polling, Runtime Host fake shutdown, desktop animation waits, alignment audit settling). Will split per workspace into independently reviewable PRs with before/after timing, as the issue specifies.
UncertaintyDeterminesYou4ndMe commented on Aug 7, 2026
Retracting my claim for now — this is best done after #2394 lands (same test-infrastructure territory), and I'd rather not hold the issue while blocked on that. Will pick it back up if it's still unclaimed then.
UncertaintyDeterminesYou4ndMe commented on Aug 7, 2026
Picking this back up (per discussion) — proceeding now with the same methodology as #2394, one PR per workspace as the issue specifies. Starting with an audit of the named spots: Pi TUI polling, Runtime Host fake shutdown, desktop animation waits, alignment audit settling.
UncertaintyDeterminesYou4ndMe commented on Aug 7, 2026
15.5s → 12.1s focused suite; 55 unconditional sleeps replaced with observable waits, 81 close watchdogs moved to a CI-scaled budget, elapsed ticker now injectable
flat 2.5s×11 settle → mutation-quiet window under the same budget; 42.5s → 22.7s
Each PR names the contracts that stay covered and the real-timeout waits that were deliberately preserved (signal-exit probes, the 3s exit grace, retry cadences, selection-settle negative windows).
Activity
UncertaintyDeterminesYou4ndMe commentedon Aug 7, 2026
I'd like to take this one. It's a direct continuation of #2394, which removed the same fixed-delay pattern from the computer-use cancellation tests — same methodology (replace elapsed-time guesses with observable synchronization: controlled clocks, barriers, readiness markers), applied to the remaining workspaces (Pi TUI polling, Runtime Host fake shutdown, desktop animation waits, alignment audit settling). Will split per workspace into independently reviewable PRs with before/after timing, as the issue specifies.
UncertaintyDeterminesYou4ndMe commentedon Aug 7, 2026
Retracting my claim for now — this is best done after #2394 lands (same test-infrastructure territory), and I'd rather not hold the issue while blocked on that. Will pick it back up if it's still unclaimed then.
UncertaintyDeterminesYou4ndMe commentedon Aug 7, 2026
Picking this back up (per discussion) — proceeding now with the same methodology as #2394, one PR per workspace as the issue specifies. Starting with an audit of the named spots: Pi TUI polling, Runtime Host fake shutdown, desktop animation waits, alignment audit settling.
UncertaintyDeterminesYou4ndMe commentedon Aug 7, 2026
All four named areas are covered, one PR per workspace as specified:
toPass()geometry polls, 1 layout sleep →scrollHeight-stable wait; wall parity (worker-overlapped) but load-tolerantEach PR names the contracts that stay covered and the real-timeout waits that were deliberately preserved (signal-exit probes, the 3s exit grace, retry cadences, selection-settle negative windows).
test(desktop): poll animation landings instead of guessing their dura…
perf(scripts): settle the alignment audit on DOM quiescence, not a fl…
test(cli): replace fixed waits in Pi TUI coverage with observable com…
test(runtime-host): drive liveness-crossing waits from an injected pr…
Astro-Han commentedon Aug 8, 2026
Completed. All four named areas have now moved from fixed waits to observable completion through independently reviewed changes:
The remaining waits in those changes are deliberate timeout/deadline contracts rather than completion guesses. Closing this issue as delivered.
简体中文
已完成。Issue 列出的四个区域都已经通过独立 PR,将固定等待替换为可观察的完成条件:
这些改动中保留的等待属于有意验证的 timeout/deadline 契约,不再是对完成时间的猜测。按已交付关闭。