From 16ec8393fe466a56b039c7183393a25830de3ed9 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Mon, 17 Aug 2026 00:02:31 +1000 Subject: [PATCH] style: apply gofumpt formatting --- cmd/archied/bootstrap.go | 3 ++- cmd/archied/main_test.go | 17 +++++++++++++---- .../app/agentworker/single_stage_request.go | 3 ++- internal/app/agentworker/task_execution_test.go | 4 ++++ internal/channels/telegram/approval.go | 3 ++- internal/channels/telegram/dangerous.go | 3 ++- internal/channels/telegram/telegram.go | 6 ++++-- internal/config/config_test.go | 3 ++- internal/daemon/daemon.go | 3 ++- internal/daemon/daemon_test.go | 1 + .../domain/workflow/skillbuild/skillbuild.go | 6 ++++-- internal/gateway/session_delete.go | 3 ++- internal/gateway/session_store_sqlite.go | 12 ++++++++---- internal/gateway/task_tools.go | 6 ++++-- internal/infrastructure/agentgit/safety.go | 3 ++- .../terminalprompt/terminalprompt.go | 3 ++- internal/logging/reader_test.go | 6 ++++-- internal/tools/builtin/edit_test.go | 6 ++++-- internal/tools/builtin/grep_test.go | 12 ++++++++---- internal/tools/builtin/pathutil_test.go | 9 ++++++--- internal/tools/webfetch/webfetch.go | 3 ++- internal/webui/api_chat.go | 3 ++- 22 files changed, 82 insertions(+), 36 deletions(-) diff --git a/cmd/archied/bootstrap.go b/cmd/archied/bootstrap.go index 0103bf707..610260a0d 100644 --- a/cmd/archied/bootstrap.go +++ b/cmd/archied/bootstrap.go @@ -770,7 +770,8 @@ func (b *boot) setupGuardrails() { log := b.log gc := tools.DefaultGuardrailConfig() b.guardrails = tools.NewGuardrailEngine(gc) - log.Info("guardrail engine enabled", + log.Info( + "guardrail engine enabled", "exact_failure_warn", gc.ExactFailureWarnAfter, "same_tool_failure_warn", gc.SameToolFailureWarnAfter, "no_progress_warn", gc.NoProgressWarnAfter, diff --git a/cmd/archied/main_test.go b/cmd/archied/main_test.go index 4bd3aa568..dd128ef62 100644 --- a/cmd/archied/main_test.go +++ b/cmd/archied/main_test.go @@ -773,7 +773,9 @@ func (stubForge) CreatePR(context.Context, string, string, string, string, strin } func (stubForge) SetStateLabel(context.Context, string, string, int, string, []string) {} func (stubForge) LinkBranch(context.Context, string, string, int, string) error { return nil } -func (stubForge) AcceptInvitations(context.Context) error { panic("unexpected call") } + +func (stubForge) AcceptInvitations(context.Context) error { panic("unexpected call") } + func (stubForge) AssignedIssues(context.Context, string, string, string) ([]forge.Issue, error) { panic("unexpected call") } @@ -793,8 +795,11 @@ func (stubForge) PRState(context.Context, string, string, int) (string, error) { func (stubForge) CreateIssue(context.Context, string, string, string, string, []string) (int, error) { panic("unexpected call") } + func (stubForge) React(context.Context, string, string, int, string) error { panic("unexpected call") } -func (stubForge) VerifyPush(context.Context, string, string) error { panic("unexpected call") } + +func (stubForge) VerifyPush(context.Context, string, string) error { panic("unexpected call") } + func startEmbeddedNATS(t *testing.T) *server.Server { t.Helper() srv := natssrv.RunRandClientPortServer() @@ -875,7 +880,9 @@ func (*identityForge) CreatePR(context.Context, string, string, string, string, } func (*identityForge) SetStateLabel(context.Context, string, string, int, string, []string) {} func (*identityForge) LinkBranch(context.Context, string, string, int, string) error { return nil } -func (*identityForge) AcceptInvitations(context.Context) error { panic("unexpected") } + +func (*identityForge) AcceptInvitations(context.Context) error { panic("unexpected") } + func (*identityForge) AssignedIssues(context.Context, string, string, string) ([]forge.Issue, error) { panic("unexpected") } @@ -895,8 +902,10 @@ func (*identityForge) PRState(context.Context, string, string, int) (string, err func (*identityForge) CreateIssue(context.Context, string, string, string, string, []string) (int, error) { panic("unexpected") } + func (*identityForge) React(context.Context, string, string, int, string) error { panic("unexpected") } -func (*identityForge) VerifyPush(context.Context, string, string) error { panic("unexpected") } + +func (*identityForge) VerifyPush(context.Context, string, string) error { panic("unexpected") } // A container-mode task owned by a non-root identity must have its RPC // calls served by that identity's own forge client, never the root's. diff --git a/internal/app/agentworker/single_stage_request.go b/internal/app/agentworker/single_stage_request.go index 010374e82..12f5185f8 100644 --- a/internal/app/agentworker/single_stage_request.go +++ b/internal/app/agentworker/single_stage_request.go @@ -85,7 +85,8 @@ func handleSingleStageRequest( return err } - log.Info("stage complete", + log.Info( + "stage complete", "task", request.TaskID, "stage", request.Stage, "status", response.Result.Status, diff --git a/internal/app/agentworker/task_execution_test.go b/internal/app/agentworker/task_execution_test.go index 92c4477ee..9037229e0 100644 --- a/internal/app/agentworker/task_execution_test.go +++ b/internal/app/agentworker/task_execution_test.go @@ -42,13 +42,16 @@ type prCapturingForge struct { func (f *prCapturingForge) Comment(context.Context, string, string, int, string) (int64, error) { return 1, nil } + func (f *prCapturingForge) CloseIssue(context.Context, string, string, int, string) error { return nil } + func (f *prCapturingForge) CreatePR(_ context.Context, owner, repo, title, head, base, body string) (int, error) { f.prs = append(f.prs, struct{ owner, repo, title, head, base, body string }{owner, repo, title, head, base, body}) return 5, nil } func (f *prCapturingForge) SetStateLabel(context.Context, string, string, int, string, []string) {} func (f *prCapturingForge) AcceptInvitations(context.Context) error { panic("unexpected call") } + func (f *prCapturingForge) AssignedIssues(context.Context, string, string, string) ([]forge.Issue, error) { panic("unexpected call") } @@ -76,6 +79,7 @@ func (f *prCapturingForge) React(context.Context, string, string, int, string) e func (f *prCapturingForge) VerifyPush(context.Context, string, string) error { panic("unexpected call") } + func (f *prCapturingForge) LinkBranch(context.Context, string, string, int, string) error { return nil } type remoteManager struct { diff --git a/internal/channels/telegram/approval.go b/internal/channels/telegram/approval.go index ab3c73472..4f496de4c 100644 --- a/internal/channels/telegram/approval.go +++ b/internal/channels/telegram/approval.go @@ -247,7 +247,8 @@ func (g *Gateway) handleApprovalCallback(ctx context.Context, b *bot.Bot, update return } - g.log.Info("tool approval decision", + g.log.Info( + "tool approval decision", "action", pa.action, "decision", decision, "recipient", query.From.ID, "username", query.From.Username, ) diff --git a/internal/channels/telegram/dangerous.go b/internal/channels/telegram/dangerous.go index db3c5eb60..bb9d7a884 100644 --- a/internal/channels/telegram/dangerous.go +++ b/internal/channels/telegram/dangerous.go @@ -158,7 +158,8 @@ func (g *Gateway) handleDangerousCallback(ctx context.Context, b *bot.Bot, updat } decision, _ := parseDangerousCallback(query.Data) - g.log.Info("dangerous command decision", + g.log.Info( + "dangerous command decision", "command", action.command, "decision", decision, "recipient", query.From.ID, "username", query.From.Username, ) diff --git a/internal/channels/telegram/telegram.go b/internal/channels/telegram/telegram.go index d1219c00b..1c8d17721 100644 --- a/internal/channels/telegram/telegram.go +++ b/internal/channels/telegram/telegram.go @@ -305,7 +305,8 @@ func (g *Gateway) launch(ctx context.Context, router *gateway.Router) (*bot.Bot, if err != nil { g.log.Warn("failed to get webhook info", "error", err) } else { - g.log.Info("webhook info", + g.log.Info( + "webhook info", "url", info.URL, "pending_update_count", info.PendingUpdateCount, "last_error_message", info.LastErrorMessage, @@ -635,7 +636,8 @@ func (g *Gateway) authorizedMessage(ctx context.Context, b *bot.Bot, update *mod if g.isSenderAllowed(update.Message.From.ID) { return update.Message, true } - g.log.Warn("message from unauthorized sender", + g.log.Warn( + "message from unauthorized sender", "user_id", update.Message.From.ID, "username", update.Message.From.Username, "chat_id", update.Message.Chat.ID, diff --git a/internal/config/config_test.go b/internal/config/config_test.go index be3bfee4f..142ceff3a 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -206,7 +206,8 @@ func TestRepoJSONRoundTrip(t *testing.T) { if err != nil { t.Fatal(err) } - assertJSONKeys(t, data, + assertJSONKeys( + t, data, "owner", "name", "base", diff --git a/internal/daemon/daemon.go b/internal/daemon/daemon.go index b57e778f5..0906bcb35 100644 --- a/internal/daemon/daemon.go +++ b/internal/daemon/daemon.go @@ -771,7 +771,8 @@ func (d *Daemon) reconcilePRs(ctx context.Context) { // row that is a second implementation and a second PR for work // already merged. d.closeResolvedIssue(ctx, fg, &t, fmt.Sprintf( - "Closed by #%d, merged by archie.", t.PRNumber)) + "Closed by #%d, merged by archie.", t.PRNumber, + )) d.Log.Info("PR merged", "repo", t.Owner+"/"+t.Repo, "pr", t.PRNumber) d.emit(events.Event{ Kind: events.KindPRMerged, TaskID: t.ID, diff --git a/internal/daemon/daemon_test.go b/internal/daemon/daemon_test.go index 183f5cb7c..56c6dbb80 100644 --- a/internal/daemon/daemon_test.go +++ b/internal/daemon/daemon_test.go @@ -1084,6 +1084,7 @@ func (f *recordingForge) React(context.Context, string, string, int, string) err } func (f *recordingForge) VerifyPush(context.Context, string, string) error { panic("unexpected call") } + func (f *recordingForge) LinkBranch(context.Context, string, string, int, string) error { panic("unexpected call") } diff --git a/internal/domain/workflow/skillbuild/skillbuild.go b/internal/domain/workflow/skillbuild/skillbuild.go index 0ad2959a4..c1959e177 100644 --- a/internal/domain/workflow/skillbuild/skillbuild.go +++ b/internal/domain/workflow/skillbuild/skillbuild.go @@ -115,7 +115,8 @@ func mergeSkillWorkflows(worktree string, reg workflow.Registry, origins map[str sw := SkillWorkflow{Workflow: entry.Workflow, Dir: entry.Dir} wf, err := BuildWorkflow(worktree, sw) if err != nil { - slog.Default().Warn("skipping broken skill workflow", + slog.Default().Warn( + "skipping broken skill workflow", "workflow", entry.Workflow, "skill", entry.Dir, "err", err, @@ -126,7 +127,8 @@ func mergeSkillWorkflows(worktree string, reg workflow.Registry, origins map[str // Only warn when TWO SKILLS declare the same workflow name. // Overriding a built-in name is routine -- don't log. if prevSkill, dup := seenFromSkill[entry.Workflow]; dup { - slog.Default().Warn("duplicate workflow name across skills -- overriding", + slog.Default().Warn( + "duplicate workflow name across skills -- overriding", "workflow", entry.Workflow, "skill", entry.Dir, "previous_skill", prevSkill, diff --git a/internal/gateway/session_delete.go b/internal/gateway/session_delete.go index 1516d3337..62758df38 100644 --- a/internal/gateway/session_delete.go +++ b/internal/gateway/session_delete.go @@ -47,7 +47,8 @@ func (r *Router) handleDelete(ctx context.Context, msg Message, rest string) (st return fmt.Sprintf( "Refusing to delete on %d characters — this cannot be undone. "+ "Give at least %d characters of the session id, or its full id.", - len([]rune(ref)), minDeleteRefLen), nil + len([]rune(ref)), minDeleteRefLen, + ), nil } // Read the active session before the delete, so the reply can say diff --git a/internal/gateway/session_store_sqlite.go b/internal/gateway/session_store_sqlite.go index e75fafe29..f8e3057d5 100644 --- a/internal/gateway/session_store_sqlite.go +++ b/internal/gateway/session_store_sqlite.go @@ -214,7 +214,8 @@ func (s *sqliteSessionStore) ClaimTurn(ctx context.Context, initial TurnRecord) FROM turns WHERE turn_id = ?`, initial.TurnID).Scan( &turn.TurnID, &turn.SessionID, &turn.SourceID, &turn.Status, &turn.Attempt, &turn.OwnerID, &turn.InputMessageID, &turn.AssistantMessageID, &turn.PartialText, - &turn.ResponseText, &turn.Error, &createdMS, &updatedMS) + &turn.ResponseText, &turn.Error, &createdMS, &updatedMS, + ) if errors.Is(err, sql.ErrNoRows) { now := time.Now().UTC() initial.Status = TurnStatusRunning @@ -253,7 +254,8 @@ func (s *sqliteSessionStore) ClaimTurn(ctx context.Context, initial TurnRecord) FROM turns WHERE turn_id = ?`, initial.TurnID).Scan( &turn.TurnID, &turn.SessionID, &turn.SourceID, &turn.Status, &turn.Attempt, &turn.OwnerID, &turn.InputMessageID, &turn.AssistantMessageID, &turn.PartialText, - &turn.ResponseText, &turn.Error, &createdMS, &updatedMS) + &turn.ResponseText, &turn.Error, &createdMS, &updatedMS, + ) } if err != nil { return TurnRecord{}, "", fmt.Errorf("sessionstore: read turn: %w", err) @@ -343,7 +345,8 @@ func (s *sqliteSessionStore) GetTurn(ctx context.Context, turnID string) (TurnRe FROM turns WHERE turn_id = ?`, turnID).Scan( &turn.TurnID, &turn.SessionID, &turn.SourceID, &turn.Status, &turn.Attempt, &turn.OwnerID, &turn.InputMessageID, &turn.AssistantMessageID, &turn.PartialText, - &turn.ResponseText, &turn.Error, &createdMS, &updatedMS) + &turn.ResponseText, &turn.Error, &createdMS, &updatedMS, + ) if errors.Is(err, sql.ErrNoRows) { return TurnRecord{}, false, nil } @@ -417,7 +420,8 @@ func (s *sqliteSessionStore) ListRecoverableTurns(ctx context.Context) ([]TurnRe if err := rows.Scan( &turn.TurnID, &turn.SessionID, &turn.SourceID, &turn.Status, &turn.Attempt, &turn.OwnerID, &turn.InputMessageID, &turn.AssistantMessageID, &turn.PartialText, - &turn.ResponseText, &turn.Error, &createdMS, &updatedMS); err != nil { + &turn.ResponseText, &turn.Error, &createdMS, &updatedMS, + ); err != nil { return nil, fmt.Errorf("sessionstore: scan recoverable turn: %w", err) } turn.CreatedAt = time.UnixMilli(createdMS).UTC() diff --git a/internal/gateway/task_tools.go b/internal/gateway/task_tools.go index 3dbc8be83..40144588f 100644 --- a/internal/gateway/task_tools.go +++ b/internal/gateway/task_tools.go @@ -148,7 +148,8 @@ func taskListTool(lister ChatTaskLister, identity string) tools.ToolEntry { "type": "integer", "description": fmt.Sprintf( "Maximum tasks to return. Defaults to %d, capped at %d.", - defaultTaskListLimit, maxTaskListLimit), + defaultTaskListLimit, maxTaskListLimit, + ), }, }, }, @@ -259,7 +260,8 @@ func taskLogsTool(reader ChatTaskLogReader, identity string) tools.ToolEntry { "type": "integer", "description": fmt.Sprintf( "Maximum entries to return. Defaults to %d, capped at %d.", - defaultTaskLogLimit, maxTaskLogLimit), + defaultTaskLogLimit, maxTaskLogLimit, + ), }, }, "required": []any{"task_id"}, diff --git a/internal/infrastructure/agentgit/safety.go b/internal/infrastructure/agentgit/safety.go index 67d47dec7..3f895a290 100644 --- a/internal/infrastructure/agentgit/safety.go +++ b/internal/infrastructure/agentgit/safety.go @@ -53,7 +53,8 @@ func markSafe(ctx context.Context, mountDir string, run gitRunner, log *slog.Log out, err := run(ctx, "config", "--global", "--add", "safe.directory", mountDir) if err != nil { - log.Warn("git safe.directory config failed -- gates that shell out to git may fail", + log.Warn( + "git safe.directory config failed -- gates that shell out to git may fail", "dir", mountDir, "err", err, "output", strings.TrimSpace(string(out)), diff --git a/internal/infrastructure/terminalprompt/terminalprompt.go b/internal/infrastructure/terminalprompt/terminalprompt.go index 997673f16..64e3171db 100644 --- a/internal/infrastructure/terminalprompt/terminalprompt.go +++ b/internal/infrastructure/terminalprompt/terminalprompt.go @@ -46,7 +46,8 @@ func New(in *os.File, out io.Writer) (*Terminal, error) { return nil, fmt.Errorf( "terminalprompt: %s is not a terminal; archied setup requires an "+ "interactive session (input cannot be piped, redirected, or "+ - "scripted)", in.Name()) + "scripted)", in.Name(), + ) } return &Terminal{ in: in, diff --git a/internal/logging/reader_test.go b/internal/logging/reader_test.go index 356e120d5..c9d69e8b0 100644 --- a/internal/logging/reader_test.go +++ b/internal/logging/reader_test.go @@ -27,7 +27,8 @@ func line(level, msg string, extra ...string) string { } func TestTailFilters(t *testing.T) { - path := writeLog(t, + path := writeLog( + t, line("INFO", "started", `"component":"daemon"`), line("WARN", "telegram rate limited", `"component":"gateway-telegram"`), line("ERROR", "pull failed", `"component":"container"`), @@ -175,7 +176,8 @@ func TestDecodeKeepsStructuredFields(t *testing.T) { } func TestComponents(t *testing.T) { - path := writeLog(t, + path := writeLog( + t, line("INFO", "a", `"component":"daemon"`), line("INFO", "b", `"component":"gateway-telegram"`), line("INFO", "c", `"component":"daemon"`), diff --git a/internal/tools/builtin/edit_test.go b/internal/tools/builtin/edit_test.go index 36493c100..4058ded0c 100644 --- a/internal/tools/builtin/edit_test.go +++ b/internal/tools/builtin/edit_test.go @@ -277,7 +277,8 @@ func TestEdit_NotFoundReportsNearestMatch(t *testing.T) { // Same code, wrong indentation on the body line. res, err := tool.Execute(context.Background(), json.RawMessage( - `{"path":"f.go","edits":[{"old_text":"func handleCancel() {\n\tdoWork()\n}","new_text":"func handleCancel() { return }"}]}`), nil) + `{"path":"f.go","edits":[{"old_text":"func handleCancel() {\n\tdoWork()\n}","new_text":"func handleCancel() { return }"}]}`, + ), nil) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -313,7 +314,8 @@ func TestEdit_NotFoundWithNoPlausibleMatchStaysGeneric(t *testing.T) { tool := NewEditTool(tmp, NewMutationQueue(), rt) res, err := tool.Execute(context.Background(), json.RawMessage( - `{"path":"f.go","edits":[{"old_text":"nothing like this exists","new_text":"x"}]}`), nil) + `{"path":"f.go","edits":[{"old_text":"nothing like this exists","new_text":"x"}]}`, + ), nil) if err != nil { t.Fatalf("unexpected error: %v", err) } diff --git a/internal/tools/builtin/grep_test.go b/internal/tools/builtin/grep_test.go index 81335d6e8..bc763c98a 100644 --- a/internal/tools/builtin/grep_test.go +++ b/internal/tools/builtin/grep_test.go @@ -336,7 +336,8 @@ func TestGrepClampsContextLines(t *testing.T) { tool := NewGrepTool(tmp, nil) res, err := tool.Execute(context.Background(), json.RawMessage( - `{"pattern":"needle","context_before":40,"context_after":40}`), nil) + `{"pattern":"needle","context_before":40,"context_after":40}`, + ), nil) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -363,7 +364,8 @@ func TestGrepLeavesModestContextAlone(t *testing.T) { tool := NewGrepTool(tmp, nil) res, err := tool.Execute(context.Background(), json.RawMessage( - `{"pattern":"needle","context_before":2,"context_after":2}`), nil) + `{"pattern":"needle","context_before":2,"context_after":2}`, + ), nil) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -392,7 +394,8 @@ func TestGrepUsesIndexForSubdirectorySearch(t *testing.T) { tool := NewGrepTool(tmp, index) res, err := tool.Execute(context.Background(), json.RawMessage( - `{"pattern":"needle","path":"sub"}`), nil) + `{"pattern":"needle","path":"sub"}`, + ), nil) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -420,7 +423,8 @@ func TestGrepFallsBackToDirectWhenNoCandidatesInSubtree(t *testing.T) { tool := NewGrepTool(tmp, index) res, err := tool.Execute(context.Background(), json.RawMessage( - `{"pattern":"needle","path":"sub"}`), nil) + `{"pattern":"needle","path":"sub"}`, + ), nil) if err != nil { t.Fatalf("unexpected error: %v", err) } diff --git a/internal/tools/builtin/pathutil_test.go b/internal/tools/builtin/pathutil_test.go index 6da8089c4..a15f7b272 100644 --- a/internal/tools/builtin/pathutil_test.go +++ b/internal/tools/builtin/pathutil_test.go @@ -110,7 +110,8 @@ func TestGrepAllowsGoModCache(t *testing.T) { tool := NewGrepTool(cwd, nil) res, err := tool.Execute(context.Background(), json.RawMessage( - `{"pattern":"Needle","path":`+quote(cache)+`}`), nil) + `{"pattern":"Needle","path":`+quote(cache)+`}`, + ), nil) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -131,7 +132,8 @@ func TestWriteRejectsGoModCache(t *testing.T) { tool := NewWriteTool(cwd, nil, NewReadTracker()) res, err := tool.Execute(context.Background(), json.RawMessage( - `{"path":`+quote(filepath.Join(cache, "evil.go"))+`,"content":"package evil\n"}`), nil) + `{"path":`+quote(filepath.Join(cache, "evil.go"))+`,"content":"package evil\n"}`, + ), nil) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -154,7 +156,8 @@ func TestEditRejectsGoModCache(t *testing.T) { rt.MarkRead(cwd, target) tool := NewEditTool(cwd, nil, rt) res, err := tool.Execute(context.Background(), json.RawMessage( - `{"path":`+quote(target)+`,"edits":[{"old_text":"package dep","new_text":"package hacked"}]}`), nil) + `{"path":`+quote(target)+`,"edits":[{"old_text":"package dep","new_text":"package hacked"}]}`, + ), nil) if err != nil { t.Fatalf("unexpected error: %v", err) } diff --git a/internal/tools/webfetch/webfetch.go b/internal/tools/webfetch/webfetch.go index dd82411bd..19a0fb88d 100644 --- a/internal/tools/webfetch/webfetch.go +++ b/internal/tools/webfetch/webfetch.go @@ -246,7 +246,8 @@ func (c *Client) dialContext(ctx context.Context, network, addr string) (net.Con if len(refused) > 0 { return nil, fmt.Errorf( "refusing to connect to %s: it resolves to the private or loopback address %s, which is where this host's own services live; set tools.web_fetch.allow_private_networks to permit it", - host, strings.Join(refused, ", ")) + host, strings.Join(refused, ", "), + ) } return nil, fmt.Errorf("could not connect to %s", host) } diff --git a/internal/webui/api_chat.go b/internal/webui/api_chat.go index 289a230ad..cb493ba7f 100644 --- a/internal/webui/api_chat.go +++ b/internal/webui/api_chat.go @@ -127,7 +127,8 @@ func (s *Server) handleChatSessions(w http.ResponseWriter, r *http.Request) { func chatCommandSpecs(chat *ChatService) []gateway.CommandSpec { specs := gateway.LocalCommandSpecs() if chat.Dangerous != nil { - specs = append(specs, + specs = append( + specs, gateway.CommandSpec{Command: "/rollback", Description: "Request approval to restore a filesystem checkpoint", Usage: "/rollback [number]"}, gateway.CommandSpec{Command: "/stop", Description: "Request approval to terminate a background process", Usage: "/stop "}, gateway.CommandSpec{Command: "/deny", Description: "Deny a pending dangerous action", Usage: "/deny "},