Files
document-haness/docs/clean-architecture-backend-template/final/evidence/rendered/a11-f004-number-bytes.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

178 lines
17 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="1976" viewBox="0 0 1200 1976" 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="1974" 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">$ set -e
D=$(mktemp -d); trap &#x27;rm -rf &quot;$D&quot;&#x27; EXIT
H=/shared/codebase/clean-architecture-backend-template/src/adapter/outb</tspan><tspan x="24" dy="22">ound/httpclient
JAR=$H/build/libs/httpclient-0.0.1+21234e38cdb9.jar
CACHE=/root/.gradle/caches/modules-2/files-2.1
cp=&quot;&quot;</tspan><tspan x="24" dy="22">
while IFS= read -r line; do
coord=${line%%=*}; confs=${line#*=}
case &quot;,$confs,&quot; in *&quot;,runtimeClasspath,&quot;*) ;; *) co</tspan><tspan x="24" dy="22">ntinue ;; esac
group=${coord%%:*}; rest=${coord#*:}; name=${rest%%:*}; ver=${rest##*:}
jar=$(find &quot;$CACHE/$group/$na</tspan><tspan x="24" dy="22">me/$ver&quot; -name &#x27;*.jar&#x27; ! -name &#x27;*sources*&#x27; ! -name &#x27;*javadoc*&#x27; 2&gt;/dev/null | head -1)
[ -n &quot;$jar&quot; ] &amp;&amp; cp=&quot;$cp:$jar&quot;
d</tspan><tspan x="24" dy="22">one &lt; &lt;(grep -E &#x27;^[a-zA-Z0-9._-]+:[^=]+=&#x27; &quot;$H/gradle.lockfile&quot;)
CP=&quot;$JAR${cp}&quot;
java -version 2&gt;&amp;1 | head -1
cat &gt; &quot;$D/Re</tspan><tspan x="24" dy="22">playabilityProbe.java&quot; &lt;&lt;&#x27;JAVA&#x27;
import dev.caskeleton.adapter.outbound.httpclient.api.body.ObjectBody;
import java.io.By</tspan><tspan x="24" dy="22">teArrayOutputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.co</tspan><tspan x="24" dy="22">ncurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.DoubleA</tspan><tspan x="24" dy="22">ccumulator;
import java.util.concurrent.atomic.DoubleAdder;
import java.util.concurrent.atomic.LongAccumulator;
import j</tspan><tspan x="24" dy="22">ava.util.concurrent.atomic.LongAdder;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpO</tspan><tspan x="24" dy="22">utputMessage;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;</tspan><tspan x="24" dy="22">
import org.springframework.http.converter.json.JacksonJsonHttpMessageConverter;
import org.springframework.web.client.R</tspan><tspan x="24" dy="22">estClient;
public final class ReplayabilityProbe {
/** A DTO of the shape the platform is built around, with a count</tspan><tspan x="24" dy="22">er in it. */
public record Order(String id, AtomicInteger attempt) {}
public record Basket(String id, List&lt;String&gt; </tspan><tspan x="24" dy="22">lines) {}
private static final JacksonJsonHttpMessageConverter JSON =
new JacksonJsonHttpMessageConverter();
</tspan><tspan x="24" dy="22"> private static String verdict(Object value) {
return ObjectBody.json(value).replayability().toString();
}
/** </tspan><tspan x="24" dy="22">Encodes through the converter a default RestClient uses for a JSON body. */
private static byte[] encode(Object value)</tspan><tspan x="24" dy="22"> throws Exception {
ByteArrayOutputStream sink = new ByteArrayOutputStream();
JSON.write(
value,
</tspan><tspan x="24" dy="22"> MediaType.APPLICATION_JSON,
new HttpOutputMessage() {
@Override
public OutputStream getBody</tspan><tspan x="24" dy="22">() {
return sink;
}
@Override
public HttpHeaders getHeaders() {
r</tspan><tspan x="24" dy="22">eturn new HttpHeaders();
}
});
return sink.toByteArray();
}
public static void main(String[] </tspan><tspan x="24" dy="22">args) throws Exception {
System.out.println(&quot;[요청 본문을 인코딩하는 변환기] RestClient 기본 목록&quot;);
RestClient.</tspan><tspan x="24" dy="22">create()
.mutate()
.messageConverters(
converters -&gt;
converters.stream()
</tspan><tspan x="24" dy="22"> .filter(c -&gt; c.canWrite(Order.class, MediaType.APPLICATION_JSON))
.forEach(c -&gt; Sys</tspan><tspan x="24" dy="22">tem.out.println(&quot; &quot; + c.getClass().getName())));
System.out.println();
System.out.println(&quot;[java.util.concurre</tspan><tspan x="24" dy="22">nt.atomic 의 Number 하위 타입]&quot;);
Object[] mutables = {
new AtomicInteger(1), new AtomicLong(1L), new LongAdde</tspan><tspan x="24" dy="22">r(), new DoubleAdder(),
new LongAccumulator(Long::sum, 0L), new DoubleAccumulator(Double::sum, 0d),
};
for</tspan><tspan x="24" dy="22"> (Object mutable : mutables) {
System.out.printf(
&quot; %-20s Number 상속 %-5s 판정 %s%n&quot;,
mutab</tspan><tspan x="24" dy="22">le.getClass().getSimpleName(), mutable instanceof Number, verdict(mutable));
}
System.out.println();
System</tspan><tspan x="24" dy="22">.out.println(&quot;[상자 원시형과 원자 계열 사이에 남는 둘]&quot;);
java.math.BigInteger bigInteger = new java.math.BigInteger</tspan><tspan x="24" dy="22">(&quot;7&quot;);
java.math.BigDecimal bigDecimal = new java.math.BigDecimal(&quot;7.5&quot;);
bigInteger.add(java.math.BigInteger.ON</tspan><tspan x="24" dy="22">E);
bigDecimal.add(java.math.BigDecimal.ONE);
System.out.println(&quot; BigInteger add 뒤 자기 값 &quot; + bigInteger + </tspan><tspan x="24" dy="22">&quot; 판정 &quot; + verdict(bigInteger));
System.out.println(&quot; BigDecimal add 뒤 자기 값 &quot; + bigDecimal + &quot; 판정 &quot; + verd</tspan><tspan x="24" dy="22">ict(bigDecimal));
AtomicInteger counter = new AtomicInteger(7);
counter.incrementAndGet();
System.out.printl</tspan><tspan x="24" dy="22">n(&quot; AtomicInteger increment 뒤 자기 값 &quot; + counter
+ &quot; 판정 &quot; + verdict(counter));
System.out.println();
</tspan><tspan x="24" dy="22">
System.out.println(&quot;[성분에 카운터를 둔 record]&quot;);
Order order = new Order(&quot;A-1&quot;, new AtomicInteger(1));
Ob</tspan><tspan x="24" dy="22">jectBody body = ObjectBody.json(order);
byte[] first = encode(body.value());
System.out.println(&quot; 판정 :</tspan><tspan x="24" dy="22"> &quot; + body.replayability());
System.out.println(&quot; 첫 인코딩 : &quot; + new String(first));
order.attempt().increme</tspan><tspan x="24" dy="22">ntAndGet();
byte[] second = encode(body.value());
System.out.println(&quot; 다시 인코딩 : &quot; + new String(second));
</tspan><tspan x="24" dy="22"> System.out.println(&quot; 판정(그대로) : &quot; + body.replayability());
System.out.println(&quot; 같은 바이트인가 : &quot; + java</tspan><tspan x="24" dy="22">.util.Arrays.equals(first, second));
System.out.println();
System.out.println(&quot;[검사가 잡는 쪽]&quot;);
List&lt;Str</tspan><tspan x="24" dy="22">ing&gt; held = new ArrayList&lt;&gt;(List.of(&quot;a&quot;));
System.out.println(&quot; ArrayList 자체 판정 &quot; + verdict(held));
</tspan><tspan x="24" dy="22"> System.out.println(&quot; ArrayList 를 감싼 record 판정 &quot; + verdict(new Basket(&quot;B-1&quot;, held)));
System.out.println(&quot;</tspan><tspan x="24" dy="22"> List.of 를 감싼 record 판정 &quot; + verdict(new Basket(&quot;B-2&quot;, List.of(&quot;a&quot;))));
}
}
JAVA
javac -encoding UTF-8 -cp &quot;$C</tspan><tspan x="24" dy="22">P&quot; -d &quot;$D&quot; &quot;$D/ReplayabilityProbe.java&quot;
java -Dstdout.encoding=UTF-8 -cp &quot;$CP:$D&quot; ReplayabilityProbe
</tspan></text>
<text x="24" y="1080" 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/src/adapter/outbound/httpclient</tspan></text>
<text x="24" y="1102" 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-02T13:29:59+00:00 · exit 0</tspan></text>
<line x1="24" y1="1116" x2="1176" y2="1116" stroke="#30363d"/>
<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">openjdk version &quot;21.0.12&quot; 2026-07-21</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">[요청 본문을 인코딩하는 변환기] RestClient 기본 목록</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"> org.springframework.http.converter.json.JacksonJsonHttpMessageConverter</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"></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">[java.util.concurrent.atomic 의 Number 하위 타입]</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"> AtomicInteger Number 상속 true 판정 REPLAYABLE</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"> AtomicLong Number 상속 true 판정 REPLAYABLE</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"> LongAdder Number 상속 true 판정 REPLAYABLE</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"> DoubleAdder Number 상속 true 판정 REPLAYABLE</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"> LongAccumulator Number 상속 true 판정 REPLAYABLE</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"> DoubleAccumulator Number 상속 true 판정 REPLAYABLE</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"></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">[상자 원시형과 원자 계열 사이에 남는 둘]</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"> BigInteger add 뒤 자기 값 7 판정 REPLAYABLE</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"> BigDecimal add 뒤 자기 값 7.5 판정 REPLAYABLE</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"> AtomicInteger increment 뒤 자기 값 8 판정 REPLAYABLE</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"></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">[성분에 카운터를 둔 record]</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"> 판정 : REPLAYABLE</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"> 첫 인코딩 : {&quot;id&quot;:&quot;A-1&quot;,&quot;attempt&quot;:1}</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"> 다시 인코딩 : {&quot;id&quot;:&quot;A-1&quot;,&quot;attempt&quot;:2}</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"> 판정(그대로) : REPLAYABLE</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"> 같은 바이트인가 : false</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"></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">[검사가 잡는 쪽]</tspan></text>
<text x="24" y="1706" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> ArrayList 자체 판정 ONE_SHOT</tspan></text>
<text x="24" y="1728" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> ArrayList 를 감싼 record 판정 ONE_SHOT</tspan></text>
<text x="24" y="1750" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> List.of 를 감싼 record 판정 REPLAYABLE</tspan></text>
<text x="24" y="1772" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">/tmp/tmp.Innso2FbOh/ReplayabilityProbe.java:57: warning: [removal] messageConverters(Consumer&lt;List&lt;HttpMessageConverter&lt;?&gt;&gt;&gt;) in</tspan><tspan x="24" dy="22"> Builder has been deprecated and marked for removal</tspan></text>
<text x="24" y="1816" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> .messageConverters(</tspan></text>
<text x="24" y="1838" 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="1860" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">1 warning</tspan></text>
<text x="24" y="1882" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">SLF4J(W): No SLF4J providers were found.</tspan></text>
<text x="24" y="1904" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">SLF4J(W): Defaulting to no-operation (NOP) logger implementation</tspan></text>
<text x="24" y="1926" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0">SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.</tspan></text>
</svg>