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:
co-authored by
Claude Opus 5
parent
43bccd08a8
commit
b2963105a8
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
kind: REFERENCE
|
||||
slug: messaging-inbox-jdbc-postgresql-f05
|
||||
title: 컬럼 폭은 애플리케이션 검증과 짝을 이룬다
|
||||
topic: contract-domain-and-bounds
|
||||
project: clean-architecture-backend-template
|
||||
status: 게시 전
|
||||
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
|
||||
rootTreeNode: reference:messaging-inbox-jdbc-postgresql-f05
|
||||
verifiedOn: # 이 기록은 이번 회차에 실행 확인을 하지 않았다
|
||||
source:
|
||||
- analysis/messaging/messaging-inbox-jdbc-postgresql.md#L684
|
||||
---
|
||||
|
||||
# 컬럼 폭은 애플리케이션 검증과 짝을 이룬다
|
||||
|
||||
## 관계
|
||||
|
||||
- **bounded purge가 구현돼 있고 호출되지 않아, cleanup이 스스로 막겠다고 한 장애를 일으킨다**
|
||||
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
|
||||
- **속성을 이름으로 주장하는 테스트가 그 속성을 보일 수 없는 fake 위에서 통과한다**
|
||||
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
|
||||
- **SQL 실패가 재시도 불가로 분류된다**
|
||||
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
|
||||
|
||||
## 목적
|
||||
|
||||
DB 가 먼저 거절하면 그 실패는 설정 오류가 아니라 인프라 오류의 모양으로 도착한다. 여기서는 긴 consumerId 가 SQLException 이 되고, 그것이 INBOX_RESERVE_FAILED · CONFIGURATION · retryable=false 로 분류돼 결국 설정 실수가 메시지 파킹으로 나타난다.
|
||||
|
||||
## 규칙
|
||||
|
||||
1. 컬럼에 폭이 선언돼 있으면 애플리케이션 층에도 같은 상한을 둔다
|
||||
migration 이 consumer_id VARCHAR(160) 을 선언한다.
|
||||
|
||||
2. 지금 무엇을 검증하는지 확인한다
|
||||
IdempotentConsumer · TransactionalInboxHandler · JdbcInboxRepository 셋 다 공백만 거절하고 길이를 보지 않는다.
|
||||
|
||||
3. 값 객체가 있으면 그 생성자가 상한을 갖는다
|
||||
messaging-core-api 의 값 객체들이 바이트 상한을 생성자에서 강제하는 형태가 그쪽 §4.5 에 있다. consumerId 는 아직 값 객체가 아니다.
|
||||
|
||||
## 적용 조건
|
||||
|
||||
스키마가 폭을 정하고 그 값이 애플리케이션에서 문자열로 다뤄지는 모든 컬럼.
|
||||
|
||||
## 예외
|
||||
|
||||
폭이 실질적으로 도달 불가능할 만큼 넉넉한 경우는 예외로 둘 수 있다. 다만 그 판단이 어디에도 적혀 있지 않으면 예외가 아니라 미검증이다.
|
||||
|
||||
## 예시
|
||||
|
||||
V2__messaging_inbox.sql:10 의 컬럼 선언과 세 클래스의 검증 코드. 확인 방법은 161자 consumerId 로 reserve 를 부르는 것이다.
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
kind: REFERENCE
|
||||
slug: messaging-inbox-jdbc-postgresql-f06
|
||||
title: 같은 안전 규칙은 한 공식과 한 강제 시점을 갖는다
|
||||
topic: contract-domain-and-bounds
|
||||
project: clean-architecture-backend-template
|
||||
status: 게시 전
|
||||
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
|
||||
rootTreeNode: reference:messaging-inbox-jdbc-postgresql-f06
|
||||
verifiedOn: # 이 기록은 이번 회차에 실행 확인을 하지 않았다
|
||||
source:
|
||||
- analysis/messaging/messaging-inbox-jdbc-postgresql.md#L693
|
||||
---
|
||||
|
||||
# 같은 안전 규칙은 한 공식과 한 강제 시점을 갖는다
|
||||
|
||||
## 관계
|
||||
|
||||
- **bounded purge가 구현돼 있고 호출되지 않아, cleanup이 스스로 막겠다고 한 장애를 일으킨다**
|
||||
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
|
||||
- **속성을 이름으로 주장하는 테스트가 그 속성을 보일 수 없는 fake 위에서 통과한다**
|
||||
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
|
||||
- **SQL 실패가 재시도 불가로 분류된다**
|
||||
이 규칙의 근거는 같은 분석 리프의 판정이 소유한다.
|
||||
|
||||
## 목적
|
||||
|
||||
같은 종류의 시간 관계가 곱셈과 덧셈으로 다르게 표현되고 강제 시점까지 다르면, 어느 배포가 그 규칙의 보호를 받는지 코드에서 읽을 수 없게 된다.
|
||||
|
||||
## 규칙
|
||||
|
||||
1. 같은 규칙이 몇 곳에 있는지 센다
|
||||
보존 규칙은 세 곳에 있다. InboxRepository javadoc 은 강제하지 않고, 이 leaf 의 InboxRetentionPolicy 는 × 2.0 이며, messaging-claim-check 의 ClaimCheckPolicy 는 brokerRetention + maxRedeliveryWindow 다.
|
||||
|
||||
2. 공식이 같은지 본다
|
||||
곱셈과 덧셈은 같은 안전 여유를 표현하지 않는다.
|
||||
|
||||
3. 언제 강제되는지 본다
|
||||
InboxRetentionPolicy.validate() 는 InboxCleanupJob 을 만들 때만 불린다. cleanup 을 배선하지 않은 배포는 보존 검사를 아예 받지 않는다. ClaimCheckPolicy 는 항상 강제한다.
|
||||
|
||||
## 적용 조건
|
||||
|
||||
보존 기간·재전달 창·타임아웃처럼 시간 관계를 안전 여유로 표현하는 정책이 여러 leaf 에 흩어져 있는 자리.
|
||||
|
||||
## 예외
|
||||
|
||||
leaf 마다 다른 여유가 필요한 경우는 공식이 아니라 계수가 달라야 한다. 지금은 계수가 아니라 연산 자체가 다르고, 그 차이의 이유가 어느 쪽에도 적혀 있지 않다.
|
||||
|
||||
## 예시
|
||||
|
||||
세 위치의 공식과 강제 시점. 확인 방법은 그 셋을 나란히 놓고 대조하는 것이다.
|
||||
|
||||
Reference in New Issue
Block a user