Skip to content

feat(format): accelerate selected test formatting - #764

Merged
kvlonge merged 2 commits into
mainfrom
fix/format-test-selection-performance
Sep 21, 2026
Merged

kvlonge merged 2 commits into
mainfrom
fix/format-test-selection-performance

Conversation

@kvlonge

@kvlonge kvlonge commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Why

Formatting selected SQL tests unnecessarily compiled the full project graph, rejected path:tests/... selectors, and invoked native formatting once per SQL body. Large test projects therefore spent most of their time in unrelated discovery and fixture completion.

Changes

  • support simple path selection across every formatter-owned SQL root, including tests/
  • discover only selected fixture candidates and referenced contracts for contract-aware cleanup
  • keep typed-null removal conservative through explicit contract-prefix checks
  • batch and parallelize native SQL formatting while deduplicating identical bodies
  • batch header parsing and report formatting duration plus checked/changed file counts
  • add --fixtures-only for contract fixture cleanup without canonical SQL churn
  • add deterministic work-count, absolute latency, and 500/1,000/2,000-file scaling guards

Verification

  • focused format unit and integration tests: 38 passed
  • formatter performance guards: 3 passed
  • focused Rust formatter tests and Clippy passed
  • uv sync --all-extras
  • make check-ci
  • public repository hygiene scan

@kvlonge
kvlonge enabled auto-merge (squash) September 21, 2026 06:41
@kvlonge
kvlonge disabled auto-merge September 21, 2026 06:43
@kvlonge
kvlonge enabled auto-merge (squash) September 21, 2026 06:43
@kvlonge
kvlonge disabled auto-merge September 21, 2026 06:46
@kvlonge
kvlonge enabled auto-merge (squash) September 21, 2026 06:53
@kvlonge
kvlonge merged commit 1782e00 into main Sep 21, 2026
21 checks passed
@kvlonge
kvlonge deleted the fix/format-test-selection-performance branch September 21, 2026 07:05
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