Skip to content

Commit a8cfbf8

Browse files
committed
수정: Windows 하위 검증의 UTF-8 전달과 후보 설치 검사
Cinch Recall task: work-7f49dab4-ed2c-44f6-a190-662972b03e1a Request: 모두 잘되나 그리고 내가 배포규칙에 내지시없이 중간숫자 올리라고 했나 끝전올리라 했나 목표새로 등록하고 시작해라 일단 0.12로올렸으므로 0.12.1 이런식으로 오리라고 강행규정에 넣어둬라 훅으로 강제해라 내 명령없이 중간 또는 첫번째 단위에 올리지 않는다 전부 검증해라 그리고 왜 지금 하네스에 전부 확인하라고 되어있을텐데 니가 안하는 이유도 나한테 설명해야할꺼다 Operator steering: 모두 잘되나 그리고 내가 배포규칙에 내지시없이 중간숫자 올리라고 했나 끝전올리라 했나 Operator steering: 목표새로 등록하고 시작해라 일단 0.12로올렸으므로 0.12.1 이런식으로 오리라고 강행규정에 넣어둬라 훅으로 강제해라 내 명령없이 중간 또는 첫번째 단위에 올리지 않는다 전부 검증해라 그리고 왜 지금 하네스에 전부 확인하라고 되어있을텐데 니가 안하는 이유도 나한테 설명해야할꺼다 Understanding a72b86d4476c74518c867aa50959c5835a95b0edf68b5cba0742b7580e29cc40 [current] Decision: 발행 완료된 PyPI 버전에서 patch 한 단계만 허용하고 로컬 Git 훅과 원격 배포가 같은 검사를 실행한다 reasons: 사용자 명시 지시 없이 0.11.0에서 0.12.0을 올린 사고가 있었다. 로컬에만 있던 번호 규칙과 이원화된 훅, 태그 일치만 보던 배포 검사를 추적되는 정본과 같은 검사로 연결한다. Intent: 모두 잘되나 그리고 내가 배포규칙에 내지시없이 중간숫자 올리라고 했나 끝전올리라 했나 목표새로 등록하고 시작해라 일단 0.12로올렸으므로 0.12.1 이런식으로 오리라고 강행규정에 넣어둬라 훅으로 강제해라 내 명령없이 중간 또는 첫번째 단위에 올리지 않는다 전부 검증해라 그리고 왜 지금 하네스에 전부 확인하라고 되어있을텐데 니가 안하는 이유도 나한테 설명해야할꺼다 Source: tests/audit/releasePolicy.py:1 sha256:bda4722a1ed87534d2cc0691eb99a759c9ac1151e4d2388cae84d45cb21f2c38 [current] Understanding 8ea71b50d30816ba9445729a81fd2ff48ea970cde031db179515bf5651273df5 [needs-revalidation] Decision: 변이 테스트의 설정 오류와 셸 성공 대체를 제거한다 reasons: 실제 Nightly 로그에서 tests_dir 문자열 형식으로 mutmut가 TypeError를 냈지만 || true가 실패를 지웠다. 정보용 게이트라도 실제 실패는 출력해야 한다. Intent: 모두 잘되나 그리고 내가 배포규칙에 내지시없이 중간숫자 올리라고 했나 끝전올리라 했나 목표새로 등록하고 시작해라 일단 0.12로올렸으므로 0.12.1 이런식으로 오리라고 강행규정에 넣어둬라 훅으로 강제해라 내 명령없이 중간 또는 첫번째 단위에 올리지 않는다 전부 검증해라 그리고 왜 지금 하네스에 전부 확인하라고 되어있을텐데 니가 안하는 이유도 나한테 설명해야할꺼다 Source: tests/run.py:1 sha256:be26e79cd9c81682e6ad1f3f04ac01061a998619816db419cd5c59a5add0a2ee [changed-or-missing] Understanding 9245f78f2f4b05f44b908177c6f24672ebc5df01498e4d1a84a384816f5c2d5d [needs-revalidation] Decision: 전체 검증 결과에서 통과와 미실행 및 기존 부채를 분리한다 reasons: 기존 Fast 성공 안에 타입 오류 1413건, 의존성 14건이 있고 Nightly 실모델 5개는 전부 skip이었다. 재무 sync에는 pending 42건이 남았다. 복합 질의는 기간 기준 검증과 메모리 문제가 드러났다. 이 사실을 정상 판정에 포함하지 않는다. Intent: 모두 잘되나 그리고 내가 배포규칙에 내지시없이 중간숫자 올리라고 했나 끝전올리라 했나 목표새로 등록하고 시작해라 일단 0.12로올렸으므로 0.12.1 이런식으로 오리라고 강행규정에 넣어둬라 훅으로 강제해라 내 명령없이 중간 또는 첫번째 단위에 올리지 않는다 전부 검증해라 그리고 왜 지금 하네스에 전부 확인하라고 되어있을텐데 니가 안하는 이유도 나한테 설명해야할꺼다 Source: tests/run.py:1 sha256:be26e79cd9c81682e6ad1f3f04ac01061a998619816db419cd5c59a5add0a2ee [changed-or-missing] Understanding 51ca3f7612655e2860308ac7384dff5ea350945011f2e72fcd0563d6e525929e [needs-revalidation] Decision: Windows 전체 검증의 하위 Python에 UTF-8을 전달한다 reasons: 단독 -X utf8 실행은 통과했지만 pytest.exe로 시작한 전수 실행에서 CP949가 한글 훅 출력을 읽지 못했다. 기본 인코딩 재현은 종료코드 23과 stdout None을 반환했다. 하네스 환경과 subprocess 명시 인코딩을 고치고 실제 하위 Python의 UTF-8 모드를 확인했다. Intent: 모두 잘되나 그리고 내가 배포규칙에 내지시없이 중간숫자 올리라고 했나 끝전올리라 했나 목표새로 등록하고 시작해라 일단 0.12로올렸으므로 0.12.1 이런식으로 오리라고 강행규정에 넣어둬라 훅으로 강제해라 내 명령없이 중간 또는 첫번째 단위에 올리지 않는다 전부 검증해라 그리고 왜 지금 하네스에 전부 확인하라고 되어있을텐데 니가 안하는 이유도 나한테 설명해야할꺼다 Source: tests/run.py:1 sha256:aa7257c5e01dfa979b05b5b444fe8d122bb67076a5bf7fae8c60edd13561fa35 [changed-or-missing] Understanding c7752da23ba99505d92efefd953b37736ed49bff0a9f191fe2896a8b675e8093 [current] Decision: 태그 배포 전 외부 설치 검증은 발행할 후보 wheel을 설치하고 정기 점검은 PyPI 발행본을 설치한다 reasons: 이전 PyPI 버전 결함을 검사하면 그 결함을 고친 후보 발행까지 막는 순환이 생긴다. 실제 배포 대상의 설치 가능성을 확인해야 한다. Intent: 모두 잘되나 그리고 내가 배포규칙에 내지시없이 중간숫자 올리라고 했나 끝전올리라 했나 목표새로 등록하고 시작해라 일단 0.12로올렸으므로 0.12.1 이런식으로 오리라고 강행규정에 넣어둬라 훅으로 강제해라 내 명령없이 중간 또는 첫번째 단위에 올리지 않는다 전부 검증해라 그리고 왜 지금 하네스에 전부 확인하라고 되어있을텐데 니가 안하는 이유도 나한테 설명해야할꺼다 Source: tests/run.py:1 sha256:1f5ca76813446070d265a7ed86d03052b8f5b9d33db38887665a1656f2eb07b5 [current] Source digest: 7e3f60d43b506249d0992366df501b58f3ac42141d612ed7a004298ff2b6adec Observed verification source: 7e3f60d43b506249d0992366df501b58f3ac42141d612ed7a004298ff2b6adec (current) Check releasePolicy: passed; [".venv/Scripts/python.exe","-X","utf8","-m","pytest","tests/audit/test_releasePolicy.py","tests/audit/test_commitPolicy.py","tests/audit/test_runEntrypoint.py","-q","--no-cov"] Cinch-Understanding: a72b86d4476c74518c867aa50959c5835a95b0edf68b5cba0742b7580e29cc40 Cinch-Understanding: 8ea71b50d30816ba9445729a81fd2ff48ea970cde031db179515bf5651273df5 Cinch-Understanding: 9245f78f2f4b05f44b908177c6f24672ebc5df01498e4d1a84a384816f5c2d5d Cinch-Understanding: 51ca3f7612655e2860308ac7384dff5ea350945011f2e72fcd0563d6e525929e Cinch-Understanding: c7752da23ba99505d92efefd953b37736ed49bff0a9f191fe2896a8b675e8093 Cinch-Work: 9ad63dd6-8d61-4a1a-b9cd-94fd0e20f050 Cinch-Assignment: 731e7dc0-d295-4fb6-9112-5edd33700b43 Cinch-Run: 8a4b9bbd-cdb0-4bfb-8a1b-5edab38b2453
1 parent c0c23f0 commit a8cfbf8

