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/api/webhook_test.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'internal/api/webhook_test.go') diff --git a/internal/api/webhook_test.go b/internal/api/webhook_test.go index 05fe82c..f0ede7c 100644 --- a/internal/api/webhook_test.go +++ b/internal/api/webhook_test.go @@ -422,11 +422,21 @@ func TestGitHubWebhook_PushEvent_SyncsLocalBareRepo(t *testing.T) { // Create a "github" source bare repo with a commit. githubBare := filepath.Join(dir, "github.git") localBare := filepath.Join(dir, "local.git") - for _, bare := range []string{githubBare, localBare} { - if out, err := exec.Command("git", "init", "--bare", bare).CombinedOutput(); err != nil { - t.Fatalf("git init bare %s: %v\n%s", bare, err, out) + initBare := func(path string) { + t.Helper() + out, err := exec.Command("git", "init", "--bare", "--initial-branch=main", path).CombinedOutput() + if err != nil { + // Fallback for older git: init then update HEAD to main. + if out2, err2 := exec.Command("git", "init", "--bare", path).CombinedOutput(); err2 != nil { + t.Fatalf("git init bare %s: %v\n%s", path, err2, out2) + } + if out2, err2 := exec.Command("git", "-C", path, "symbolic-ref", "HEAD", "refs/heads/main").CombinedOutput(); err2 != nil { + t.Fatalf("set HEAD to main %s: %v\n%s\n%s", path, err, out, out2) + } } } + initBare(githubBare) + initBare(localBare) // Seed githubBare with a commit via a temp clone. clone := filepath.Join(dir, "clone") run := func(args ...string) { -- cgit v1.2.3