Repository navigation
tests: fix headless Chrome cold-start flake and surface startup retry notes - #227
Merged
Merged
Conversation
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.
Summary
Fixes the recurring
TimeoutError: Browser.getVersionheadless Chrome cold-start flake in CI (skills/coordinator/scripts/test_command_center.pyandskills/coordinator/scripts/test_sites_refresh.py, observed in runs44221521208,44834084949,44877259152, and44986044435).Changes
check.pyworkers (skills/coordinator/scripts/test_command_center.py):startup_lock()uses anfcntl.flocklock in_SREESTACK_TEST_CACHE/chrome-startup.lockscoped per startup attempt sotest_command_center.pyandtest_sites_refresh.pydon't cold-start two headless Chrome instances simultaneously, while running their actual test suites in parallel.start_chrome()usesSTARTUP_TIMEOUTS = (10, 15), retries only transient(TimeoutError, ConnectionError)handshake failures, immediately force-kills (SIGKILLviaclose(force=True)) failed startup candidates instead of waiting 10s onSIGTERM, and cleans up temporary profiles on every error path.stdin=subprocess.DEVNULLand--enable-logging=stderr --log-level=2to headless Chrome; enrichBrokenPipeErrorand still-alive timeout diagnostics with PID/exit code and Chrome stderr tail._SREESTACK_TEST_CACHE/notes.logand surface non-emptynotes.logonscripts/check.pystderr even when tests pass, so retries never hide silently on green runs.setUpModule()HTTP server setup and isolatetearDownModule()steps viacontextlib.ExitStack, makingChrome.close()idempotent across descriptor errors.skills/coordinator/scripts/test_chrome_startup.py(7 unit tests covering retries, force-kill, non-transient errors, cross-processflockserialization, stdin/logging/diagnostics/BrokenPipeError, idempotentclose(), and teardown/setup error isolation).notes.logpass-through assertion toscripts/test_check.py.Verification
python3 scripts/check.py skills/coordinator/scripts/test_chrome_startup.py: 7/7 passed (0.64s)python3 scripts/check.py: 564 tests across 26 files passed in 32.60s (Checked 63 skills, local Markdown paths/anchors, and skill link hygiene.)review-fix-loop(sreestack-chrome-startup-flake): Pass 1 Primary + Adversarial, Pass 2 PrimaryAPPROVEona4fb479f.ubuntu-latestruntime verification: covered by this PR'sSkills and secretsCI run.