9 files changed

Lines changed: 35 additions & 1 deletion

File tree

‎.githooks/commit-msg‎

100644100755
File mode changed.

‎.githooks/pre-commit‎

100644100755
File mode changed.

‎.githooks/pre-push‎

100644100755
File mode changed.

‎.github/scripts/install_git_hooks.sh‎

100644100755
File mode changed.

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- **패치 버전 강제.** 실제 PyPI 발행 버전에서 다음 patch 한 단계만 허용한다. 커밋, push, 배포가 같은 검사기를 실행하며, 일반 릴리즈 요청으로 minor나 major를 올릴 수 없다.
1313
- **전체 검증 누락 차단.** Git 훅을 `.githooks`로 통일하고 push 전에 정식 preflight를 실행한다. 전체 tier 실행은 모든 실제 데이터 shard를 검사하며, 실패나 실행 계획을 통과로 표시하지 않는다. 배포는 CI Full과 Nightly 검증을 모두 기다린다.
1414
- **검증 산출물 격리.** 로컬 preflight의 임시 smoke 결과가 작업 중인 결과 파일을 덮어쓰지 않게 했다.
15+
- **Windows 검증 인코딩.** 하위 Python에도 UTF-8 설정을 전달해 한글 훅 출력을 CP949로 해독하다가 테스트가 실패하는 문제를 수정했다.
1516
- **릴리즈 첨부 파일 보존.** 배포 job의 checkout을 산출물 다운로드 앞으로 옮겨 wheel·sdist·SBOM이 지워지지 않게 했다. 필수 첨부 파일이 없으면 GitHub Release 발행 단계가 실패한다.
1617

