Files
document-haness/docs/clean-architecture-backend-template/final/evidence/meta/a14-f011-maxarrayelements-parser.json
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

15 lines
5.2 KiB
JSON

{
"assetKey": "a14-f011-maxarrayelements-parser",
"kind": "terminal",
"command": "set -e\nset -o pipefail\nD=$(mktemp -d); trap 'rm -rf \"$D\"' EXIT\nC=/shared/codebase/clean-architecture-backend-template\nM=$C/src/adapter/inbound/web\nCACHE=/root/.gradle/caches/modules-2/files-2.1\njava -version 2>&1 | grep version\ncp=\"\"\nwhile IFS= read -r line; do\n coord=${line%%=*}; confs=${line#*=}\n case \",$confs,\" in *\",testRuntimeClasspath,\"*) ;; *) continue ;; esac\n g=${coord%%:*}; rest=${coord#*:}; n=${rest%%:*}; v=${rest##*:}\n jar=$(find \"$CACHE/$g/$n/$v\" -name '*.jar' ! -name '*sources*' ! -name '*javadoc*' 2>/dev/null | head -1) || true\n [ -n \"$jar\" ] && cp=\"$cp:$jar\"\ndone < <(grep -E '^[a-zA-Z0-9._-]+:[^=]+=' \"$M/gradle.lockfile\")\nSIB=$(find \"$C/src\" -path '*/build/libs/*+21234e38cdb9*.jar' ! -name '*-testkit.jar' | sort | tr '\\n' ':')\ncat > \"$D/ArrayBudgetProbe.java\" <<'JAVA'\nimport dev.caskeleton.adapter.inbound.web.json.BoundedJsonFactory;\nimport dev.caskeleton.adapter.inbound.web.json.WebJsonProfile;\nimport tools.jackson.core.JsonParser;\nimport tools.jackson.core.JsonToken;\nimport tools.jackson.core.StreamReadConstraints;\nimport tools.jackson.core.json.JsonFactory;\n\n/** 이 저장소가 세운 파서가 넓은 배열을 어디까지 받는지, 파서가 줄 수 있는 상한이 무엇인지 본다. */\npublic final class ArrayBudgetProbe {\n\n /** 원소 n 개짜리 평평한 정수 배열. 깊이는 1 이고 문자열은 없다. */\n private static String flatArray(int n) {\n StringBuilder out = new StringBuilder(n * 2 + 2).append('[');\n for (int i = 0; i < n; i++) {\n if (i > 0) {\n out.append(',');\n }\n out.append('0');\n }\n return out.append(']').toString();\n }\n\n private static long readAll(JsonFactory factory, String json) {\n long tokens = 0;\n try (JsonParser parser = factory.createParser(tools.jackson.core.ObjectReadContext.empty(), json)) {\n while (parser.nextToken() != null) {\n tokens++;\n }\n }\n return tokens;\n }\n\n public static void main(String[] args) {\n WebJsonProfile strict = WebJsonProfile.strict();\n System.out.println();\n System.out.println(\"[엄격 프로파일이 선언한 세 상한]\");\n System.out.printf(\" %-22s %d%n\", \"maxDepth\", strict.maxDepth());\n System.out.printf(\" %-22s %d%n\", \"maxArrayElements\", strict.maxArrayElements());\n System.out.printf(\" %-22s %d%n\", \"maxStringBytes\", strict.maxStringBytes());\n\n JsonFactory factory = BoundedJsonFactory.create(strict);\n StreamReadConstraints set = factory.streamReadConstraints();\n System.out.println();\n System.out.println(\"[유계 팩토리가 파서에 실제로 건 값]\");\n System.out.printf(\" %-22s %d%n\", \"maxNestingDepth\", set.getMaxNestingDepth());\n System.out.printf(\" %-22s %d%n\", \"maxStringLength\", set.getMaxStringLength());\n System.out.printf(\" %-22s %d%n\", \"maxNameLength\", set.getMaxNameLength());\n System.out.printf(\" %-22s %d%n\", \"maxNumberLength\", set.getMaxNumberLength());\n System.out.printf(\" %-22s %s%n\", \"maxDocumentLength\",\n set.hasMaxDocumentLength() ? String.valueOf(set.getMaxDocumentLength()) : \"걸지 않음\");\n System.out.printf(\" %-22s %s%n\", \"maxTokenCount\",\n set.hasMaxTokenCount() ? String.valueOf(set.getMaxTokenCount()) : \"걸지 않음\");\n\n int elements = 2_000_000;\n System.out.println();\n System.out.printf(\"[원소 %,d 개짜리 평평한 배열을 그 팩토리에 넣는다]%n\", elements);\n String json = flatArray(elements);\n System.out.printf(\" %-22s %,d%n\", \"본문 바이트\", json.length());\n System.out.printf(\" %-22s %,d%n\", \"읽어 낸 토큰 수\", readAll(factory, json));\n System.out.println(\" 결과 끝까지 읽음\");\n\n System.out.println();\n System.out.println(\"[같은 본문을 토큰 수 상한만 건 파서에 넣는다]\");\n JsonFactory bounded = JsonFactory.builder()\n .streamReadConstraints(StreamReadConstraints.builder().maxTokenCount(1_000_000).build())\n .build();\n try {\n readAll(bounded, json);\n System.out.println(\" 결과 끝까지 읽음\");\n } catch (RuntimeException failure) {\n String message = failure.getMessage();\n int cut = message.indexOf('\\n');\n System.out.println(\" 결과 \" + (cut < 0 ? message : message.substring(0, cut)));\n }\n }\n}\nJAVA\njavac -encoding UTF-8 -cp \"$SIB$cp\" -d \"$D/out\" \"$D/ArrayBudgetProbe.java\" 2>&1 | grep -v '^$' || true\njava -Xmx1g -Dstdout.encoding=UTF-8 -cp \"$D/out:$SIB$cp\" ArrayBudgetProbe\n",
"cwd": "/shared/codebase/clean-architecture-backend-template/src",
"exitCode": 0,
"executedAt": "2026-09-03T01:52:46+00:00",
"sourceRevision": "21234e38cdb9a926cbc92bb97a2aee2e4a7d2916",
"raw": "evidence/raw/a14-f011-maxarrayelements-parser.txt",
"svg": "evidence/rendered/a14-f011-maxarrayelements-parser.svg",
"rawSha256": "81e78df33132487f5d2213ec78881e72445747ea578082a1066374718e55e701",
"lines": 22,
"redaction": "none — 값은 저장소와 이 프로브가 만든 것이다"
}