gofmt and staticcheck: snapshot checks the connections error again
The composer merge left the snapshot's connections error unchecked once the runners view followed it. Also gofmt for m8_test.go, an unused relay field and an unused value in TestMacWorker.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 files changed,
+12
−11
internal/equipo/chat/store.go+3 −0internal/headless/m8_test.go+0 −1internal/headless/mac_test.go+2 −2internal/runner/thin/relay.go+7 −8
CI failed — run details
Intent
diff --git a/internal/equipo/chat/store.go b/internal/equipo/chat/store.go| index 9a71ac7c..0eeebe35 100644 |
| --- a/internal/equipo/chat/store.go |
| +++ b/internal/equipo/chat/store.go |
| @@ -597,6 +597,9 @@ func (s *Store) Snapshot(ctx context.Context, person string) (out wire.Snapshot, |
| return e |
| } |
| conns, e := full.connections(person) |
| + if e != nil { |
| + return e |
| + } |
| out.Connections = make([]wire.Connection, 0, len(conns)) |
| for _, r := range conns { |
| out.Connections = append(out.Connections, connectionView(r)) |
diff --git a/internal/headless/m8_test.go b/internal/headless/m8_test.go| index a6d7d08d..dbb3ac3b 100644 |
| --- a/internal/headless/m8_test.go |
| +++ b/internal/headless/m8_test.go |
| @@ -284,4 +284,3 @@ func (l *lockedBuffer) String() string { |
| defer l.mu.Unlock() |
| return l.b.String() |
| } |
| - |
diff --git a/internal/headless/mac_test.go b/internal/headless/mac_test.go| index a9eef865..ae295b52 100644 |
| --- a/internal/headless/mac_test.go |
| +++ b/internal/headless/mac_test.go |
| @@ -124,9 +124,9 @@ func TestMacWorker(t *testing.T) { |
| t.Run("M1", func(t *testing.T) { |
| sent := s.send(t, "tool:record_task:woodstar/woodstar|iOS edge swipe|Swipe back from the edge feels late.\ntool:start_task:$task|edit:Woodstar/Swipe.swift|edgeSwipe = true|edgeSwipe = true // from the edge") |
| id := s.taskOf(t, sent.Turn.ID) |
| - k := s.settled(t, id, 3*time.Minute) |
| + s.settled(t, id, 3*time.Minute) |
| s.wait(t, "merged", time.Minute, func(c *thintest.Conversation) bool { return c.Tasks[id].Stage == wire.StageDone }) |
| - k, _ = env.Client.Task(s.ctx, id) |
| + k, _ := env.Client.Task(s.ctx, id) |
| checks, review := stepOf(k, wire.SpecialistChecks, 0), stepOf(k, wire.SpecialistReview, 0) |
| if checks.RunnerLabel != "Tito Studio" || checks.Checks != wire.ChecksPassed || checks.Gate != ".amadan/ci" || checks.ExitCode == nil || *checks.ExitCode != 0 || checks.TerminationKind != wire.TerminationProcessGroup || strings.Join(checks.Needs, ",") != "macos,xcode,ios_simulator" || checks.CandidateSHA != k.CandidateSHA { |
| t.Fatalf("checks %+v", checks) |
diff --git a/internal/runner/thin/relay.go b/internal/runner/thin/relay.go| index d9ce896d..8024d1ec 100644 |
| --- a/internal/runner/thin/relay.go |
| +++ b/internal/runner/thin/relay.go |
| @@ -275,14 +275,13 @@ func (s *State) reportPublished(ctx context.Context, rep wire.PublishedReport) e |
| // commits, one at a time, from the durable tables. It runs at start (a |
| // restart picks up where a crash left off) and when a command arrives. |
| type Relay struct { |
| - State *State |
| - Engine *Engineer |
| - Notify func() |
| - Logger *slog.Logger |
| - retry time.Duration |
| - once sync.Once |
| - wake chan struct{} |
| - stopped chan struct{} |
| + State *State |
| + Engine *Engineer |
| + Notify func() |
| + Logger *slog.Logger |
| + retry time.Duration |
| + once sync.Once |
| + wake chan struct{} |
| } |
| func (x *Relay) init() { x.once.Do(func() { x.wake = make(chan struct{}, 1) }) } |