Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/retention-and-unbounded-growth/reference/reference-a-port-that-offers-both-forms-has-chosen-the-unsafe-one.md
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

2.5 KiB

kind, slug, title, topic, project, status, sourceRevision, rootTreeNode, verifiedOn
kind slug title topic project status sourceRevision rootTreeNode verifiedOn
REFERENCE a-port-that-offers-both-forms-has-chosen-the-unsafe-one 두 형태를 나란히 내놓는 포트는 이미 안전하지 않은 쪽을 고른 것이다 retention-and-unbounded-growth clean-architecture-backend-template 게시 전 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 reference:a-port-that-offers-both-forms-has-chosen-the-unsafe-one

두 형태를 나란히 내놓는 포트는 이미 안전하지 않은 쪽을 고른 것이다

목적

인터페이스가 만든 기본값을 호출자의 선택으로 오인하지 않는다. 안전하지 않은 형태가 컴파일되면 그것은 언젠가 호출된다.

규칙

  1. 안전하지 않은 쪽을 부르는 것이 컴파일되는지 본다 컴파일되면 그 형태는 기본값이다.

  2. 두 형태를 가르는 표시가 있는지 본다 폐기 표시, 이름 차이, 가시성 차이 중 아무것도 없으면 호출자는 짧은 쪽을 고른다.

  3. 두 형태가 진짜로 다른 용도인지 묻는다 다르면 이름이 그 차이를 말해야 한다. 오버로드로 두는 것은 차이를 이름에서 지우는 선택이다.

  4. 같은 용도라면 하나를 지운다 지울 수 없으면 폐기 표시와 함께 부를 조건을 javadoc 에 적는다.

적용 조건

정리, 삭제, 조회처럼 결과 크기가 데이터 양에 비례하는 모든 연산. 그리고 같은 전이의 두 세대가 공존하는 인터페이스.

예외

두 형태가 서로 다른 호출자 집단을 위한 것이면 공존이 맞다. 그때 판정 기준은 이름이 그 구분을 담고 있는지다.

예시

inbox 와 outbox 포트가 정리 연산의 무제한 형태와 배치 제한 형태를 오버로드로 나란히 선언한다. 두 정리 잡이 무제한 쪽을 부르고, 배치 제한 쪽은 호출 지점이 0이다.

같은 포트에 같은 전이의 두 세대 메서드가 있다. 안전하지 않은 쪽에 폐기 표시가 없다.

관계

  • bounded 와 unbounded 오버로드를 나란히 둔 포트 이 규칙이 나온 구조다.
  • cleanup 이 스스로 막겠다고 적은 장애를 일으키는 형태로 호출된다 이 규칙을 어긴 결과다.
  • 같은 개념의 두 어휘가 공존하면 하나를 죽은 것으로 표시한다 같은 계열의 규칙이고, 이쪽은 어휘가 아니라 시그니처에 대한 것이다.