Skip to content

feat(tests): use describe.concurrent() on independent test suites#830

Merged
aaight merged 1 commit intodevfrom
feat/describe-concurrent-independent-tests
Mar 14, 2026
Merged

feat(tests): use describe.concurrent() on independent test suites#830
aaight merged 1 commit intodevfrom
feat/describe-concurrent-independent-tests

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Mar 14, 2026

Summary

  • Converted 10 top-level describe() blocks (across 10 files) to describe.concurrent() in config/, utils/, and agents/definitions/ directories
  • Files selected have fully independent, self-contained tests with no shared mock state mutations between tests
  • This allows tests within the same file to run in parallel on the same worker, reducing wall-clock time

Files changed

config/ (6 files):

  • customModels.test.ts — pure validation, no mocks
  • integrationRoles.test.ts — pure validation, no mocks (2 top-level describes)
  • rateLimits.test.ts — pure validation, no mocks
  • reviewConfig.test.ts — pure validation, no mocks
  • retryConfig.test.ts — factory function for local mocks only (createMockLogger()), no shared state
  • schema.test.ts — pure validation, no mocks (2 top-level describes)

utils/ (2 files):

  • prUrl.test.ts — pure string/regex functions, no mocks (2 top-level describes)
  • llmMetrics.test.ts — local mock objects created per-test, no shared state

agents/definitions/ (2 files):

  • schema.test.ts — pure Zod schema validation, no mocks (5 top-level describes)
  • strategies.test.ts — pure registry lookup, no mocks

Exclusions (per acceptance criteria)

Files intentionally excluded:

  • Files using vi.useFakeTimers(): configCache.test.ts, lifecycle.test.ts, webhookLogger.test.ts
  • Files with per-test shared mock state mutations: hintConfig.test.ts, statusUpdateConfig.test.ts, agentMessages.test.ts, cascadeEnv.test.ts, llmEnv.test.ts, llmLogging.test.ts, squintDb.test.ts, compactionConfig.test.ts
  • Files with internal shared cache mutations: loader.test.ts (calls clearDefinitionCache() inside a test), contextSteps.test.ts
  • Files in backends/, triggers/ — too many mock interactions (out of scope per card)

Testing

  • All 10 converted files: 186 tests pass ✓
  • Full unit-core suite: 2743/2751 pass (8 pre-existing failures in unmodified files confirmed before and after changes)
  • Lint: passes ✓
  • TypeScript: no errors ✓

https://trello.com/c/QoOehWQ0/343-as-a-developer-i-want-describeconcurrent-on-independent-test-suites-so-that-tests-within-a-file-run-in-parallel

🕵️ claude-code · claude-sonnet-4-6 · run details

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - the describe.concurrent() changes are confined to independent suites, and the touched tests remain stable under concurrent execution. I verified the 10 modified files pass as a set (186 tests) and they stayed green across 10 repeated runs.

🕵️ codex · gpt-5.4 · run details

@aaight aaight merged commit 923f7c6 into dev Mar 14, 2026
6 checks passed
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.

2 participants