Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test: pin scripts/structural-suites.tsv freshness in classify-tests

garrytan3d695b481034
diff --git a/scripts/structural-suites.tsv b/scripts/structural-suites.tsv
index 05dcdce0de..2c13cb8c86 100644
--- a/scripts/structural-suites.tsv
+++ b/scripts/structural-suites.tsv
@@ -293,6 +293,7 @@ test/scripts/ci-manifest-diff.test.ts test.yml dependency-audit scope 2 readFile
test/scripts/ci-pr-scope.test.ts pull-request CI scope 11 readFileSync
test/scripts/ci-runner-routing.test.ts CI runner routing 7 readFileSync
test/scripts/classify-tests.test.ts classify-tests detectors 23 bun-file,doctor-source-helper,exec-scan,readFileSync,source-surface-helper
+test/scripts/classify-tests.test.ts structural-suites manifest 1 readFileSync
test/scripts/coverage-diff-gate.test.ts exemptions 3 readFileSync
test/scripts/data-safety-native-workflow.test.ts data-safety native CI coverage 13 readFileSync
test/scripts/e2e-backend-matrix.test.ts scripts/e2e-backend-matrix.txt 3 readFileSync
diff --git a/test/scripts/classify-tests.test.ts b/test/scripts/classify-tests.test.ts
index 8185a2f006..42fc9897d9 100644
--- a/test/scripts/classify-tests.test.ts
+++ b/test/scripts/classify-tests.test.ts
@@ -4,7 +4,9 @@
* attribution rule gets a direct fixture — no filesystem needed.
*/
import { describe, test, expect } from 'bun:test';
-import { classifyFile } from '../../scripts/classify-tests.ts';
+import { readFileSync } from 'node:fs';
+import { join } from 'node:path';
+import { classifyFile, generate } from '../../scripts/classify-tests.ts';
describe('classify-tests detectors', () => {
test('repo-anchored readFileSync binding attributes the referencing suite', () => {
@@ -142,3 +144,10 @@ describe('classify-tests detectors', () => {
expect(classifyFile('test/fake.test.ts', src).rows).toHaveLength(0);
});
});
+
+describe('structural-suites manifest', () => {
+ test('scripts/structural-suites.tsv matches a fresh classification of the test tree', () => {
+ const committed = readFileSync(join(import.meta.dir, '..', '..', 'scripts', 'structural-suites.tsv'), 'utf-8');
+ expect(committed).toBe(generate().tsv);
+ }, 60_000);
+});