Skip to content

test(notebook): decouple redirect trust from probe timing - #2228

Merged
ewen-poch merged 1 commit into
mainfrom
test/mirror-probe-redirect-trust
Sep 6, 2026
Merged

test(notebook): decouple redirect trust from probe timing#2228
ewen-poch merged 1 commit into
mainfrom
test/mirror-probe-redirect-trust

Conversation

@ewen-poch

Copy link
Copy Markdown
Member

Problem

PR #2226's Ubuntu full-suite shard failed the existing USTC-to-NJU redirect trust test. The test expected USTC to be selected even when the equally valid official mirror completed faster. Coverage aggregation inherited the same failure. This test entered main in #2217; it is unrelated to the Specialist implementation.

Proposed change

Test accepted redirects with USTC as the sole candidate. Retain the untrusted-redirect fallback assertion and existing dedicated fastest-mirror tests. Production behavior is unchanged.

Acceptance criteria and validation

Reproduced the exact CI mismatch deterministically by making mocked USTC requests advance a controlled Date.now clock while official requests did not: original assertion selected the official mirror and failed. The corrected assertion passed under the same clock. The clock instrumentation was then removed because acceptance no longer depends on relative latency.

Final test-only diff -> npm test -- src/main/notebook/mirror-probe.test.ts -> all 14 tests passed. npm run lint, targeted Prettier and git diff --check passed after the material edit. No production interfaces, consumers, persistence, UI, or data compatibility changed; no full local test run. Final-head PR Gate and independent review remain required.

Review focus

Ensure trust rejection/fallback remains covered and the accepted-redirect assertion no longer assumes wall-clock ordering. No latency policy or timeout changes.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review

Verdict: mergeable

No actionable findings.

Summary: The change only removes a timing-sensitive competing candidate from an existing redirect-trust test. Static inspection found no concrete merge-blocking defect.

@github-actions github-actions Bot added the ready-to-merge All completed AI reviewers found this pull request mergeable. label Sep 5, 2026
@ewen-poch
ewen-poch merged commit 7e1f3c7 into main Sep 6, 2026
26 checks passed
@ewen-poch
ewen-poch deleted the test/mirror-probe-redirect-trust branch September 6, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge All completed AI reviewers found this pull request mergeable.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant