Repository navigation
Run a specification against its own slice only - #1060
Merged
Merged
Conversation
A specification states what its slice owns, so only that slice's behavior runs: its own reactions, captures and outbound publications. A command another slice owns is still decided for its outcome, so refusal branches work, but its facts are not adopted. The compile-time outcome check follows the same rule, so a specification that states another slice's event is refused as unreachable.
Each specification now states only what its own slice does: published events move to the translation's specification, invoked commands' facts leave the automation's specification, and the pinned bytes, revisions and outcomes are regenerated.
The Release build's StyleCop rule SA1515 refused a comment directly after a collection entry.
A specification's then section can state 'then invokes <Command>' with the values the invocation passes, in both compilers. The statement prints, walks, indexes as a command reference and appears in MCP declaration details. PLAY0815 refuses a malformed line and PLAY0816 an invocation no reaction of the specification's own slice can make (decision 0115).
A specification that states an invocation binds its command and the stated non-generated property values, selects language and semantic version 34 and serializes thenInvocations only when present, so every earlier model keeps its version, bytes and revision. Readers below v34 refuse the member, and a stated invocation counts as a success outcome.
Move the slice-isolation properties and methods into the positions the StyleCop ordering rules expect; no behavior changes.
A specification run records every invocation its slice's reactions make, with the values sent and whether the command accepted it, and exposes them as SemanticSpecificationRun.Invocations. When a specification states 'then invokes', the invocations must match in count and order (as a multiset under 'then events in any order'), comparing only stated values.
Monaco and the VS Code grammar read 'then invokes <Command>' as a step, Monaco completes it and keeps PLAY0815 on its marker, and the event model board names stated invocations in the specification header.
Every specification now states only what its own slice does (decision 0115). Automations state the command they hand over to with then invokes, facts of other slices' reactions and publications move to those slices, and the commands those automations invoke gain their own accepted-path specifications. The sample now selects ESM v34.
|
Corpus impact: Cratis/AI#926 |
Contributor
Author
|
Corpus impact: Cratis/AI#926 Verification (local):
Follow-ups: Stage and Studio pick this up after release; Studio's Acme sample spec |
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.
A specification now runs against the slice that declares it, and nothing else, so it states only what its slice owns.
Added
then invokes <Command>states a command the slice's reaction invokes, with the values it passes indented beneath, as ESM v34. A specification that states at least one invocation compares every recorded invocation in count and order, or as a set underthen events in any order.then invokesline, and PLAY0816 reports athen invokesfor a command no reaction of the specification's own slice invokes.Invocationsproperty lists the invocations its reactions made, accepted or refused, asSemanticRecordedInvocationvalues.Changed
then, read-model or query assertions. A command another slice owns is still decided when the slice's reaction invokes it, so refusals andon refusedbranches behave as declared, but its events are not kept. State that hand-over withthen invokes. See decision 0115.Translateslice's specification (when append <PrivateEvent>), and replace an invoked command's events withthen invokes <Command>.Fixed
SetProductPricestatingProductPriceChanged.