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>
54 lines
2.9 KiB
Markdown
54 lines
2.9 KiB
Markdown
---
|
|
kind: CONCEPT
|
|
slug: adapter-outbound-fileserver-c03
|
|
title: stateRevision은 정확히 하나씩만 증가한다
|
|
topic: state-machines-and-ownership
|
|
project: clean-architecture-backend-template
|
|
status: 게시 전
|
|
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
|
|
rootTreeNode: concept:adapter-outbound-fileserver-c03
|
|
evidenceCapturedOn: 2026-09-01
|
|
assets:
|
|
- key: adapter-outbound-fileserver-c03
|
|
file: ../../../final/evidence/rendered/adapter-outbound-fileserver-c03.svg
|
|
- key: adapter-outbound-fileserver-c03-diagram
|
|
file: ../../../final/assets/diagrams/adapter-outbound-fileserver-c03.svg
|
|
evidence:
|
|
- ../../../final/evidence/raw/adapter-outbound-fileserver-c03.txt
|
|
source:
|
|
- 원본 분석 절은 analysis/08-adapter-outbound-fileserver.md#L184 이다.
|
|
module: adapter-outbound-fileserver
|
|
---
|
|
|
|
# stateRevision은 정확히 하나씩만 증가한다
|
|
|
|
`validateOperationTransition`이 여섯 가지를 순서대로 강제하고, 두 종착 상태에는 후속 전이가 없다.
|
|
|
|
## 본문
|
|
|
|
<!-- body:start -->
|
|
|
|
`validateOperationTransition`이 여섯 가지를 순서대로 강제한다: requestFingerprint 불변 → 불변 identity 10개 필드 불변 → `stateRevision` 감소 금지 → 동일 revision 다른 내용 금지 → **정확히 +1** 증가 → 인접 전이 행렬.
|
|
|
|
## 두 종착 상태
|
|
|
|
:::evidence key="adapter-outbound-fileserver-c03-diagram" alt="비terminal 상태에서 PUBLISHED 로 가는 실선 화살표와 QUARANTINED 로 가는 점선 화살표가 있고 두 종착 상태에서 나가는 화살표는 없는 구조" caption="두 종착 상태" zoom="false"
|
|
:::
|
|
|
|
행렬은 README가 적은 사슬과 일치하고, 모든 비terminal 상태에서 `QUARANTINED`로만 이탈할 수 있으며 `PUBLISHED`·`QUARANTINED`는 후속 전이가 없다(`case PUBLISHED, QUARANTINED -> false`).
|
|
|
|
## 분석 원문의 전이 검사
|
|
|
|
:::evidence key="adapter-outbound-fileserver-c03" alt="분석 문서 analysis/08-adapter-outbound-fileserver.md 에서 이 기록의 근거 절을 그대로 잘라낸 15줄. 코드베이스를 측정한 것이 아니라 원본 판정이 무엇을 적었는지를 보여 준다." caption="analysis/08-adapter-outbound-fileserver.md 발췌 — 15줄" zoom="true"
|
|
:::
|
|
|
|
## 봉인 이후 얼어붙는 사실
|
|
|
|
`requireSealedFactsUnchanged`가 byteSize·rowCount·columnCount·sha256·formulaMitigatedCount·sealedAt을 고정하고, `MANIFEST_PUBLISHED` 이후에는 `manifestDigest`, `REFERENCE_PUBLISHED` 이후에는 `referenceDigest`도 고정된다.
|
|
|
|
## 같은 레코드 재기록을 전이가 아니라 복구로 본다
|
|
|
|
`current.equals(candidate)`는 전이가 아니라 **복구(repair)**로 취급된다 — 부모 디렉터리를 다시 force하고 정확 read-back만 수행한다. 크래시 후 같은 레코드를 다시 쓰는 재시도가 conflict가 되지 않게 하는 처리이고, `parentForcedCallbackFailureIsRepairedByIdenticalOperationRetry`가 이를 고정한다.
|
|
|
|
<!-- body:end -->
|