From 940a5bab031bfe81cea9c90d64e6ebc804c366f9 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sat, 4 Apr 2026 09:30:13 +0000 Subject: feat: story ship gate — explicit POST /api/stories/{id}/ship; remove auto-deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - checkStoryCompletion now guards against re-running on already-SHIPPABLE stories and no longer auto-triggers triggerStoryDeploy on completion - New Pool.ShipStory method validates SHIPPABLE state then fires triggerStoryDeploy - POST /api/stories/{id}/ship route registered and handleShipStory handler added - Two new tests: 202 for SHIPPABLE story, 409 for non-SHIPPABLE story Co-Authored-By: Claude Sonnet 4.6 --- internal/api/server.go | 1 + 1 file changed, 1 insertion(+) (limited to 'internal/api/server.go') diff --git a/internal/api/server.go b/internal/api/server.go index aec1439..3bc4147 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -149,6 +149,7 @@ func (s *Server) routes() { s.mux.HandleFunc("GET /api/stories/{id}/tasks", s.handleListStoryTasks) s.mux.HandleFunc("POST /api/stories/{id}/tasks", s.handleAddTaskToStory) s.mux.HandleFunc("PUT /api/stories/{id}/status", s.handleUpdateStoryStatus) + s.mux.HandleFunc("POST /api/stories/{id}/ship", s.handleShipStory) s.mux.HandleFunc("GET /api/stories/{id}/deployment-status", s.handleStoryDeploymentStatus) s.mux.HandleFunc("GET /api/health", s.handleHealth) s.mux.HandleFunc("GET /api/version", s.handleVersion) -- cgit v1.2.3