# Script test census (/docs/research/scripts-tests)

Of 168 test suites under scripts/, 47 were invoked by nothing at all; all 42 runnable ones were triaged and wired into a single discovery runner.

A census of the `scripts/` tree found a verification hole: of the **168 test files** under `scripts/**`, **47 were invoked by nothing at all** — they passed or failed for nobody. The 47 were lost precisely because nothing named them and no list was checked in.

## What was built [#what-was-built]

A single runner discovers and runs every test suite under `scripts/`, so the hole cannot reopen when someone adds a suite under a new subdirectory:

```bash
node scripts/ci/run-scripts-tests.mjs
```

It exits 0 only if every discovered file passed, and 1 on any failure **or when nothing ran at all**. Discovery enumerates `scripts/` recursively and runs each kind the way its host needs: `*.test.mjs` under `node --test`, `*.test.ts` through a vitest host, `test-*.ps1` under PowerShell, and anything under `fixtures/**` skipped with the reason shown.

## The triage of all 47 [#the-triage-of-all-47]

Every file was run for real, bare, with no arguments. Nothing was deleted and no assertion was weakened:

| category | count | result |
| --- | --- | --- |
| runnable | 42 | all PASS |
| broken | 0 | — |
| stale (only ever ran by hand with arguments) | 0 | — |
| intentionally-unwired | 5 | skipped, with the reason |

The 42 runnable files hold **423 assertions** and about **59 s** of child-process time. The 5 skipped are the mini-eval's own solution tests under `fixtures/`: running them as a gate over this repository would assert nothing about the repository, so the runner skips anything under a `fixtures/` directory and says so — the skip is visible in the output and counted, never silently dropped.

<Callout type="info">
The set is provably the census's: a set-comparison of the three input lists against the baseline's own `unwired` array returns nothing missing and nothing extra.
</Callout>
