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
test: in-flight observation drain test races the 100 ms takeover poll #423
test/security/security-takeover-observations.test.ts > "drains an in-flight cli window observation before granting control" failed once in CI on PR #418 (run 40778033723):
AssertionError: expected true to be false
The test publishes a human lease while a desktop wait sample holds its agent permit, sleeps 40 ms, and expects the lease to be still waiting. But stopOnTakeover in packages/desktop-linux/src/wait.ts polls for a lease every 100 ms (TAKEOVER_POLL_MS) and then cancels the sample on purpose, so its permit drains. When a poll lands in the 40 ms window and the fake xdotool exits fast, the lease is granted before the check. That is the designed behavior, so the assertion races the poll.
The same file passed 6 times in a row locally (48 cases). #418 does not change desktop wait or the lease drain.
Assert that the lease waits for the permit to drain without a fixed 40 ms window, for example by holding the sample until the test releases it, or by checking that the grant happens only after the sample ended
Activity