Skip to content

fix(grpc): classify adaptive admission rejections accurately #49

Description

@DavidBellamy

Problem

The gRPC router maps every status other than 400, 404, 408/504, and 5xx to internal_error. Enforced adaptive admission returns HTTP 429 when a model fleet is saturated, so ordinary capacity rejections inflate smg_router_request_errors_total{error_type="internal_error"} and look like gateway failures.

Expected behavior

  • Classify 429 as a bounded admission rejection, not an internal failure.
  • Preserve the HTTP 429 response and Retry-After behavior.
  • Keep actual 5xx and unexpected statuses distinguishable.
  • Add focused status-mapping tests.

Acceptance criteria

  • 429 maps to a stable non-internal metric label.
  • Existing 400, 404, timeout, and backend mappings remain unchanged.
  • A regression test covers 429 and representative existing statuses.
  • No routing or admission decision behavior changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions