Files
document-haness/docs/clean-architecture-backend-template/final/evidence/rendered/a13-f005-retry-after-illegalargumentexception-negative.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

144 lines
14 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="1712" viewBox="0 0 1200 1712" 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="1710" 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
set -o pipefail
D=$(mktemp -d); trap &#x27;rm -rf &quot;$D&quot;&#x27; EXIT
C=/shared/codebase/clean-architecture-backend-template
</tspan><tspan x="24" dy="22">N=$C/src/adapter/outbound/notification
CACHE=/root/.gradle/caches/modules-2/files-2.1
java -version 2&gt;&amp;1 | head -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
g=${coord%%:*}; rest=${coord#*:}; n=${rest%%:*}; v=${rest##*:}
jar=$(find &quot;$CACHE/$g/$n/$v&quot; -name &#x27;*.</tspan><tspan x="24" dy="22">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;
done &lt; &lt;(grep -E &#x27;^</tspan><tspan x="24" dy="22">[a-zA-Z0-9._-]+:[^=]+=&#x27; &quot;$N/gradle.lockfile&quot;)
CP=$(find &quot;$N/build/libs&quot; &quot;$C/src/application-core/build/libs&quot; -name &#x27;*+21</tspan><tspan x="24" dy="22">234e38cdb9.jar&#x27; | tr &#x27;\n&#x27; &#x27;:&#x27;)${cp#:}
cat &gt; &quot;$D/RetryAfterProbe.java&quot; &lt;&lt;&#x27;JAVA&#x27;
import dev.caskeleton.adapter.outbound.no</tspan><tspan x="24" dy="22">tification.platform.provider.ProviderResults;
import dev.caskeleton.adapter.outbound.notification.platform.provider.apns</tspan><tspan x="24" dy="22">.ApnsFailureClassifier;
import dev.caskeleton.adapter.outbound.notification.platform.provider.fcm.FcmFailureClassifier;
</tspan><tspan x="24" dy="22">import dev.caskeleton.adapter.outbound.notification.platform.provider.http.NotificationHttpResponse;
import dev.caskelet</tspan><tspan x="24" dy="22">on.adapter.outbound.notification.platform.provider.ses.SesFailureClassifier;
import dev.caskeleton.adapter.outbound.noti</tspan><tspan x="24" dy="22">fication.platform.provider.twilio.TwilioFailureClassifier;
import dev.caskeleton.adapter.outbound.notification.platform.</tspan><tspan x="24" dy="22">provider.webpush.WebPushFailureClassifier;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.</tspan><tspan x="24" dy="22">Method;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.util.List;
import java.util.Map</tspan><tspan x="24" dy="22">;
import java.util.Optional;
import java.util.function.Function;
/** 같은 Retry-After 헤더를 파서 넷과 분류기 다섯에 넣</tspan><tspan x="24" dy="22">고 무엇이 나오는지 잰다. */
public final class RetryAfterProbe {
private static final String[] HEADERS = {&quot;30&quot;, &quot;-30&quot;</tspan><tspan x="24" dy="22">, &quot;0&quot;, &quot;Wed, 21 Oct 2026 07:28:00 GMT&quot;};
private static NotificationHttpResponse throttled(String header) {
retur</tspan><tspan x="24" dy="22">n new NotificationHttpResponse(
429, Map.of(&quot;retry-after&quot;, List.of(header)), &quot;{}&quot;.getBytes(StandardCharsets.UTF_</tspan><tspan x="24" dy="22">8));
}
private static String outcome(java.util.concurrent.Callable&lt;Object&gt; call) {
try {
Object value = c</tspan><tspan x="24" dy="22">all.call();
if (value instanceof Optional&lt;?&gt; parsed) {
return parsed.map(Object::toString).orElse(&quot;빈 값&quot;)</tspan><tspan x="24" dy="22">;
}
return String.valueOf(value);
} catch (Exception thrown) {
Throwable failure = thrown instance</tspan><tspan x="24" dy="22">of InvocationTargetException wrapped ? wrapped.getCause() : thrown;
return failure.getClass().getSimpleName() + &quot;:</tspan><tspan x="24" dy="22"> &quot; + failure.getMessage();
}
}
private static Method webhookParser() throws Exception {
Class&lt;?&gt; adapter = </tspan><tspan x="24" dy="22">Class.forName(&quot;dev.caskeleton.adapter.outbound.notification.platform&quot;
+ &quot;.provider.webhook.WebhookNotificationPr</tspan><tspan x="24" dy="22">oviderAdapter&quot;);
Method parser = adapter.getDeclaredMethod(&quot;retryAfter&quot;, NotificationHttpResponse.class);
parser</tspan><tspan x="24" dy="22">.setAccessible(true);
return parser;
}
public static void main(String[] args) throws Exception {
Method web</tspan><tspan x="24" dy="22">hook = webhookParser();
FcmFailureClassifier fcm = new FcmFailureClassifier();
System.out.println();
System</tspan><tspan x="24" dy="22">.out.println(&quot;[알림 리프의 파서 셋에 같은 헤더를 넣는다]&quot;);
for (String header : HEADERS) {
System.out.println</tspan><tspan x="24" dy="22">(&quot; retry-after: &quot; + header);
System.out.println(&quot; ProviderResults.retryAfter &quot; + outcome(() -&gt;
</tspan><tspan x="24" dy="22">ProviderResults.retryAfter(Optional.of(header))));
System.out.println(&quot; FcmFailureClassifier.retryAfter &quot; + out</tspan><tspan x="24" dy="22">come(() -&gt;
fcm.retryAfter(Optional.of(header))));
System.out.println(&quot; Webhook 어댑터의 것 </tspan><tspan x="24" dy="22"> &quot; + outcome(() -&gt;
webhook.invoke(null, throttled(header))));
}
System.out.println();
System.out</tspan><tspan x="24" dy="22">.println(&quot;[헤더가 -30 인 429 응답을 분류기 넷에 넣는다]&quot;);
NotificationHttpResponse negative = throttled(&quot;-30&quot;);
</tspan><tspan x="24" dy="22"> record Case(String name, Function&lt;NotificationHttpResponse, Object&gt; run) {}
List&lt;Case&gt; cases = List.of(
new</tspan><tspan x="24" dy="22"> Case(&quot;SesFailureClassifier&quot;, r -&gt; new SesFailureClassifier().classify(r)),
new Case(&quot;TwilioFailureClassifier&quot;, </tspan><tspan x="24" dy="22">r -&gt; new TwilioFailureClassifier().classify(r)),
new Case(&quot;WebPushFailureClassifier&quot;, r -&gt; new WebPushFailureCla</tspan><tspan x="24" dy="22">ssifier().classify(r)),
new Case(&quot;ApnsFailureClassifier&quot;, r -&gt; new ApnsFailureClassifier().classify(r)));
fo</tspan><tspan x="24" dy="22">r (Case one : cases) {
String result = outcome(() -&gt; one.run().apply(negative));
System.out.println(&quot; &quot; + o</tspan><tspan x="24" dy="22">ne.name());
System.out.println(&quot; &quot; + (result.length() &gt; 118 ? result.substring(0, 118) + &quot;&quot; : result));
</tspan><tspan x="24" dy="22">}
}
}
JAVA
javac -encoding UTF-8 -cp &quot;$CP&quot; -d &quot;$D&quot; &quot;$D/RetryAfterProbe.java&quot;
java -Dstdout.encoding=UTF-8 -cp &quot;$CP:$D&quot;</tspan><tspan x="24" dy="22"> RetryAfterProbe
</tspan></text>
<text x="24" y="970" 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</tspan></text>
<text x="24" y="992" 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-02T16:28:48+00:00 · exit 0</tspan></text>
<line x1="24" y1="1006" x2="1176" y2="1006" stroke="#30363d"/>
<text x="24" y="1046" 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="1068" 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="1090" 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="1112" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> retry-after: 30</tspan></text>
<text x="24" y="1134" fill="#e6edf3" font-size="14" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" xml:space="preserve"><tspan x="24" dy="0"> ProviderResults.retryAfter PT30S</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"> FcmFailureClassifier.retryAfter PT30S</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"> Webhook 어댑터의 것 PT30S</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"> retry-after: -30</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"> ProviderResults.retryAfter PT-30S</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"> FcmFailureClassifier.retryAfter PT-30S</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"> Webhook 어댑터의 것 빈 값</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"> retry-after: 0</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"> ProviderResults.retryAfter PT0S</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"> FcmFailureClassifier.retryAfter PT0S</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"> Webhook 어댑터의 것 빈 값</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"> retry-after: Wed, 21 Oct 2026 07:28:00 GMT</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"> ProviderResults.retryAfter 빈 값</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"> FcmFailureClassifier.retryAfter 빈 값</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"> Webhook 어댑터의 것 빈 값</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">[헤더가 -30 인 429 응답을 분류기 넷에 넣는다]</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"> SesFailureClassifier</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"> IllegalArgumentException: retryAfter</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"> TwilioFailureClassifier</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"> IllegalArgumentException: retryAfter</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"> WebPushFailureClassifier</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"> IllegalArgumentException: retryAfter</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"> ApnsFailureClassifier</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"> ProviderFailure[code=PROVIDER_THROTTLED, category=THROTTLED, retryable=true, retryAfter=Optional.empty, nativeCode=Opt …</tspan></text>
</svg>