Skip to content

An opt-in strict completion policy for runs - #82

Merged
ptescher merged 1 commit into
mainfrom
strict-completion
Nov 12, 2026
Merged

ptescher merged 1 commit into
mainfrom
strict-completion

Conversation

@ptescher

Copy link
Copy Markdown
Owner

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.

Policy Passes when expectation-run
Policy::Lenient nothing failed the default
Policy::Required every test that isn't pending ran and passed --strict
Policy::All every test ran and passed, nothing pending --strict=all
  • Report::meets(policy) and Report::incomplete(plans, policy), which lists each test that didn't run with its status and reason, and the pending ones Required let by, apart.
  • Acceptance::assert_passes_with(driver, opts, policy); assert_passes is the lenient one, as before.
  • A run of no tests meets neither strict policy.
  • expectation-run judges 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.
  • Approval plays no part.

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 real expectation-run binary exits 0 by default and 1 with --strict when the app lacks a binding, even with earlier passes saved in --docs.
  • cargo test --workspace and cargo clippy --workspace --all-targets -- -D warnings pass locally.

🤖 Generated with Claude Code

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>
@ptescher
ptescher merged commit 3c71907 into main Nov 12, 2026
3 checks passed
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.

Runner: opt-in strict completion policy for required plans

1 participant