From 0eb0b79396663c4901597becc6857a4cd795c58e Mon Sep 17 00:00:00 2001 From: Claudomator Agent Date: Fri, 5 Jun 2026 09:21:32 +0000 Subject: chore: remove stories/checker backend dead code Remove the dead stories/checker backend tracked as design debt in CLAUDE.md: - Delete internal/api/stories.go, stories_test.go, elaborate.go - Delete internal/task/story.go, story_test.go - Remove story/checker columns from storage schema and all CRUD methods - Remove checkStoryCompletion, spawnCheckerTask, triggerStoryDeploy, createValidationTask, checkValidationResult, ShipStory, CheckStoryCompletion from executor; simplify handleRunResult - Remove story/checker fields from task.Task (StoryID, AcceptanceCriteria, CheckerForTaskID, CheckerReport) - Remove story routes and geminiBinPath from API server - Move claudeJSONResult/extractJSON from elaborate.go to validate.go - Rename ensureStoryBranch -> ensureBranch in ContainerRunner - Fix git identity in bare-repo tests; fix initial-branch to use main Co-Authored-By: Claude Sonnet 4.6 --- internal/task/story.go | 41 ----------------------------------------- internal/task/story_test.go | 42 ------------------------------------------ internal/task/task.go | 4 ---- 3 files changed, 87 deletions(-) delete mode 100644 internal/task/story.go delete mode 100644 internal/task/story_test.go (limited to 'internal/task') diff --git a/internal/task/story.go b/internal/task/story.go deleted file mode 100644 index 536bda1..0000000 --- a/internal/task/story.go +++ /dev/null @@ -1,41 +0,0 @@ -package task - -import "time" - -type StoryState string - -const ( - StoryPending StoryState = "PENDING" - StoryInProgress StoryState = "IN_PROGRESS" - StoryShippable StoryState = "SHIPPABLE" - StoryDeployed StoryState = "DEPLOYED" - StoryValidating StoryState = "VALIDATING" - StoryReviewReady StoryState = "REVIEW_READY" - StoryNeedsFix StoryState = "NEEDS_FIX" -) - -type Story struct { - ID string `json:"id"` - Name string `json:"name"` - ProjectID string `json:"project_id"` - BranchName string `json:"branch_name"` - DeployConfig string `json:"deploy_config"` - ValidationJSON string `json:"validation_json"` - Status StoryState `json:"status"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` -} - -var validStoryTransitions = map[StoryState]map[StoryState]bool{ - StoryPending: {StoryInProgress: true}, - StoryInProgress: {StoryShippable: true, StoryNeedsFix: true}, - StoryShippable: {StoryDeployed: true}, - StoryDeployed: {StoryValidating: true}, - StoryValidating: {StoryReviewReady: true, StoryNeedsFix: true}, - StoryReviewReady: {}, - StoryNeedsFix: {StoryInProgress: true}, -} - -func ValidStoryTransition(from, to StoryState) bool { - return validStoryTransitions[from][to] -} diff --git a/internal/task/story_test.go b/internal/task/story_test.go deleted file mode 100644 index 38d0290..0000000 --- a/internal/task/story_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package task - -import "testing" - -func TestValidStoryTransition_Valid(t *testing.T) { - cases := []struct { - from StoryState - to StoryState - }{ - {StoryPending, StoryInProgress}, - {StoryInProgress, StoryShippable}, - {StoryInProgress, StoryNeedsFix}, - {StoryNeedsFix, StoryInProgress}, - {StoryShippable, StoryDeployed}, - {StoryDeployed, StoryValidating}, - {StoryValidating, StoryReviewReady}, - {StoryValidating, StoryNeedsFix}, - } - for _, tc := range cases { - if !ValidStoryTransition(tc.from, tc.to) { - t.Errorf("expected valid transition %s → %s", tc.from, tc.to) - } - } -} - -func TestValidStoryTransition_Invalid(t *testing.T) { - cases := []struct { - from StoryState - to StoryState - }{ - {StoryPending, StoryDeployed}, - {StoryReviewReady, StoryPending}, - {StoryReviewReady, StoryInProgress}, - {StoryReviewReady, StoryShippable}, - {StoryShippable, StoryPending}, - } - for _, tc := range cases { - if ValidStoryTransition(tc.from, tc.to) { - t.Errorf("expected invalid transition %s → %s", tc.from, tc.to) - } - } -} diff --git a/internal/task/task.go b/internal/task/task.go index eeac49e..7092ce8 100644 --- a/internal/task/task.go +++ b/internal/task/task.go @@ -88,11 +88,7 @@ type Task struct { Priority Priority `yaml:"priority" json:"priority"` Tags []string `yaml:"tags" json:"tags"` DependsOn []string `yaml:"depends_on" json:"depends_on"` - StoryID string `yaml:"-" json:"story_id,omitempty"` BranchName string `yaml:"-" json:"branch_name,omitempty"` - AcceptanceCriteria string `yaml:"-" json:"acceptance_criteria,omitempty"` - CheckerForTaskID string `yaml:"-" json:"checker_for_task_id,omitempty"` - CheckerReport string `yaml:"-" json:"checker_report,omitempty"` State State `yaml:"-" json:"state"` RejectionComment string `yaml:"-" json:"rejection_comment,omitempty"` QuestionJSON string `yaml:"-" json:"question,omitempty"` -- cgit v1.2.3