v0.282.0: after_setup (the app's own sign-up switch), close sign-up now (decision 49), probes read lists + done_status (R-715)
gates / gates (push) Successful in 27s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-09-29 16:19:12 +02:00
parent 6fc3059167
commit 4110da50e9
25 changed files with 1864 additions and 36 deletions
+20
View File
@@ -385,3 +385,23 @@ func (s *Server) ServeSignupClosed(w http.ResponseWriter, r *http.Request) {
s.logger.Printf("[ERROR] [web] signup-closed page: %v", err)
}
}
// appCloseSignupHandler is decision 49's "close sign-up now" (POST /apps/<slug>/close-signup) for an app installed
// before decision 47. It applies exactly what a fresh install gets after its setup; it never gates the app.
func (s *Server) appCloseSignupHandler(w http.ResponseWriter, r *http.Request, slug string) {
found := s.stackBySlug(slug)
if found == nil {
escrowJSON(w, http.StatusNotFound, nil, s.msg(r, "escrow.unknown_app"))
return
}
if err := s.stackMgr.CloseSignupNow(found.Name); err != nil {
if errors.Is(err, stacks.ErrCloseSignupNotOffered) {
escrowJSON(w, http.StatusConflict, nil, s.msg(r, "err.setup_gate.close_signup_not_offered"))
return
}
s.logger.Printf("[ERROR] [web] close sign-up %s: %v", found.Name, err)
escrowJSON(w, http.StatusInternalServerError, nil, s.msg(r, "err.setup_gate.open_failed"))
return
}
escrowJSON(w, http.StatusOK, map[string]any{"closed": true}, "")
}