Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/retention-and-unbounded-growth/reference/reference-a-fake-that-cannot-show-the-property-is-not-a-witness.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.7 KiB

kind, slug, title, topic, project, status, sourceRevision, rootTreeNode, verifiedOn
kind slug title topic project status sourceRevision rootTreeNode verifiedOn
REFERENCE a-fake-that-cannot-show-the-property-is-not-a-witness 그 속성을 보일 수 없는 대역 위에서 통과한 테스트는 증인이 아니다 retention-and-unbounded-growth clean-architecture-backend-template 게시 전 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 reference:a-fake-that-cannot-show-the-property-is-not-a-witness

그 속성을 보일 수 없는 대역 위에서 통과한 테스트는 증인이 아니다

목적

테스트 대역이 실제 구현의 불변식을 재현하지 못하면 그 위에서 통과한 단언은 그 불변식에 대해 아무 말도 하지 않는다.

규칙

  1. 단언하는 속성이 협력자의 상태 변화에 달려 있는지 본다 달려 있지 않으면 이 규칙은 해당하지 않는다.

  2. 대역이 결함 있는 구현과 올바른 구현을 구분할 수 있는지 묻는다 구분하지 못하면 그 테스트는 회귀를 잡지 못한다.

  3. 대역이 흉내 내는 불변식을 문장으로 쓴다 쓸 수 없으면 대역이 무엇을 재현하는지 저자도 모르는 상태다.

  4. 이름이 속성을 주장하면 대역을 먼저 읽는다 이름이 강할수록 그 공백이 눈에 띄지 않는다.

적용 조건

저장소, 브로커, 파일 시스템처럼 상태를 갖는 협력자의 인메모리 대역 전부.

예외

협력자의 존재만 필요한 테스트에는 해당하지 않는다. 호출이 일어났는지만 확인하는 경우가 그렇다.

예시

배치 제한 정리 대역이 무제한 결과와 제한값 중 작은 쪽을 돌려준다. 전부 지우고 숫자만 깎으므로 두 형태의 차이를 보일 수 없다.

리드라이브 대역의 정착 메서드가 정착 목록에 추가만 하고 준비 목록을 줄이지 않는다. 실제 불변식은 정착된 것이 다음 조회에서 사라지는 것이고, 재개 지점 계산이 정확히 그 성질에 달려 있다.

청구 대역의 저장 메서드가 삽입을 흉내 내서, 실제 구현이 갱신으로 동작한다는 차이를 가린다.

관계

  • cleanup 이 스스로 막겠다고 적은 장애를 일으키는 형태로 호출된다 이 규칙이 회귀 테스트를 막는 사례다.
  • 재개된 리드라이브가 옮기지 못한 메시지를 건너뛰고 성공으로 닫힌다 대역이 불변식을 재현하지 못해 결함이 오래 남은 사례다.
  • 배정 식별자 때문에 insert-first 청구가 UPSERT 가 되어 커밋된 결과를 덮었다 같은 형태의 세 번째 사례다.