Repository navigation
An opt-in strict completion policy for runs - #82
Merged
Merged
Conversation
A run passes when nothing failed, so tests the driver can't run yet, pending ones and ones that weren't run let a release gate through. A policy asks for more, and the default is what it was: - Policy::Required (expectation-run --strict): every test that isn't pending ran and passed - Policy::All (--strict=all): every test ran and passed, nothing pending - Report::meets and Report::incomplete, which lists each test that didn't run with its status and why, and the pending ones Required let by, apart - Acceptance::assert_passes_with for tests - a run of no tests meets neither: it verified nothing - expectation-run judges its own run's report, so a pass an earlier run saved doesn't stand in for a test that didn't run now Closes #78 Co-Authored-By: Claude <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.
Closes #78.
A run passes when nothing failed, so tests the driver can't run yet, pending ones and ones that weren't run let a release gate through. This adds an opt-in policy. The default is unchanged.
expectation-runPolicy::LenientPolicy::Required--strictPolicy::All--strict=allReport::meets(policy)andReport::incomplete(plans, policy), which lists each test that didn't run with its status and reason, and the pending onesRequiredlet by, apart.Acceptance::assert_passes_with(driver, opts, policy);assert_passesis the lenient one, as before.expectation-runjudges its own run's report, not the merged one, so a pass saved by an earlier run doesn't stand in for a test that didn't run now.Tests
crates/harness/tests/strict.rs: unsupported, pending, failed, not-run and empty reports against each policy; merged results; both assertions.crates/remote/tests/strict.rs: the realexpectation-runbinary exits 0 by default and 1 with--strictwhen the app lacks a binding, even with earlier passes saved in--docs.cargo test --workspaceandcargo clippy --workspace --all-targets -- -D warningspass locally.🤖 Generated with Claude Code