test(lint): tighten seam regex + drop reference-only suites (#698)#707
Conversation
Two cleanups to the TestSeamLintTests ratchet: 1. Anchor the hazard-type regex with a leading word boundary (\b). Without it, the pattern matched a method NAME ending in a type, e.g. `testAppKitSourcesDoNotBypassInstallerEngine()`, flagging FacadeLintTests as a false positive. 2. Drop 4 reference-only suites from the allowlist (they only name the types, never construct them, so the tightened regex no longer flags them): FacadeLintTests, PrivilegedOperationsCoordinatorTests, SystemRequirementsTests, WizardPureLogicTests. Allowlist shrinks 8 → 4. The remaining 4 are the genuinely-hard cases: ErrorHandlingTests, KeyPathTests, RuntimeCoordinatorResetTests (real saveConfiguration/ resetToDefaultConfig I/O — see #698) and VHIDDeviceManagerTests (the seam's own test). Verified: `swift test --filter TestSeamLintTests` passes in 0.08s. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code Review — PR #707: Tighten seam regex + drop reference-only suitesOverviewThis PR does two tightly-coupled things to shrink the test-seam allowlist from 8 → 4:
Correctness: ✅Regex fix is sound. The old pattern Dropped files are correctly excluded. Breaking down each:
One minor inaccuracy in the PR description: It says all 4 dropped suites "only name the types but never construct them." For The Ratchet Invariant: ✅Allowlist shrinks from 8 → 4. The Minor ObservationsSecond alternative doesn't need File-name-based allowlist caveat (pre-existing, not introduced here): The allowlist matches on TestsPR claims Verdict: LGTM. The regex fix is correct, all 4 dropped files are verified to be safe to remove, and the allowlist ratchet is maintained. The minor description inaccuracy is not blocking. |
Part of #698 — shrinks the test-seam allowlist 8 → 4.
\b) so it stops matching a method name ending in a type (e.g.testDoNotBypassInstallerEngine()was a false positive flagging FacadeLintTests).FacadeLintTests,PrivilegedOperationsCoordinatorTests,SystemRequirementsTests,WizardPureLogicTests.Remaining allowlist (4) is the genuinely-hard set:
ErrorHandlingTests,KeyPathTests,RuntimeCoordinatorResetTests(real config-regeneration I/O) +VHIDDeviceManagerTests(the seam's own test).Verified
swift test --filter TestSeamLintTestspasses in 0.08s.