Repository navigation
Test hygiene: skipped tests show as skipped, no vacuous checks, temp folders removed, a flake gate on main - #276
Merged
Merged
Conversation
…un tutor-check does, through one shared script Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y test that failed in only one run as flaky Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ort as skipped without it instead of passing Co-Authored-By: Claude Opus 5.5 <[email protected]>
… a per-test root that the .scratch trait removes Co-Authored-By: Claude Opus 5.5 <[email protected]>
… and the run-folder and steering tests assert what they describe Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Test hygiene: checks that could pass without testing anything now fail or show as skipped, tests clean up the folders they make, and CI on main names flaky tests.
scripts/tutor-check.shholds the summary-line guard.mise run tutor-checkand CI's build job both run it, so an app that exits early fails in CI too.mise run test --skip-build).scripts/flaky-tests.shcompares the failing test names from the two logs and fails the job naming each test that failed in only one run. It reads bothrecorded an issueandfailed afterlines, because a parameterized test that fails prints nofailed afterline under--quiet. Nothing is retried. Pull requests still run the suite once..enabled(if:)with what they need, instead ofguard … else { return }.allSatisfyflagged in the audit, plus the clear ones a sweep found, now also checks a count or that the collection is not empty.outsideHeedsPanesIsNeverYounow asserts the answer is refused and the question stays unanswered. Its oldexit != .ok || …short-circuited and never checked the steering rows.aReportTheBranchCarriesIsNotReadnow shows the branch's report would read as fresh, and runsclearLeftoversto check the report is gone..scratchtrait (Tests/HeedCoreTests/Scratch.swift, aTestScopingtrait) gives each test a root under the temp directory and removes it afterwards. Helpers that made folders without removing them now useScratch.folder. One-off folders got adefer. The Audit*Tests are not touched, because fix/audit-integrity is changing them. GitEnvironmentTests already removed its folder.Verification:
mise run lintpasses.mise run testpasses apart from the knowninteractiveCallsGoFirstunder load. Mutations were applied and then reverted:logged.count == 3.clearLeftoversfails the run-folder test.aFailedSetupLeavesAShell.theProbeRunsFromFish.Zmx.killfails the real-zmx test.The flake script was run against real suite output. The tutor-check guard was tested with stub apps: no summary fails, a summary passes, and a non-zero exit is passed on.
Untested: both CI workflow changes. They only show when running on CI, and the flake gate only runs on a push to main.
🤖 Generated with Claude Code