fix(test): provider fixture가 추적되는 .claude 파일도 복사한다

FE-GATE-013의 system 시험 tests/system/ci-runner/ci-artifact-contract.test.ts
에서 verified promotion finalizer 시험 18개가 desktop에서 실패한다. 오류는
`ENOENT … .claude/agents/arch-reviewer.md`다. 기준 fixture는 checkout을
.git째 복사하면서 .claude를 통째로 건너뛴다. 하네스 PR #13 뒤로 .claude/에
추적 파일이 11개 있다. 공급망 생성(scripts/lib/repository-file-inventory.ts)
은 추적 파일마다 lstat하므로, 빠진 파일에서 후보 빌드가 멈춘다. main
38c0dc7d에서도 같다. runner에서는 이 시험이 bwrap 없음으로 돌지 못해 드러나지
않았다.

.claude 대신 다른 worktree가 들어 있는 .claude/worktrees만 건너뛴다.
- 등록부의 provider-fixture-skip 집합은 .claude 항목의 setPaths로 그 경로를
  고른다.
- 복사 filter는 첫 경로 조각이 아니라 경로 앞부분으로 비교한다.

버린 것:
- inventory가 .claude를 건너뛰게 하기: 실제 후보 빌드의 inventory까지 추적
  파일을 빠뜨린다.
- fixture의 git index에서 .claude 파일을 지우기: fixture가 실제 checkout과
  달라진다.

위험: runner에서는 FE-GATE-013이 여전히 bwrap 없음으로 실패해, 이 수정은
desktop에서만 확인된다. 사본에 .claude/ 11파일이 더 들어간다.

검증(desktop): 이 시험 파일 전체를 main 38c0dc7d와 이 커밋에서 돌렸다.
- main: 18개 ENOENT 실패, 36개 건너뜀(기준 fixture 빌드 실패).
- 이 커밋: finalizer 18개 통과, ENOENT 0. 남은 18개 실패는 모두
  provider sandbox의 `bwrap: loopback: Failed RTM_NEWADDR`(desktop 비특권
  network namespace 제약)다.
- test:unit, check:types, check:ci, lint, verify:documentation.
This commit is contained in:
DongHyeonka
2026-11-12 05:01:27 +09:00
parent 1f57c38e40
commit ceaf21ea84
2 changed files with 13 additions and 5 deletions
+5 -2
View File
@@ -18,7 +18,7 @@
"vite-build": "vite build가 읽는 입력(scripts/lib/vite-build-inputs.ts)",
"typescript-only": "JS 파일을 두면 안 되는 곳(scripts/check-architecture.ts)",
"checkout-copy-skip": "저장소 전체를 임시 폴더로 복사하는 시험이 건너뛰는 항목(tests/e2e/support/fixture-builds.ts, tests/e2e/support/service-worker-builds.ts, tests/unit/run-output-root-build.test.ts)",
"provider-fixture-skip": "provider 업로드 시험의 기준 fixture가 복사하지 않는 항목(tests/system/ci-runner/ci-artifact-contract.test.ts)",
"provider-fixture-skip": "provider 업로드 시험의 기준 fixture가 복사하지 않는 항목과 경로. .claude는 다른 worktree만 건너뛴다(tests/system/ci-runner/ci-artifact-contract.test.ts)",
"supply-chain-fixture-skip": "공급망 provider fixture가 복사하지 않는 항목. artifacts는 따로 복사한다(scripts/check-supply-chain-provider-fixtures.ts, tests/integration/security-followup-archive.test.ts)",
"fixture-code": "사본을 만들고 node_modules를 잇는 코드가 있는 곳. linkFixtureNodeModules 규칙을 보는 범위(scripts/check-adapter-inventory.ts, tests/unit/fixture-node-modules.test.ts)",
"package-manifest": "pnpm 설치를 정하는 매니페스트(tests/unit/fixture-node-modules.test.ts)",
@@ -36,7 +36,10 @@
"kind": "tool-convention",
"role": "Claude Code 설정·규칙·스킬·서브에이전트",
"readBy": "Claude Code",
"sets": ["checkout-copy-skip", "provider-fixture-skip", "agent-harness"]
"sets": ["checkout-copy-skip", "agent-harness"],
"setPaths": {
"provider-fixture-skip": [".claude/worktrees"]
}
},
{
"path": ".dependency-cruiser.json",
@@ -2231,7 +2231,10 @@ async function createProviderFixture() {
* removal-drill fixtures, each with its own node_modules; copying them filled
* every /tmp/ci-provider-upload-* root with those trees, and the suite failed
* with timeouts and ENOTEMPTY clean-ups (1103/11-04). None of them is tracked,
* so the candidate's tracked-file inventory does not miss them.
* so the candidate's tracked-file inventory does not miss them. The rest of
* `.claude/` is tracked and copied: the fixture keeps `.git`, and supply-chain
* generation lstat()s every tracked file, so skipping all of `.claude` failed
* every finalizer test with ENOENT once `.claude/` had tracked files.
*/
const PROVIDER_BASE_FIXTURE_UNCOPIED_ENTRIES: readonly string[] = selectRepositoryPaths("provider-fixture-skip");
@@ -2244,8 +2247,10 @@ async function ensureProviderBaseFixture(): Promise<string> {
filter: (source) => {
const relative = path.relative(sourceRoot, source);
if (!relative) return true;
const first = relative.split(path.sep)[0];
return !PROVIDER_BASE_FIXTURE_UNCOPIED_ENTRIES.includes(first ?? "");
const entry = relative.split(path.sep).join("/");
return !PROVIDER_BASE_FIXTURE_UNCOPIED_ENTRIES.some(
(skipped) => entry === skipped || entry.startsWith(`${skipped}/`),
);
},
});
// The release evidence, minus the trace and Storybook trees. Copying the