# Tests under the floor: finding the real cost of a slow suite

**Disposition:** A historical investigation, judged paid on 18 September 2026. The measured suite was archived on 26 September.

**Evidence:** Profiled setup, a bisected regression, focused repair verification, corrected worker measurements, and a later green health reading.

## The suspicion needed a measurement

The Human asked whether the process or inefficient tests explained the wait. [FIND-1875](#find-1875) supplied a baseline on 14 September 2026: a serial run at commit `30f86071` took 2,830 seconds, with 4,321 passes, nine failures, and three skips.

The slowest tests explained only part of the wait. The sixty slowest accounted for 579 seconds; much of the remainder appeared as a broad cost across ordinary tests. Profiling found repeated database construction. The run created 2,308 SQLite stores, including 1,346 at schema version 35. A fresh store walked thirty-four migrations. In two ordinary tests profiled under load, initialization consumed 7.8 of 11.4 seconds.

The investigators checked a cheaper setup's equivalence. Copying an already migrated store to a fresh path and opening it took about 0.006 seconds in the recorded probe. Its schema and version matched a newly walked store, with all thirty-five migration-history rows present.

## An optimization caused a real regression

PATCH-575 introduced a seam inside initialization. Production retained its migration walk. Under pytest, each process built one pristine migrated store and copied it for subsequent fresh paths. A representative 129-test file later ran in 16.1 seconds, around 0.125 seconds per test, compared with the earlier approximate 0.5-second ordinary-test cost. Those file-level figures are not a fourfold improvement of the full suite.

The change also broke a larger command-canary exercise. Its fixture wrapped `sqlite3.connect` and asserted that every opened database belonged to its disposable environment. The first creation of the process's pristine store used a different temporary naming pattern. The guard raised, the canary converted the exception into its report, and the connection count stayed at zero.

[FIND-1888](#find-1888) bisected this failure to PATCH-575. A probe also disproved an early explanation involving clock-pinned seed data: disabling the seam did not remove a separate set of differences. Those differences were expected by the exercise at the time. The rejected explanation remains recorded.

## Repair preserved the check's purpose

Teaching the fixture another temporary-directory name would have coupled it to the optimization. Instead, PATCH-593 made the canary's deterministic runtime walk its own stores, as the exercise claimed to do. The connection guard stayed. The [verification fields](#patch-593) identify the exact commit and focused command.

The repaired file reported 37 passes in 107.53 seconds on a busy host. This restored correctness; the integration exercise remained expensive. Another repair grouped pair-store schema creation into one transaction without changing journal mode or relaxing durability settings. The account records the affected test files falling from 342 to approximately 218 seconds serially. These measurements describe different cuts.

## Counting workers changed the conclusion

An inherited claim said `-n auto` used twenty-four workers. The host had twelve physical cores and twenty-four logical CPUs, and that option started twelve workers. An earlier comparison interpreted as twelve against twenty-four had compared twelve against twelve.

[FIND-1895](#find-1895) corrected the count and measured the fast tier again. At the recorded commit and host, twenty-four workers had a sixty-second median across five runs; twelve workers had an eighty-one-second median across five runs. Known failures remained. This establishes a scheduling result for that selection and host, not a clean correctness result.

The finding also recorded fewer Git launches without a wall-time effect distinguishable from host noise. The full measured count fell from 8,865 to 8,266, or 599 fewer. Excluding two newly added test files gave 7,914 launches, or 951 fewer than the earlier total. That adjusted comparison must not be presented as the full measured reduction. Fewer operations did not justify claiming a measured speedup.

## What the ending supports

On 18 September, FIND-1942 recorded a green health reading at `2629fc49`: zero red and 268.8 seconds. The Architect judged the investigation paid. That reading and the subminute fast-tier runs have different selections and conditions; they cannot form one before-and-after ratio.

The suite was archived on 26 September as Corpus changed where tests ran. This is a historical account of reproduced costs, local repairs, and corrected interpretations. It is not today's benchmark. Nor does it establish that every test was necessary: choosing the smallest check that demonstrates a guarantee remained a separate question.

## Source samples

Quotations and record fields below are reviewed selections. Historical commands retain their original test paths.

### FIND-1875

**14 September 2026 · serial baseline**

> 4321 passed / 9 failed / 3 skipped in **2830 s (47 min)**.

Commit: `30f86071`. The baseline was already failing, so timing alone could not certify an improvement.

### FIND-1888

**14 September 2026 · rejected repair**

> teaching the test the seam's temp-dir name would pin conftest internals into a bench test.

The chosen repair made the canary walk the stores it claimed to exercise.

### PATCH-593

**14 September 2026 · verification fields**

| Field | Recorded value |
| --- | --- |
| Status | verified |
| Verifier | Imp_Ferrule |
| Verified commit | `bc47a68c72e0ecef44e514c5ce14129d5aa6a3e6` |
| Verify command | `python -m pytest tests/test_ops_command_canary.py -q -n0` |

Verification and landing are separate claims.

### FIND-1895

**14 September 2026 · corrected comparison**

> Her "`-n 12` 88 s vs `-n auto` = 24 84 s, so more workers add contention" compared 12 with 12.

The correction changes interpretation, not recorded time.

## Source provenance

Private source account: `library/work/tests-under-the-floor/README.md`. Owning records: FIND-1875, FIND-1880, FIND-1888, PATCH-575, PATCH-593, PATCH-594, FIND-1895, FIND-1942. Historical tests: `archive/tests/suite-2026-09/`; setup mechanism: `conftest.py`. Paths are relative to the private Corpus repository. Full records remain private. Reviewed 17 October 2026.
