Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/commit-ambiguity-as-a-result/reference/reference-translation-chain-order-is-a-contract.md
T
DongHyeonkaandClaude Opus 5 b2963105a8 docs(keycloak-session-store): import the session-storage lab as a new project
The keycloak project ended with four open questions that design could not
settle. A two-VM lab was built to answer them by measurement, and this is
that material: 26 experiments, 125 raw command outputs, 22 browser captures.

Follows the import procedure in README.md.

  source/     the originating repository verbatim — 78 documents, 28 SVGs,
              8 manifests, plus .source-revision recording the commit
  final/      the SSOT
    document.md   729 lines written from the 29 experiment documents, not
                  concatenated: what was predicted, what was measured, and
                  where the measurement itself was wrong
    evidence/raw    125 outputs, flattened to <experiment>__<file> because
                    the originals collided (01-baseline.txt appeared three
                    times) and the audit only globs the top level
    evidence/meta   one per raw file; command and exitCode are null and the
                    README says why rather than inventing them
    evidence/browser  22 captures
    assets/       three diagrams through techviz
    .techviz/     their VizSpecs

A separate project rather than an addition to keycloak: the B-layer answers
that project's four questions, but the A, C and D layers are about cluster
failure, SSO and operations, and one document.md should hold one subject.
The four question records there can point here through 관계.

Recorded rather than papered over: only three of the 28 diagrams were
remade. The repository forbids hand-drawn SVG and forbids titles inside the
canvas; all 28 originals carry both, so converting them is redrawing, not
reformatting. They stay in source/ and the gap is written into the document.

verify-pipeline.py passes. audit-records.py reports no issues.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 22:51:59 +09:00

59 lines
2.8 KiB
Markdown

---
kind: REFERENCE
slug: translation-chain-order-is-a-contract
title: 실패 번역 사슬의 순서는 계약이다
topic: commit-ambiguity-as-a-result
project: clean-architecture-backend-template
status: 게시 전
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
rootTreeNode: reference:translation-chain-order-is-a-contract
verifiedOn: # 이 기록은 이번 회차에 실행 확인을 하지 않았다
---
# 실패 번역 사슬의 순서는 계약이다
## 목적
번역 사슬의 단계를 재배치하거나 건너뛰어서, 이미 분류된 판정을 잃거나 프로그래밍 에러를 재시도 가능하게 만드는 것을 막는다.
## 규칙
1. 이미 분류된 실패는 그대로 통과시킨다
다시 번역하면 그 실패가 들고 있던 시도 번호와 키와 완료 판정을 새로 만들면서 잃는다.
2. SQLSTATE 없는 provider 예외를 그다음에 둔다
낙관적 충돌이 대표적이다. SQLSTATE 가 없으므로 SQLSTATE 기반 번역기가 알아보지 못하고, 뒤에 두면 마지막 단계로 떨어진다.
3. 벤더 SQLSTATE 를 그다음에 둔다
직렬화 실패와 데드락과 제약 계열을 덮는다.
4. 나머지는 손대지 않고 반환한다
도메인 예외나 assertion 실패나 NullPointerException 은 퍼시스턴스 실패가 아니다. 그것을 퍼시스턴스 실패로 포장하면 프로그래밍 에러가 재시도 가능한 것처럼 보인다.
5. 모든 번역기가 같은 시도 값을 받는다
operation 과 attempt 와 elapsed 와 trace 를 호출 지점에서 한 번 만들어 넘긴다. 두 번역기가 같은 시도를 다르게 서술할 수 없게 된다.
## 적용 조건
예외를 계층 간에 옮기는 모든 어댑터
번역기 없이 실행되는 경로가 있는지 확인해야 하는 조립 지점
## 예외
정책의 화이트리스트는 어떤 범주가 재시도될 수 있는지를 넓힌다. 이 실패에 대한 분류기의 판정을 뒤집지 않는다.
## 예시
재시도 코디네이터가 플랫폼 예외 하나만 잡는데 executor 가 아무것도 번역하지 않으면, 경합이 실제로 만들어 내는 예외들이 번역되지 않은 채 나가서 catch 를 비껴간다. 단위 픽스처가 이미 번역된 예외를 던지면 그 공백이 초록불로 덮인다.
벤더 번역기가 없는 구성에서도 사슬은 존재하고 벤더 단계만 아무것도 돌려주지 않는다. 사슬 자체를 건너뛰는 경로를 두지 않는다.
## 관계
- **번역되지 않은 경합 예외가 재시도 코디네이터의 catch를 통째로 비껴갔다**
이 순서를 계약으로 만든 사례다.
- **모르는 것은 성공도 실패도 아닌 세 번째 결과여야 한다**
번역이 없으면 분류도 없고, 분류가 없으면 세 번째 결과도 만들어지지 않는다.