Repository navigation
Make two timing-dependent browser tests wait for what they assert - #413
Merged
Merged
Conversation
The lock-page test moved the agent along before the page's first poll answered; when that poll arrived late, the page never saw the waiting state and, by design, did not count agent_connected. The extension harness gave up after 100 event-loop turns instead of after a time limit. Both flaked on main and blocked automatic deploys. staging-check now also treats test files outside tests/ as not reaching the service. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main requires the staging status from GitHub Actions, so a status set from a personal account never counted. A maintainer now runs staging-check with the commit and how it was tested (an infra/ change deployed with its own deploy.sh, for example). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Added: a hand-set |
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.
What and why
With merges deploying automatically, a flaky test on
mainblocks the deploy. Two different browser tests failed on consecutivemaincommits today (3d1e746, 7ba43ed); a re-run passed both times.lock page: the steps tick as the agent connects…The page renders its steps before its first poll answers. The test then switched the fake agent to "connected" right away. When the first poll reached the server after that switch, the page never saw the waiting state, and by design ("a step counts once per page view, and only when this page watched it happen") it didn't recordagent_connected. The test now waits until the first poll has been answered, and resets the counter for each theme. The page itself is unchanged.eventually()gave up after 100 event-loop turns, not after a time limit, so real async work (credential hashing) on a loaded runner failedconcurrent project connects serialize onto one browser credential. It now waits up to 5 s by time.staging-checkalso exempts test files outside the top-leveltests/folder (anytests/directory,*.test.js|cjs|mjs). Otherwise test-only changes like this one would need a staging deploy.Verification
web/lock-page.browser.test.js: 6/6 passed. Under load (4 parallel copies × 3 rounds), all 12 runs passed.npm test50/50,test:collection45/45.web/app.js,src/tin_lite/static/app.jsandbrowser-extension/src/background.js.Tested on staging
Tests and a workflow pattern only; nothing that runs on the VM changes.
staging-checkruns frommain's copy, so the new exemption doesn't apply to this PR yet, and I've set its staging status by hand.🤖 Generated with Claude Code