Skip to content

[CI] test: keep relay correction fixtures alive through the minimum connection age - #26389

Merged
nwparker merged 1 commit into
mainfrom
nwparker/relay-correction-minimum-control-age
Oct 8, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/relay-correction-minimum-control-age

Conversation

@nwparker

@nwparker nwparker commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​59 $\color{#cf222e}{\Huge{\mathbf{−}}}$​9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​50
Prod 0 0 0 0

ELI5

Three relay correction tests started with a brand-new connection, but the relay now requires three minutes of connected time before an idle move. They failed before reaching the behavior they were meant to check.

What Changed

The existing fixture now advances its injected clock in normal heartbeat increments. It calls the original heartbeat callback, waits for the real matching pong and any due database renewal, then refreshes the cell report. All three existing cases, assertions and thirty-second deadlines remain unchanged. Production code is unchanged.

Why

This exercises the new minimum connection age without waiting three wall-clock minutes or bypassing live connection and database lease checks. A single clock jump would expire those leases and test a different behavior.

Linked Issue

Fixes the relay CI failures blocking #26384.

Visual Proof

N/A — test fixture only; no user interface changes.

Testing

Before: run 37711195460 had 13 passed, 3 failed across the two relay contract files. The failures were two unexpected busy results and one wait for a commit that never started. After: run 37714088463, relay job 113107236200, has 16 passed, 0 failed, 0 skipped. The passing job ran on PR merge source f0848fdb3ee7698e2b2ed1180d7fc412a6d8e922, which includes newer main changes; the fixture file matches this PR exactly. This is a correctness repair; failed-run durations are not a speed measurement.

  • Formatting and changed-code quality checks passed.
  • Independently reviewed fixture ownership, original assertions and deadlines.
  • Relay contract CI passes all sixteen original cases under Node.
  • Complete PR CI passes: all ten full unit shards, relay contracts, static analysis and typecheck, and the final verification gate succeeded on this head.

The local e2e typecheck is not clean: 246 diagnostics include unavailable cloud packages and unrelated test errors. Its only diagnostic in this file is at the existing configuration cast on line 87; no new heartbeat lines were reported. Native relay tests run in CI, with background launching enabled.

Review

The timer spy passes through to the original implementation and is restored in finally before clock advancement. Callback selection requires the exact source-session timer handle and heartbeat interval. Real socket handling and database batching remain active.

Agent skill upstream boundary

  • Not applicable; no upstream skill source is copied.

Notes

Test-only fixture; no runtime, protocol, cross-platform, SSH or mobile behavior changes. No new local-only production assumptions.

Checklist

  • This PR is small and focused.
  • Explained before/after behavior, mechanism and choice of approach.
  • Visual proof is N/A with reason.
  • Self-reviewed correctness and connection/lease ownership.
  • Cross-platform and remote impact considered.
  • PR CI passed on this head; local e2e typecheck limitation disclosed.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 66856d56-e020-4f3b-a56d-6e066a94a7cd
📥 Commits

Reviewing files that changed from the base of the PR and between 7c88ab7 and 4a4b6b4.

📒 Files selected for processing (1)
  • tests/e2e/relay-region-correction.unit.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The test helper now captures the source session’s control-ping callback and advances the test clock in ping-interval steps until the minimum control age is reached. It checks pong completion, pending-ping state, and renewal progress before recording a heartbeat.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 4a4b6

No concrete issue requiring a fix before merge was established. The relay tests and CI still need to complete.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the test-fixture change that keeps relay correction fixtures alive through the minimum connection age.
Description check ✅ Passed The description is complete and focused. It explains the problem, the fixture changes, the reason for the approach, testing results, limitations, review notes, and checklist status. It also identifies…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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.

@nwparker
nwparker merged commit b0fbcfd into main Oct 8, 2026
35 checks passed
@nwparker nwparker changed the title test: keep relay correction fixtures alive through the minimum connection age [CI] test: keep relay correction fixtures alive through the minimum connection age Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant