Repository navigation
test: replace real timeout waits with fake timers in the slowest suites - #878
Conversation
Seven files spent most of their CI time waiting for real 10-second timeouts and rate-limit refills. They now advance fake timers instead, keep real socket and filesystem I/O, and assert each deadline boundary (still open just before it, closed at it). The installed-plugin test loads the registry once for its 16 explicit-command cases. No production code changed and no assertions were removed.
Codex Review Summary: ✅ CompletedThis 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. |
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d7d1283df4
ℹ️ 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".
| Object.fromEntries( | ||
| commands.map(([id, variable]) => [variable, path.resolve(".missing-fixture", id)]), | ||
| ), |
There was a problem hiding this comment.
Isolate each explicit-command override
Populating every CODEXHOST_*_COMMAND variable in the shared registry weakens the mapping check: if an Adapter is accidentally wired to another Harness's variable, it still receives a nonexistent path and returns the expected notInstalled result. Previously, only the variable under test was set, so this mistake was exposed whenever normal discovery found that Adapter locally—the exact scenario these cases are intended to cover. Preserve per-case environments, or independently assert which configured path each Adapter selected.
Useful? React with 👍 / 👎.
Purpose
Seven test files spent 4–17 seconds each waiting for real 10-second timeouts and rate-limit refills. remote-relay alone took 56 seconds of CI test time across 12 files.
Changes
The slow cases advance Vitest fake timers instead of waiting in real time. Socket and filesystem I/O stay real, and each timeout case now also checks the boundary: still open just before the deadline, closed at it. No production code changed and no assertions were removed.
packages/remote-relay/test/limits.test.tspackages/remote-relay/test/operations.test.tspackages/remote-relay/test/relay.test.tspackages/host-runtime/test/remote-official-socket-link.test.tsDateonly)packages/remote-relay/test/client-hello.test.tspackages/host-runtime/test/installed-harness-plugins.test.tspackages/adapters/zcode/test/transport.test.tstests/release/host-bundle.test.mjswas also slow but has no safely shareable setup, so it is unchanged.Validation