Merge pull request 'fix(lint): resolve 64 pre-existing golangci-lint violations in workspace-server' (#803) from fix/golangci-lint-preexisting-violations into main
Some checks failed
Block internal-flavored paths / Block forbidden paths (push) Successful in 18s
CI / Detect changes (push) Successful in 46s
E2E API Smoke Test / detect-changes (push) Successful in 38s
E2E Staging Canvas (Playwright) / detect-changes (push) Successful in 29s
Harness Replays / detect-changes (push) Successful in 9s
Handlers Postgres Integration / detect-changes (push) Successful in 24s
Secret scan / Scan diff for credential-shaped strings (push) Successful in 13s
Runtime PR-Built Compatibility / detect-changes (push) Successful in 31s
CI / Canvas (Next.js) (push) Successful in 14s
CI / Shellcheck (E2E scripts) (push) Successful in 9s
CI / Python Lint & Test (push) Successful in 11s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (push) Successful in 21s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (push) Successful in 14s
E2E API Smoke Test / E2E API Smoke Test (push) Successful in 2m42s
Handlers Postgres Integration / Handlers Postgres Integration (push) Successful in 6m5s
publish-workspace-server-image / build-and-push (push) Successful in 11m3s
Harness Replays / Harness Replays (push) Failing after 14m56s
CI / Canvas Deploy Reminder (push) Failing after 13m5s
CI / Platform (Go) (push) Successful in 17m36s
Sweep stale e2e-* orgs (staging) / Sweep e2e orgs (push) Successful in 10s
gate-check-v3 / gate-check (push) Compensated by status-reaper (workflow has no push: trigger; Gitea 1.22.6 hardcoded-suffix bug — see .gitea/scripts/status-reaper.py)
Staging SaaS smoke (every 30 min) / Staging SaaS smoke (push) Compensated by status-reaper (workflow has no push: trigger; Gitea 1.22.6 hardcoded-suffix bug — see .gitea/scripts/status-reaper.py)
CI / all-required (push) Successful in 7s
ci-required-drift / drift (push) Successful in 2m28s
Continuous synthetic E2E (staging) / Synthetic E2E against staging (push) Successful in 5m25s
main-red-watchdog / watchdog (push) Compensated by status-reaper (workflow has no push: trigger; Gitea 1.22.6 hardcoded-suffix bug — see .gitea/scripts/status-reaper.py)
status-reaper / reap (push) Compensated by status-reaper (workflow has no push: trigger; Gitea 1.22.6 hardcoded-suffix bug — see .gitea/scripts/status-reaper.py)
Sweep stale Cloudflare DNS records / Sweep CF orphans (push) Compensated by status-reaper (workflow has no push: trigger; Gitea 1.22.6 hardcoded-suffix bug — see .gitea/scripts/status-reaper.py)

This commit is contained in:
devops-engineer 2026-05-13 07:55:29 +00:00
commit 871f8f52b5
4 changed files with 4 additions and 6 deletions

View File

@ -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",

View File

@ -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))

View File

@ -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.

View File

@ -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)