Compare commits

...

2 Commits

Author SHA1 Message Date
infra-sre 329661177a chore: trigger CI for SOP gate re-check
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 17s
Harness Replays / detect-changes (pull_request) Successful in 18s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 18s
CI / Detect changes (pull_request) Successful in 50s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 51s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 53s
E2E API Smoke Test / detect-changes (pull_request) Successful in 57s
qa-review / approved (pull_request) Failing after 23s
security-review / approved (pull_request) Failing after 22s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 50s
gate-check-v3 / gate-check (pull_request) Successful in 31s
sop-tier-check / tier-check (pull_request) Successful in 17s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m18s
Harness Replays / Harness Replays (pull_request) Successful in 8s
sop-checklist / na-declarations (pull_request) awaiting /sop-n/a declaration for: qa-review, security-review
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
CI / Shellcheck (E2E scripts) (pull_request) Successful in 7s
CI / Python Lint & Test (pull_request) Successful in 16s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 22s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m23s
CI / Platform (Go) (pull_request) Failing after 4m52s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 5m4s
audit-force-merge / audit (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 9m6s
CI / Canvas (Next.js) (pull_request) Successful in 15m51s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Successful in 6s
2026-05-14 15:08:02 +00:00
infra-sre 6599f4000c fix(db): add rows.Err() checks after all for rows.Next() loops
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 6s
Harness Replays / detect-changes (pull_request) Successful in 8s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 13s
qa-review / approved (pull_request) Failing after 14s
security-review / approved (pull_request) Failing after 15s
sop-tier-check / tier-check (pull_request) Successful in 11s
E2E API Smoke Test / detect-changes (pull_request) Successful in 23s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 23s
Harness Replays / Harness Replays (pull_request) Successful in 8s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 24s
CI / Detect changes (pull_request) Successful in 24s
gate-check-v3 / gate-check (pull_request) Successful in 23s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 27s
sop-checklist / na-declarations (pull_request) awaiting /sop-n/a declaration for: qa-review, security-review
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
CI / Shellcheck (E2E scripts) (pull_request) Successful in 6s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 10s
CI / Python Lint & Test (pull_request) Successful in 6s
CI / Canvas (Next.js) (pull_request) Successful in 8s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 8s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m15s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m41s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 3m30s
CI / Platform (Go) (pull_request) Failing after 3m41s
CI / all-required (pull_request) Successful in 8s
Add missing database/sql row-scan error checks to
workspace-server/internal/handlers/secrets.go following the Go
database/sql pattern (rows.Err() must be checked after every
for rows.Next() loop). Fixes 6 loops:

- List: for rows.Next() (workspace secrets)
- List: for globalRows.Next() (merged global secrets)
- Values: for globalRows.Next() (decrypted global secrets)
- Values: for wsRows.Next() (decrypted workspace secrets)
- ListGlobal: for rows.Next()
- restartAllAffectedByGlobalKey: for rows.Next()

Each check logs the error and returns, consistent with the error
handling posture elsewhere in this file.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 15:06:50 +00:00
@@ -63,6 +63,10 @@ func (h *SecretsHandler) List(c *gin.Context) {
"updated_at": updatedAt,
})
}
if err := rows.Err(); err != nil {
log.Printf("database scan error: %v", err)
return
}
// 2. Global secrets not overridden at workspace level
globalRows, err := db.DB.QueryContext(ctx,
@@ -91,6 +95,10 @@ func (h *SecretsHandler) List(c *gin.Context) {
"updated_at": updatedAt,
})
}
if err := globalRows.Err(); err != nil {
log.Printf("database scan error: %v", err)
return
}
c.JSON(http.StatusOK, secrets)
}
@@ -174,6 +182,10 @@ func (h *SecretsHandler) Values(c *gin.Context) {
out[k] = string(decrypted)
}
}
if err := globalRows.Err(); err != nil {
log.Printf("database scan error: %v", err)
return
}
}
wsRows, wErr := db.DB.QueryContext(ctx,
@@ -195,6 +207,10 @@ func (h *SecretsHandler) Values(c *gin.Context) {
out[k] = string(decrypted) // workspace override wins over global
}
}
if err := wsRows.Err(); err != nil {
log.Printf("database scan error: %v", err)
return
}
}
if len(failedKeys) > 0 {
@@ -324,6 +340,10 @@ func (h *SecretsHandler) ListGlobal(c *gin.Context) {
"scope": "global",
})
}
if err := rows.Err(); err != nil {
log.Printf("database scan error: %v", err)
return
}
c.JSON(http.StatusOK, secrets)
}
@@ -400,6 +420,10 @@ func (h *SecretsHandler) restartAllAffectedByGlobalKey(key string) {
ids = append(ids, id)
}
}
if err := rows.Err(); err != nil {
log.Printf("database scan error: %v", err)
return
}
if len(ids) == 0 {
return
}