diff --git a/docs/reviews/adapters/INVENTORY.md b/docs/reviews/adapters/INVENTORY.md index e73f7e3f..83ae86ae 100644 --- a/docs/reviews/adapters/INVENTORY.md +++ b/docs/reviews/adapters/INVENTORY.md @@ -152,5 +152,5 @@ | 142 | `src/adapters/AGENTS.md` | 계층 규칙 문서(코드 아님, 리뷰 대상 아님) | | 143 | `src/adapters/CLAUDE.md` | 위 문서를 가져오는 한 줄(`@AGENTS.md`) | -합계: **141/141**. 새 adapter 파일이 추가되면 이 ledger와 해당 상세 리뷰 inventory를 같은 변경에서 갱신한다. +합계: **143/143**. 새 adapter 파일이 추가되면 이 ledger와 해당 상세 리뷰 inventory를 같은 변경에서 갱신한다. diff --git a/scripts/tests/test_verify.py b/scripts/tests/test_verify.py index f97cd49a..25f5d2f8 100644 --- a/scripts/tests/test_verify.py +++ b/scripts/tests/test_verify.py @@ -74,6 +74,18 @@ class StagePlanTest(unittest.TestCase): self.assertFalse(calls.exists(), "a refused command must not reach the remote host") +class CiEnvironmentTest(unittest.TestCase): + def test_the_ci_env_names_the_head_commit_and_its_time(self) -> None: + # parts and script run the gate commands without ci:gate, which would otherwise set SOURCE_DATE_EPOCH. + script = (f'eval "$(sed -n "/^ci_env()/,/^}}/p" {VERIFY})"; ci_env; ' + 'echo "$CI $VITE_COMMIT_SHA $SOURCE_DATE_EPOCH $CI_RUNNER_IMAGE"') + ci, sha, epoch, image = sh(["bash", "-c", script], cwd=REPO).stdout.split() + self.assertEqual(ci, "true") + self.assertEqual(sha, sh(["git", "rev-parse", "HEAD"], cwd=REPO).stdout.strip()) + self.assertEqual(epoch, sh(["git", "log", "-1", "--format=%ct"], cwd=REPO).stdout.strip()) + self.assertRegex(image, r"@sha256:[0-9a-f]{64}$") + + class RemoteTransportTest(unittest.TestCase): """--on <호스트>: the patch lands in a fresh worktree, the tree matches, the run is logged, the worktree goes.""" diff --git a/scripts/verify.sh b/scripts/verify.sh index 24d4301d..a19c5e70 100755 --- a/scripts/verify.sh +++ b/scripts/verify.sh @@ -93,7 +93,9 @@ ci_env() { sha=$(git rev-parse HEAD) export CI=true VITE_COMMIT_SHA="$sha" VITE_BUILD_ID="gitea-${VERIFY_RUN:-1}-1" \ RELEASE_ID="refs/heads/${VERIFY_REF:-verify}-${VERIFY_RUN:-1}-1" \ - CI_RUNNER_IMAGE="local/runner@sha256:$(printf 'a%.0s' $(seq 64))" + CI_RUNNER_IMAGE="local/runner@sha256:$(printf 'a%.0s' $(seq 64))" \ + SOURCE_DATE_EPOCH="$(git log -1 --format=%ct)" + # ci:gate makes SOURCE_DATE_EPOCH from HEAD itself; parts and script call the commands directly. } # 한 줄 결과: "<이름> rc= <초>s". 로그는 VERIFY_STEP_LOGS가 있으면 그 폴더에 이름별로.