detached bcae23b

test(protocol): update final hello fixtures

commit
bcae23b153d48fbdb6393edf3906b3c3de7f97f0
author
brice · · 2026-08-03 07:19 UTC
committer
brice · · 2026-08-04 03:19 UTC
parent
0929f70
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +6 -4
M internal/adapters/dgram/proxy_test.go +4 -3
@@ -10,6 +10,7 @@ import (
1010 "testing"
1111 "time"
1212
13+ "github.com/bnema/vev/internal/domain"
1314 "github.com/bnema/vev/internal/ports"
1415 )
1516
@@ -87,7 +88,7 @@ func TestProxyRuntimeClampsDatagramHelloOutputWindowAndPreservesControl(t *testi
8788 daemon := newFakeTransport()
8889 errCh := make(chan error, 1)
8990 go func() { errCh <- ProxyRuntime{Client: client, Daemon: daemon, IdleTTL: time.Hour}.Run(t.Context()) }()
90- hello := ports.Hello{Version: ports.ProtocolVersion, Intent: ports.IntentAttach, Name: "work", MaxOutputInFlight: requested}
91+ hello := ports.Hello{Version: ports.ProtocolVersion, Intent: ports.IntentAttach, Name: "work", Size: domain.Size{Cols: 80, Rows: 24}, MaxOutputInFlight: requested}
9192 client.recv <- recvResult{frame: ports.Frame{Type: ports.MsgHello, Payload: ports.MarshalHello(hello)}}
9293
9394 select {
@@ -488,7 +489,7 @@ func TestProxyCopierStopsRetryingWhenContextCanceled(t *testing.T) {
488489
489490 func TestClampDatagramHelloOutputWindowPreservesProtocolValidation(t *testing.T) {
490491 t.Run("malformed payload remains malformed", func(t *testing.T) {
491- payload := append(ports.MarshalHello(ports.Hello{Version: ports.ProtocolVersion, MaxOutputInFlight: 8}), 0xff)
492+ payload := append(ports.MarshalHello(ports.Hello{Version: ports.ProtocolVersion, Size: domain.Size{Cols: 80, Rows: 24}, MaxOutputInFlight: 8}), 0xff)
492493 frame := ports.Frame{Type: ports.MsgHello, Payload: payload}
493494 got := clampDatagramHelloOutputWindow(frame)
494495 if !reflect.DeepEqual(got, frame) {
@@ -502,7 +503,7 @@ func TestClampDatagramHelloOutputWindowPreservesProtocolValidation(t *testing.T)
502503 t.Run("mismatched version remains mismatched", func(t *testing.T) {
503504 wantVersion := ports.ProtocolVersion + 1
504505 frame := ports.Frame{Type: ports.MsgHello, Payload: ports.MarshalHello(ports.Hello{
505- Version: wantVersion, MaxOutputInFlight: 8,
506+ Version: wantVersion, Size: domain.Size{Cols: 80, Rows: 24}, MaxOutputInFlight: 8,
506507 })}
507508 got, err := ports.UnmarshalHello(clampDatagramHelloOutputWindow(frame).Payload)
508509 if err != nil {
@@ -10,6 +10,7 @@ import (
10 "testing"10 "testing"
11 "time"11 "time"
12 12
13+ "github.com/bnema/vev/internal/domain"
13 "github.com/bnema/vev/internal/ports"14 "github.com/bnema/vev/internal/ports"
14 )15 )
15 16
@@ -87,7 +88,7 @@ func TestProxyRuntimeClampsDatagramHelloOutputWindowAndPreservesControl(t *testi
87 daemon := newFakeTransport()88 daemon := newFakeTransport()
88 errCh := make(chan error, 1)89 errCh := make(chan error, 1)
89 go func() { errCh <- ProxyRuntime{Client: client, Daemon: daemon, IdleTTL: time.Hour}.Run(t.Context()) }()90 go func() { errCh <- ProxyRuntime{Client: client, Daemon: daemon, IdleTTL: time.Hour}.Run(t.Context()) }()
90- hello := ports.Hello{Version: ports.ProtocolVersion, Intent: ports.IntentAttach, Name: "work", MaxOutputInFlight: requested}91+ hello := ports.Hello{Version: ports.ProtocolVersion, Intent: ports.IntentAttach, Name: "work", Size: domain.Size{Cols: 80, Rows: 24}, MaxOutputInFlight: requested}
91 client.recv <- recvResult{frame: ports.Frame{Type: ports.MsgHello, Payload: ports.MarshalHello(hello)}}92 client.recv <- recvResult{frame: ports.Frame{Type: ports.MsgHello, Payload: ports.MarshalHello(hello)}}
92 93
93 select {94 select {
@@ -488,7 +489,7 @@ func TestProxyCopierStopsRetryingWhenContextCanceled(t *testing.T) {
488 489
489 func TestClampDatagramHelloOutputWindowPreservesProtocolValidation(t *testing.T) {490 func TestClampDatagramHelloOutputWindowPreservesProtocolValidation(t *testing.T) {
490 t.Run("malformed payload remains malformed", func(t *testing.T) {491 t.Run("malformed payload remains malformed", func(t *testing.T) {
491- payload := append(ports.MarshalHello(ports.Hello{Version: ports.ProtocolVersion, MaxOutputInFlight: 8}), 0xff)492+ payload := append(ports.MarshalHello(ports.Hello{Version: ports.ProtocolVersion, Size: domain.Size{Cols: 80, Rows: 24}, MaxOutputInFlight: 8}), 0xff)
492 frame := ports.Frame{Type: ports.MsgHello, Payload: payload}493 frame := ports.Frame{Type: ports.MsgHello, Payload: payload}
493 got := clampDatagramHelloOutputWindow(frame)494 got := clampDatagramHelloOutputWindow(frame)
494 if !reflect.DeepEqual(got, frame) {495 if !reflect.DeepEqual(got, frame) {
@@ -502,7 +503,7 @@ func TestClampDatagramHelloOutputWindowPreservesProtocolValidation(t *testing.T)
502 t.Run("mismatched version remains mismatched", func(t *testing.T) {503 t.Run("mismatched version remains mismatched", func(t *testing.T) {
503 wantVersion := ports.ProtocolVersion + 1504 wantVersion := ports.ProtocolVersion + 1
504 frame := ports.Frame{Type: ports.MsgHello, Payload: ports.MarshalHello(ports.Hello{505 frame := ports.Frame{Type: ports.MsgHello, Payload: ports.MarshalHello(ports.Hello{
505- Version: wantVersion, MaxOutputInFlight: 8,506+ Version: wantVersion, Size: domain.Size{Cols: 80, Rows: 24}, MaxOutputInFlight: 8,
506 })}507 })}
507 got, err := ports.UnmarshalHello(clampDatagramHelloOutputWindow(frame).Payload)508 got, err := ports.UnmarshalHello(clampDatagramHelloOutputWindow(frame).Payload)
508 if err != nil {509 if err != nil {
M internal/adapters/sshstdio/transport_test.go +2 -1
@@ -12,6 +12,7 @@ import (
1212 "testing"
1313 "time"
1414
15+ "github.com/bnema/vev/internal/domain"
1516 "github.com/bnema/vev/internal/ports"
1617 )
1718
@@ -120,7 +121,7 @@ func TestTransportRoundTripAndVersionMismatchFrame(t *testing.T) {
120121 defer func() { _ = client.Close() }()
121122 defer func() { _ = server.Close() }()
122123
123- hello := ports.Hello{Version: ports.ProtocolVersion + 1, Intent: ports.IntentAttach, Name: "work"}
124+ hello := ports.Hello{Version: ports.ProtocolVersion + 1, Intent: ports.IntentAttach, Name: "work", Size: domain.Size{Cols: 80, Rows: 24}}
124125 go func() {
125126 f, err := server.Recv()
126127 if err != nil {
@@ -12,6 +12,7 @@ import (
12 "testing"12 "testing"
13 "time"13 "time"
14 14
15+ "github.com/bnema/vev/internal/domain"
15 "github.com/bnema/vev/internal/ports"16 "github.com/bnema/vev/internal/ports"
16 )17 )
17 18
@@ -120,7 +121,7 @@ func TestTransportRoundTripAndVersionMismatchFrame(t *testing.T) {
120 defer func() { _ = client.Close() }()121 defer func() { _ = client.Close() }()
121 defer func() { _ = server.Close() }()122 defer func() { _ = server.Close() }()
122 123
123- hello := ports.Hello{Version: ports.ProtocolVersion + 1, Intent: ports.IntentAttach, Name: "work"}124+ hello := ports.Hello{Version: ports.ProtocolVersion + 1, Intent: ports.IntentAttach, Name: "work", Size: domain.Size{Cols: 80, Rows: 24}}
124 go func() {125 go func() {
125 f, err := server.Recv()126 f, err := server.Recv()
126 if err != nil {127 if err != nil {

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 2

Tags 13

↑↓ moveenter openesc close