Repository navigation
test: preserve generation diagnostics and wait for tray probe readiness - #7038
Conversation
Drain bounded stdout and stderr from generation-race children, identify exits before readiness, and report per-child missing files and import phases. Reap owned children in a finally block when readiness or outcome collection fails. Keep the 10-second readiness and child deadlines and the exact-one-callback generation assertions unchanged. Add real-child regressions for early exit, bounded capture, and cleanup. This records evidence for a startup timeout; it does not claim that timeout is fixed. Reconstruct the test-only follow-up from lidge-jun#7017 on current dev. Source-commit: 3e76357 Co-authored-by: Epinephrine <27862058+luvs01@users.noreply.github.com>
Perform production initialization and its initial launch tick before measuring maintenance, then wait for the actual child PID readiness signal instead of a fixed sleep. Retain the 250 ms maintenance bound, process reaping assertions, and delayed Online readiness coverage. Reconstruct the test-only follow-up from lidge-jun#7017 on current dev. Native Windows validation of this new candidate is still required; prior source-commit CI is not evidence for this candidate. Source-commit: 23b4333 Co-authored-by: Epinephrine <27862058+luvs01@users.noreply.github.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
|
Maintainer integration (dev-only bypass per MAINTAINERS.md), not an independent approval. Exact head Independent exact-head review (gpt-6.1-sol, read-only): MERGE-OK, no findings. Combined tree with #7036/#7038/#7039 on current |
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ca09d9597
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (Date.now() >= deadline) { | ||
| const missing = paths.filter(path => !existsSync(path)); | ||
| throw new Error(`timed out waiting for ${missing.join(", ")}; children: ${guardRaceDiagnostics(children)}`); |
There was a problem hiding this comment.
Set the test timeout beyond the child deadline
For local focused runs that omit an explicit timeout (for example, bun run test --parallel=1 ./tests/codex-integration/codex-config-generation.test.ts), scripts/test.ts's resolveBunTestArgs adds isolation and parallelism but no per-test timeout. I checked bun test --help, which documents --timeout=<val> ... default is 5000; therefore, when a generation child really fails to become ready, Bun aborts the test at 5 seconds before this 10-second branch can emit the newly captured stdout/stderr and phase diagnostics. Give this process-spawning test an explicit timeout long enough for the child deadline plus reaping, or move the diagnostic deadline below the runner timeout.
Useful? React with 👍 / 👎.
Summary
Follow up on the two test improvements set aside from #7017, as suggested by the maintainer.
The diff is limited to three test/fixture files (+155/-40). It carries the unchanged patches from
3e763570ac0136e527d51aaf3d59b39cdb4ad69dand23b4333ca39eb18b42d8dfe200820f0f583169aconto deva5cd5a2b832d727cfef5e77c48547b47b1cbeebb, preserving their authorship. The config-bound product changes already merged in #7029 and other reader changes are not part of this PR.Verification
Local checks were run on Linux at
585019db72adc08725c2b838788236aea7eef157, using Bun 1.4.2 for runtime commands and the repository's pinned Bun 1.4.3 test runner.bun run test --parallel=1 \ ./tests/codex-integration/codex-config-generation.test.ts \ ./tests/windows/windows-tray.test.ts \ ./tests/test-layout.test.ts \ ./tests/test-layout-tooling.test.ts \ ./tests/ci-workflows/file-size-ratchet.test.ts \ ./tests/ci-workflows/structure-ssot.test.ts bun run typecheck bun run structure:check bun run privacy:scan git diff --check a5cd5a2b832d727cfef5e77c48547b47b1cbeebb..HEADThe focused run reported 122 pass, 0 fail across six files, including all 15 generation cases. Five Windows-only cases return early on Linux, so their reported passes do not establish native Windows coverage. Typecheck, structure, privacy, and diff checks passed. The repository typecheck covers
src/.I also checked the two TypeScript test files explicitly:
This expanded check is not clean: the unchanged dev baseline reports four errors and this head reports two, with no new diagnostics. The remaining errors are
SyncSubprocess.signalinscripts/test-temp-lock.ts:78and a fixture missingbunRuntimeSourceintests/windows/windows-tray.test.ts:167. The two baseline generation pipe-type errors disappear with the carried patch. Unrelated type fixes are left out of this change.Native Windows validation now passed for this exact head in Cross-platform CI run 38378944192, using Bun 1.4.3. The workflow checked out PR merge
753e9660bbe07e8443888dd669b6f5e32052a45e, whose tree is identical to head585019db72adc08725c2b838788236aea7eef157.These are primary test-batch results on the new head, with no attribution rerun; the historical CI pass for
23b4333cis not used as validation.The full 2,268-module suite was not run locally. For this three-file test follow-up, I used focused real-child tests and the layout, size, and structure checks. CI passed all four Linux test shards and nine native Windows test shards, and the final aggregate
cijob passed. The completed run has 22 successful jobs and 10 path-filtered skips, with no failures. Path-filtered jobs, including macOS, were skipped and are not claimed as validated. This PR remains draft with the review-readiness checklist below unchecked.Checklist
Co-authored-by: Epinephrine 27862058+luvs01@users.noreply.github.com
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>