From a0166b164fb17a81fe88bac1b8dedd4d78921c3e Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Thu, 19 Nov 2026 18:28:01 +0900 Subject: [PATCH 1/2] =?UTF-8?q?docs(ledger):=20be-ci-next=20=EC=B0=A9?= =?UTF-8?q?=EC=88=98=20=EC=98=88=EC=B8=A1=EC=9D=84=20=EB=82=A8=EA=B8=B4?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 백엔드 CI 후속 셋(links 외부 시간 초과, API surface 빈 root, BE-1·BE-4)을 시작하며 docs/work/README.md 6절대로 예측 한 줄을 더한다. 실측 줄은 일이 끝날 때 더한다. 검증: ledger.py append가 칸을 검사했다. scripts/verify.sh docs rc=0(노트북). --- docs/ledger/estimates.jsonl | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ledger/estimates.jsonl b/docs/ledger/estimates.jsonl index d7953d81..fcc0be15 100644 --- a/docs/ledger/estimates.jsonl +++ b/docs/ledger/estimates.jsonl @@ -18,3 +18,4 @@ {"schema": 1, "kind": "estimate", "task": "r9-group-b", "transcript": "0ef672ab-db3e-427a-9f53-b2e918462534", "started_at": "2026-11-13T07:00:00+09:00", "base": "d3a90479", "task_kind": "improve", "size": "large", "minutes": {"p30": 190, "p50": 286, "p80": 424}, "calls": {"p30": 378, "p50": 567, "p80": 819}, "output_tokens": {"p30": 348000, "p50": 522000, "p80": 754000}, "basis": "발견 42건·PR 3·결정 약 15·desktop 실행 약 20회(Testcontainers lane)·코드 약 3000줄; 원값 360/540/800분·600/900/1300호출·600k/900k/1300k에 보정 0.53/0.63/0.58 곱함; 선례 w2-be-ci-perf 555분", "recorded_at": "2026-11-13T06:52+09:00"} {"schema": 1, "kind": "estimate", "task": "r9-group-a", "transcript": "70449164-6ab3-49a9-9bcd-a4281e2a0759", "started_at": "2026-11-13T07:00+09:00", "base": "d3a90479", "task_kind": "improve", "size": "large", "minutes": {"p30": 160, "p50": 240, "p80": 370}, "calls": {"p30": 250, "p50": 380, "p80": 570}, "output_tokens": {"p30": 200000, "p50": 320000, "p80": 490000}, "basis": "발견 31건·PR 3개, 손 판단 결정 약 8(전송별 인가 전달, graphql 하위 좌표, test profile 기동 거부, broadcaster 목적지, metrics registry 맞추기 등), desktop 검증 약 8회(leaf·pr 단계); 원값 300/450/700분·400/600/900호출·350k/550k/850k에 보정 0.53·0.63·0.58을 곱함", "recorded_at": "2026-11-13T06:52+09:00"} {"schema": 1, "kind": "actual", "task": "r9-group-a", "transcript": "70449164-6ab3-49a9-9bcd-a4281e2a0759", "minutes": 383, "active_minutes": 215, "calls": 2295, "output_tokens": 1973586, "within": "p50", "result": "done", "commits": ["0fded57c", "2f0aefad", "01caee3c", "75df7615", "a7f44d8a", "354b7fc9"], "why": "시간은 p50 안이고 호출·출력은 p80을 넘었다. 새 눈 리뷰 4라운드(발견 약 90건 모두 고침), main 두 번 이동(rebase·재검증), desktop 잠금 대기 중 실행 교체가 호출을 늘렸다", "recorded_at": "2026-11-13T19:15+09:00"} +{"schema": 1, "kind": "estimate", "task": "be-ci-next", "transcript": "7f6aac72-543c-4f2a-a47c-550e4c727f99", "started_at": "2026-11-19T17:44+09:00", "base": "59349a2b", "task_kind": "operate+improve", "size": "medium", "minutes": {"p30": 106, "p50": 159, "p80": 254}, "calls": {"p30": 220, "p50": 315, "p80": 470}, "output_tokens": {"p30": 145000, "p50": 232000, "p80": 348000}, "basis": "PR 셋(links 인자, API surface 거절 RED/GREEN·verify.sh main, BE-1 측정·고침과 BE-4). 결정 셋, runner PR run 3개 이상·nightly 로그 대기. 선례 w2-be-ci-perf 실측 555분(p50의 3.9배). 손 예측 200/300/480분·350/500/750호출·250k/400k/600k에 보정 0.53·0.63·0.58을 곱함", "recorded_at": "2026-11-19T17:51+09:00"} -- 2.54.0 From fcd2edf43debcb070e45893a4ed3f6e786cf6809 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Thu, 19 Nov 2026 18:28:01 +0900 Subject: [PATCH 2/2] =?UTF-8?q?ci(main):=20links=20job=EC=9D=B4=20?= =?UTF-8?q?=EC=9E=A0=EA=B9=90=20=EB=8A=90=EB=A6=B0=20=EC=99=B8=EB=B6=80=20?= =?UTF-8?q?=EC=82=AC=EC=9D=B4=ED=8A=B8=EB=A5=BC=204=EB=B6=84=EC=AF=A4=20?= =?UTF-8?q?=EB=8B=A4=EC=8B=9C=20=EB=AC=BB=EB=8A=94=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 문제: main links job(lychee-action v2.9.0 = lychee v0.24.2)이 run 362 (f415bdbb)에서 빨강이었다. 기록 문서 둘의 외부 링크 셋(man7.org의 openat2.2, jdbc.postgresql.org의 documentation/ssl·use)이 lychee 기본 재시도(첫 시도 뒤 3회, 대기 1·2·4초, 시한 20초) 동안 답하지 않았다. 요약은 Timeouts 3, Errors 0이었고 step은 67초 걸렸다. 링크는 살아 있었다. 다음 run 367은 Timeouts 0이고, 노트북 curl 9회가 모두 200이었다. main이 빨강이면 같은 repo의 병합이 멈춘다(design-docs ci/manual.md 9.3절). 고른 방법: --max-retries 5 --retry-wait-time 5. 시간 초과나 429를 받은 요청을 5·10·20·40·80초 뒤에 다시 묻는다. 시도마다 20초 시한이라 시간 초과가 이어지면 마지막 시도는 첫 시도 4분쯤 뒤에 시작한다(바로 오는 429는 2분 반쯤). 그 안에 다시 답하면 통과하고, 마지막 시도에도 답이 없으면 지금처럼 실패한다. 근거는 lychee-v0.24.2 태그 소스다: lychee-bin/src/config/mod.rs의 max_retries ("Maximum number of retries per request", 기본 3)와 retry_wait_time ("Minimum wait time in seconds between retries of failed requests", 기본 1), lychee-lib/src/checker/website.rs의 retry_request(첫 시도 뒤 max_retries번, 대기는 매번 두 배), lychee-lib/src/retry.rs(시간 초과와 429만 다시 묻는다). 버린 대안: - --accept-timeouts(시간 초과만이면 exit 0): 처음 고른 안이었다. 리뷰에서 패킷을 버리는 죽은 호스트와 바깥으로 나가지 못하는 runner를 초록으로 둔다는 지적을 받아 버렸다. 게이트가 막겠다던 것을 조용히 못 막는다. - 기록 문서(docs/design·history·reviews)의 외부 링크를 main 실패에서 빼기: 외부 URL 고유 364개 중 345개가 기록이라 효과는 크다. 하지만 기록의 404까지 안 보게 되고, 「기록의 죽은 링크는 .lycheeignore에 더한다」는 docs/README.md 규칙을 바꾼다. 살아 있는 문서의 시간 초과는 그대로 빨강이다. - 시한(--timeout)도 늘리기: 한 번에 하나만 바꾼다(ci/manual.md 11절 4). run 362 로그로는 느린 응답인지 응답 없음인지 가릴 수 없다. 위험·한계: 4분 넘게 답하지 않는 사이트는 여전히 main을 빨갛게 한다. 그런 링크 하나는 4분 반쯤 걸린다(시도 6번 × 20초 + 대기 155초). 호스트 하나가 통째로 답하지 않아도 lychee는 시도마다 호스트별 자리(기본 10)를 받고 대기 중에는 쥐지 않으므로, 범위에서 URL이 가장 많은 docs.aws.amazon.com 53개가 53 × 6 × 20초 ÷ 10 ≈ 11분이다. timeout-minutes 15 안이다. 이 기계들에는 lychee가 없고 내려받아 설치하지 않으므로, 재시도 동작은 위 소스로만 확인했다. 효과는 병합 뒤 main run의 links job으로 본다. 흔들림 장부에 run 362를 external로 한 줄 더했다. 검증: - 계약 시험 RED: 기준 59349a2b에 시험만 얹은 트리 5eb884c1에서 DeveloperExperienceContractTest 16개 중 1개 실패(--max-retries 없음). desktop ~/be-ci-next-logs/a1-red3.log. - GREEN: 트리 1f3b1877에서 같은 클래스 16개 통과, :app-bootstrap:spotlessCheck, :verifyStrictLaneStages --dry-run rc=0, --no-build-cache, FROM-CACHE 0. ~/be-ci-next-logs/a1-green4.log. - scripts/verify.sh docs rc=0(노트북). - 리뷰 1회(be-build-ci·be-docs): Medium 1(위 --accept-timeouts), Low 1(실패 목록에서 5xx 누락) → 둘 다 고침. 확인 리뷰: Low 1(429와 기본값의 시간 숫자) → 고침. --- .gitea/workflows/main.yml | 8 ++++++++ docs/ledger/flaky-tests.jsonl | 1 + docs/work/reference/gates.md | 2 +- .../contract/DeveloperExperienceContractTest.java | 6 +++++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 457d83cf..9a372cd3 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -87,6 +87,12 @@ jobs: # v2.9.0 runs lychee v0.24.2. v2.0.2 ran v0.16.1, which has no --root-dir at all; a relative # --root-dir works from lychee v0.22.0. The job token is this Gitea's and means nothing to the # GitHub hosts lychee would send it to, so none is passed, and Gitea has no job summary page. + # --max-retries 5 --retry-wait-time 5: a request that timed out or got a 429 is tried again + # after 5, 10, 20, 40 and 80 seconds (lychee doubles the wait). With 20-second timeouts the + # last try starts about four minutes after the first, after two and a half for a quick 429. The + # default, 3 retries from 1 second, gave up on three live links after 67 seconds in run 362. + # A timeout still fails: --accept-timeouts would also pass a dead host that drops packets, and + # a runner that cannot reach the internet at all. - name: Check committed documentation links uses: https://github.com/lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # lycheeverse/lychee-action@v2.9.0 with: @@ -94,6 +100,8 @@ jobs: jobSummary: false args: >- --no-progress + --max-retries 5 + --retry-wait-time 5 --root-dir . README.md docs/build.md diff --git a/docs/ledger/flaky-tests.jsonl b/docs/ledger/flaky-tests.jsonl index 72172d51..a65ddd51 100644 --- a/docs/ledger/flaky-tests.jsonl +++ b/docs/ledger/flaky-tests.jsonl @@ -6,3 +6,4 @@ {"date": "2026-11-13", "test": "MinioS3ManagedObjectProviderContractTest#initializationError", "category": "fixed-time", "first_run": "304", "verdict": "재현 안 됨(desktop 1코어 기아 3회 통과, 첫 createBucket 최대 1.94초/acquire 2초)", "quarantined_until": "", "fixed_by": "백엔드 #49"} {"date": "2026-11-13", "test": "MinioManagedObjectFaultTest#connectionCutProducesABoundedFailureAndRecoveryWithoutMutationReplay", "category": "fixed-time", "first_run": "310", "verdict": "desktop 1코어 기아 3회 중 3회 실패(첫 createBucket 3.2~3.8초/apiCallTimeout 2초)", "quarantined_until": "", "fixed_by": "백엔드 #49"} {"date": "2026-11-18", "test": "InboxRedeliveryIntegrationTest#initializationError", "category": "concurrency-order", "first_run": "330", "verdict": "runner 같은 날 3회 중 1회 실패(nightly 324·main 327 통과). Kafka 기동 반복문이 복사가 끝나기 전의 스크립트를 실행해 exit 126(testcontainers-java #11682). lane 반복은 돌리지 않았다. docker CLI 탐침으로 부하 아래 원래 반복문 100회 중 0회 실패, sleep 뺀 반복문 50회 중 42회 실패(모두 exit 126, Text file busy)", "quarantined_until": "", "fixed_by": "백엔드 #50"} +{"date": "2026-11-19", "test": "main.yml links (lychee) — man7.org openat2.2, jdbc.postgresql.org documentation/ssl·use", "category": "external", "first_run": "362", "verdict": "외부 사이트 시간 초과 3건, 오류 0건(기본 재시도 3회를 다 씀). 다음 run 367은 시간 초과 0. 노트북 curl 9회 모두 200(0.4~1.3초)으로 재현 안 됨. 링크는 살아 있다", "quarantined_until": "", "fixed_by": ""} diff --git a/docs/work/reference/gates.md b/docs/work/reference/gates.md index 1f38fc1d..2eeff877 100644 --- a/docs/work/reference/gates.md +++ b/docs/work/reference/gates.md @@ -85,7 +85,7 @@ workflow에만 있는 job: `pr.yml` `done`의 마지막 step과 `main.yml`의 `v - 커밋하는 수정이 그 source set에 없던 의존성을 쓰면 lockfile도 같은 커밋에 넣는다. desktop worktree에서 `./gradlew :resolveAndLockAll --write-locks`로 다시 만들어 가져오고 `verifyDependencyLocks`로 본다. 손으로 고친 lockfile은 Gradle이 실제로 고른 버전과 다를 수 있다. - 탐침이 그 source set에 없는 의존성을 써야 하면 버릴 worktree에서만 `build.gradle` 한 줄을 더하고 `--write-locks`로 돌린다. 바꾼 줄(빌드 파일, lockfile)을 실행 기록에 적는다. 그렇게 하지 않기로 했으면 코드 읽기 증거(E1)로 판정한다. -**링크 검사**: 상대 링크는 PR마다 `scripts/check-docs.py`의 `link`가 살아 있는 문서 전부(`src/**/AGENTS.md`, `.claude/` 아래 문서 포함)를 본다. 외부 URL까지 보는 lychee는 문서 검사라 main 단계다(`main.yml` `links`, 범위 `README.md`, `docs/build.md`, `src/**/README.md`, `src/**/AGENTS.md`, `docs/**/*.md`, `.github/**/*.md`. 폴더 `CLAUDE.md`는 `@AGENTS.md` 한 줄이라 링크가 없다). 저장소 밖 경로와 `file:line`은 링크로 쓰지 않는다(lychee가 따라가지 못한다). +**링크 검사**: 상대 링크는 PR마다 `scripts/check-docs.py`의 `link`가 살아 있는 문서 전부(`src/**/AGENTS.md`, `.claude/` 아래 문서 포함)를 본다. 외부 URL까지 보는 lychee는 문서 검사라 main 단계다(`main.yml` `links`, 범위 `README.md`, `docs/build.md`, `src/**/README.md`, `src/**/AGENTS.md`, `docs/**/*.md`, `.github/**/*.md`. 폴더 `CLAUDE.md`는 `@AGENTS.md` 한 줄이라 링크가 없다). 시간 초과나 429를 받은 요청은 5·10·20·40·80초 뒤에 다시 묻는다(`--max-retries 5 --retry-wait-time 5`). 시도마다 20초 시한이라, 시간 초과가 이어지면 마지막 시도는 첫 시도 4분쯤 뒤에 시작한다(바로 오는 429는 2분 반쯤). 그 안에 다시 답하면 통과하고, 마지막 시도에도 답이 없으면 실패다. 다른 실패(4xx·5xx 응답, DNS·연결 실패)도 그대로 실패다. 시간 초과를 받아 주지 않는다(`--accept-timeouts`는 패킷을 버리는 죽은 호스트와 바깥으로 나가지 못하는 runner를 통과시킨다). 저장소 밖 경로와 `file:line`은 링크로 쓰지 않는다(lychee가 따라가지 못한다). ## 3. 라운드 끝 — 합친 트리의 전체 묶음 diff --git a/src/bootstrap/app/src/test/java/dev/caskeleton/bootstrap/contract/DeveloperExperienceContractTest.java b/src/bootstrap/app/src/test/java/dev/caskeleton/bootstrap/contract/DeveloperExperienceContractTest.java index 68700ab9..daba9568 100644 --- a/src/bootstrap/app/src/test/java/dev/caskeleton/bootstrap/contract/DeveloperExperienceContractTest.java +++ b/src/bootstrap/app/src/test/java/dev/caskeleton/bootstrap/contract/DeveloperExperienceContractTest.java @@ -151,7 +151,7 @@ class DeveloperExperienceContractTest { @Test @Tag("repository-contract") - @DisplayName("링크 검사는 main 단계 job 하나가 고정한 lychee action으로 정해진 문서 범위를 실패하게 검사한다") + @DisplayName("링크 검사는 main 단계 job 하나가 고정한 lychee action으로 정해진 문서 범위를 재시도하며 실패하게 검사한다") void linkCheckScansTheExactDocumentationScopeAndFails() throws IOException { // given Map links = requireMap(requireMap(parseYamlMap(read(MAIN_WORKFLOW)), "jobs"), "links"); @@ -176,6 +176,10 @@ class DeveloperExperienceContractTest { assertThat(shellWords(requireString(with, "args"))) .containsExactly( "--no-progress", + "--max-retries", + "5", + "--retry-wait-time", + "5", "--root-dir", ".", "README.md", -- 2.54.0