Skip to content

feat(api): give the queue-full 429 and auth failures a stable error code #1000

Description

@yeongseon

Problem

일부 에러 본문에 code 가 없어서 클라이언트가 문장으로 분기해야 한다.

Evidence

  • service/build_runs_api.py:466-467 — ServiceResponse(429, {"error": "async build queue is full"}). code 없음. 같은 429 인 인증 실패 제한에는 "code": "auth_throttled" 가 있다 (service/app.py:1440) — 둘을 구분할 방법이 문장뿐이다.
  • service/http.py:72 과부하 503 본문 {"error": "server overloaded"}.
  • 재시작으로 중단된 run 은 사유가 이벤트 메시지 문자열 안에만 있다 (build_runs_api.py:578-579).

확인하지 않은 것: 401(만료/무효) 본문의 형태.

Acceptance Criteria

  • 큐 초과, 과부하, 중단된 run, 401 각각에 계약에 선언된 code
  • 계약 버전 상향

Required Verification

V2 + V3 (OpenAPI)

Dependencies

Relates: #994, #996

Notes

2026-10-04 세 저장소 연동 리뷰에서 나온 항목이다. main @ 7a3f78f 에서 다시 확인한 것만 적었다.

Activity

  1. added
    review:R2Public API, builder API, OpenAPI, spec, transformation (POLICY 18.1)
    epic:trustTrust & Evidence — verification, drift, provenance
    priority:medium제품화에 필요하지만 다른 작업을 중단시키지 않는다 (POLICY 8)
    on Oct 4, 2026
  2. Eomdahyeon commented on Oct 4, 2026

    @Eomdahyeon
    Collaborator

    착수하려다 멈췄다. 큐 초과 429·과부하 503·401 에 code 를 주려면 계약의 공용 응답(components.responses.Unauthorized 등)과 예시를 고치고 버전을 올려야 하는데, 열려 있는 #1009(계약에 publish 경로 선언)와 #994 의 범위(auth_throttled, 과부하 503 선언)가 같은 곳을 다룬다. 중단된 run 의 code 는 #996 에 달려 있고, #996 은 #1008 이 고치는 routes/_guards.py 를 건드린다. #1008·#1009 가 머지된 뒤에 하는 편이 충돌이 없다 — 할당은 풀어 둔다. 401 본문은 확인했다: {"error": <AuthError.reason>} 이고 code 가 없다 (service/app.py 의 인증 게이트).

  3. self-assigned this
    on Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

epic:trustTrust & Evidence — verification, drift, provenancepriority:medium제품화에 필요하지만 다른 작업을 중단시키지 않는다 (POLICY 8)review:R2Public API, builder API, OpenAPI, spec, transformation (POLICY 18.1)type:featureNew feature or capability

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions