From 4ac7894cd621300f8663022aff764e48c8b71d3e Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Thu, 9 Jul 2026 03:26:52 +0000 Subject: style: gofmt internal/executor and internal/agentloop Task 2 of the task-acceptance-criteria plan copied the plan document's own misaligned struct-literal text verbatim without running gofmt afterward, newly breaking gofmt compliance on tools.go/agentmcp.go; also fixes pre-existing unrelated misalignment in channel.go/channel_test.go while touching the same files. --- internal/executor/agentmcp.go | 14 +++++++------- internal/executor/channel.go | 22 +++++++++++----------- internal/executor/channel_test.go | 8 ++++---- 3 files changed, 22 insertions(+), 22 deletions(-) (limited to 'internal/executor') diff --git a/internal/executor/agentmcp.go b/internal/executor/agentmcp.go index a9a195d..9f0cb7e 100644 --- a/internal/executor/agentmcp.go +++ b/internal/executor/agentmcp.go @@ -154,13 +154,13 @@ func newAgentServer(ch AgentChannel) *mcp.Server { Description: "Create a child task to be executed separately. Use this to break large work into focused pieces, then finish your turn.", }, func(ctx context.Context, _ *mcp.CallToolRequest, in spawnSubtaskInput) (*mcp.CallToolResult, any, error) { id, err := ch.SpawnSubtask(ctx, SubtaskSpec{ - Name: in.Name, - Instructions: in.Instructions, - Model: in.Model, - MaxBudgetUSD: in.MaxBudgetUSD, - Role: in.Role, - DependsOn: in.DependsOn, - AcceptanceCriteria: in.AcceptanceCriteria, + Name: in.Name, + Instructions: in.Instructions, + Model: in.Model, + MaxBudgetUSD: in.MaxBudgetUSD, + Role: in.Role, + DependsOn: in.DependsOn, + AcceptanceCriteria: in.AcceptanceCriteria, }) if err != nil { return nil, nil, err diff --git a/internal/executor/channel.go b/internal/executor/channel.go index e815b00..6353a40 100644 --- a/internal/executor/channel.go +++ b/internal/executor/channel.go @@ -8,13 +8,13 @@ import ( "sync" "time" + "github.com/google/uuid" "github.com/thepeterstone/claudomator/internal/agentchannel" "github.com/thepeterstone/claudomator/internal/event" "github.com/thepeterstone/claudomator/internal/role" "github.com/thepeterstone/claudomator/internal/storage" "github.com/thepeterstone/claudomator/internal/story" "github.com/thepeterstone/claudomator/internal/task" - "github.com/google/uuid" ) // AgentChannel, SubtaskSpec, BlockedError, and ErrAgentBlocked used to be @@ -152,15 +152,15 @@ func (c *storeChannel) SpawnSubtask(_ context.Context, spec SubtaskSpec) (string } child := &task.Task{ ID: uuid.NewString(), - Name: spec.Name, - ParentTaskID: c.taskID, - Agent: agent, - Priority: task.PriorityNormal, - DependsOn: spec.DependsOn, - AcceptanceCriteria: spec.AcceptanceCriteria, - State: task.StatePending, - CreatedAt: now, - UpdatedAt: now, + Name: spec.Name, + ParentTaskID: c.taskID, + Agent: agent, + Priority: task.PriorityNormal, + DependsOn: spec.DependsOn, + AcceptanceCriteria: spec.AcceptanceCriteria, + State: task.StatePending, + CreatedAt: now, + UpdatedAt: now, } if err := c.store.CreateTask(child); err != nil { return "", err @@ -287,4 +287,4 @@ func (c *storeChannel) ReportVerdict(_ context.Context, approved bool, reasoning Actor: event.ActorAgent, Payload: payload, }) -} \ No newline at end of file +} diff --git a/internal/executor/channel_test.go b/internal/executor/channel_test.go index a2e7c70..e21112b 100644 --- a/internal/executor/channel_test.go +++ b/internal/executor/channel_test.go @@ -23,9 +23,9 @@ type fakeChannelStore struct { // Epic/story fakes back ProposeEpic (Phase 7c). epics is keyed by ID; // GetEpicByName does a linear scan by Name, mirroring the real // storage.DB.GetEpicByName's "exact match, simplest reasonable" behavior. - epics map[string]*story.Epic - createEpicErr error - stories map[string]*story.Story + epics map[string]*story.Epic + createEpicErr error + stories map[string]*story.Story updateStoryErr error updatedStories []*story.Story @@ -33,7 +33,7 @@ type fakeChannelStore struct { // creation order — mirrors storage.DB.CreateRoleConfig's own // "auto-assign next version number for that role" behavior without a // real database. - roleConfigs map[string][]*storage.RoleConfigRow + roleConfigs map[string][]*storage.RoleConfigRow createRoleConfigErr error } -- cgit v1.2.3