Skip to content

Commit 3d5efc7

Browse files
authored
fix(ci): classify the merged regression tests explicitly in the layout inventories (#5075)
The regex seeds place a conventionally named file, so a regression test can sit in the tree, run in CI, and still be absent from the authoritative table. That is how the regression tests for #5050, #5051 and #5055 landed without ever entering scripts/test-layout/layout.json or tests/fixtures/test-layout-expected.json (#5059). The two inventories are two copies of one table and the membership oracle already compares them, so both sides get the same three entries. A new test names the three files so they cannot fall out again silently, and checks that each one actually sits in the directory its registration claims. No repository-wide explicit-registration policy is introduced here; the seeds keep carrying brand-new files as designed.
1 parent 6044a9a commit 3d5efc7

3 files changed

Lines changed: 31 additions & 2 deletions

File tree

scripts/test-layout/layout.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,10 @@
15311531
"ws-steering-smoke.test.ts": "responses",
15321532
"combo-authoritative-reset.test.ts": "codex-integration",
15331533
"devin-stated-reset-hardening.test.ts": "providers",
1534-
"devin-stated-reset-retry.test.ts": "providers"
1534+
"devin-stated-reset-retry.test.ts": "providers",
1535+
"ci-structure-gate.test.ts": "ci-workflows",
1536+
"responses-code-mode-patch-compile.test.ts": "responses",
1537+
"gui-codex-usage-score-parity.test.ts": "gui"
15351538
},
15361539
"migrated": [
15371540
"adapters",

tests/fixtures/test-layout-expected.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,5 +1363,8 @@
13631363
"ws-steering-smoke.test.ts": "responses",
13641364
"combo-authoritative-reset.test.ts": "codex-integration",
13651365
"devin-stated-reset-hardening.test.ts": "providers",
1366-
"devin-stated-reset-retry.test.ts": "providers"
1366+
"devin-stated-reset-retry.test.ts": "providers",
1367+
"ci-structure-gate.test.ts": "ci-workflows",
1368+
"responses-code-mode-patch-compile.test.ts": "responses",
1369+
"gui-codex-usage-score-parity.test.ts": "gui"
13671370
}

tests/test-layout-tooling.test.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,29 @@ describe("membership oracle", () => {
262262
expect({ unresolvedNew, missingFromTree, wrongTarget }).toEqual({ unresolvedNew: [], missingFromTree: [], wrongTarget: [] });
263263
});
264264

265+
// The regex seeds place a conventionally named file, so a regression test can sit in the tree,
266+
// run in CI, and never appear in the authoritative table — which is how these three landed with
267+
// their subjects (#5050, #5051, #5055) and stayed invisible to the inventory (#5059). The seeds
268+
// are deliberately allowed to carry a brand-new file; what they must not do is carry a merged
269+
// regression test indefinitely. Naming them here is the difference between "something resolves
270+
// it" and "the table says which domain owns it".
271+
test("the merged regression tests are classified explicitly, not by seed", () => {
272+
const owners = {
273+
"ci-structure-gate.test.ts": "ci-workflows",
274+
"responses-code-mode-patch-compile.test.ts": "responses",
275+
"gui-codex-usage-score-parity.test.ts": "gui",
276+
} as const;
277+
const classified = Object.fromEntries(
278+
Object.keys(owners).map(name => [name, layout.explicit[name] ?? null]),
279+
);
280+
expect(classified).toEqual(owners);
281+
// The file has to be where its registration says, or the registration is a claim about a
282+
// tree that does not exist.
283+
const live = new Set(listTestFiles(repoRoot()));
284+
const placed = Object.entries(owners).map(([name, domain]) => `tests/${domain}/${name}`);
285+
expect(placed.filter(rel => !live.has(rel))).toEqual([]);
286+
});
287+
265288
test("the fixture histogram never drops below the inventory in devlog 001 §2.B", () => {
266289
// 001 is a snapshot of 2026-09-05; files added on dev afterwards join the fixture and
267290
// raise a domain's count. A count that falls below the snapshot means a file was dropped

0 commit comments

Comments
 (0)