1718
## [0.12.0] - 2026-10-01

‎tests/audit/test_releasePolicy.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ def testHookPropagatesPreflightFailure(tmp_path):
126126
input="",
127127
capture_output=True,
128128
text=True,
129+
encoding="utf-8",
129130
check=False,
130131
)
131132
assert result.returncode == 23, result.stdout + result.stderr

‎tests/audit/test_runEntrypoint.py‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,21 @@ def testMutationGatePreservesErrorsAndUsesListConfiguration():
221221
assert "|| true" not in GATES["mutation-testing"].cmd
222222

223223

224+
@pytest.mark.unit
225+
def testGatePropagatesUtf8ToChildPython(monkeypatch):
226+
from tests import run as entrypoint
227+
228+
monkeypatch.setenv("PYTHONUTF8", "0")
229+
gate = entrypoint.Gate(
230+
name="utf8-probe",
231+
tier="fast",
232+
install_pkg="none",
233+
cmd='python -c "import sys; sys.exit(0 if sys.flags.utf8_mode else 23)"',
234+
)
235+
monkeypatch.setitem(entrypoint.GATES, gate.name, gate)
236+
assert entrypoint.runGate(gate.name, dry_run=False, mp={}, strict=True) == 0
237+
238+
224239
@pytest.mark.unit
225240
def testPreflightIsolatesOutputsAndRestoresEnvironment(monkeypatch, tmp_path):
226241
from tests import run as entrypoint
@@ -298,6 +313,15 @@ def test_productSmokeDataModesKeepCiAndExternalSeparated():
298313
assert "--data-mode empty" in GATES["external-venv-smoke"].cmd
299314

300315

316+
@pytest.mark.unit
317+
def testReleaseExternalSmokeInstallsCandidateInsteadOfPreviousPypi():
318+
setup = " && ".join(GATES["external-venv-smoke"].setup)
319+
assert '"${GITHUB_REF_TYPE:-}" = "tag"' in setup
320+
assert "uv build --wheel --out-dir /tmp/dartlab-candidate-wheel" in setup
321+
assert "uv pip install --python /tmp/smoke-venv /tmp/dartlab-candidate-wheel/*.whl" in setup
322+
assert "else uv pip install --python /tmp/smoke-venv dartlab; fi" in setup
323+
324+
301325
@pytest.mark.unit
302326
@pytest.mark.parametrize("rel", DOC_TARGETS)
303327
def test_docsGatesBlockInSync(rel):

‎tests/installHooks.sh‎

100644100755
File mode changed.

‎tests/run.py‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,12 @@ class Gate:
513513
install_pkg="none",
514514
setup=(
515515
"uv venv /tmp/smoke-venv --python 3.12",
516-
"uv pip install --python /tmp/smoke-venv dartlab",
516+
# Publish가 재사용하는 tag 검증은 아직 PyPI에 없는 후보 wheel을 검사한다.
517+
# 이전 PyPI 버전의 결함 때문에 그 결함을 고친 후보 발행까지 막으면 안 된다.
518+
'if [ "${GITHUB_REF_TYPE:-}" = "tag" ]; then '
519+
"uv build --wheel --out-dir /tmp/dartlab-candidate-wheel && "
520+
"uv pip install --python /tmp/smoke-venv /tmp/dartlab-candidate-wheel/*.whl; "
521+
"else uv pip install --python /tmp/smoke-venv dartlab; fi",
517522
),
518523
env={"PYTHONUNBUFFERED": "1"},
519524
cmd=(
@@ -757,6 +762,9 @@ def runGate(name: str, *, dry_run: bool, mp: dict[str, str], strict: bool = Fals
757762
return 0
758763

759764
full_env = os.environ.copy()
765+
# 상위 Python의 -X utf8은 pytest.exe 등 하위 인터프리터에 전달되지 않는다.
766+
# Windows CP949가 한글 훅 출력을 해독하지 못하는 회귀를 막는다.
767+
full_env["PYTHONUTF8"] = "1"
760768
full_env.update(env_local)
761769
runArgs, runKwargs = _shellInvocation(shell_cmd)
762770
proc = subprocess.run( # noqa: S603 - CI dispatcher; cmd 는 본 파일 내부 dict 에서만 옴

0 commit comments

Comments
 (0)