fix(handlers): add rows.Err() checks after secrets scan loops (closes #1016) #1021

Merged
devops-engineer merged 1 commits from fix/1016-secrets-rows-err-checks into staging 2026-05-14 15:40:35 +00:00

1 Commits

Author SHA1 Message Date
858af52d6f fix(handlers): add rows.Err() checks after secrets scan loops (closes #1016)
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
Harness Replays / detect-changes (pull_request) Successful in 9s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 8s
E2E API Smoke Test / detect-changes (pull_request) Successful in 19s
CI / Detect changes (pull_request) Successful in 19s
gate-check-v3 / gate-check (pull_request) Successful in 13s
qa-review / approved (pull_request) Successful in 12s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 23s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 22s
security-review / approved (pull_request) Successful in 10s
sop-tier-check / tier-check (pull_request) Successful in 14s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m6s
Harness Replays / Harness Replays (pull_request) Successful in 12s
CI / Canvas (Next.js) (pull_request) Successful in 15s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 8s
CI / Python Lint & Test (pull_request) Successful in 8s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 11s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m2s
CI / Canvas Deploy Reminder (pull_request) Successful in 5s
CI / Platform (Go) (pull_request) Failing after 4m27s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 4m10s
CI / all-required (pull_request) Successful in 6s
sop-checklist / na-declarations (pull_request) awaiting /sop-n/a declaration for: qa-review, security-review
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 5/7 — missing: root-cause, no-backwards-compat — body-unfilled: comprehensive-testing, local-postgres-e2e, staging-sm
audit-force-merge / audit (pull_request) Successful in 24s
Regression from audit #109: rows.Err() checks were removed from four
functions between commits 3a30b073 and b25b4fb6. Without these checks,
a mid-stream query error (e.g. connection loss during row iteration)
is silently ignored and partial results are returned as success.

Added rows.Err() checks after every for rows.Next() loop:
- List: workspace secrets loop + global secrets loop
- Values: global secrets loop + workspace secrets loop
- ListGlobal: single loop
- restartAllAffectedByGlobalKey: affected workspaces loop

Each check logs the iteration error and continues (non-fatal, matching
the existing log.Printf pattern used elsewhere in the file).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 14:12:35 +00:00