From db4c632d531cf38584efc66d45a383a2bf0d4675 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Thu, 12 Nov 2026 11:35:59 +0900 Subject: [PATCH] =?UTF-8?q?test(archive):=20=EB=8B=A4=EB=A5=B8=20=EC=8B=9C?= =?UTF-8?q?=ED=97=98=EC=9D=B4=20=EC=93=B0=EB=8A=94=20=EC=A4=91=EC=9D=B8=20?= =?UTF-8?q?=EC=9E=84=EC=8B=9C=20=ED=8C=8C=EC=9D=BC=EC=9D=80=20=EC=82=AC?= =?UTF-8?q?=EB=B3=B8=EC=97=90=20=EB=B3=B5=EC=82=AC=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8A=94=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tests/integration/security-followup-archive.test.ts는 후보 빌드에 쓸 증거를 얻으려고 checkout의 artifacts/를 통째로 사본에 복사한다. 같은 integration 실행에서 tests/integration/http-scenario-catalog.test.ts가 artifacts/tests/http-scenario-executions.json을 임시 파일에 쓰고 rename한다. 복사가 목록을 읽은 뒤 그 임시 파일이 rename되면 ENOENT로 실패한다. desktop FE-GATE-007(2026-11-12, load 9)에서 났다. 복사 filter가 원자적 쓰기의 임시 파일(.<이름>.<무작위>.tmp)을 건너뛴다. 그런 파일은 쓰는 중이라 증거가 아니다. fs.cp는 filter를 stat보다 먼저 부르므로, 건너뛴 파일은 사라져도 오류가 없다. 버린 것: - 필요한 증거 경로만 복사: 공급망 생성이 추적 파일(artifacts의 .gitkeep 포함)을 모두 lstat하고 build가 읽는 증거가 여러 곳이라, 목록을 따로 관리해야 한다. - 두 시험을 같이 돌지 않게 하기: integration 층 전체를 직렬로 돌려야 한다. 위험: 임시 파일이 아닌 파일을 다른 시험이 지우는 경합은 남는다. 지금 artifacts/ 아래에서 그렇게 하는 시험은 찾지 못했다. 검증(desktop): - 다른 프로세스가 artifacts/tests에 임시 파일 10개를 계속 만들고 rename하는 동안 이 시험을 돌렸다. main 6b4f703c는 3회 중 2회가 같은 ENOENT(.tmp)로 실패했고, 이 커밋은 3회 모두 통과했다. - test:unit, check:types, check:ci, lint, verify:documentation. --- tests/integration/security-followup-archive.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/integration/security-followup-archive.test.ts b/tests/integration/security-followup-archive.test.ts index 837863c6..b0f7c233 100644 --- a/tests/integration/security-followup-archive.test.ts +++ b/tests/integration/security-followup-archive.test.ts @@ -21,6 +21,9 @@ import { } from "../../scripts/lib/fixture-node-modules.ts"; import { selectRepositoryPaths } from "../../scripts/lib/repository-layout.ts"; +/** The temporary file of an atomic write: `...tmp`. */ +const IN_FLIGHT_WRITE = /^\..+\.tmp$/u; + it( "builds a real candidate assessment and passes the default archived verifier from the captured archive", async () => { @@ -36,8 +39,13 @@ it( return !selectRepositoryPaths("supply-chain-fixture-skip").includes(first ?? ""); }, }); + // Other test files write their receipts under artifacts/ while this one + // copies it: a temporary file of an atomic write (...tmp) was + // renamed between the listing and the copy, and the copy failed with + // ENOENT (FE-GATE-007 on desktop, 2026-11-12). It is never evidence. await cp(path.join(sourceRoot, "artifacts"), path.join(fixtureRoot, "artifacts"), { recursive: true, + filter: (source) => !IN_FLIGHT_WRITE.test(path.basename(source)), }); await rm(path.join(fixtureRoot, "artifacts/release"), { recursive: true,