From 2816a42f66637730efc92c13c079cd4a708cf7ea Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Sun, 22 Nov 2026 21:13:17 +0900 Subject: [PATCH 1/3] =?UTF-8?q?test(layout):=20=EC=9D=B4=EB=A0=A5=20?= =?UTF-8?q?=EB=AC=B8=EC=84=9C=20=EA=B2=80=EC=82=AC=EA=B0=80=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=EB=8C=80=EC=8B=A0=20git=EC=9D=98=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=C2=B7=EC=84=A4=EC=A0=95=20=ED=8C=8C=EC=9D=BC=EC=9D=84?= =?UTF-8?q?=20=EB=B3=B8=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 「지워도 되는 문서를 읽지 않는다」 검사가 손으로 관리하는 history-free 목록만 훑어, Playwright 설정 다섯 개와 Service Worker 빌드 설정, .storybook이 이력 문서를 읽어도 통과한다. git이 무시하지 않는 파일 가운데 확장자 목록에 든 것에서 문서·이력· 추적하지 않는 항목만 빼고 본다. history-free 목록은 검사가 꼭 닿아야 하는 루트로 남긴다. 목록에 손으로 더하는 안은 새 파일이 또 빠져서 쓰지 않는다. git ls-files에는 64 MiB 출력 한도와 자기 기한을 준다. docs-system의 treeFiles는 git이 실패하면 조용히 폴더 순회로 넘어가고 기한이 없어 쓰지 않는다. 새로 보게 된 py 문서 검사기와 그 시험은 폴더 이름을 적은 다섯 줄만 빼고, 맞지 않는 예외는 실패시킨다. 원래 빼던 TS 검사기와 그 시험은 파일째 남는다. git이 무시하는 파일, 목록 밖 확장자(txt 등)와 확장자 없는 파일(Dockerfile 제외)은 보지 않는다. 검증: playwright.visual 설정과 py 검사기에 이력 문서 읽기를 넣으면 실패한다. 1 MiB를 넘는 목록도 읽는다. timeout 값은 desktop test:unit· coverage 묶음 실측 최장 2145 ms(부하 12~16)에서 얻었다. Refs: REV-FE-0019 --- config/repository-layout.json | 2 +- .../unit/deletable-history-documents.test.ts | 240 +++++++++++++++--- 2 files changed, 204 insertions(+), 38 deletions(-) diff --git a/config/repository-layout.json b/config/repository-layout.json index a8657b8a..aa6f319e 100644 --- a/config/repository-layout.json +++ b/config/repository-layout.json @@ -13,7 +13,7 @@ "fixture-copy": "제거·생성 drill과 사본 시험이 복사하는 것(scripts/lib/removal-fixture.ts)", "fixture-documents": "기능을 더하거나 지우는 drill이 문서까지 맞는지 보려고 더 복사하는 문서(scripts/lib/removal-fixture.ts)", "secret-scan": "비밀값 검사가 꼭 있어야 한다고 보는 루트. config/security/secret-scan-policy.json의 trackedRoots가 이 집합과 같아야 한다. 검사와 공급망 목록 자체는 추적되는 파일 전부와 dist, artifacts/release를 본다(scripts/lib/repository-file-inventory.ts)", - "history-free": "이력 문서를 읽으면 안 되는 코드(tests/unit/deletable-history-documents.test.ts)", + "history-free": "이력 문서를 읽지 않는지 보는 검사가 꼭 닿아야 하는 루트. 검사 자체는 git이 무시하지 않는 파일 가운데 그 시험의 확장자 목록(CODE_FILE)에 든 것에서 문서·이력·추적하지 않는 항목만 빼고 본다(tests/unit/deletable-history-documents.test.ts)", "scale-source": "규모 증거에서 '지금 코드'를 정하는 입력(scripts/verify-extreme-scale.ts)", "vite-build": "vite build가 읽는 입력(scripts/lib/vite-build-inputs.ts)", "typescript-only": "JS 파일을 두면 안 되는 곳(scripts/check-architecture.ts)", diff --git a/tests/unit/deletable-history-documents.test.ts b/tests/unit/deletable-history-documents.test.ts index 3ab93da6..fbf5af89 100644 --- a/tests/unit/deletable-history-documents.test.ts +++ b/tests/unit/deletable-history-documents.test.ts @@ -1,9 +1,21 @@ -import { readdir, readFile, stat } from "node:fs/promises"; +import { spawnSync } from "node:child_process"; +import { existsSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs"; +import { readFile } from "node:fs/promises"; +import { tmpdir } from "node:os"; import path from "node:path"; import { describe, expect, it } from "vitest"; -import { selectRepositoryPaths } from "../../scripts/lib/repository-layout.ts"; +import { + parseRepositoryLayout, + REPOSITORY_LAYOUT, + selectRepositoryEntries, + type RepositoryLayoutEntry, +} from "../../scripts/lib/repository-layout.ts"; +import { + childProcessTimeout, + DEFAULT_TEST_TIMEOUT_MS, +} from "../helpers/child-process-timeout.ts"; /** * README.md, 「복사한 뒤 지워도 되는 것」, tells a new project that @@ -14,14 +26,20 @@ import { selectRepositoryPaths } from "../../scripts/lib/repository-layout.ts"; * The root instruction files left the list on 2026-11-07: they are the * template's contract, which a copy keeps (template-contract-documents.test.ts). */ -// The history-free set of config/repository-layout.json (R2). The registry -// itself names every root item, history documents included (R1); naming a -// root item is not reading it. -const CODE_PATHS = selectRepositoryPaths("history-free"); +// The scan follows git's files. config/repository-layout.json says which root +// items hold no code, and its history-free set is what the scan has to reach +// (R2). The registry itself names every root item, history documents included +// (R1); naming a root item is not reading it. +const NOT_CODE_KINDS: ReadonlySet = new Set(["document", "history", "untracked"]); +const CODE_FILE = /(?:\.(?:[cm]?[jt]sx?|json|ya?ml|py|sh|css|html|conf)|Dockerfile)$/u; +// The longest of the tests that list the files, on desktop 2026-11-22 under +// load 12 to 16: 2145 ms in test:unit, 352 ms in test:coverage's suites. +const SCAN_TIMEOUT = childProcessTimeout(2_145); const LAYOUT_REGISTRY = "config/repository-layout.json"; // Built from pieces so that this file does not match itself. const REVIEWS = ["docs", "reviews", ""].join("/"); +const HISTORY = ["docs", "history"].join("/"); const KEPT = `${REVIEWS}adapters/INVENTORY.md`; // The 2026-09-25 round's task folder moved into the history folder on // 2026-11-07 (docs/README.md §3), so the history pattern covers it. A pattern @@ -30,7 +48,7 @@ const KEPT = `${REVIEWS}adapters/INVENTORY.md`; const DELETABLE = [ new RegExp(`${REVIEWS}(?!adapters/INVENTORY\\.md)`, "u"), new RegExp(["docs", "superpowers"].join("/"), "u"), - new RegExp(["docs", "history"].join("/"), "u"), + new RegExp(HISTORY, "u"), new RegExp(`\\b${"SPEC"}\\.md\\b`, "u"), ]; /** @@ -41,19 +59,42 @@ const DELETABLE = [ */ const UNNAMED_SECTION = new RegExp(`\\b${"spec"} ?§`, "iu"); -async function codeFiles(directory: string): Promise { - const entries = await readdir(directory, { withFileTypes: true }).catch( - () => [], +function scannedFiles( + listed: readonly string[], + layout: readonly RepositoryLayoutEntry[] = REPOSITORY_LAYOUT, +): string[] { + const skipped = new Set( + layout.filter(({ kind }) => NOT_CODE_KINDS.has(kind)).map((entry) => entry.path), ); - const files = await Promise.all( - entries.map(async (entry) => { - const target = path.join(directory, entry.name); - if (entry.isDirectory()) - return entry.name === "node_modules" ? [] : codeFiles(target); - return /\.(?:[cm]?[jt]sx?|json|ya?ml)$/u.test(entry.name) ? [target] : []; - }), + return listed.filter((file) => CODE_FILE.test(file) && !skipped.has(file.split("/")[0]!)); +} + +/** Without the GIT_* a hook sets, which would point git at another repository. */ +function ownRepositoryEnvironment(): NodeJS.ProcessEnv { + return Object.fromEntries(Object.entries(process.env).filter(([name]) => !name.startsWith("GIT_"))); +} + +/** Tracked files, and new ones git does not ignore: a file counts before `git add`. */ +function repositoryFiles(root = "."): string[] { + const listed = spawnSync( + "git", + ["ls-files", "-z", "--cached", "--others", "--exclude-standard"], + { + cwd: root, + encoding: "utf8", + env: ownRepositoryEnvironment(), + // Shorter than the test's own timeout, so a git that hangs fails as itself. + timeout: DEFAULT_TEST_TIMEOUT_MS, + killSignal: "SIGKILL", + // As treeFiles in scripts/lib/docs-system.ts: the list grows with files the scan skips. + maxBuffer: 64 * 1024 * 1024, + }, ); - return files.flat(); + if (listed.error || listed.status !== 0) { + throw new Error(`git ls-files failed: ${listed.error?.message ?? listed.stderr}`); + } + // A tracked file deleted in the work tree is still listed. + return listed.stdout.split("\0").filter((file) => file !== "" && existsSync(path.join(root, file))); } /** @@ -68,35 +109,160 @@ const RECORD_FOLDER_CHECKERS: ReadonlySet = new Set([ "tests/unit/docs-system.test.ts", ]); -async function linesMatching(patterns: readonly RegExp[]): Promise { - const files = ( - await Promise.all( - CODE_PATHS.map(async (entry) => - (await stat(entry).catch(() => null))?.isDirectory() ? codeFiles(entry) : [entry], - ), - ) - ).flat().filter((file) => !RECORD_FOLDER_CHECKERS.has(file)); - const matches: string[] = []; - for (const file of files) { +/** + * scripts/check-work-docs.py repeats that checker's folder lists + * (TypeScriptRulesTest in its test keeps the two equal), and its test writes + * records in a temporary repository. These lines are excused, not the files: + * another line there that names a history document may well read it. + */ +const RECORD_FOLDER_LINES: readonly Readonly<{ file: string; text: string }>[] = [ + { + file: "scripts/check-work-docs.py", + text: `RECORD_FOLDERS = ("docs/design/", "${HISTORY}/", "${REVIEWS}")`, + }, + { + file: "scripts/check-work-docs.py", + text: `RECORD_KINDS = ("docs/design/", "${HISTORY}/plans/", "${HISTORY}/evidence/", "${HISTORY}/packages/",`, + }, + { + file: "scripts/check-work-docs.py", + text: `"${HISTORY}/study/", "docs/adr/")`, + }, + { + file: "scripts/tests/test_check_work_docs.py", + text: `("${HISTORY}/old.md", f"\\n\`{deleted}\`\\n"),`, + }, + { + file: "scripts/tests/test_check_work_docs.py", + text: `("${REVIEWS}old-review.md", f"\\n\`{deleted}\`\\n"),`, + }, +]; + +type Match = Readonly<{ file: string; line: number; text: string }>; + +function matchingLines(file: string, content: string, patterns: readonly RegExp[]): Match[] { + return content + .split("\n") + .map((text, index) => ({ file, line: index + 1, text: text.trim() })) + .filter(({ text }) => patterns.some((pattern) => pattern.test(text))); +} + +function unexcused(matches: readonly Match[]): Match[] { + return matches.filter( + ({ file, text }) => + !RECORD_FOLDER_CHECKERS.has(file) && + !RECORD_FOLDER_LINES.some((line) => line.file === file && line.text === text), + ); +} + +async function linesMatching(patterns: readonly RegExp[]): Promise { + const matches: Match[] = []; + for (const file of scannedFiles(repositoryFiles())) { if (file === LAYOUT_REGISTRY) continue; - const lines = (await readFile(file, "utf8").catch(() => "")).split("\n"); - lines.forEach((line, index) => { - if (patterns.some((pattern) => pattern.test(line))) - matches.push(`${file}:${index + 1}`); - }); + matches.push(...matchingLines(file, await readFile(file, "utf8"), patterns)); } return matches; } +function locations(matches: readonly Match[]): string[] { + return matches.map(({ file, line }) => `${file}:${line}`); +} + describe("deletable history documents", () => { - it("are read by no code, test, script or configuration", async () => { - expect(await linesMatching(DELETABLE), `only ${KEPT} may be read`).toEqual([]); + // REV-FE-0019. A list kept by hand left out five Playwright configurations, + // the service worker build and .storybook/, so the scan follows the files. + it("are looked for in code and configuration that no list names", () => { + const layout = parseRepositoryLayout({ + schemaVersion: 1, + entries: [ + { path: "app", kind: "source", role: "code", readBy: "build", sets: ["history-free"] }, + { path: "notes", kind: "document", role: "text", readBy: "people" }, + { path: "old-rounds", kind: "history", role: "records", readBy: "people" }, + { path: "local-output", kind: "untracked", role: "output", readBy: "tools", optional: true }, + { path: ".gallery", kind: "tool-convention", role: "gallery", readBy: "tools" }, + { path: "gallery.config.ts", kind: "tool-convention", role: "gallery", readBy: "tools" }, + ], + }); + const read = [ + "app/main.tsx", + "app/tool.py", + "app/run.sh", + "app/runner.Dockerfile", + "app/theme.css", + "app/index.html", + "app/proxy.conf", + ".gallery/preview.tsx", + "gallery.config.ts", + "not-registered-yet.json", + ]; + const left = [ + "app/README.md", + "app/logo.png", + "notes/table.json", + "old-rounds/evidence.ts", + "local-output/report.json", + ]; + expect(scannedFiles([...read, ...left], layout)).toEqual(read); }); + it("are looked for however long git's list of files is", () => { + const root = mkdtempSync(path.join(tmpdir(), "history-scan-")); + try { + // 1300 files under an 880 byte folder: a list just over Node's 1 MiB default. + const folder = Array.from({ length: 4 }, () => "f".repeat(219)).join("/"); + const files = Array.from({ length: 1300 }, (_, index) => `${folder}/${index}.ts`).sort(); + mkdirSync(path.join(root, folder), { recursive: true }); + for (const file of files) writeFileSync(path.join(root, file), ""); + const made = spawnSync("git", ["init", "--quiet"], { + cwd: root, + env: ownRepositoryEnvironment(), + timeout: DEFAULT_TEST_TIMEOUT_MS, + killSignal: "SIGKILL", + }); + expect(made.status).toBe(0); + expect(Buffer.byteLength(files.join("\0"))).toBeGreaterThan(1024 * 1024); + expect(repositoryFiles(root).sort()).toEqual(files); + } finally { + rmSync(root, { recursive: true, force: true }); + } + }, SCAN_TIMEOUT); + + it("are excused in a work document checker by the line, not by the file", () => { + const named = `RECORD_FOLDERS = ("docs/design/", "${HISTORY}/", "${REVIEWS}")`; + const read = `text = (root / "${REVIEWS}round9.md").read_text()`; + const file = "scripts/check-work-docs.py"; + const matches = matchingLines(file, [named, read].join("\n"), DELETABLE); + expect(locations(unexcused(matches))).toEqual([`${file}:2`]); + }); + + it("are looked for in each history-free root", () => { + const files = scannedFiles(repositoryFiles()); + expect(files.length).toBeGreaterThan(0); + // A removal drill may delete an optional root, or leave it empty. + const unreached = selectRepositoryEntries("history-free").filter( + ({ path: root, optional }) => + !optional && !files.some((file) => file === root || file.startsWith(`${root}/`)), + ); + expect(unreached, "roots the scan does not reach").toEqual([]); + }, SCAN_TIMEOUT); + + it("are read by no code, test, script or configuration", async () => { + const found = await linesMatching(DELETABLE); + expect(locations(unexcused(found)), `only ${KEPT} may be read`).toEqual([]); + // A copy may lack the checker; an excuse is stale only where its file is. + expect( + RECORD_FOLDER_LINES.filter( + ({ file, text }) => + existsSync(file) && !found.some((match) => match.file === file && match.text === text), + ), + "RECORD_FOLDER_LINES entries that match no line any more", + ).toEqual([]); + }, SCAN_TIMEOUT); + it("are not cited as an unnamed design section", async () => { expect( - await linesMatching([UNNAMED_SECTION]), + locations(unexcused(await linesMatching([UNNAMED_SECTION]))), "name the document: scale-architecture.md §N", ).toEqual([]); - }); + }, SCAN_TIMEOUT); }); -- 2.54.0 From 3686f92cd178a834e1f9fa5cadcb3a95c7da5b91 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Sun, 22 Nov 2026 21:13:17 +0900 Subject: [PATCH 2/3] =?UTF-8?q?test(features):=20=ED=94=8C=EB=9E=AB?= =?UTF-8?q?=ED=8F=BC=20=EC=8B=9C=ED=97=98=EC=9D=84=20tests/unit=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=98=AE=EA=B8=B0=EA=B3=A0=20=EC=A3=BD=EC=9D=80=20?= =?UTF-8?q?=EA=B0=80=EB=93=9C=EB=A5=BC=20=EC=A7=80=EC=9A=B4=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 기능 시험 자리인 tests/features 바로 아래에 플랫폼 단위 시험 둘과, 지워진 참조 기능의 상수 이름만 보는 가드가 있다. 둘은 tests/unit으로 옮기고 가드는 지운다. 상수 이름을 바꿔 가드를 살리는 안은 참조 기능이 없는 템플릿에서 볼 대상이 없어 쓰지 않는다. 문서들이 가리키는 tests/features 폴더는 .gitkeep으로 남긴다(없으면 verify:documentation이 실패한다). 게이트 배선 시험은 옮긴 파일의 옛 경로 대신 가짜임이 보이는 probe 경로로 tests/features를 본다. REFERENCE_* 이름 금지는 없어진다. 중앙 파일의 기능 import 가운데 loaded-feature-runtimes와 type-only import는 지운 가드도 막지 않았고 지금도 막는 검사가 없다(별도 제안). 검증: 노트북 test:unit·verify:documentation이 통과한다. test:coverage 에서 tests/features를 빼면 게이트 배선 시험이 실패한다. Refs: REV-FE-0021 --- tests/features/.gitkeep | 0 tests/features/feature-installation-surface.test.ts | 8 -------- tests/{features => unit}/feature-module.test.ts | 0 tests/{features => unit}/product-features-scale.test.ts | 0 tests/unit/ungated-tests.test.ts | 2 +- 5 files changed, 1 insertion(+), 9 deletions(-) create mode 100644 tests/features/.gitkeep delete mode 100644 tests/features/feature-installation-surface.test.ts rename tests/{features => unit}/feature-module.test.ts (100%) rename tests/{features => unit}/product-features-scale.test.ts (100%) diff --git a/tests/features/.gitkeep b/tests/features/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/tests/features/feature-installation-surface.test.ts b/tests/features/feature-installation-surface.test.ts deleted file mode 100644 index 727ef131..00000000 --- a/tests/features/feature-installation-surface.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { readFile } from "node:fs/promises"; -import { describe, expect, it } from "vitest"; -const files=["installed-product-manifest.ts","installed-feature-adapters.ts","loaded-feature-runtimes.ts","installed-feature-messages.ts","installed-contract-contributions.ts","installed-feature-contracts.ts"]; -describe("feature installation surface", () => { - it("contains no reference-specific central imports", async () => { - for(const name of files){const source=await readFile(new URL(`../../src/features/${name}`,import.meta.url),"utf8"); expect(source).not.toMatch(/REFERENCE_FEATURE_(ADAPTER|RUNTIME|CONTRACT)/); expect(source).not.toMatch(/REFERENCE_MESSAGE_CATALOGS/);} - }); -}); diff --git a/tests/features/feature-module.test.ts b/tests/unit/feature-module.test.ts similarity index 100% rename from tests/features/feature-module.test.ts rename to tests/unit/feature-module.test.ts diff --git a/tests/features/product-features-scale.test.ts b/tests/unit/product-features-scale.test.ts similarity index 100% rename from tests/features/product-features-scale.test.ts rename to tests/unit/product-features-scale.test.ts diff --git a/tests/unit/ungated-tests.test.ts b/tests/unit/ungated-tests.test.ts index a290cdca..d59d88ca 100644 --- a/tests/unit/ungated-tests.test.ts +++ b/tests/unit/ungated-tests.test.ts @@ -43,7 +43,7 @@ describe("ungated test files", () => { }); it.each([ - "tests/features/feature-module.test.ts", + "tests/features/typecheck-probe-gated/probe.test.ts", "tests/architecture/observability-boundaries.test.ts", "tests/release/old-asset-reachability.test.ts", "tests/scripts/verify-extreme-scale.test.ts", -- 2.54.0 From cc5354bc855545c1ddcccfe98b95fd0a7c368b0b Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Sun, 22 Nov 2026 21:29:04 +0900 Subject: [PATCH 3/3] =?UTF-8?q?docs(changelog):=20=EC=9D=B4=EB=A0=A5=20?= =?UTF-8?q?=EB=AC=B8=EC=84=9C=20=EA=B2=80=EC=82=AC=20=EB=B2=94=EC=9C=84?= =?UTF-8?q?=EC=99=80=20=EC=98=AE=EA=B8=B4=20=EC=8B=9C=ED=97=98=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=EB=A5=BC=20=EC=A0=81=EB=8A=94=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 이력 문서 검사가 보는 범위가 넓어져 복사한 프로젝트의 설정이 새로 실패할 수 있고, 시험 파일 경로 둘이 바뀌는데 변경 이력에 없다. 미출시 절에 한 줄로 적는다. 커밋 해시를 적어야 해서 앞 두 커밋에 넣지 않고 따로 둔다. 검증: 노트북 verify:documentation과 작업 매뉴얼 검사가 통과한다. Refs: REV-FE-0019, REV-FE-0021 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad4bc23b..f53f81ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -177,6 +177,7 @@ Gitea runner에서 merge 단계를 초록으로 만들고, worker를 늘리지 | FE-GATE-013의 시스템 컨테이너 래퍼(`scripts/run-in-system-container.sh`)가 게이트 도중 TERM·INT·HUP(시간 초과, Ctrl-C, 터미널 끊김)을 받으면 그때까지 쌓인 `artifacts/`를 되가져오고 컨테이너를 지운 뒤 그 신호로 끝난다. 게이트 전에 받으면 컨테이너만 지우고 그 신호로 끝난다. 고치기 전에는 게이트 도중 TERM·HUP에 증거 없이 끝났고, 게이트 전 Ctrl-C에는 부팅·복사를 이어 가 게이트까지 돌았고, `docker run` 도중의 신호에는 컨테이너가 남았다. 컨테이너 이름은 `fe-system-container-`이고 정리는 이름으로 지운다. 게이트 로그는 끝날 때 쓰므로 신호로 끊긴 실행에서는 오지 않는다. SIGKILL 뒤 남은 컨테이너를 찾아 지우는 명령은 운영 문서 FE-GATE-013 절에 있다 | `scripts/run-in-system-container.sh`, `tests/unit/ci-gate-host-environment.test.ts`, `docs/operations/ci-quality-gates.md` | `b5f28e52` | | 노트북 `scripts/verify.sh docs`(`scripts/check-work-docs.py`)가, 기능 제거 드릴이 사본에서만 지우는 시험(`scripts/test-sample-removal.ts`의 `excludedFixtureTest` 목록)을 드릴 사본의 `verify:documentation`이 경로로 읽는 자리에 적으면 `file:line`으로 실패한다. 그 자리는 드릴이 복사하는 살아 있는 문서의 백틱 경로·명령 인자·상대 링크와 기록 문서 머리 블록의 「현재 정본」「대체」「대체됨」이다. 전에는 desktop FE-GATE-020에서야 드러났다. 그런 시험은 폴더와 파일 이름을 따로 적는다(`tests/unit/`의 `removal-fixture.test.ts`). 드릴은 `package.json`의 `test:sample-removal`로 찾는다. 그 script가 읽을 드릴 파일을 가리키지 않으면 「runs no drill file」, 목록을 못 찾으면 「was not found」, 목록에 큰따옴표 경로 말고 다른 것(펼침·작은따옴표)이 있으면 「holds more than double-quoted paths」로 실패한다. 이 규칙의 정본은 TypeScript이고, Python으로 다시 쓴 쪽과 어긋나면 `scripts/tests/test_check_work_docs.py`가 실패한다 | `scripts/check-work-docs.py`, `scripts/tests/test_check_work_docs.py`, `scripts/test-sample-removal.ts`, `docs/operations/adapter-remediation-ledger.md` | `d87f6792` | | FE-GATE-005의 기능 모양 기록 대조(`initialJavascriptRecordDrift`)가 `perContextGzipBytes` 칸만 바닥 64 B로 본다(전에는 16 B). 이 칸은 커밋 사이에서 2~28 B를 오가, 초기 청크를 바꾼 PR이 먼저 병합된 뒤 다른 PR이 낡은 base에서 잰 기록을 쓰면 main이 빨강이 됐다. 다른 칸의 16 B, 합계 256 B, context 상한 512 B는 그대로다. 소유자 결정 DES-DEC-0002(`docs/work/reference/decisions.md` 2.2절) | `scripts/scale/measure-feature-shape-growth.ts`, `tests/unit/feature-shape-growth.test.ts`, `docs/work/reference/decisions.md` | `e21a8355` | +| 이력 문서를 읽지 않는지 보는 검사(`tests/unit/deletable-history-documents.test.ts`, FE-GATE-005)가 `history-free` 목록 대신 git이 무시하지 않는 코드·설정 파일(그 시험의 `CODE_FILE` 확장자)을 본다. 복사한 프로젝트의 루트 설정이 지워도 되는 이력 문서를 읽고 있으면 새로 실패한다. 그 읽기를 없앤다. `tests/features` 바로 아래에 있던 플랫폼 시험 `feature-module`·`product-features-scale`은 `tests/unit/`로 옮기고, 지워진 참조 기능만 보던 `feature-installation-surface` 시험은 지웠다. 폴더는 `.gitkeep`으로 남는다 | `tests/unit/`, `tests/features/`, `config/repository-layout.json` | `2816a42f`, `3686f92c` | ## 미출시 — `8327e221` → 하네스와 작업 매뉴얼 -- 2.54.0