test(state): pin v1.0 freeze-critical surface; rename ErrActorPanic#153
Closed
joshua-temple wants to merge 1 commit into
Closed
test(state): pin v1.0 freeze-critical surface; rename ErrActorPanic#153joshua-temple wants to merge 1 commit into
joshua-temple wants to merge 1 commit into
Conversation
Add characterization tests for previously zero-coverage exported surface ahead of the v1.0 freeze: SystemClock Now/After driving a real `after` transition, WithSpawnInput round-trip, actor Output, guard LeafRefs/ StateInTargets, and ForbidAny. Add a nested parallel-in-parallel done-cascade test pinning innermost-first OnDone firing (exactly once) -- the highest-risk previously-untested semantic path. Rename ErrActorPanic -> ActorPanicError for consistency with the package's other typed errors (ActionPanicError, WaitTimeoutError). Breaking change, noted in the CHANGELOG; permissible pre-v1.0. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Collaborator
Author
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.
Pre-v1.0-freeze hardening for
crucible/state. Closes the gaps the freeze sign-off review flagged.Tests added (previously 0% coverage on the exported contract)
SystemClockNow/After— the default production clock forafter/delayed transitions, now driven through a real firing (fake-clock tests skipped this path).WithSpawnInputround-trip; actorOutput.LeafRefs/StateInTargets;ForbidAny.OnDonefiring, each exactly once. No engine bug found; the cascade is correct.Coverage: SystemClock/WithSpawnInput/Output/LeafRefs/ForbidAny → 100%; StateInTargets → 88.9% (uncovered arm is the
g==nilguard).Breaking (pre-v1.0)
ErrActorPanic→ActorPanicErrorfor consistency with the package's other typed errors. CHANGELOG updated.Verification
go build/go vetclean;go test ./... -racegreen across all 6 packages;golangci-lint runclean.Open question for v1.0 owner (not addressed here)
ForbidAny()currently shadows an explicit same-stateOn(event)handler (forbids()is checked beforematchingTransitions()). The doc says it blocks events "not otherwise handled," which arguably should let a same-state handler win. The test deliberately avoids this contested precedence. Decide before freeze whether forbid-beats-same-state-handler is intended, or reconcile doc vs behavior.