Files
document-haness/docs/clean-architecture-backend-template/final/evidence/rendered/a07-f001-uuidcodec-elsewhere.svg
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

115 lines
16 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="1734" viewBox="0 0 1200 1734" role="img">
<title>terminal evidence</title>
<desc>Terminal-style rendering generated from retained command output. Sensitive-looking values are redacted in the visual asset.</desc>
<rect x="1" y="1" width="1198" height="1732" rx="14" fill="#0d1117" stroke="#30363d"/>
<rect x="1" y="1" width="1198" height="44" rx="14" fill="#161b22"/>
<rect x="1" y="30" width="1198" height="14" fill="#161b22"/>
<circle cx="24" cy="22" r="6" fill="#ff5f57"/>
<circle cx="44" cy="22" r="6" fill="#febc2e"/>
<circle cx="64" cy="22" r="6" fill="#28c840"/>
<text x="92" y="27" fill="#8b949e" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace">terminal evidence</text>
<text x="24" y="68" fill="#c9d1d9" font-size="15" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">$ echo &#x27;# 문자열에서 UUID 를 만드는 리프 밖 프로덕션&#x27;
echo -n &#x27;# 파일 : &#x27;
grep -rl &#x27;UUID.fromString&#x27; --include=*.java </tspan><tspan x="24" dy="22">src --exclude-dir=build | grep &#x27;/main/&#x27; \
| grep -v &#x27;^src/adapter/outbound/identifier/&#x27; | wc -l
echo -n &#x27;# 호출 줄 :</tspan><tspan x="24" dy="22"> &#x27;
grep -rn &#x27;UUID.fromString&#x27; --include=*.java src --exclude-dir=build | grep &#x27;/main/&#x27; \
| grep -v &#x27;^src/adapter/outbo</tspan><tspan x="24" dy="22">und/identifier/&#x27; | wc -l
grep -rl &#x27;UUID.fromString&#x27; --include=*.java src --exclude-dir=build | grep &#x27;/main/&#x27; \
| grep </tspan><tspan x="24" dy="22">-v &#x27;^src/adapter/outbound/identifier/&#x27; | sed &#x27;s#^src/# #&#x27;
echo
echo &#x27;# 그중 하나는 표준 파서의 관대함을 알고 먼저 거</tspan><tspan x="24" dy="22">른다&#x27;
sed -n &#x27;19,21p;32,34p&#x27; src/adapter/inbound/graphql/src/main/java/dev/caskeleton/adapter/inbound/graphql/scalar/Uui</tspan><tspan x="24" dy="22">dScalar.java
echo
echo &#x27;# 문서가 toUuid 의 목적으로 든 컬럼 변환이 실제로 잇는 구간&#x27;
echo -n &#x27;# @JdbcTypeCode(SqlType</tspan><tspan x="24" dy="22">s.UUID) 를 단 프로덕션 파일 : &#x27;
grep -rl &#x27;@JdbcTypeCode(SqlTypes.UUID)&#x27; --include=*.java src --exclude-dir=build | grep </tspan><tspan x="24" dy="22">-c &#x27;/main/&#x27;
echo -n &#x27;# 그 애너테이션 개수 : &#x27;
grep -rn &#x27;@JdbcTypeCode(SqlTypes.UUID)&#x27; --include=*.java src --exclude-d</tspan><tspan x="24" dy="22">ir=build | grep -c &#x27;/main/&#x27;
echo -n &#x27;# 그 애너테이션이 붙은 필드의 타입 : &#x27;
python3 - &lt;&lt;&#x27;PY&#x27;
import collections, pathl</tspan><tspan x="24" dy="22">ib, re
kinds = collections.Counter()
for path in pathlib.Path(&#x27;src&#x27;).rglob(&#x27;*.java&#x27;):
if &#x27;build&#x27; in path.parts or &#x27;/</tspan><tspan x="24" dy="22">main/&#x27; not in str(path):
continue
lines = path.read_text(encoding=&#x27;utf-8&#x27;).splitlines()
for index, line </tspan><tspan x="24" dy="22">in enumerate(lines):
if &#x27;@JdbcTypeCode(SqlTypes.UUID)&#x27; not in line:
continue
for following i</tspan><tspan x="24" dy="22">n lines[index + 1:index + 6]:
found = re.search(r&#x27;(?:private|protected|public)\s+([A-Za-z_][\w.&lt;&gt;]*)\s+\w+\s</tspan><tspan x="24" dy="22">*;&#x27;, following)
if found:
kinds[found.group(1)] += 1
break
print(dict(kinds)</tspan><tspan x="24" dy="22">)
PY
echo
echo &#x27;# 그래서 문자열 구간은 매퍼가 따로 한다&#x27;
grep -n -B2 &#x27;UUID.fromString&#x27; \
src/sample-portfolio/src/m</tspan><tspan x="24" dy="22">ain/java/dev/caskeleton/sample/portfolio/adapter/outbound/persistence/mapper/WorkLogPersistenceMapper.java | head -6
ec</tspan><tspan x="24" dy="22">ho
echo &#x27;# 리프에 의존해도 되는 모듈&#x27;
python3 - &lt;&lt;&#x27;PY&#x27;
import json
d = json.load(open(&#x27;src/config/architecture/modules.j</tspan><tspan x="24" dy="22">son&#x27;))
modules = d[&#x27;modules&#x27;]
allowed = [m[&#x27;id&#x27;] for m in modules
if &#x27;adapter-outbound-identifier&#x27; in m.get(&#x27;</tspan><tspan x="24" dy="22">allowed_dependencies&#x27;, [])]
print(&#x27;# 전체&#x27;, len(modules), &#x27;&#x27;, len(allowed), &#x27;:&#x27;, &#x27;, &#x27;.join(allowed))
PY
echo &#x27;# </tspan><tspan x="24" dy="22">예제 애플리케이션이 코덱을 쓰지 않는 이유를 적어 둔 자리&#x27;
sed -n &#x27;333,335p&#x27; src/sample-portfolio/README.md</tspan></text>
<text x="24" y="530" fill="#8b949e" font-size="13" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">cwd: /shared/codebase/clean-architecture-backend-template</tspan></text>
<text x="24" y="552" fill="#8b949e" font-size="13" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">time: 2026-09-02T09:02:43+00:00 · exit 0</tspan></text>
<line x1="24" y1="566" x2="1176" y2="566" stroke="#30363d"/>
<text x="24" y="606" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># 문자열에서 UUID 를 만드는 리프 밖 프로덕션</tspan></text>
<text x="24" y="628" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># 파일 : 15</tspan></text>
<text x="24" y="650" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># 호출 줄 : 21</tspan></text>
<text x="24" y="672" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> application-core/src/main/java/dev/caskeleton/application/fileserver/api/UploadId.java</tspan></text>
<text x="24" y="694" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> application-core/src/main/java/dev/caskeleton/application/fileserver/api/FileId.java</tspan></text>
<text x="24" y="716" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> messaging/messaging-cloudevents/src/main/java/dev/caskeleton/messaging/cloudevents/DefaultCloudEventMapper.java</tspan></text>
<text x="24" y="738" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> messaging/messaging-rabbit/src/main/java/dev/caskeleton/messaging/rabbit/RabbitDeliveryMapper.java</tspan></text>
<text x="24" y="760" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> messaging/messaging-kafka/src/main/java/dev/caskeleton/messaging/kafka/KafkaDeliveryMapper.java</tspan></text>
<text x="24" y="782" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> sample-portfolio/src/main/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/controller/WorkLogController.java</tspan></text>
<text x="24" y="804" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> sample-portfolio/src/main/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/controller/PosterController.java</tspan></text>
<text x="24" y="826" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> sample-portfolio/src/main/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/controller/LegacyPosterImageController.ja</tspan><tspan x="24" dy="22">va</tspan></text>
<text x="24" y="870" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> sample-portfolio/src/main/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/controller/PosterImagePublicationControll</tspan><tspan x="24" dy="22">er.java</tspan></text>
<text x="24" y="914" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> sample-portfolio/src/main/java/dev/caskeleton/sample/portfolio/adapter/outbound/persistence/mapper/PosterPersistenceMapper.j</tspan><tspan x="24" dy="22">ava</tspan></text>
<text x="24" y="958" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> sample-portfolio/src/main/java/dev/caskeleton/sample/portfolio/adapter/outbound/persistence/mapper/WorkLogPersistenceMapper.</tspan><tspan x="24" dy="22">java</tspan></text>
<text x="24" y="1002" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> adapter/inbound/graphql/src/main/java/dev/caskeleton/adapter/inbound/graphql/scalar/UuidScalar.java</tspan></text>
<text x="24" y="1024" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> adapter/outbound/persistence-mongo/src/main/java/dev/caskeleton/adapter/outbound/mongo/query/pagination/MongoCursorValueCode</tspan><tspan x="24" dy="22">c.java</tspan></text>
<text x="24" y="1068" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/dispatch/JacksonRoutingPla</tspan><tspan x="24" dy="22">nCodec.java</tspan></text>
<text x="24" y="1112" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/postgresql/PostgreSqlIdempotencyC</tspan><tspan x="24" dy="22">laimRepository.java</tspan></text>
<text x="24" y="1156" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"></tspan></text>
<text x="24" y="1178" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># 그중 하나는 표준 파서의 관대함을 알고 먼저 거른다</tspan></text>
<text x="24" y="1200" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> * &lt;p&gt;{@link UUID#fromString} is lenient — it happily accepts {@code &quot;1-1-1-1-1&quot;} — so accepting</tspan></text>
<text x="24" y="1222" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> * whatever it parses would make the wire contract depend on a JDK quirk and let two different</tspan></text>
<text x="24" y="1244" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> * strings denote the same identifier. The canonical form is enforced explicitly instead.</tspan></text>
<text x="24" y="1266" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> Pattern.compile(</tspan></text>
<text x="24" y="1288" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> &quot;[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}&quot;);</tspan></text>
<text x="24" y="1310" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"></tspan></text>
<text x="24" y="1332" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"></tspan></text>
<text x="24" y="1354" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># 문서가 toUuid 의 목적으로 든 컬럼 변환이 실제로 잇는 구간</tspan></text>
<text x="24" y="1376" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># @JdbcTypeCode(SqlTypes.UUID) 를 단 프로덕션 파일 : 23</tspan></text>
<text x="24" y="1398" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># 그 애너테이션 개수 : 38</tspan></text>
<text x="24" y="1420" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># 그 애너테이션이 붙은 필드의 타입 : {&#x27;UUID&#x27;: 38}</tspan></text>
<text x="24" y="1442" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"></tspan></text>
<text x="24" y="1464" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># 그래서 문자열 구간은 매퍼가 따로 한다</tspan></text>
<text x="24" y="1486" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">17- */</tspan></text>
<text x="24" y="1508" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">18- public static UUID toUuid(WorkLogId id) {</tspan></text>
<text x="24" y="1530" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">19: return UUID.fromString(id.value());</tspan></text>
<text x="24" y="1552" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"></tspan></text>
<text x="24" y="1574" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># 리프에 의존해도 되는 모듈</tspan></text>
<text x="24" y="1596" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># 전체 62 중 2 : app-bootstrap, sample-portfolio</tspan></text>
<text x="24" y="1618" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"># 예제 애플리케이션이 코덱을 쓰지 않는 이유를 적어 둔 자리</tspan></text>
<text x="24" y="1640" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">- 36자 canonical UUID 와 PostgreSQL native `uuid`(128비트)를 서로 변환합니다. `UuidCodec` 같은 공용</tspan></text>
<text x="24" y="1662" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> 코덱이 아니라 JDK `java.util.UUID` 를 **직접** 쓰는 이유: 영속 어댑터는 경계 규칙상</tspan></text>
<text x="24" y="1684" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> `adapter-outbound`(코덱이 있는 곳)에 의존하면 안 되기 때문입니다(stdlib 이라 의존 문제 자체가 없음).</tspan></text>
</svg>