Simplify test suites without weakening coverage - #1143
Merged
Conversation
robinebers
added a commit
that referenced
this pull request
Aug 25, 2026
Second simplification pass after #1143, covering the suites that pass did not touch: consolidates duplicated fixtures (Cursor JWT/SQLite fakes, OpenCode stub, BlockingParser, sequence runtimes), parameterizes near-identical test clusters, and removes tests whose behavior is verified elsewhere or that restated the implementation. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Audit all 139 Swift test/support files and simplify 53 test files without weakening meaningful regression coverage. Reduce repository test/support code from 27,885 to 25,825 lines (2,060 fewer; 7.4%).
What was happening
What this changes
Heads-up
Tests
swift test: 1,190 app XCTest cases, 4 CLI XCTest cases, and 3 Swift Testing cases; 0 failures, 3 expected skips.swift build: passed.git diff --check: passed.Note
Low Risk
Tests-only refactor: no app behavior, auth, or data-handling changes. Residual risk is slightly less isolated cases if a merged loop misses a previously separate assertion.
Overview
Shrinks and consolidates XCTest suites (~2k fewer test lines) with no production-code changes. Equivalent auth, mapping, scanner, layout, cache, and formatter cases are folded into table-driven loops; shared helpers (
configuredAuthStore,makePersistence,makeSync,limitResource) replace copy-pasted setup.Fixtures and assertions are tightened (smaller JSON/CSV payloads,
mapequality instead of per-field checks). A few overlapping tests are merged (e.g. unknown vs synthetic Claude models, Copilot extra-usage/org-seat variants, Codex reset-credit fallbacks) while keeping distinct failure modes. Some concurrency fixtures use fewer files; pin-cap tests use two providers instead of four.Reviewed by Cursor Bugbot for commit ecffbc6. Bugbot is set up for automated code reviews on this repo. Configure here.