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>
57 lines
2.5 KiB
Markdown
57 lines
2.5 KiB
Markdown
---
|
|
kind: REFERENCE
|
|
slug: messaging-observability-f06
|
|
title: 타입이 문서화한 불변식은 타입이 강제한다
|
|
topic: declaration-and-document-drift
|
|
project: clean-architecture-backend-template
|
|
status: 게시 전
|
|
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
|
|
rootTreeNode: reference:messaging-observability-f06
|
|
verifiedOn: # 이 기록은 이번 회차에 실행 확인을 하지 않았다
|
|
source:
|
|
- analysis/messaging/messaging-observability.md#L717
|
|
---
|
|
|
|
# 타입이 문서화한 불변식은 타입이 강제한다
|
|
|
|
## 관계
|
|
|
|
- **`extract`가 손상된 추적 헤더에 분류되지 않은 예외를 던진다**
|
|
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
|
|
- **관측 구현이 조립되지 않고, 그 재료 둘만 bean으로 존재한다**
|
|
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
|
|
- **감사 sink 인터페이스가 사용처에서 다시 선언된다**
|
|
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
|
|
- **자격증명 판정이 core-api보다 약하다**
|
|
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
|
|
- **태그 어휘가 존재하고 유일한 호출부가 우회해, 실패 분류가 기록되지 않는다**
|
|
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
|
|
|
|
## 목적
|
|
|
|
javadoc 이 "the details are passed through MessagingRedactor" 라고 적는데 생성자는 Map.copyOf 만 한다. 감사 기록은 "often retained far longer than the source topic" 이고 운영자가 읽는다. redaction 이 호출자 책임이면 새 호출부가 그것을 잊는 순간 민감한 값이 가장 오래 남는 곳에 들어간다.
|
|
|
|
## 규칙
|
|
|
|
1. javadoc 이 서술하는 불변식을 생성자 본문과 대조한다
|
|
MessagingAuditEvent.java:30-38 이 그 대조 지점이다.
|
|
|
|
2. 강제하지 않으면 문장을 호출자 책임으로 고친다
|
|
둘 중 하나만 참일 수 있다.
|
|
|
|
3. 같은 가족의 강제 사례를 기준으로 삼는다
|
|
messaging-core-api 의 FailureDescriptor 는 512자 절단을 생성자에서 한다.
|
|
|
|
## 적용 조건
|
|
|
|
javadoc 이 값의 형태·상한·정제 여부를 단정하는 모든 record·값 객체.
|
|
|
|
## 예외
|
|
|
|
호출 지점이 전부 한 파일 안에 있고 그 파일이 불변식을 지키는 것을 테스트가 붙드는 경우는 예외로 볼 수 있다. 여기서는 RedriveService:126 과 ReplayService:73 이 redactor 를 부르는지부터 확인해야 한다.
|
|
|
|
## 예시
|
|
|
|
MessagingAuditEvent.java:30-38 의 생성자 본문과 그 javadoc 문장.
|
|
|