docs(clean-architecture-backend-template): 제1부가 채택한 것만 글감으로 남기고 다시 고른다
글감 1,001개 중 제1부(§3~§11) 앵커를 하나라도 가진 것은 112개뿐이었다. 나머지 889개는
제2부 모듈 분석 65편의 절 제목에서 나온 것이고, 그것이 재판정이 필요했던 이유다.
주제 44 → 16 (43개가 독자 질문 없이 있었다. 지금은 전부 있다)
글감 1,001 → 123 (제1부 앵커 112 + 제1부가 채택했는데 비어 있던 자리 11)
후보 965 → 1,088 · PENDING 905 → 0
error 3,042 → 0
내려온 889개는 후보 대장에 KEEP_IN_SSOT 로 남는다 — 버린 것이 아니라 분석에 남기고 독립
기록으로 만들지 않기로 한 것이다. 그 글감을 받치던 기록 파일 828개는 지웠다. 계약이 정본이고,
파일이 남아 있다는 이유로 계약에서 뺀 주제가 되살아나면 안 된다. 이력에는 그대로 있다 —
git checkout a0ca2bb -- <경로>.
제1부가 채택했는데 글감이 없던 자리 열하나를 채웠다: mongo high-water mark 가 재전달 이벤트를
삼킨 P1, admin plane 이 가드만 켜고 서비스는 켜지 않은 것과 그 짝인 결정, 실패 어휘 세 층과
SQLState 매트릭스 병합 규칙, 부하 아래에서만 새는 admission 경계, 발행 증거와 완료 판정의
분리, keyset·JSONB 결정 둘.
Concept 17개에 basis-version 을 채우고, 계약 제목과 기록 제목이 갈라져 있던 23건을 기록 쪽에
맞췄다. candidateScope 에 excludedAnchorPattern 을 적어 제2부 앵커만 가진 글감이 다시 올라올
수 없게 한다.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
a0ca2bb72a
commit
1f04117bbf
@@ -109,7 +109,8 @@ class Fixture:
|
||||
def read(self) -> dict:
|
||||
return json.load(open(self.index_path, encoding="utf-8"))
|
||||
|
||||
def diagram(self, name: str, *, bundled: bool = True, with_source: bool = True) -> None:
|
||||
def diagram(self, name: str, *, bundled: bool = True, with_source: bool = True,
|
||||
cited: bool = False) -> None:
|
||||
assets = os.path.join(self.base, "final/assets")
|
||||
target = os.path.join(assets, name) if bundled else assets
|
||||
os.makedirs(target, exist_ok=True)
|
||||
@@ -118,6 +119,19 @@ class Fixture:
|
||||
src = os.path.join(self.base, "final/.techviz", name)
|
||||
os.makedirs(src, exist_ok=True)
|
||||
open(os.path.join(src, "spec.json"), "w", encoding="utf-8").write("{}")
|
||||
if cited:
|
||||
self.cite(name)
|
||||
|
||||
def cite(self, name: str) -> None:
|
||||
"""그림을 Studio 자리로 복사하고 기록이 그것을 가리키게 한다 — 실제 작업 순서다."""
|
||||
studio_assets = os.path.join(self.base, "final/assets/tech-log-studio")
|
||||
os.makedirs(studio_assets, exist_ok=True)
|
||||
open(os.path.join(studio_assets, f"{name}.svg"), "w", encoding="utf-8").write("<svg/>")
|
||||
record = os.path.join(self.studio, "session-custody/case/case-session-split.md")
|
||||
open(record, "w", encoding="utf-8").write(RECORD.replace(
|
||||
"status: 게시 전\n",
|
||||
f"status: 게시 전\nassets:\n - key: {name}\n"
|
||||
f" file: ../../../final/assets/tech-log-studio/{name}.svg\n"))
|
||||
|
||||
def __enter__(self):
|
||||
self._saved = (verifier.ROOT, builder.ROOT, layout.ROOT)
|
||||
@@ -293,6 +307,36 @@ class ContractTest(unittest.TestCase):
|
||||
self.assertIn("slug 가 두 글감에 있다", verifier.verify("fixture").errors)
|
||||
|
||||
|
||||
class SsotAssetTest(unittest.TestCase):
|
||||
"""SSOT 가 이미 그린 그림을 글감에 배정하고, 기록이 그것을 쓰는지 본다."""
|
||||
|
||||
def _verify(self, fx):
|
||||
with contextlib.redirect_stdout(io.StringIO()):
|
||||
builder.main(["build", "fixture"])
|
||||
return verifier.verify("fixture")
|
||||
|
||||
def test_assigned_diagram_the_record_uses_is_clean(self):
|
||||
with Fixture(mutate(**{"ssot-assets": ["session-custody-map"]})) as fx:
|
||||
fx.diagram("session-custody-map", cited=True)
|
||||
self.assertEqual(self._verify(fx).errors, {})
|
||||
|
||||
def test_assigned_diagram_the_record_never_uses_is_an_error(self):
|
||||
with Fixture(mutate(**{"ssot-assets": ["session-custody-map"]})) as fx:
|
||||
fx.diagram("session-custody-map")
|
||||
self.assertIn("배정한 SSOT 그림을 기록이 쓰지 않는다", self._verify(fx).errors)
|
||||
|
||||
def test_assigned_diagram_that_does_not_exist_is_an_error(self):
|
||||
with Fixture(mutate(**{"ssot-assets": ["never-drawn"]})) as fx:
|
||||
self.assertIn("배정한 SSOT 그림이 final/assets 에 없다", self._verify(fx).errors)
|
||||
|
||||
def test_assigned_evidence_the_record_never_cites_is_an_error(self):
|
||||
with Fixture(mutate(**{"ssot-evidence": ["raw/explain/plan-a.txt"]})) as fx:
|
||||
raw = os.path.join(fx.base, "final/evidence/raw/explain")
|
||||
os.makedirs(raw)
|
||||
open(os.path.join(raw, "plan-a.txt"), "w", encoding="utf-8").write("EXPLAIN\n")
|
||||
self.assertIn("배정한 SSOT 증거를 기록이 쓰지 않는다", self._verify(fx).errors)
|
||||
|
||||
|
||||
class BuildTest(unittest.TestCase):
|
||||
def test_derived_fields_come_from_the_record_file(self):
|
||||
with Fixture():
|
||||
@@ -330,11 +374,23 @@ class BuildTest(unittest.TestCase):
|
||||
class LayoutTest(unittest.TestCase):
|
||||
def test_a_diagram_with_its_source_is_clean(self):
|
||||
with Fixture() as fx:
|
||||
fx.diagram("session-custody-map")
|
||||
fx.diagram("session-custody-map", cited=True)
|
||||
report = layout.verify("fixture")
|
||||
self.assertEqual(report.errors, {}, report.errors)
|
||||
self.assertEqual(report.warns, {}, report.warns)
|
||||
|
||||
def test_ssot_diagram_no_record_cites_is_counted(self):
|
||||
# 배정하지 않은 그림은 글을 쓸 때 새로 그리게 된다. keycloak 이 그렇게 됐다
|
||||
with Fixture() as fx:
|
||||
fx.diagram("session-custody-map")
|
||||
self.assertIn("기록이 쓰지 않는 SSOT 그림", layout.verify("fixture").warns)
|
||||
|
||||
def test_a_project_with_no_record_yet_is_not_counted(self):
|
||||
# 아직 안 쓴 것이지 안 쓰기로 한 것이 아니다
|
||||
with Fixture(with_record=False) as fx:
|
||||
fx.diagram("session-custody-map")
|
||||
self.assertNotIn("기록이 쓰지 않는 SSOT 그림", layout.verify("fixture").warns)
|
||||
|
||||
def test_svg_without_a_techviz_source_is_counted(self):
|
||||
with Fixture() as fx:
|
||||
fx.diagram("hand-drawn", with_source=False)
|
||||
|
||||
Reference in New Issue
Block a user