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>
This commit is contained in:
DongHyeonka
2026-09-04 22:51:59 +09:00
co-authored by Claude Opus 5
parent 43bccd08a8
commit b2963105a8
5017 changed files with 372751 additions and 4943 deletions
@@ -0,0 +1,50 @@
---
kind: REFERENCE
slug: messaging-schema-avro-f03
title: 컬렉션 순서가 계약이면 양쪽에서 같은 방향으로 적는다
topic: schema-and-data-contracts
project: clean-architecture-backend-template
status: 게시 전
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
rootTreeNode: reference:messaging-schema-avro-f03
verifiedOn: # 이 기록은 이번 회차에 실행 확인을 하지 않았다
source:
- analysis/messaging/messaging-schema-avro.md#L542
---
# 컬렉션 순서가 계약이면 양쪽에서 같은 방향으로 적는다
## 관계
- **진화 판단이 두 곳에 있고 형태가 반대다**
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
- **CI에서 돈다고 선언한 게이트를 부르는 CI가 없다**
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
## 목적
둘을 잇는 코드가 없어 지금은 무해하다. 이으면서 reversed() 를 빠뜨리면 pairwise 모드가 가장 오래된 스키마를 직전 버전으로 비교한다. 실패하지 않고 통과할 수 있는 오류라는 점이 이 규칙의 이유다.
## 규칙
1. 같은 리스트를 주고받는 두 쪽의 순서 문장을 대조한다
SchemaRegistry.history javadoc 은 oldest first, AvroCompatibilityGate.check 의 @param history 는 newest first 다.
2. 위험이 이미 문서화돼 있는지 본다
port javadoc 이 그 위험을 직접 적는다 — "an ordering mistake here silently converts a transitive check into a pairwise one."
3. 한 방향으로 통일하고 뒤집기를 안쪽으로 넣는다
게이트가 oldest-first 를 받고 내부에서 뒤집는 형태다.
## 적용 조건
정렬된 컬렉션이 port 와 그 소비자 사이를 오가고, 순서가 결과를 바꾸는 모든 경계.
## 예외
SSOT 가 이 규칙의 반례를 적지 않았다. 두 방향이 의도적이라면 변환 지점이 코드로 존재해야 하는데, 지금은 잇는 코드 자체가 없다.
## 예시
두 javadoc 의 순서 문장. 확인 방법은 그 둘을 나란히 대조하는 것이다.
@@ -0,0 +1,50 @@
---
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' 다.