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
Test material was fifteen loose
create_*functions in a module namedutils, and the harness read its own state through free functions and hand-rolled cursor arithmetic. A CSP process whose alphabet a run never touched also passed, because a trace that takes no transition satisfies every process.Related Issues
None
Changes Made
schedulability:intb_assert_spec!compiles at allFrameandTransportEnvelopeDERtesting-propertyTesting
make test-all: passesBreaking Changes
create_test_signing_key()isTestKey::signing().create_v0_tightbeam()isTestFrame::v0().testing::utilsistesting::fixtures.verify_trace(spec, trace)isspec.verify(trace).()and are built withTestHooks::on_pass/TestHooks::on_fail.?becomes an assertion.ProcessBuilder::permits_no_progress.Note
Medium Risk
Breaking testing and CSP verification behavior can fail downstream scenarios; CSP progress checks change what counts as a pass. New DER fuzz targets exercise untrusted-input boundaries but do not alter production decode logic.
Overview
This PR reorganizes the test harness and tightens a few verification semantics, with breaking changes for anyone using
testingAPIs.Fixtures lose the scattered
create_*helpers in favor of owner types (TestKey,TestFrame,TestCertificate,TestMessage,TestDigest, …) undertesting::fixtures. Call sites across tests, fuzz targets, and consumer crates are updated accordingly.Scenario grading moves trace checking onto specs (
spec.verify(trace)instead ofverify_trace), folds the expected pass/fail once intoHookContext::outcome(), and reshapesTestHooksintoon_pass/on_failobservers that return()(so errors cannot be swallowed with?).CSP Layer 2 now defaults to
requires_progress: a run that never emits an event in the process alphabet fails withNoProgressunless the process explicitly callsProcessBuilder::permits_no_progress()(trace-derived processes setrequires_progress: false).Fuzzing adds AFL
tb_scenario! { fuzz: afl, raw: ... }targets forFrame::from_derandTransportEnvelope::from_der, centralizes fuzz byte cursor logic inFuzzContextInner, and introduces optionaltesting-propertywith proptest in the workspace lockfile.Reviewed by Cursor Bugbot for commit 97ce67d. Bugbot is set up for automated code reviews on this repo. Configure here.