Repository navigation
Conversation
Contributor
Author
|
/ok to test bf873a4 |
7 tasks done
The exited-shell interrupt test typed `...; set -e; sleep 120` about 0.5 s after Harbor starts `bash --login`, then pasted queued input and sent Ctrl-C. On the ubuntu-26.04 runner image the login shell can still be starting at that point. The pre-Ctrl-C input drain then consumes the unread command line itself, `sleep` never runs, Ctrl-C reaches an idle prompt, and the shell never exits (`pane_dead` stays 0). Wait until tmux reports `sleep` as the pane's foreground command before pasting the queued input, so both variants exercise the state they assert on. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
yaoyu-33
force-pushed
the
yuya/terminus-interrupt-test-startup-race
branch
from
October 23, 2026 20:50
bf873a4 to
5f8b084
Compare
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Wait until tmux reports
sleepas the foreground command before pasting queued input and triggering shell exit intest_exited_shell_recovery_discards_pending_input_and_reports_lost_state.A slow login shell can leave the command unread when Ctrl-C arrives. The pending-input drain then consumes the command itself, so the test never starts the foreground job it intends to interrupt. Waiting for the foreground command makes that setup deterministic without weakening the discarded-input, preserved-file, or lost-shell-state assertions.
This complements #4966, now on main, which clears
PROMPT_COMMANDso Ubuntu 26.04's login hook does not prevent the shell from exiting on Ctrl-C. The previous description attributed the Ubuntu CI failures solely to startup timing; #4966 identified this additional cause.Rebased onto main at
8041d1910, including #4973's atomic resubmit-lock fix. The prior red Unit tests / Test job failed intest_two_concurrent_resubmits_queue_one_job, outside the Terminus change.Issue: none needed for this focused test reliability fix.
Validation
On the rebased head:
pytest responses_api_agents/terminus_2_sandboxed_agent/tests/test_terminal.py: 18 passed, 4 skipped on macOS. The four skips require Linux tmux; they need fresh Linux CI.pytest tests/unit_tests/test_eval_resubmit.py: 39 passed.pre-commit run --all-files,git diff --check, and DCO trailer checks: passed.Earlier validation recorded on the original PR head used a throwaway macOS adaptation with Bash 5.2.37 and delayed login startup. It reported 180/180 runs across both exit variants and 0 s, 0.8 s, and 1.5 s startup delays. Those adapted runs were not repeated during this rebase.
Rollout evidence
N/A: test-only change; no agent, verifier, or runtime behavior changes.