Repository navigation
test(desktop): wait for process-family handler readiness - #10383
kaoru0822-kitauji wants to merge 3 commits into
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Low impact] The PR appears safe to merge, with the existing non-blocking readiness-timeout concern still open. Findings
Fix with agent prompt### Issue 1
src/application/desktop/DesktopApplicationCapture.test.ts:161-163
The parent starts its roughly five-second readiness wait before the test releases `start-children`. Both children must wait for `nextRequest` to release that file, but requests run between process, window, and open-file scans. If a scan delays the next request past that wait, the parent writes `children-not-ready` and exits before the children are allowed to start. This leaves a non-blocking source of failures on slow Linux runners in both tests.
Wait for the barrier before starting the bounded readiness check.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryReplaces the process-family tests’ fixed delay with a shared child script and explicit startup signals.
Reviews (4) · Last reviewed commit: "test(desktop): keep readiness timeout in..." · Reviewed by Greptile |
|
Final author-wide sweep: failed shard 1/8 (job 131994362258, run 43456196624) fails only the old fingerprint fixture, not the desktop readiness cases. Both fingerprint cases exceed 30 s (44.505 s direct / 47.909 s transferred); shard result is 2 failed / 2,307 passed / 43 skipped. This is the shared #10381 blocker. Common repair #10384 at Please incorporate that common repair into your owned branch, or refresh after it lands on main, before recording this PR's CI as passing. I am leaving your branch untouched to avoid a collision; no unchanged-head retry was performed or claimed. |
|
I am preparing an isolated integration of the green common repair ae34c21 with this exact PR head, using session-owned branch |
|
Final evidence for the shared CI repair; your published branch is unchanged.
The canonical replacement is now #10391 at #10384 is closed as superseded; #10381 stays open pending a landed replacement. After #10391 lands, refreshing this PR from main keeps its diff independent. The historical helper refs above predate that main update. No peer branch was pushed, duplicate PR opened, or human review attested. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
| 'printf "count=1\\n" > "$HOME/.config/fakeapp/state.ini"', | ||
| // Bound failed child startup after the caller releases the fixture barrier. | ||
| `ready=; for i in $(seq 1 500); do if [ -f "${join(root, "group-ready")}" ] && [ -f "${join(root, "setsid-ready")}" ]; then ready=1; break; fi; sleep 0.01; done; [ -n "$ready" ] || { echo "synthetic children did not report ready" >&2; touch "${join(root, "children-not-ready")}"; exit 97; }`, |
There was a problem hiding this comment.
Readiness timeout starts too early
The parent starts its roughly five-second readiness wait before the test releases start-children. Both children must wait for nextRequest to release that file, but requests run between process, window, and open-file scans. If a scan delays the next request past that wait, the parent writes children-not-ready and exits before the children are allowed to start. This leaves a non-blocking source of failures on slow Linux runners in both tests.
Wait for the barrier before starting the bounded readiness check.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/application/desktop/DesktopApplicationCapture.test.ts
Line: 161-163
Comment:
**Readiness timeout starts too early**
The parent starts its roughly five-second readiness wait before the test releases `start-children`. Both children must wait for `nextRequest` to release that file, but requests run between process, window, and open-file scans. If a scan delays the next request past that wait, the parent writes `children-not-ready` and exits before the children are allowed to start. This leaves a non-blocking source of failures on slow Linux runners in both tests.
Wait for the barrier before starting the bounded readiness check.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
Refs #10366. Replace the process-family fixture's 1.5-second readiness guess with an explicit startup barrier and acknowledgments from both installed TERM handlers. Both capture cases observe the parent state before releasing child startup, then wait for both acknowledgments before requesting shutdown or failure.
The shared child fixture owns handler setup. Preserve main's bounded startup-failure marker and prompt failure reporting in both callbacks; retain the group/detached SIGTERM markers, verified cleanup and failed-session content removal. Production termination and process ownership are unchanged.
Validation
Updated with main
97b017c500; current head includes9836fe5c6fandfc208d325. Executed on macOS arm64, Node 24.22.1/npm 11.16.0:npm run test:local -- src/application/desktop/DesktopApplicationCapture.test.ts src/process/TokenOwnedTermination.test.ts: 25 passed, 13 skipped. The affected process-family capture cases require Linux and were skipped locally.npm run check:fast: passed.git diff --check: passed.The prior Linux source-test run passed both affected cases on the earlier head. Current-head Linux verification is pending. The old unrelated fingerprint timeout is repaired on main by
62798fa8b0, now included. This change establishes fixture ordering; it does not establish the original intermittent failure's cause or frequency. No live desktop app/provider was exercised.Author readiness
Human owner: @kaoru0822-kitauji