You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: stabilize Link preflight and standalone stop checks - #9064
The Link test keeps a real loopback peer. Once the peer receives the complete credential-free probe, the test advances its clock to the original 20 ms deadline. It still checks that the operation fails with the expected timeout, sends no credentials, and leaves the request body untouched. A real abort cleans up if the probe never arrives.
The stop test runs each matching or mismatching standalone record in its own temporary home. Each case has the standard five-second test timeout. Previously three separate CLI invocations shared one five-second limit. The real CLI arguments, platform-specific coverage and total number of child invocations are preserved.
Verification
Reproduced the original Link failure by delaying delivery to the test peer for 90 ms. The revised test passed under the same delay. When the probe was withheld, it failed as expected and the process exited.
On Windows x64 with Bun 1.4.4, the Link test file passed all 17 cases (94 assertions). On the combined commit, the two affected files with a name filter selecting the changed cases passed 6 cases with 58 assertions. One POSIX-only case was skipped.
bun check --no-script --noEmit, bun scripts/structure-ssot.ts and git diff --check passed. Local testing focused on the changed fixtures. The Ubuntu CI run covers the POSIX-only input.
Checklist
Only changed the two tests that failed in the linked run.
Checked that the changes affect test setup and scheduling only.
Preserved the assertions about stop authorization, signals, credentials, and request bodies.
Summary by CodeRabbit
Tests
Improved coverage for authentication timeouts, confirming a silent peer triggers the expected timeout even when the request has a longer abort window, and that the request body remains unread and uncancelled.
Expanded stop-operation checks for matching and mismatched records. Tests confirm valid legacy and current records permit ordinary stops after discovery misses, while wrong-home, wrong-port, stale, and client-role records prevent stop requests and signals.
No actionable comments were generated in the recent review.
Walkthrough
The changes update two test areas. The relay test controls when its authentication timeout expires. The deferred-teardown tests separate matching-record stop cases from mismatch cases and add assertions about receipts, signals, stop URLs, and nonces.
Changes: Relay authentication timeout test
Layer / File(s)
Summary
Control the silent-peer timeout tests/clients/link-relay-bound-transport.test.ts
The test names the 20 ms timeout and advances the fake timer after the peer receives the authentication probe. It supplies a 2-second abort signal and restores real timers in a finally block. Existing assertions continue to check that the request body is neither read nor cancelled.
Deferred teardown stop tests
Layer / File(s)
Summary
Check matching and mismatched records tests/service/stop-deferred-teardown.test.ts
Separate tests verify that legacy and current records permit an ordinary stop after a discovery miss, including the absence of a receipt. Wrong-home, wrong-port, stale, and client-role records refuse the stop; the tests also check that no signal, stop URL, or nonce is issued. The wrong-home case remains skipped on Windows.
lidge-jun/opencodex#8834: Updates fixtures in the same test file to address the 20 ms authentication window expiring before the data request starts.
Merge Risk: Minimal · up to 68730
This change only stabilizes two tests and does not alter production behavior. No actionable merge-blocking risk is evident.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "test: stabilize Link preflight and standalone stop checks" matches the PR objectives. The PR changes two test files: the Link relay-bound transport test now advances the 20 ms fake-timer de…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "test: stabilize Link preflight and standalone stop checks" matches the PR objectives. The PR changes two test files: the Link relay-bound transport test now advances the 20 ms fake-timer deadline only after the peer receives the probe, and the standalone stop test runs each record in its own temporary home. The title names both affected areas and uses the conventional test: prefix. It is specific and does not describe anything outside the changeset.
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.
Reviewing files that changed from the base of the PR and between 7cec010 and 68730c7.
Files selected for processing: 1
tests/clients/link-relay-bound-transport.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Maintainer integration (lane W, @lidge-jun) at exact head 68730c72c7112c42557709c953621f81b9f925d9, which contains dev49554a1221.
Added 68730c72c7: the missing-probe watchdog now aborts after 2 s, inside the 5 s test timeout, so finally always restores real timers (independent review finding).
PR CI on this head: gates, test changed, ci, hygiene, enforce-target, CodeRabbit all pass.
Real Windows x64 (Bun 1.4.4), PR head merged with dev: both changed files 163 pass / 10 skip / 0 fail.
macOS: bun run typecheck clean; bun run test:changed 173 pass / 0 fail; both files 173 pass.
Independent gpt-6.1-terra review, two rounds: PASS, no open findings.
scripts/ci/assert-mergeable-review.sh --maintainer-integration 9064: OK.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
choreMaintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two tests failed on the Ubuntu changed-test run for #9061.
Verification
bun check --no-script --noEmit,bun scripts/structure-ssot.tsandgit diff --checkpassed. Local testing focused on the changed fixtures. The Ubuntu CI run covers the POSIX-only input.Checklist
Summary by CodeRabbit