Skip to content

fix(app): keep idle relay links alive - #933

Merged
frahlg merged 1 commit into
masterfrom
agent/app-relay-heartbeat
Aug 17, 2026
Merged

fix(app): keep idle relay links alive#933
frahlg merged 1 commit into
masterfrom
agent/app-relay-heartbeat

Conversation

@frahlg

@frahlg frahlg commented Aug 17, 2026

Copy link
Copy Markdown
Member

What changed

  • refresh the app relay read deadline when the relay sends a WebSocket ping
  • keep Gorilla's same-payload pong reply
  • add a short idle-connection regression test

Why

The relay pings every 15 seconds, while Core closes a quiet connection after 45 seconds. Core refreshed its deadline only for data frames and pong frames. A relay ping therefore did not count as activity, so a healthy idle link could time out and reconnect every 45 seconds.

Impact

Idle FTW app links stay connected while relay heartbeats arrive. Missing heartbeats still cause the same timeout and reconnect path. This does not change control or safety behavior.

Regression proof

  • old code: the new 30 ms idle test timed out even while the relay sent pings every 5 ms
  • new code: the focused test passed 100 runs
  • new code: the focused race test passed 20 runs
  • make verify passed on exact head, including 167 optimizer tests, Go tests, vet, and build
  • git range-diff is identical to the reviewed local candidate

Base: b6ee4e3bf5d144da0a226fb2b0029225cc8ada6d

@frahlg
frahlg requested a review from miravoss26 August 17, 2026 04:40
@frahlg

frahlg commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

@codex review

@miravoss26 please review exact head 4f64bdc4920cb0be88ad6f77cec5ce991ec587ae. It is patch-identical to the reviewed local candidate on post-#921 master b6ee4e3bf5d144da0a226fb2b0029225cc8ada6d. The focused test passed 100 runs, the focused race test passed 20 runs, and full make verify is green.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 4f64bdc492

ℹ️ 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".

@frahlg
frahlg marked this pull request as ready for review August 17, 2026 04:56
@frahlg
frahlg merged commit 393ecdf into master Aug 17, 2026
14 checks passed
@frahlg
frahlg deleted the agent/app-relay-heartbeat branch August 17, 2026 18:18
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