Skip to content

fix: don't reconnect after a command longer than the ack timeout - #45

Merged
InftyAI-Agent merged 1 commit into
mainfrom
fix/long-exec-reconnect
Oct 17, 2026
Merged

InftyAI-Agent merged 1 commit into
mainfrom
fix/long-exec-reconnect

Conversation

@kerthcet

Copy link
Copy Markdown
Member

The daemon handles each message inline, so while a command runs its serve loop reads nothing and the controller's heartbeat acks sit unread in the socket. When the command finished, the next ack_check saw no ack for longer than ack_timeout (30s by default) and reconnected, so the daemon vanished from the registry for its 5s backoff right after answering.

This broke the E2E run on #44: microdnf install -y curl on rocky took the full 60s timeout, daemon-rocky-1 reconnected the same instant, and the following tests failed with "Daemon daemon-rocky-1 not found".

Restart the ack deadline after each inline message. The buffered acks are read on the next iterations; a controller that really stopped acking is still caught one ack_timeout later. Introduced in #40.

What this PR does / why we need it

Which issue(s) this PR fixes

Fixes #

Special notes for your reviewer

Does this PR introduce a user-facing change?


The daemon handles each message inline, so while a command runs its serve
loop reads nothing and the controller's heartbeat acks sit unread in the
socket. When the command finished, the next ack_check saw no ack for longer
than ack_timeout (30s by default) and reconnected, so the daemon vanished
from the registry for its 5s backoff right after answering.

This broke the E2E run on #44: `microdnf install -y curl` on rocky took
the full 60s timeout, daemon-rocky-1 reconnected the same instant, and the
following tests failed with "Daemon daemon-rocky-1 not found".

Restart the ack deadline after each inline message. The buffered acks are
read on the next iterations; a controller that really stopped acking is
still caught one ack_timeout later. Introduced in #40.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
Copilot AI balanced review requested due to automatic review settings October 17, 2026 19:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 638c1c87-dc5d-4ec9-961a-caf16d997a9f
  • 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@InftyAI-Agent InftyAI-Agent added needs-triage Indicates an issue or PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. do-not-merge/needs-kind Indicates a PR lacks a label and requires one. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 17, 2026
@kerthcet

Copy link
Copy Markdown
Member Author

/kind bug
/lgtm

@InftyAI-Agent InftyAI-Agent added bug Categorizes issue or PR as related to a bug. lgtm Looks good to me, indicates that a PR is ready to be merged. and removed do-not-merge/needs-kind Indicates a PR lacks a label and requires one. labels Oct 17, 2026

@InftyAI-Agent InftyAI-Agent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: PR has both lgtm and approved labels

@InftyAI-Agent
InftyAI-Agent merged commit 96c97b2 into main Oct 17, 2026
43 of 45 checks passed
@kerthcet
kerthcet deleted the fix/long-exec-reconnect branch October 17, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bug Categorizes issue or PR as related to a bug. lgtm Looks good to me, indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a label and requires one. needs-triage Indicates an issue or PR lacks a label and requires one.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants