detached 8dda6f5

test(daemon): cover echo acknowledgement through sequenced input

The echo ack test called the tracker directly, so removing noteInputApplied from handleSequencedInput left the suite green. It now drives handleSequencedInput.
commit
8dda6f55153419777eee191180e169568e34f182
author
brice · · 2026-10-08 06:01 UTC
parent
8442b74
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +5 -3
M internal/usecase/daemon/echo_ack_test.go +5 -3
@@ -65,11 +65,13 @@ func (c *echoTestClock) nextTimer(t *testing.T) (*manualAttentionTimer, time.Dur
6565
6666 func TestEchoAckWaitsForEchoTimeoutAndSendsAckOnlyOutput(t *testing.T) {
6767 clock := newEchoTestClock()
68- d, _, ac, sends := newManualSessionWithPTYsClock(t, clock, newQuietPTY())
68+ d, sess, ac, sends := newManualSessionWithPTYsClock(t, clock, newQuietPTY())
6969
70- d.noteInputApplied(ac, 1)
70+ // Drive the production input path so the acknowledgement wiring is
71+ // covered, not just the tracker.
72+ d.handleSequencedInput(sess, ac, 1, []byte("a"))
7173 clock.advance(20 * time.Millisecond)
72- d.noteInputApplied(ac, 2)
74+ d.handleSequencedInput(sess, ac, 2, []byte("b"))
7375 timer, delay := clock.nextTimer(t)
7476 require.Equal(t, echoAckDelay, delay)
7577 require.Zero(t, ac.echoAck.Load(), "input is not echoed when applied")
@@ -65,11 +65,13 @@ func (c *echoTestClock) nextTimer(t *testing.T) (*manualAttentionTimer, time.Dur
65 65
66 func TestEchoAckWaitsForEchoTimeoutAndSendsAckOnlyOutput(t *testing.T) {66 func TestEchoAckWaitsForEchoTimeoutAndSendsAckOnlyOutput(t *testing.T) {
67 clock := newEchoTestClock()67 clock := newEchoTestClock()
68- d, _, ac, sends := newManualSessionWithPTYsClock(t, clock, newQuietPTY())68+ d, sess, ac, sends := newManualSessionWithPTYsClock(t, clock, newQuietPTY())
69 69
70- d.noteInputApplied(ac, 1)70+ // Drive the production input path so the acknowledgement wiring is
71+ // covered, not just the tracker.
72+ d.handleSequencedInput(sess, ac, 1, []byte("a"))
71 clock.advance(20 * time.Millisecond)73 clock.advance(20 * time.Millisecond)
72- d.noteInputApplied(ac, 2)74+ d.handleSequencedInput(sess, ac, 2, []byte("b"))
73 timer, delay := clock.nextTimer(t)75 timer, delay := clock.nextTimer(t)
74 require.Equal(t, echoAckDelay, delay)76 require.Equal(t, echoAckDelay, delay)
75 require.Zero(t, ac.echoAck.Load(), "input is not echoed when applied")77 require.Zero(t, ac.echoAck.Load(), "input is not echoed when applied")

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close