문제: 문서를 복사하지 않는 capability 드릴 셋은 `REMOVAL_FIXTURE_DOCUMENT_TESTS` 의 파일을 통째로 지운다. 문서를 읽는 테스트 하나 때문에 `backend-contract-pin.test.ts`가 목록에 들어가, config와 코드만 보는 나머지 14건(pin 커밋, 답 표 사본, 생성기 사실, Envelope 판정 대조)도 그 드릴에서 돌지 않는다. `feature-tracked-files.test.ts`의 생성기 목록 검사 1건도 같다. 목록을 지키는 검사는 파일 글자에 `README.md|CHANGELOG.md|docs/`가 있는지만 봐서, `backend-contract-pin.test.ts`는 주석 한 줄로 통과했다. 고른 방법(리뷰 문서 ⓐ+ⓑ): - 6.1 표를 읽는 테스트를 `backend-contract-pin-document.test.ts`로 옮기고 목록에는 그 파일을 둔다. pin 파일은 목록에서 빠져 모든 드릴에서 돈다. 새 파일은 pin에서 문서 경로만 읽고, 그 경로가 `docs/` 아래인지 확인한다. - `feature-tracked-files.test.ts`의 문서와 무관한 1건을 `feature-tracked-file-rewrites.test.ts`로 옮긴다. 남은 두 건은 모두 문서를 읽어 그 파일은 목록에 남는다(`create-feature.ts`의 참조도 그대로 맞다). - 목록 검사는 Babel로 파일을 파싱해 코드의 문자열·템플릿 리터럴에 문서 경로가 있는지 본다. 주석은 세지 않는다. 주석만 있는 소스를 거절하는지 자체 테스트를 더했다. - 6.1 대조를 가리키던 `external-contract-runtime.ts` 주석과 계약 문서 한 줄을 새 파일 이름으로 고쳤다. 버린 대안: capability 드릴이 계약 문서 하나만 복사하기. 문서 테스트가 늘 때마다 복사 목록이 늘고, 그 드릴이 "문서 없이"를 증명한다는 전제가 흐려진다. 목록 검사만 고치기는 빠지는 범위가 그대로다. 위험·한계: - 목록 검사는 파일 단위다. 파일 안의 모든 테스트가 문서를 읽는지는 기계로 보지 않는다. 목록 주석에 규칙을 적었다. - 검사는 코드에 문서 경로 문자열이 있는지 본다. 그 문자열로 실제로 읽는지는 보지 않는다. - 이 노트북에서는 실행하지 못했다. 검증: desktop batch에서 확인. node scripts/run-vitest.ts run tests/unit/removal-fixture.test.ts tests/unit/backend-contract-pin.test.ts tests/unit/backend-contract-pin-document.test.ts tests/unit/feature-tracked-files.test.ts tests/unit/feature-tracked-file-rewrites.test.ts check:types, lint, verify:documentation, ci:gate FE-GATE-020(capability 드릴 셋의 unit 실행에 pin 14건이 나오는지) Refs: 1106/12-01
23 lines
864 B
TypeScript
23 lines
864 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { FEATURE_TRACKED_FILE_REWRITES } from "../../scripts/create-feature.ts";
|
|
|
|
/**
|
|
* 1105/16-01. The tracked template files every added feature changes, each
|
|
* with the command that rewrites it. tests/unit/feature-tracked-files.test.ts
|
|
* holds the documents to this list.
|
|
*
|
|
* 1106/12-01. This check reads no document, so it is not in that file: the
|
|
* removal drills that copy no documents leave that file out
|
|
* (REMOVAL_FIXTURE_DOCUMENT_TESTS in scripts/lib/removal-fixture.ts) and run
|
|
* this one.
|
|
*/
|
|
describe("tracked files a feature changes (1105/16-01)", () => {
|
|
it("lists the generator's tracked rewrites", () => {
|
|
expect(FEATURE_TRACKED_FILE_REWRITES.map((file) => file.path)).toEqual([
|
|
"public/release-manifest.json",
|
|
"config/scale/feature-shape-ceilings.json",
|
|
]);
|
|
});
|
|
});
|