Skip to content

test: resume tiered execution and eliminate fixture waits - #12760

Open
backryun wants to merge 9 commits into
diegosouzapw:release/v3.8.51from
backryun:codex/test-quick-tier-12589
Open

test: resume tiered execution and eliminate fixture waits#12760
backryun wants to merge 9 commits into
diegosouzapw:release/v3.8.51from
backryun:codex/test-quick-tier-12589

Conversation

@backryun

@backryun backryun commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

The test-efficiency work in #12539 stalled between the relocation/tier PRs and an unpublished quick-tier prototype. This continuation adds an opt-in runner derived from the canonical collectors and fixes two measured sources of unnecessary waits without deleting coverage or weakening assertions.

Depends on #12588, then #12606. This PR targets the release branch because the parent branches live on a fork. The release-relative diff therefore includes their relocation changes. Review this continuation's two commits / 12 files here:

Incremental diff against the integration-tier parent

Do not merge this continuation before its parents and the release-base failures are resolved. No auto-merge is enabled.

⚠️ base-red inherited: #12732

The existing base repair candidate is #12333; its changes are not copied into this test PR. This is a non-draft PR so the repository's CI actually runs.

Changes:

  • Add npm run test:unit:quick with --list and --concurrency. It excludes the six previously measured heavy groups, preserves per-file process/data isolation, dashboard tsx and serial concurrency, includes new canonical groups automatically, bounds command-line size, and reports failures even when later batches pass. Full CI and coverage commands are unchanged.
  • Replace five Batch API polling loops with the existing processing/completion helpers. The success test now uses a deterministic response and requires successful output instead of accepting credential failures. Existing scheduler startup/shutdown coverage remains.
  • Replace three Redis test doubles' TCP-chunk matching with a shared RESP-framing fixture. Pipelined/fragmented handshakes no longer strand concurrent-probe and socket-release tests; those assertions remain and each factory test is bounded at 10 seconds.
  • Document the recovered rollout, exact commands, measurements, remaining failures, and landing order. The earlier audit found no exact duplicates; no test suites were deleted on similarity alone.

Validation:

  • Focused Node regressions: 66 passed.
  • Vitest: 465 passed in 51 files.
  • Test discovery: 5,536 files / 34 collectors, unchanged frozen orphan debt of 9.
  • Targeted ESLint, check:docs-all, diff checks, and normal commit hooks passed. Hooks ran without a shared git stash.
  • Batch/processor group: 46 tests passed in 3.05s; the five API cases previously spent about 53s waiting for scheduler ticks. Redis factory group: 5 tests passed in 0.28s after two cases stalled over five minutes.
  • The initial quick run selected 3,898/4,946 files and recorded 29,723 passes, 26 failures, and 20 skips. Two failures were the stalled Redis files explicitly terminated during diagnosis; that run is not an uninterrupted success. The later focused runs verify their fixes.
  • Six additional failure files were rerun unchanged on the integration-tier parent: the same nine local failures reproduced. The checked-in rollout document lists them so they are not mistaken for quick-runner regressions or waived silently.

Full-suite green status and the complete before/after performance/coverage comparison remain outstanding. The 60/60/60/60 coverage floor is unchanged. Refs #12539 and #12589; this PR does not close the broader overhaul.

backryun and others added 9 commits September 5, 2026 07:25
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>
…tegration glob

Moves 8 slow hermetic suites (batch-e2e 150s, live-ws-heartbeat 54s,
resilience-http 36s, +5) to tests/integration/e2e/ with a dedicated
test:integration:e2e script, and 7 upstream-gated suites (live-gemini*,
gemini-live-429, codex-chat-reasoning, wire-capture) to
tests/integration/live/ with test:integration:live. Shared helpers used
by both tiers stay at tests/integration/ root; tier-private helpers move
along. CI runs both tiers after the default suite so no assertions stop
running anywhere.

Default test:integration: 115 -> 100 files. Pre-existing failures
(combo-failover/routing assertions, resilience-http-e2e 1 case) unchanged
and out of scope.

Refs diegosouzapw#12539
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