Skip to content

test(combos): keep the rename fixture off provider discovery and serialize its temp homes - #6833

Merged
lidge-jun merged 1 commit into
devfrom
codex/n3-combo-rename-fixture
Oct 9, 2026
Merged

lidge-jun merged 1 commit into
devfrom
codex/n3-combo-rename-fixture

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

Fixes #6777. The combo rename management tests could time out and then corrupt the next test's fixture.

The rename route awaits Claude agent sync, which gathers routed models, and the fixture's synthetic providers (https://a.example/v1 etc.) had live discovery on. Discovery ends in a DNS lookup that the HTTP request's abort signal does not bound. When DNS was slow, the case exceeded Bun's 5 s default; Bun then started the next case while the first callback was still running, so the first read the second's fixture and its finally restored the environment under it. That is the reported new-public/stable-public mismatch followed by ENOENT config.json. Hosted CI resolves DNS fast and runs with --timeout 60000, which hid it.

Test-only change in tests/routing/combo-management-api.test.ts:

  • Fixture providers set liveModels: false, so the static catalog path is used and no outbound request is made. The route's await stays: the case asserts agent definitions are migrated before the response returns.
  • withTempHome owners are serialized. afterEach drains the queue with a 50 s bound; if an owner never settles, the helper is poisoned so later owners (including ones already queued) reject instead of sharing a live environment, and later drains fail immediately.
  • Regressions: the rename case asserts providerOutboundGet is never called (3 calls on dev); an overlapping-owner case and a poison case cover the helper (both fail with the dev helper).

No production code changes.

Verification

Every local run started Bun with a fresh temporary HOME, USERPROFILE and CLAUDE_CONFIG_DIR (the separate #6775 hazard).

  • bun test tests/routing/combo-management-api.test.ts: 41 pass, 0 fail.
  • New regressions against the dev helper/fixture: rename discovery 0/1 (3 outbound calls), serialization 0/1, poison 0/1; after the change 3/3.
  • bun test tests/ci-workflows/file-size-ratchet.test.ts: pass (file at 1,913 lines). bun run typecheck: exit 0.
  • Independent review reproduced the full reported cascade on dev with a controlled 5.5 s DNS delay (37 pass / 2 fail / 1 error) and confirmed it is gone here; also ran the file with CI's --isolate --timeout 60000 flags (77/77 across four files).
  • The full suite was not run locally; it runs in hosted CI on this head.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. (Test-only; no user-facing change.)
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. (None touched.)

@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 9, 2026 11:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T11:48:28.617739Z 0fa7ee8 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 448eaaaf-7ca2-4ba8-a263-67eff143bab8

📥 Commits

Reviewing files that changed from the base of the PR and between 37e9294 and 0fa7ee8.


📒 Files selected for processing (1)
  • tests/routing/combo-management-api.test.ts


  • 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 github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@lidge-jun
lidge-jun merged commit 6d7e5f4 into dev Oct 9, 2026
30 checks passed
@lidge-jun
lidge-jun deleted the codex/n3-combo-rename-fixture branch October 9, 2026 12:59
lidge-jun added a commit that referenced this pull request Oct 9, 2026
* docs(devlog): record the #6777 fixture implementation

* docs(devlog): record the #6776 fixture implementation

* docs(devlog): close the N3 test-infra unit (#6775, #6777, #6776)

Moves devlog/_plan/261009_n3_test_infra to devlog/_fin with an Outcome section recording #6835 (7f642e3), #6833 (6d7e5f4) and #6834 (c4baa30), their exact-head CI, the union check, and the scope left as follow-ups.

* docs(devlog): say which N3 CI jobs were skipped
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.

1 participant