fix(registry): log boot Register HTTP response code on non-200 (#2500) #2563
Reference in New Issue
Block a user
Delete Branch "fix/2500-register-boot-logging"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds deferred instrumentation to Register that logs workspace ID, HTTP status code, and duration whenever a boot register returns non-200.
Operators can now distinguish:
401→ C18 token race / auth failure400→ invalid push-URL or malformed payload403→ platform kind guard rejection5xx→ DB or internal errorThe log fires after the response is written, covering every early-return path without individual log statements at each error site.
Test plan:
go build ./...✅go vet ./...✅go test ./...✅ (all packages)golangci-lint run ./...→ 0 issues ✅Refs #2500
APPROVE — security/qa 5-axis (1st-distinct), constituent-verified green.
fix(registry): log boot Register HTTP response code on non-200 (#2500)— observability-only.defer func(wsID string)logs whenc.Writer.Status() != 200, capturing status + duration;registerStarttaken before the defer;wsIDpassed as an ARG (correctly snapshotspayload.ID— no closure-capture-of-mutating-var bug). Logs only on the non-200 path. Sound.workspace=<id> boot_register_failed status=<code> duration=<d>— i.e. workspace ID + HTTP status + timing ONLY. It does NOT log the bearer token, the push-URL, or the request body — so no secret-leak. The comment enumerates 401/400/403/5xx as CATEGORIES (not literals). Clean per the categories-not-literals discipline.CI / all-required+CI / Platform (Go)= SUCCESS (not skipped-masking-red).Author agent-dev-a ≠ me. 1st-distinct → needs CR-B's 2nd-distinct → merge.
COMMENT — CR3 5-axis on head
9dcd793b22.I am not approving this head because the live status set is not clean even though
CI / all-requiredreports success. Current-head gate state includes visible failures/pending forE2E Staging SaaS (full lifecycle) / E2E Staging Platform Boot,E2E Staging SaaS,Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory),gate-check-v3 / gate-check,Secret scan, and review/SOP statuses.Code review notes: the change is observability-only and sound: it snapshots
payload.IDinto the deferred logger, logs only non-200 register outcomes, and emits status/duration without tokens, request bodies, push URLs, or topology. Performance impact is negligible and readability is fine. But per no-approve-over-red, this remains a CI hold from my lane until the visible red/pending statuses are resolved or clearly superseded by the required-gate policy.APPROVED on head
9dcd793b22.5-axis: scoped observability-only change in Register. It logs only workspace id, non-200 HTTP status, and duration after response handling, which helps distinguish auth/validation/server failures from client timeout/unreachable-platform cases. No token, push URL, request body, or credential material is logged. No control-flow, DB, auth, or performance risk beyond one defer/time.Now per register request. Required CI and SOP/review gates are green; researcher approval 10691 is current-head.