diff --git a/workspace-server/internal/handlers/org_persona_env_test.go b/workspace-server/internal/handlers/org_persona_env_test.go index c187c36a..0a48c66e 100644 --- a/workspace-server/internal/handlers/org_persona_env_test.go +++ b/workspace-server/internal/handlers/org_persona_env_test.go @@ -152,6 +152,7 @@ func TestIsSafeRoleName_Acceptance(t *testing.T) { t.Errorf("isSafeRoleName(%q) = false; want true", s) } } + // trailing-hyphen IS allowed; only include actually-bad names: bad := []string{ "", ".", "..", "with/slash", "/abs", "dot.in.middle", "with space", "back\\slash", "with$dollar", "with?question", diff --git a/workspace-server/internal/handlers/templates.go b/workspace-server/internal/handlers/templates.go index 4ff37f11..d51c19cc 100644 --- a/workspace-server/internal/handlers/templates.go +++ b/workspace-server/internal/handlers/templates.go @@ -275,7 +275,7 @@ func (h *TemplatesHandler) ListFiles(c *gin.Context) { return } // Translate to the handler's wire shape (the field names match - // 1:1, but Go can't implicit-convert named struct types). + // 1:1, so we can use a direct type conversion). out := make([]fileEntry, 0, len(entries)) for _, e := range entries { out = append(out, fileEntry(e)) diff --git a/workspace-server/internal/handlers/workspace_crud.go b/workspace-server/internal/handlers/workspace_crud.go index 1ba565af..df5008af 100644 --- a/workspace-server/internal/handlers/workspace_crud.go +++ b/workspace-server/internal/handlers/workspace_crud.go @@ -145,9 +145,7 @@ func (h *WorkspaceHandler) Update(c *gin.Context) { // Auth is fully enforced at the router layer (WorkspaceAuth middleware, #680). // WorkspaceAuth validates that the caller holds a valid bearer token for this - // specific workspace — no additional auth gate is needed here. The - // sensitiveUpdateFields map above documents the risk classification for - // auditors but is no longer used as a runtime gate. + // specific workspace — no additional auth gate is needed here. // #120: guard — return 404 for nonexistent workspace IDs instead of // silently applying zero-row UPDATEs and returning 200. diff --git a/workspace-server/internal/memory/client/client_test.go b/workspace-server/internal/memory/client/client_test.go index 248b43d6..a7b95783 100644 --- a/workspace-server/internal/memory/client/client_test.go +++ b/workspace-server/internal/memory/client/client_test.go @@ -793,8 +793,7 @@ func TestDoJSON_204OnEndpointExpectingBody(t *testing.T) { t.Fatalf("Search: %v", err) } if got == nil { - t.Error("got nil SearchResponse, want zero value") - return + t.Fatal("got nil SearchResponse, want zero value") } if len(got.Memories) != 0 { t.Errorf("memories = %v, want empty", got.Memories)