diff options
| author | Claudomator Agent <agent@claudomator> | 2026-06-05 09:21:32 +0000 |
|---|---|---|
| committer | Claudomator Agent <agent@claudomator> | 2026-06-05 09:21:32 +0000 |
| commit | 0eb0b79396663c4901597becc6857a4cd795c58e (patch) | |
| tree | 3532c82aa3f7c6deeed03f143d1c360d7cf6cc47 /internal/api/webhook_test.go | |
| parent | fa3ed5220a28f326d443726233c37e1a7df0ced5 (diff) | |
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 <noreply@anthropic.com>
Diffstat (limited to 'internal/api/webhook_test.go')
| -rw-r--r-- | internal/api/webhook_test.go | 16 |
1 files changed, 13 insertions, 3 deletions
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) { |
