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>
51 lines
2.1 KiB
Markdown
51 lines
2.1 KiB
Markdown
---
|
|
kind: REFERENCE
|
|
slug: messaging-schema-avro-f05
|
|
title: 안정 코드는 판단 단위로 정하고 구현 단위로 정하지 않는다
|
|
topic: schema-and-data-contracts
|
|
project: clean-architecture-backend-template
|
|
status: 게시 전
|
|
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
|
|
rootTreeNode: reference:messaging-schema-avro-f05
|
|
verifiedOn: # 이 기록은 이번 회차에 실행 확인을 하지 않았다
|
|
source:
|
|
- analysis/messaging/messaging-schema-avro.md#L560
|
|
---
|
|
|
|
# 안정 코드는 판단 단위로 정하고 구현 단위로 정하지 않는다
|
|
|
|
## 관계
|
|
|
|
- **진화 판단이 두 곳에 있고 형태가 반대다**
|
|
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
|
|
- **CI에서 돈다고 선언한 게이트를 부르는 CI가 없다**
|
|
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
|
|
|
|
## 목적
|
|
|
|
FailureDescriptor.code 는 "stable, machine-readable code" 이고 대시보드와 재시도 정책이 그것으로 집계한다. 같은 판단이 두 어휘로 나뉘면 Avro 만 별도 계열이 되고, 집계는 포맷 수만큼 갈라진다.
|
|
|
|
## 규칙
|
|
|
|
1. 같은 판단에 형제 구현들이 어떤 코드를 쓰는지 모은다
|
|
미등록 타입과 미등록 버전이라는 같은 판단에 JSON 과 Protobuf 는 UNKNOWN_MESSAGE_TYPE 과 SCHEMA_VERSION_NOT_REGISTERED 를, Avro 는 AVRO_TYPE_NOT_REGISTERED 와 AVRO_VERSION_NOT_REGISTERED 를 쓴다.
|
|
|
|
2. 코드가 갈라진 이유가 판단인지 구현인지 묻는다
|
|
포맷 이름이 접두로 붙은 것은 구현 단위다.
|
|
|
|
3. 포맷 구분은 코드가 아니라 메시지로 옮긴다
|
|
공통 코드를 쓰고 sanitizedMessage 로 포맷을 구분한다.
|
|
|
|
## 적용 조건
|
|
|
|
여러 구현이 같은 port 를 구현하면서 각자 실패 코드를 정하는 모든 가족.
|
|
|
|
## 예외
|
|
|
|
판단 자체가 그 구현에만 존재하는 경우는 고유 코드가 맞다. 여기 두 판단은 세 codec 모두에 있다.
|
|
|
|
## 예시
|
|
|
|
세 codec 의 requireRegistered 와 schemaFor. 확인 방법은 git grep -n 'NOT_REGISTERED' -- 'src/messaging/**/*.java' 다.
|
|
|