Conversation
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.
Summary
A
tb_scenario!whose configuration named no effective verifier ran green regardless of what the code did, and thirteen assertion contracts were satisfied by every possible count. Both are now refused rather than reported as passes.Related Issues
None
Changes Made
ScenarioConfigBuilder::buildreturnsResultat_least!(0)no longer compilesTesting
make test-all: passesBreaking Changes
ScenarioConfigBuilder::buildnow returnsResult<ScenarioConfig, ScenarioConfigError>.tb_scenario!need no change.?or.expect(..)ScenarioConfigchanges its return type to match.Cardinality::newandCardinality::at_least(u32)are gone --at_leastnow takesNonZeroU32.Note
Medium Risk
Breaking
ScenarioConfigBuilder::buildAPI and stricter compile-time spec rules affect alltb_scenario!and hand-built test configs; behavior is confined to the testing framework, not runtime services.Overview
Scenarios with no real verifier can no longer pass by default.
ScenarioConfigBuilder::build()returnsResultand refuses configs where no assertion/CSP/FDR layer can reject a run, or whereExpect::Violationnames a layer that cannot produce that violation.tb_scenario!unwraps via__tb_accept_config!(panic with the refusal reason); manual builders must use?or.expect(...).Assertion cardinality no longer allows no-op contracts.
at_least!(0)fails at compile time; optional labels are omitted from the spec instead.TBSpec::can_reject()treats empty assertion lists (mode-only specs) as non-verifiers unless gate decisions, required events, or schedulability constraints apply.Tests and fuzz targets drop vacuous
at_least!(0)entries and give formerly emptytb_assert_spec!blocks realexactly!assertions so they still build under the effective-verifier rule.Reviewed by Cursor Bugbot for commit 613cbfd. Bugbot is set up for automated code reviews on this repo. Configure here.