Skip to content

Address remaining ASB review cleanups#45

Merged
haasonsaas merged 1 commit intomainfrom
codex/asb-review-cleanups
Apr 14, 2026
Merged

Address remaining ASB review cleanups#45
haasonsaas merged 1 commit intomainfrom
codex/asb-review-cleanups

Conversation

@haasonsaas
Copy link
Copy Markdown
Collaborator

Summary

  • reject non-finite rate limit config values and cover them in tests
  • bound budget exhaustion metric labels by connector kind instead of proxy handle
  • close redis clients on bootstrap error paths and prebuild the HTTP rate-limit middleware once

Testing

  • go test ./cmd/asb-api ./internal/app ./internal/bootstrap ./internal/api/httpapi -count=1
  • go test ./... -count=1

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 14, 2026

PR Summary

Medium Risk
Moderate risk due to behavior changes in config validation, HTTP middleware wrapping, and Prometheus metric label schema (may break dashboards/alerts). Runtime impact should be limited, but regressions could affect rate limiting, readiness startup, or observability.

Overview
Tightens HTTP server configuration validation by rejecting non-finite ASB_HTTP_RATE_LIMIT_RPS values (NaN/±Inf) and adds test coverage for these cases.

Reduces metric label cardinality by changing asb_budget_exhaustion_total to label by connector_kind instead of per-proxy handle, updating the service recording sites and tests accordingly.

Cleans up infrastructure wiring by prebuilding the HTTP rate-limit middleware once in httpapi.Server (instead of per request), and ensuring Redis clients are closed on bootstrap error paths; redisPoolStats is narrowed to accept *redis.Client.

Reviewed by Cursor Bugbot for commit 9b7fce2. Bugbot is set up for automated code reviews on this repo. Configure here.

@haasonsaas haasonsaas merged commit 45dfdd8 into main Apr 14, 2026
4 checks passed
@haasonsaas haasonsaas deleted the codex/asb-review-cleanups branch April 14, 2026 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant