fix(e2e): make vogon REPL ignore empty lines · Entire

fix(e2e): make vogon REPL ignore empty lines

397280a→main·

pfleidi·2w ago·2 files·+13 added/-8 removed

TmuxSession.Send may retry Enter when the pane does not visibly react within its 2s window. Vogon treated an empty stdin line as session termination, so on a slow runner a retried Enter could end the session mid-test. Exit only on explicit exit/quit and update the comments that described the pre-rewrite Send semantics.

Sessions

ffcdd5a7efd3View transcript

[?
Debug E2E Test Timing IssuesClaude Code·Opus 4.8[1m]·1 step](/content/gh/entireio/cli/session/58280a70-c670-4b2d-a1c8-80439ef7460d#timeline-ffcdd5a7efd3/index.html)

Changes

2

80 unmodified lines

81
82
83
84
85
84
85
86
87
88
89

80 unmodified lines

s.stableAtSend = stableContent(s.Capture())

// Verify the pane reacted to Enter; a swallowed Enter leaves the prompt
     // sitting unsubmitted in the input box. Retry a couple of times — Enter
     // on an already-submitted (empty) input box is a no-op.
     // sitting unsubmitted in the input box. Retry a couple of times — TUIs
     // treat Enter on an already-submitted (empty) input box as a no-op, and
     // the vogon REPL ignores empty lines.
     for range 3 {
     	 preEnter := s.Capture()
     	 if err := s.SendKeys("Enter"); err != nil {

Me2e/agents/tmux.go+3/-2

63 unmodified lines

64
65
66
67
67
68
69
70
71
72
73
74
70
71
72
73
74
75
76
77
78
79
80
81

63 unmodified lines

scanner := bufio.NewScanner(os.Stdin)
     for scanner.Scan() {
     	 line := strings.TrimSpace(scanner.Text())
     	 if line == "" || line == "exit" || line == "quit" {
     	 	 if line == "exit" || line == "quit" {
     	 	 	 break
     	 }
     	 // Give tmux's Send() time to capture the echoed-input state
     	 // before we produce any output. Send polls every 200ms; without
     	 // this pause, vogon output appears in the same capture window
     	 // as the echo, causing stableAtSend to include final output and
     	 // preventing WaitFor's contentChanged detection.
     	 // Ignore empty lines: tmux's Send() may retry Enter when the pane
     	 // doesn't visibly react in time, and treating that as termination
     	 // would end the session mid-test.
     	 if line == "" {
     	 	 continue
     	 }
     	 // Give tmux's Send() time to observe a distinct pre-output pane
     	 // state, so its Enter verification and WaitFor's contentChanged
     	 // detection see a clean echo -> output transition.
     	 time.Sleep(700 * time.Millisecond)
     	 fmt.Fprintln(os.Stdout, "Working...")
     	 runTurn(dir, cfg.sessionID, transcriptPath, line)

Me2e/vogon/main.go+10/-6