Skip to content

[Critical] Test suite scale is inefficient: relocate unit suites into per-prefix subdirs - #12588

Open
backryun wants to merge 6 commits into
diegosouzapw:release/v3.8.51from
backryun:chore/test-efficiency-12539
Open

[Critical] Test suite scale is inefficient: relocate unit suites into per-prefix subdirs#12588
backryun wants to merge 6 commits into
diegosouzapw:release/v3.8.51from
backryun:chore/test-efficiency-12539

Conversation

@backryun

@backryun backryun commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Relocates 4,263 flat unit test files into prefix directories and updates their imports, runner globs, impact selection, mutation paths, and quality-baseline keys so the reorganized suite remains discoverable. Existing test assertions are retained. File relocation alone is not a suite-speed claim.

The DB pre-migration backup test import and moonshot/seekai selector drift are fixed in this prerequisite, using the original commit from #12606 with its author and Diego co-author trailer preserved. The main unit/coverage glob no longer also collects the 23 dashboard tests: those run once in their dedicated full-tsx phase. A new regression guard checks that partition across seven unit/coverage configurations.

Validation:

  • 43 targeted runner, selector, and DB-import tests passed.
  • Test discovery and strict mutation registration passed; removing the dashboard overlap did not change unique test membership.
  • CI restarted after rebasing onto release/v3.8.51 at 9d1a896; results are pending. No merge commits were introduced, and authorship/co-author trailers were preserved.

⚠️ base-red inherited: #12732

The separate base repair candidate is #12333. This PR does not incorporate its production fixes.

Landing sequence: this relocation PR → integration split #12606 → quick-tier and deterministic-fixture continuation #12760. Refs #12539; merging relocation must not close the broader test-efficiency effort.

This PR includes path-reference edits to AGENTS.md. Repository policy requires explicit operator approval before merging an instruction-surface change.

@backryun backryun changed the title Test suite scale is inefficient: relocate unit suites into per-prefix subdirs [Critical] Test suite scale is inefficient: relocate unit suites into per-prefix subdirs Sep 3, 2026
@backryun
backryun force-pushed the chore/test-efficiency-12539 branch 9 times, most recently from 40569f0 to 12f76ce Compare September 4, 2026 22:31
backryun and others added 6 commits September 5, 2026 19:16
Moves all ~4.3k tests/unit/*.test.* files into per-prefix subdirectories
(e.g. chatcore/, combo/, translator/, cli/, db/, provider/) plus misc/ for
the unclassifiable tail. No test logic changed except one-level-deeper
relative import/path fixes.

Syncs the 4 runner-glob owners (package.json test:unit scripts,
check-test-discovery.mjs, build-test-impact-map.mjs, merge-train.sh),
renames quality-baseline keys (file-size, eslint-suppressions,
test-masking-allowlist), and updates docs/ test-path references so the
fabricated-docs, test-discovery, file-size and masking gates stay green.

Refs diegosouzapw#12539
- stryker.conf.json: remap 338 tap.testFiles entries from flat
  tests/unit/*.test.ts paths to their new per-prefix subdirs
  (fixes check:mutation-test-coverage --strict).
- tests/unit/serial/: evict refresh-serializer*.test.ts misclassified
  by substring match into the concurrency quarantine; they belong to
  oauth/. Drop serial from the parallel runner brace so the
  quarantine is not double-executed (fixes test-serial-quarantine).
claude-fable, embedding-clova, obscura, provider-cost-data,
translator-clova-v3 -> per-prefix subdirs. flat = 0 again.
… tier split

The suite relocation left tests/unit/db/db-pre-migration-backup-retention-10421.test.ts importing ../../src (resolves to tests/src), and merge-train.sh / TIA omitted the moonshot and seekai prefixes that test:unit actually runs.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@backryun
backryun force-pushed the chore/test-efficiency-12539 branch from f88979f to d4fccfa Compare September 5, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant