fix!: 재리뷰가 찾은 결함과 색인에서 빠졌던 발견 5건을 고친다
문제: 성숙도 리뷰 수정을 다시 읽은 재리뷰(Critical 0, 회귀 0)가 Important 27건·Minor 41건을 찾았다. 수정이 새로 만든 결함이 많았다. @SystemInvoked가 권한 규칙의 탈출구가 됐고, 데모 계정 거부가 정확히 prod일 때만 걸렸고, outbox 순서 번호가 업그레이드 때 뒤로 갔고, GraphQL union 아래 복잡도가 0이었고, 서블릿 오류 응답이 success:true로 나갔고, 호출자 deadline이 breaker를 열었다. 원래 리뷰 색인이 06 영역 발견 5건(06-10~14)을 빠뜨려 그동안 처리되지 않았다. 방법: 영역별 7묶음이 test-driven-development 절차로 실패 테스트를 먼저 쓰고 고쳤다. 결정은 재리뷰 README 4절에 적었다: 순서 번호는 V21이 기록한 전역 floor부터, 데모 계정은 local·test·demo 허용 목록, @SystemInvoked bean은 기동 실패, complete 단계 실패는 IDEMPOTENCY_COMPLETION_UNKNOWN(결과 불명), 캐시 조건부 쓰기는 별도 SCRIPT lane, strict lane 정책은 build cache 입력, 끝나지 않는 재시도 행은 원인 코드·지표·PARKED 절차. 레지스트리가 선언만 하고 아무 코드도 내보내지 않던 redis.capability.* 지표 6개는 빼고 runbook을 실제 지표(redis.lane.*) 기준으로 고쳤다. 위험·한계: V21을 V22 없이 직접 고쳤다(어느 배포에도 아직 없음). 이 브랜치의 V21을 적용한 개발 DB는 다시 만들어야 한다. 서블릿 오류 디스패치를 보안 체인이 허용한다. 발행·저장소 포트 시그니처가 바뀌어 파생 서비스 코드가 깨진다. prod에서 fixture-로 시작하는 설정값은 기동을 막는다. httpclient failure-injection lane의 main 단계 중복 실행은 이전 결정대로 남겼다. 실제 CI runner 실행은 확인하지 못했다. 검증: ci, mainCheck, :integrationCheck, -p optional-platforms ci integrationCheck performanceCheck, :performanceCheck, :releaseCheck (-PgitRevision), verify-compose-profile-contracts(18 lane) 통과. 첫 실행의 실패 2건(FindSecBugs 1, sample 동시 생성 테스트의 v4 event id)은 고친 뒤 ci·integrationCheck·mainCheck를 다시 돌려 통과했다. Refs: docs/reviews/2026-11-03-rereview/README.md 3·4·6·7절 BREAKING CHANGE: outbox 발행 포트와 저장소 포트 시그니처, 순서 번호 첫 값(V21 floor 다음), 샘플 데모 계정 프로필 허용 목록, 새 오류 코드 IDEMPOTENCY_COMPLETION_UNKNOWN, prod의 fixture- 값 거부, 기동 rule은 static·의존 없음이어야 한다.
This commit is contained in:
@@ -366,7 +366,8 @@ Spring/Lettuce 타입을 노출하지 않는다.
|
||||
- **`ERROR_CODE`=100 은 `error-codes.yaml` 의 행 수 상한과 동기화한다.** 레지스트리가 100행을 넘으면
|
||||
이 상수와 레지스트리 메모를 함께 갱신해야 한다.
|
||||
- **`TENANT_ID`=1000:** 메트릭 라벨은 bounded mapping-table ID 나 cohort bucket 을 써야 한다 —
|
||||
raw UUID tenant 식별자는 라벨로 금지. 1001번째 tenant 부터는 bucket folding 이 자동 적용된다.
|
||||
raw UUID tenant 식별자는 라벨로 금지. 이 상수는 상한 값일 뿐이다: 1000개를 넘는 tenant 값을 접어
|
||||
주는(bucket folding) 코드는 없으므로, 상한을 지키는 매핑은 메트릭을 등록하는 쪽이 만든다.
|
||||
- **tag-key 매핑 quirk 2가지**(`limitFor` 에서 명시 처리): (1) HTTP 메트릭 레지스트리 행의 tag 이름은
|
||||
`status_code` 가 아니라 `status` 다 — 혼동을 막으려 `status`/`status_code` 둘 다 `STATUS_CODE`(7)로
|
||||
매핑. (2) Resilience4j bound 는 `outcome` tag(5값)에 적용 — 상수명은 명료성을 위해
|
||||
|
||||
@@ -47,6 +47,8 @@ public enum OperationalError implements ApiErrorCode {
|
||||
IDEMPOTENT_IN_FLIGHT(Category.CONFLICT, 409, true),
|
||||
IDEMPOTENT_REQUEST_MISMATCH(Category.VALIDATION, 422, false),
|
||||
IDEMPOTENCY_UNAVAILABLE(Category.TRANSIENT_DEPENDENCY, 503, true),
|
||||
// the action ran and recording its result failed; a resend with the same key is safe
|
||||
IDEMPOTENCY_COMPLETION_UNKNOWN(Category.TRANSIENT_DEPENDENCY, 503, true),
|
||||
IDEMPOTENCY_RECOVERY_REQUIRED(Category.DATA_INTEGRITY, 500, false),
|
||||
// adapter runtime lifecycle
|
||||
ADAPTER_DISABLED(Category.INTERNAL, 500, false),
|
||||
|
||||
+5
-5
@@ -29,11 +29,11 @@ import java.util.Optional;
|
||||
* <p>Three module families ask this question — the composition root, the Fileserver and HTTP client
|
||||
* platform configurations, and the object-storage adapter. {@code shared-contract} is the one leaf
|
||||
* all of them may depend on. It is also Java-stdlib-only, so this type cannot accept Spring's
|
||||
* {@code Environment}. Spring-aware composition code captures active profiles through
|
||||
* app-bootstrap's {@code RuntimeProfileSnapshot} bridge and passes the resulting plain collection
|
||||
* here. That keeps the vocabulary testable without a container and usable from the {@code
|
||||
* EnvironmentPostProcessor} phase, where no application context exists yet, while preventing ad-hoc
|
||||
* profile reads from reappearing throughout bootstrap code.
|
||||
* {@code Environment}. Spring-aware composition code captures active profiles through the {@code
|
||||
* RuntimeProfileSnapshot} bridge in {@code adapter:outbound:support} and passes the resulting plain
|
||||
* collection here. That keeps the vocabulary testable without a container and usable from the
|
||||
* {@code EnvironmentPostProcessor} phase, where no application context exists yet, while preventing
|
||||
* ad-hoc profile reads from reappearing throughout bootstrap code.
|
||||
*
|
||||
* <p>The vendored {@code messaging:*} platform deliberately does not use this type. It depends on
|
||||
* no {@code shared-contract} type by design, and its own profile vocabulary is its own contract.
|
||||
|
||||
+15
@@ -239,6 +239,21 @@ class OperationalErrorTest {
|
||||
assertThat(OperationalError.IDEMPOTENT_IN_FLIGHT.retryable()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("action 뒤 결과를 기록하지 못한 결과 불명은 같은 키로 다시 보내면 되므로 retryable 503이다")
|
||||
void idempotencyCompletionUnknownIs503TransientRetryableWithTheSameKey() {
|
||||
// docs/web/http-contract.md §2 (re-review 2026-11-03, RR-02-03) — the action ran and its result
|
||||
// was not recorded. Distinct from IDEMPOTENCY_UNAVAILABLE (refused before the action) by code;
|
||||
// a
|
||||
// resend with the same key is judged by the server (replay / in-flight / recovery required).
|
||||
assertThat(OperationalError.IDEMPOTENCY_COMPLETION_UNKNOWN.code())
|
||||
.isEqualTo("IDEMPOTENCY_COMPLETION_UNKNOWN");
|
||||
assertThat(OperationalError.IDEMPOTENCY_COMPLETION_UNKNOWN.httpStatus()).isEqualTo(503);
|
||||
assertThat(OperationalError.IDEMPOTENCY_COMPLETION_UNKNOWN.category())
|
||||
.isEqualTo(Category.TRANSIENT_DEPENDENCY);
|
||||
assertThat(OperationalError.IDEMPOTENCY_COMPLETION_UNKNOWN.retryable()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void idempotentRequestMismatchIs422ValidationNotRetryable() {
|
||||
// D8 / error-codes.yaml#IDEMPOTENT_REQUEST_MISMATCH — same key + different body is a client
|
||||
|
||||
Reference in New Issue
Block a user