Skip to content

Pin constraint refusal precedence and run specs natively on xUnit v3 - #1058

Merged
woksin merged 24 commits into
mainfrom
screenplay-train-1025
Oct 25, 2026
Merged

woksin merged 24 commits into
mainfrom
screenplay-train-1025

Conversation

@woksin

@woksin woksin commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Changed

woksin added 24 commits October 24, 2026 09:50
These specifications mutate state in their context and only pass when
each fact gets a fresh instance, as under xUnit v2. Mark them
[PerFactSpecificationLifecycle] so native xUnit v3 keeps that behavior.
Specifications 5 checks IEquatable<T> before ordered enumeration, so
ShouldEqual on an ImmutableArray<T> compares by reference identity.
Convert both sides with ToArray() so the specs compare contents.
These specifications move, rename or remove documents, or advance
journals and continuations, and later facts in the same class read that
state. xUnit v2 gave each fact a fresh instance; mark them
[PerFactSpecificationLifecycle] so native xUnit v3 keeps that isolation.
Specifications 5 fails ShouldNotContain on a null string, where v2
passed. The readiness text is null when nothing is unadmitted, which is
what these specs assert, so compare against an empty string instead.
Same Specifications 5 behavior as the earlier ImmutableArray fix:
ShouldEqual checks IEquatable<T> before ordered enumeration, so an
ImmutableArray<T> compares by reference identity. Convert the
EsmSchemaV32Support lists with ToArray() so the spec compares contents.
ShouldContain now accepts a nullable string, so the ! on PendingReason
in the v1 screen corpus spec is redundant and fails the Release build.
# Conflicts:
#	Source/DotNET/Screenplay.CanonicalVectors.Specs/for_RegisterProjectCorpus/when_comparing_the_interoperability_version_table.cs
# Conflicts:
#	Source/DotNET/Screenplay/Semantics/Execution/for_SemanticEvaluator/when_validating_query_concepts.cs
The apply fact mutated the shared fixture document, so under the
xUnit v3 lifecycle the no-write discovery/preview assertion could
observe migrated bytes. Move applying into its own context.
@woksin woksin added the minor New features, non-breaking additions label Oct 25, 2026
@woksin woksin self-assigned this Oct 25, 2026
@woksin

woksin commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Reviewer notes

@woksin woksin added the ai-corpus: tracked Language change; the AI corpus update is tracked in a linked Cratis/AI issue or PR label Oct 25, 2026
@woksin
woksin merged commit 690a1c5 into main Oct 25, 2026
26 of 29 checks passed
@woksin
woksin deleted the screenplay-train-1025 branch October 25, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-corpus: tracked Language change; the AI corpus update is tracked in a linked Cratis/AI issue or PR minor New features, non-breaking additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant