From fc3cad7dccdba2e712aa449882522ff74d11d454 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Sat, 7 Nov 2026 15:04:07 +0900 Subject: [PATCH] =?UTF-8?q?ci(docs):=20=EC=B0=B8=EC=A1=B0=20=EA=B2=80?= =?UTF-8?q?=EC=82=AC=EA=B0=80=20=EB=A3=A8=ED=8A=B8=20compose=20=ED=8F=B4?= =?UTF-8?q?=EB=8D=94=20=EA=B2=BD=EB=A1=9C=EB=8F=84=20=EB=B3=B8=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 문제: 구조 정리로 저장소 루트에 `compose/`(개발 compose의 보조 파일)가 생겼다. 참조 검사는 `src/`, `docs/`, `scripts/`, `infra/`, `.github/`로 시작하는 인라인 코드만 본다. 그래서 살아 있는 문서가 가리키는 `compose/redis/acl/README.md` 같은 경로는 파일이 옮겨지거나 지워져도 걸리지 않는다. 지금 살아 있는 문서 여덟 개가 `compose/` 경로를 쓴다. 고친 방법: PATH_ROOTS에 `compose/`를 더한다. 정본 design-docs `conventions/docs-system.md` K3는 「repo 경로」 전체를 말하고 접두사 목록을 정하지 않으므로 규칙 변경이 아니라 새 루트 폴더를 적용한 것이다. 지운 `infra/`는 남겨 둔다(다시 쓰이면 낡은 참조로 걸린다). 루트 파일 (`compose.yaml` 등)은 지금처럼 보지 않는다. 위험·한계: 새로 걸린 참조는 없다(지금 트리의 `compose/` 참조는 모두 있다). 검증: 새 시험 `test_a_missing_path_under_the_root_compose_folder_fails`가 고치기 전 실패(RED: 오류 목록이 비어 있음), 고친 뒤 43개 모두 통과. check-docs.py rc=0(참조 걸림 7·예외 7). --- docs/README.md | 2 +- scripts/check-docs.py | 9 +++++---- scripts/tests/test_check_docs.py | 3 +++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/README.md b/docs/README.md index 49f135dd..54351e62 100644 --- a/docs/README.md +++ b/docs/README.md @@ -130,7 +130,7 @@ | --- | --- | | `language` | 살아 있는 문서와 ADR 본문이 한국어인가(코드·명령·경로·인용은 세지 않는다) | | `head` | 기록과 ADR 맨 위의 머리 블록: 칸, 상태 어휘, 날짜, 한국어 요약, 현재 정본·대체됨 경로가 있는지 | -| `reference` | 살아 있는 문서의 인라인 코드 안 경로(`src/`, `docs/`, `scripts/`, `.github/`로 시작하는 것과 지운 infra 폴더 아래 경로)와 Gradle 경로가 지금 트리·registry에 있는가. 코드 블록, `> 이력` 인용 블록, 제거 표, `upgrade/`는 보지 않는다 | +| `reference` | 살아 있는 문서의 인라인 코드 안 경로(`src/`, `docs/`, `scripts/`, `compose/`, `.github/`로 시작하는 것과 지운 infra 폴더 아래 경로)와 Gradle 경로가 지금 트리·registry에 있는가. 코드 블록, `> 이력` 인용 블록, 제거 표, `upgrade/`는 보지 않는다 | | `number` | 살아 있는 문서가 Spring Boot 버전이나 leaf 개수를 복사했는가 | - 하나만 돌리기: `python3 scripts/check-docs.py --only head`. diff --git a/scripts/check-docs.py b/scripts/check-docs.py index 6e503e53..3e482356 100755 --- a/scripts/check-docs.py +++ b/scripts/check-docs.py @@ -10,9 +10,10 @@ head 기록(docs/design, docs/history, docs/adr, docs/notification/adr)의 .md는 맨 위에 머리 블록이 있다. 상태는 종류별 고정 어휘, 작성일은 날짜, 요약은 한국어, 현재 정본과 대체됨이 가리키는 경로는 지금 있다. - reference 살아 있는 문서의 인라인 코드 안 repo 경로(src/, docs/, scripts/, infra/, .github/로 - 시작)와 Gradle 경로(:a:b)가 지금 트리와 registry에 있다. 코드 블록과 「이력」으로 - 시작하는 인용 블록은 건너뛴다. 마크다운 링크는 lychee와 check-work-docs.py --links가 본다. + reference 살아 있는 문서의 인라인 코드 안 repo 경로(src/, docs/, scripts/, compose/, .github/로 + 시작. 2026-11-07에 지운 infra/ 아래 경로도 본다)와 Gradle 경로(:a:b)가 지금 트리와 + registry에 있다. 코드 블록과 「이력」으로 시작하는 인용 블록은 건너뛴다. 마크다운 + 링크는 lychee와 check-work-docs.py --links가 본다. number 살아 있는 문서가 정본이 정하는 숫자를 복사하지 않는다: Spring Boot 버전, leaf 개수. 예외 목록(scripts/check-docs-exceptions.txt)은 줄기만 한다. @@ -142,7 +143,7 @@ TOKEN = re.compile(r"[^\s가-힣]+") WORD = re.compile(r"^[(\[\"'“‘*_]*[A-Za-z][a-z]*(?:['’][a-z]+)?(?:-[a-z]+)*[)\]\"'”’*_.,;:!?…]*$") # --- 참조 -PATH_ROOTS = ("src/", "docs/", "scripts/", "infra/", ".github/") +PATH_ROOTS = ("src/", "docs/", "scripts/", "compose/", "infra/", ".github/") PLACEHOLDER = re.compile(r"[*?<>{}\[\]$…]|\.\.\.|YYYY|NNN|[가-힣]") LINE_SUFFIX = re.compile(r"(?::\d+(?:[-,]\d+)*)+$") # 모든 leaf에 있는 소스 세트 이름(src/test, src/main/java)은 어느 leaf의 것인지 문장이 정한다. diff --git a/scripts/tests/test_check_docs.py b/scripts/tests/test_check_docs.py index 1f9702f4..64ebe46e 100644 --- a/scripts/tests/test_check_docs.py +++ b/scripts/tests/test_check_docs.py @@ -191,6 +191,9 @@ class ReferenceTest(RepositoryTestCase): def test_an_existing_path_with_a_line_number_passes(self) -> None: self.assertEqual(self.errors_for("`docs/live.md:12`를 읽는다.\n"), []) + def test_a_missing_path_under_the_root_compose_folder_fails(self) -> None: + self.assertFailsWith(self.errors_for("`compose/gone/README.md`를 읽는다.\n"), "없는 경로다: compose/gone/README.md") + def test_a_path_inside_a_command_is_checked(self) -> None: self.assertFailsWith(self.errors_for("`python3 scripts/gone.py --all`을 돌린다.\n"), "scripts/gone.py")