문제 c15345c·db5728b·0eba082의 dev 전용 Vite 미들웨어(dev server가 설치된 기능의 contract set으로 manifest를 냄)를 넣은 뒤로, dev server를 쓰는 capability e2e가 "requestfailed:GET:/release-manifest.json:net::ERR_ABORTED"로 떨어졌다. 같은 호스트에서 번갈아 쟀다: 미들웨어 있음 5/30·2/30 실패, 없음 0/30·0/30(부하가 더 높았다). trace에서는 첫 manifest 요청이 200 헤더 뒤 끊기고 65 ms 뒤 두 번째 요청이 성공한다. 원인을 끝까지 좁히지는 못했다. 감시 이벤트(파일 쓰기)를 없애도 같았다. 고른 방법 - 미들웨어를 지운다. dev server는 커밋된 public/release-manifest.json을 그대로 낸다. - 그 파일의 contractSet을 설치된 기능으로 다시 쓰는 일을 명시적 단계로 둔다: `create:feature`가 생성 뒤 scripts/write-dev-release-manifest.ts를 돌리고, 기능 제거 드릴이 지운 뒤 돌린다. 매뉴얼의 되돌리기·기능 지우기 절과 errors.md에 같은 명령을 적었다. 레지스트리 기준선과 같은 방식이다. - tests/unit/dev-release-manifest.test.ts가 커밋된 파일이 설치된 기능의 contract set과 같은지 보고, 다르면 다시 쓰는 명령을 말한다. - 함께: vite.config.ts가 artifacts/·dist/·.tmp/를 감시하지 않는다. Playwright trace의 .html이 열린 페이지를 모두 다시 불러오게 했다(dev server 로그의 page reload). - 버린 대안: dev 부팅에서 contract set 검사 건너뛰기. 검사하는 테스트와 같은 조건을 dev만 따로 두게 된다. 위험·한계 - 기능을 손으로 지우고 명령을 잊으면 dev server가 부팅하지 못한다. test:unit이 그 상태를 이름과 명령으로 알린다. 검증 - test:unit 2,880건, dev-release-manifest·create-feature 테스트 45건, check:types, lint, verify:documentation 통과. - 생성 기능을 넣은 clone의 dev capability e2e와 merge 단계 14개는 이 커밋 뒤 깨끗한 clone에서 돈다. Refs: docs/reviews/2026-11-03-maturity-review/README.md 14.5 14.6 X2 #3, 16-09
40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
import { readFile } from "node:fs/promises";
|
|
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
import { buildContractSet } from "../../scripts/generate-contract-set.ts";
|
|
import {
|
|
DEV_RELEASE_MANIFEST,
|
|
devReleaseManifest,
|
|
} from "../../scripts/write-dev-release-manifest.ts";
|
|
|
|
/**
|
|
* 1103 X2 #3. `create:feature` declares a contract package; the committed
|
|
* dev manifest used to keep a fixed set, so the app it had just generated
|
|
* refused to boot in `corepack pnpm dev` (CONTRACT_SET_PACKAGE_MISSING).
|
|
*/
|
|
describe("dev release manifest", () => {
|
|
it("names the contract set of the installed features", async () => {
|
|
const committed = JSON.parse(await readFile(DEV_RELEASE_MANIFEST, "utf8")) as Record<
|
|
string,
|
|
unknown
|
|
>;
|
|
expect(
|
|
committed["contractSet"],
|
|
`${DEV_RELEASE_MANIFEST} is stale; rewrite it with node scripts/write-dev-release-manifest.ts and commit it with the feature`,
|
|
).toEqual(JSON.parse(JSON.stringify(buildContractSet())));
|
|
});
|
|
|
|
it("changes only the contract set", async () => {
|
|
const { contractSet, ...written } = JSON.parse(await devReleaseManifest()) as Record<
|
|
string,
|
|
unknown
|
|
>;
|
|
const { contractSet: _committedSet, ...committed } = JSON.parse(
|
|
await readFile(DEV_RELEASE_MANIFEST, "utf8"),
|
|
) as Record<string, unknown>;
|
|
expect(written).toEqual(committed);
|
|
expect(contractSet).toEqual(JSON.parse(JSON.stringify(buildContractSet())));
|
|
});
|
|
});
|