Skip to content

test(codex): allow child generation diagnostics before outer timeout - #7085

Merged
lidge-jun merged 2 commits into
lidge-jun:devfrom
luvs01:fix/generation-child-outer-timeout-20261014
Oct 15, 2026
Merged

lidge-jun merged 2 commits into
lidge-jun:devfrom
luvs01:fix/generation-child-outer-timeout-20261014

Conversation

@luvs01

@luvs01 luvs01 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Follow up on test: preserve generation diagnostics and wait for tray probe readiness #7038 by giving the four child-process generation tests an explicit 30-second outer Bun test timeout.
  • The existing readiness and collection phases each have a 10-second deadline. Bun's default individual-test limit is 5 seconds, so a locally slow child can cause the runner to abort before those diagnostics and cleanup finish. The new outer budget allows both phases plus cleanup slack; internal deadlines, assertions, helpers and runtime behavior remain unchanged.
  • This is a local default-runner issue, not a hosted-CI timeout defect: scripts/ci/run-bun-test-batches.sh already supplies --timeout 60000. No CI policy, project-wide timeout or production source changes are included.
  • One changed file: tests/codex-integration/codex-config-generation.test.ts (6 additions / 4 deletions).

Verification

Validated on Linux with repository-pinned Bun 1.4.3, based on upstream dev 9b31677c4704215e8f3db1c321a38b36b40062a9. These checks exercised the exact patch in local validation commit 6f21edcdfe4f9c0abda138c06dd09059689ad531. Published head dd6e8d6d21f6420cd692667a9e3b793eb7991dcf contains the same file blob (668cdaa2abdd6377d4bcf81554fdd2499d467a3e) and patch.

  • bun test tests/codex-integration/codex-config-generation.test.ts: 15 passed, 0 failed, 54 assertions; no command-line timeout override.
  • bun run test:changed: 15 passed, 0 failed; one of 2,318 test files selected against the exact origin/dev merge base.
  • bun run typecheck: passed.
  • bun test tests/ci-workflows/file-size-ratchet.test.ts: 9 passed, 0 failed.
  • bun run privacy:scan: passed.
  • git diff --check: passed.
  • Temporary before/after reproduction: add the same 6-second delay to the existing early-exit child's startup. Original code fails at the default 5-second timeout before diagnostics; patched code passes after 6.01 seconds with all three diagnostic assertions executed.
  • Temporary never-ready fixture: the unchanged 10-second readiness deadline reports the missing path and captured stderr; the finally cleanup reaps the child and preserves its output. All five probe assertions passed in 10.01 seconds. Probe-only edits were restored before committing and no fixture child remained running.

Full-suite resource exception: running all 2,318 files is disproportionate for this four-test timeout-metadata change in a shared cloud executor. Focused regression, import-connected changed coverage, typecheck and repository guards were run instead. The full suite, Windows/macOS and native-client qualification were not run and are not claimed passing. Required exact-head hosted CI and independent review remain separate. This PR is intentionally a draft.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. No user-facing runtime behavior changed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. No credentials, authentication, dependency manifests, workflows or security settings changed.

Summary by CodeRabbit

  • Tests
    • Extended timeouts for generation-race tests to allow child processes and cleanup to complete.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 47c84a25-04f0-4278-9302-b475fe394559
📥 Commits

Reviewing files that changed from the base of the PR and between dd6e8d6 and 03e80b9.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 2b559635-61f6-4a1b-b096-34f186cceeb1
📥 Commits

Reviewing files that changed from the base of the PR and between 9b31677 and dd6e8d6.

📒 Files selected for processing: 1
  • tests/codex-integration/codex-config-generation.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

📝 Walkthrough

The integration test file defines a timeout equal to three times CHILD_TIMEOUT_MS. Four child-process tests now use this timeout instead of the default test timeout.

Changes: Codex generation tests

Layer / File(s) Summary
Child-process test timeouts
tests/codex-integration/codex-config-generation.test.ts
The file defines CHILD_TEST_TIMEOUT_MS as three times CHILD_TIMEOUT_MS and applies it to the generation-race, early-exit diagnostics, bounded-output diagnostics, and child-cleanup tests.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to dd6e8

This change only extends the outer timeout for four integration tests and does not alter production behavior. The reported focused checks passed; hosted CI is still outstanding, but no actionable merge-blocking risk is evident.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: increasing the outer timeout for Codex child-generation tests so diagnostics can complete before timeout.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Oct 14, 2026
@luvs01
luvs01 marked this pull request as ready for review October 14, 2026 00:59
@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer note: I merged current dev (includes #7107) into this branch (non-force) and checked whether the root cause is in the product. It is not: the four tests spawn real Bun children and carry their own 10 s readiness/collection deadlines, while bun run test and a bare bun test run under Bun's 5 s per-test default (only the CI batch script passes --timeout 60000). On a loaded machine the runner aborted the test before its own deadline could report, which hid exactly the diagnostics #7038 added. A wrong callback count from the generation guard would still fail the same assertions, so this is a harness budget fix and does not loosen anything. The per-test timeout matches the convention used across tests/codex-integration/.

Exact-head evidence for 03e80b9: PR CI run 38698212170 green; lane=all dispatch run 38698207585: Linux, all 9 Windows shards, and all 3 macOS shards green (desktop packaging jobs were still queued at the time of writing).

@lidge-jun
lidge-jun merged commit 1008302 into lidge-jun:dev Oct 15, 2026
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants