Skip to content

reset command_timeout on interactive command when output is received …#254

Merged
thorinaboenke merged 3 commits into
ait-testbed:developmentfrom
thorinaboenke:development
Jun 23, 2026
Merged

reset command_timeout on interactive command when output is received …#254
thorinaboenke merged 3 commits into
ait-testbed:developmentfrom
thorinaboenke:development

Conversation

@thorinaboenke

@thorinaboenke thorinaboenke commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

…also when prompt is set

Task

#253

When prompts were configured (which is the default: ['$ ', '# ', '> ']), the interactive mode timer was only reset via the else branch of check_prompt, which was never reached when prompts were set. This caused command_timeout to count from when the command was dispatched rather than from the last received output, silently cutting off long-running commands
Moving set_timer() outside the else block ensures the timer resets on every received chunk unless a prompt match is found and the loop exits.

Description

fix: reset interactive SSH timeout on every received output chunk, not only when no prompts are configured

check_prompt is now:

  • Empty output (EOF) → timer unchanged, return False
  • No prompts configured → reset timer, return False
  • Prompt matched → timer = None (stops loop), return True
  • Prompt not matched → reset timer, return False

How Has This Been Tested?

Checklist

  • This Pull-Request goes to the development branch.
  • I have successfully run prek locally.
  • I have added tests to cover my changes.
  • I have linked the issue-id to the task-description.
  • I have performed a self-review of my own code.

@thorinaboenke thorinaboenke merged commit 7e0f7d8 into ait-testbed:development Jun 23, 2026
1 check passed
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