From c2a5645c55c75a116641c512de0458697aab960d Mon Sep 17 00:00:00 2001 From: Minseong Choi Date: Tue, 22 Sep 2026 13:44:38 +0900 Subject: [PATCH] fix: keep internal section numbers out of runtime messages Four messages that reach an operator or an API client cited sections of a specification nobody outside the project can read: - the unimplemented archive store error from config load - the running-server cap refusal, from both the user wake and the internal wake - the missing memory ceiling guard, in the API and in felis apply The references are gone and the wording is otherwise unchanged. Each message still says what went wrong and, where there is one, what to do about it. The test for the archive store message checks for the tarLocal remediation, which is still there. --- cmd/felis/apply.go | 2 +- internal/api/handlers_internal.go | 2 +- internal/api/handlers_user.go | 4 ++-- internal/config/config.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/felis/apply.go b/cmd/felis/apply.go index acae573..de494b0 100644 --- a/cmd/felis/apply.go +++ b/cmd/felis/apply.go @@ -220,7 +220,7 @@ func buildMinecraftServerFromApplyRequest(req applyRequest, namespace string) (* } memLim, ok := limits[corev1.ResourceMemory] if !ok || memLim.IsZero() { - return nil, fmt.Errorf("internal error: refusing to create a server without a memory ceiling (§22)") + return nil, fmt.Errorf("internal error: refusing to create a server without a memory ceiling") } // ---- storage ---- diff --git a/internal/api/handlers_internal.go b/internal/api/handlers_internal.go index aff4f75..d3619ce 100644 --- a/internal/api/handlers_internal.go +++ b/internal/api/handlers_internal.go @@ -149,7 +149,7 @@ func (a *API) handleInternalWake(w http.ResponseWriter, r *http.Request) { } if !ok { writeError(w, r, newError(http.StatusServiceUnavailable, "at_capacity", - "the cluster is at its running-server cap (spec §9.1); retry once a server stops")) + "the cluster is at its running-server cap; retry once a server stops")) return } diff --git a/internal/api/handlers_user.go b/internal/api/handlers_user.go index 8b805af..818e58e 100644 --- a/internal/api/handlers_user.go +++ b/internal/api/handlers_user.go @@ -52,7 +52,7 @@ func (a *API) handleWake(w http.ResponseWriter, r *http.Request) { } if !ok { writeError(w, r, newError(http.StatusServiceUnavailable, "at_capacity", - "the cluster is at its running-server cap (spec §9.1); retry once a server stops")) + "the cluster is at its running-server cap; retry once a server stops")) return } @@ -526,7 +526,7 @@ func resolveResources(memory string, rr *resourceRequest) (string, corev1.Resour memLim, ok := limits[corev1.ResourceMemory] if !ok || memLim.IsZero() { return "", corev1.ResourceRequirements{}, newError(http.StatusInternalServerError, "internal", - "refusing to create a server without a memory ceiling (§22)") + "refusing to create a server without a memory ceiling") } return deriveJavaHeap(memLim), corev1.ResourceRequirements{Limits: limits, Requests: requests}, nil diff --git a/internal/config/config.go b/internal/config/config.go index 7cadb5a..3c68ad3 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -300,7 +300,7 @@ func (c *Config) Validate() error { return fmt.Errorf("config: [archive] store %q is not one of tarLocal|tarS3|volumeSnapshot|longhorn", c.Archive.Store) } if _, ok := implementedArchiveStores[c.Archive.Store]; !ok { - return fmt.Errorf("config: [archive] store %q is recognized by §19 but not implemented in this build — only tarLocal is supported; set store = \"tarLocal\"", c.Archive.Store) + return fmt.Errorf("config: [archive] store %q is not implemented in this build — only tarLocal is supported; set store = \"tarLocal\"", c.Archive.Store) } switch c.K8s.EgressMode { case "loadbalancer", "nodeport":