Repository navigation
test: partition Windows apply coverage and rebalance hosted shards - #7917
Conversation
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. |
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Shared fixtures and test-suite split tests/helpers/codex-cli-windows-apply-fixture.ts, tests/codex-integration/codex-cli-update-windows-apply.test.ts, scripts/test-layout/layout-codex-collision.json, tests/fixtures/test-layout-expected.json, structure/codex-cli-update.md |
A shared helper now creates Windows x64 fixtures, approves plans, and checks cleanup. The existing test uses the helper, and the layout mappings and coverage description reflect the three added test files and their coverage. |
Installation and Worker settlement tests/codex-integration/codex-cli-update-windows-apply-install.test.ts |
Tests cover Worker settlement, cancellation during the final process scan, offline npm installation, terminal installer results, npm command sequencing, and target readback. |
Apply outcomes and persistence tests/codex-integration/codex-cli-update-windows-apply-outcomes.test.ts |
Tests cover process-state uncertainty, partial updates, unknown installer state, completion persistence retries, toolchain pinning, and planning with an unrelated directory under the shared prefix. |
Shared-prefix behavior and native cleanup tests/codex-integration/codex-cli-update-windows-apply-shared.test.ts |
Tests cover successful updates and preservation, unexpected mutations, linked entries, native handle-close failures, and no-op installs. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Other
Possibly related PRs
- lidge-jun/opencodex#7648: Adds the Windows apply transaction and ownership behavior exercised by these integration tests.
- lidge-jun/opencodex#7614: Adds native child lifetime and terminal-result behavior covered by the Worker and cleanup tests.
- lidge-jun/opencodex#7626: Adds the asynchronous job store and completion retry contracts exercised by the persistence tests.
Suggested reviewers: luvs01, ingwannu
Merge Risk: 
Minimal · up to 1e89d
-
This change reorganizes Windows CLI apply tests and their layout registration. It does not alter runtime behavior, and the supplied context shows no concrete merge-blocking risk. The author notes that hosted Windows/macOS shard timings are still unconfirmed.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title "test: partition Windows apply coverage and rebalance hosted shards" matches the main change. The PR splits Windows Codex CLI apply tests into separate files, registers the new files in the layout shard and expected-layout fixture, and updates Windows duration weights used for shard rebalancing. The title is specific and concise. It omits the expected-layout and structure-doc updates, which are minor supporting changes. The title does not describe any change absent from the changeset.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 5 files. (3 skipped: 3 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- 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.
Comment @coderabbitai help to get the list of available commands.
Summary
devatbe6b6b9556b0c075c350687ce515d0d024adfd69. Split the Windows CLI apply coverage into four sibling files and register all three new names in the layout domain shard and independent expected-layout fixture. The original 23 registration blocks expand to the same 31 cases; their bodies and parameter rows are byte-for-byte unchanged. Shared fixtures retain their existing cleanup/approval logic, with a separate root set and cleanup hook per importing file.The apply file had no Windows duration row and was assigned the 428ms median fallback. Its mixed batch and singleton attribution both exceeded 480s. Shard 5 had 303 completed files totaling 1,646.842s, against a whole-shard prediction of 1,108.478s, before cancellation in batch 56/56. Its heaviest completed files were:
tests/server/management-provider-validation.test.tsserver/server-images.test.tsserver/server-combo-failover-e2e.test.tsserver/loopback-listener-integration.test.tscodex-integration/issue-702-expired-replay-state.test.tsThe existing assignment code now predicts 1,273.795–1,273.873s per shard. The former shard-5 heavy work is redistributed through that algorithm. These predictions are not hosted completion evidence.
Verification
Run on Windows x64 with pinned Bun 1.4.4. Each test command used
OCX_TEST_NO_QUEUE=1; only one Bun test process ran at a time.bun install --frozen-lockfile— passed, no lockfile change.bun test --isolate --timeout 60000 <file>separately for each row below:tests/codex-integration/codex-cli-update-windows-apply.test.tscodex-cli-update-windows-apply-install.test.tscodex-cli-update-windows-apply-outcomes.test.tscodex-cli-update-windows-apply-shared.test.tsAll 31 apply cases pass; every file is below the requested 200s local target. An initial split-validation run exposed an accidentally removed child-launch import in the shared partition; the import was restored before its successful run above, without changing any case body or assertion.
bun test --isolate --timeout 60000 tests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/file-size-ratchet.test.ts tests/ci-workflows/ci-shard-balance.test.ts tests/ci-workflows/macos-serial-lanes.test.ts tests/ci-workflows/ci-test-lane.test.ts tests/ci-workflows/ci-crash-disposition.test.ts— 45 pass, 64 existing platform skips, 0 fail. The POSIX fake-toolchain execution cases are already skipped on Windows; the duration-table parser, refresh, table-shape, layout, and ratchet checks executed.bun run typecheck— passed, no type errors in 2,227 files.bun run structure:check— passed.bun run privacy:scan— passed.cf50c7534365729772f52bb7d5c87148edef29236a81c42c9a6e37a49351144a.git diff --check— passed.NOT RUN: full local suite (2,773 files is disproportionate on this shared Windows host; focused native behavior and the relevant metadata/harness checks were run), POSIX-only harness branches, and a new hosted Windows/macOS matrix. Hosted recovery remains to be established by a later normal batched
devrun. No CI dispatch or rerun was requested; this PR requests the full Ubuntu PR subset withci:fullbecause the timing table is read as data. No merge is requested.Checklist
Summary by CodeRabbit