Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/retention-and-unbounded-growth/reference/reference-one-formula-and-one-enforcement-point-per-safety-rule.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

2.6 KiB

kind, slug, title, topic, project, status, sourceRevision, rootTreeNode, verifiedOn
kind slug title topic project status sourceRevision rootTreeNode verifiedOn
REFERENCE one-formula-and-one-enforcement-point-per-safety-rule 같은 안전 규칙은 하나의 공식과 하나의 강제 시점을 갖는다 retention-and-unbounded-growth clean-architecture-backend-template 게시 전 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 reference:one-formula-and-one-enforcement-point-per-safety-rule

같은 안전 규칙은 하나의 공식과 하나의 강제 시점을 갖는다

목적

같은 종류의 안전 여유가 여러 곳에서 독립적으로 정해지면 공식과 강제 시점이 갈린다. 값의 주인을 한 곳으로 정한다.

규칙

  1. 이 값을 바꾸려면 몇 군데를 고쳐야 하는지 센다 하나가 아니면 나머지는 조용히 옛 값으로 남는다.

  2. 공식이 같은지 본다 같은 관계를 곱셈과 덧셈으로 다르게 표현하고 있으면 둘 중 하나는 근거가 없다.

  3. 강제 시점이 같은지 본다 한쪽은 항상 검증하고 다른 쪽은 특정 객체를 만들 때만 검증하면, 그 객체를 만들지 않는 배포는 검증을 받지 않는다.

  4. 값이 아니라 관계가 소유자를 가져야 하는 경우를 구분한다 층마다 다른 값이 정당하면 값이 아니라 그 관계를 한 곳에 두고 검증한다.

적용 조건

보존 기간, 마감, 재시도 상한, 배치 크기처럼 안전을 위해 고른 모든 수치.

예외

클라이언트 마감이 서버 마감보다 짧아야 하는 것처럼 층마다 다른 값이 필요한 경우. 그때는 값이 아니라 관계가 한 곳에 있어야 하고, 그 관계를 검증하는 코드가 있어야 한다.

예시

inbox 보존 여유가 한 곳에서는 곱셈으로, 다른 곳에서는 덧셈으로 표현된다. 한쪽은 정리 잡을 만들 때만 검증하고 다른 쪽은 항상 검증한다.

드레인 마감 30초가 세 곳에서 각자 정해진다. 공개 상수 하나, 다른 클래스의 비공개 복사본 하나, 생성자 인자 하나. 테스트가 붙드는 것은 공개 상수뿐이고, 살아 있는 값은 비공개 복사본이다.

관계

  • 재생 저장소에 제거 경로가 없고, 형제 맵의 상한은 세션 경계 하나다 보존 경계가 아예 없는 쪽의 사례다.
  • 순서 계약을 구현하는 것이 없고, 그것을 검증한다는 테스트는 enum 선언 순서만 본다 드레인 마감 세 곳이 그 사건의 일부다.
  • 문서의 수치는 세지 말고 파생하거나 게이트로 붙든다 같은 규칙의 문서 판이다.