Repository navigation
Free test shards stop failing when a test's browser exits during the cleanup check (GST-3447) - #4666
Merged
Conversation
…cleanup check (GST-3447) Free test shards no longer fail with "native process identity unavailable" when a browser a test started exits while the runner is checking it, and the Free Tests planning job gets 10 minutes instead of 5. Why: these were the two causes left of main's flapping Free Tests runs. Nothing to do. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Merged
3 tasks done
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.
Free test shards no longer fail with "native process identity unavailable" when a browser a test started exits while the runner is checking it, and the Free Tests planning job gets 10 minutes instead of 5.
Why: these were the two causes left of main's flapping Free Tests runs; the other four flaps from 11-18 and 11-19 were fixed earlier by #4490 and #4530.
Nothing to do.
What changed
Free test shards were failing with no failing test: "shard 8/8 shard cleanup or home containment failed: native process identity unavailable" (quick-bun-default, run 44850005025 at 41729a0). The shard's browser cleanup tracker checks each browser process it owns by reading its start time with
ps -o lstart=. When that browser exited on its own during the check, the tracker counted it as an ownership failure and failed the whole shard.Now a process that is provably gone just ends that round of checking, and the next round sees it gone. A failed check of a process that is still alive, a process whose identity was replaced, and every ownership mismatch still fail the shard, and a real error is reported ahead of an exit seen in the same round. A new test mode,
identity-probe-exit, uses a stand-inpsthat kills the recorded Chromium child during its first check; it fails before the fix with the exact CI message and passes after.The Free Tests planning job (
free-plan) now has 10 minutes instead of 5: its "Set up job" step alone ran 5m18s on run 44980222821 and the job was cancelled, while the job normally takes 13 to 26 seconds.Why
"Free Tests on main keeps going red with no failing test." These two causes were the last ones behind main's flapping Free Tests runs, so after this a red Free Tests run should point at a real test failure.
Blast radius
The change touches only the free test runner's browser cleanup tracker (
scripts/test-free-shards.ts), its test helper and one workflow timeout. The tracker still reports every live-process, replaced-identity and ownership failure: the replaced-pid, replaced-start, stale-child-start and unavailable-environment settlement modes were rerun on this head and pass (script ran), and CI's full free suite passed at this head (run 44993690417).Pre-Landing Review
No blocking issues. The review panel (batched specialist, red team, targeted gate reader, a second-model review on GPT-6.1 Sol and an adversarial reader) found nothing that blocks. The one gate change, the planning job's longer timeout, was reviewed and kept by the owner with the measurement above.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
scripts/test-free-shards.ts:1419error-handlingscripts/test-free-shards.ts:1345observabilitytest/helpers/free-owned-browser-settlement.ts:167test-isolationtest/test-free-shards-settlement-lifecycle.test.ts:1flaky-testExploratory QA
Pass. Capture 001:
identity-probe-exitpasses (1 pass, 0 fail). Capture 002: unavailable-environment, replaced-pid, replaced-start, stale-child-start, cancel-cold-probes and settle-cold-probes pass (6 pass, 0 fail). The probe stand-in modes are Linux-only, so macOS and Windows coverage comes from CI.Eval Results
No prompt-related files changed — evals skipped.
TODOS
No TODO items completed in this PR.
Documentation
Scope: branch
free-tests-browser-exit-during-identity-checkagainst base 6484fd5. It changes the Free Tests workflow (free-plan timeout raised from 5 to 10 minutes), the shard browser cleanup tracker inscripts/test-free-shards.ts(a browser that exits during its identity check now ends the check instead of failing the shard), its test helper, and one changelog.d fragment.Result: current. I searched README, CONTRIBUTING, docs/ and skill Markdown.
docs/TESTING_INTERNALS.mdanddocs/pregate.mdname thefree-planjob and artifact but describe neither its timeout nor the tracker's identity-check behavior, so nothing became stale. The changelog fragment matches the code change.Debt: none found. The tracker's identity-check rules are documented only in code and in the changelog fragment.
Tests
bun test test/test-free-shards-settlement-lifecycle.test.ts -t identity-probe-exit: 1 pass, 0 failbun testownership and cold-probe settlement modes: 6 pass, 0 failAgent notes
Agent notes
Flaky pass GST-3447 (lane GSTA-793). Per-failure table and evidence: captain drive reports/GSTA-793.md. The AskUserQuestion format eval reds are diagnosed there and are not changed by this PR.
REVIEW_LOOP: passes=1 blocking_found=1 deferred=0 noted=4 fixed=0 scope=frozen
Gate edits: 1 listed, 1 read, 1 finding — 1 kept, 0 restored, 0 open
Gate disposition: .github/workflows/free-tests.yml:221:gate-integrity [gate 984b34e93302] at a052564 by GStack Minder (GSTA-36) at 2026-11-22T06:21:50.617Z: free-plan timeout-minutes 5 -> 10: Set up job alone ran 5m18s and was cancelled on run 44980222821; the job normally takes 13-26 s — "Fix that too if it's a one-line timeout change." (approval a-4b9ce38e65cf)
Second-model review: openai/gpt-6.1-sol, completed, clean.
Approvals
Approved: yes (record r-4a0ce06aab6c). The full approval record stays private.
Plan: exempt: bug fix (R65; failing-first test identity-probe-exit)
Plan check: exempt bug fix