@cratis/pi 7.27.3 → 7.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/skills/cratis-arc-command/SKILL.md +34 -11
- package/package/corpus/skills/cratis-arc-command/references/generated-values.md +166 -0
- package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +13 -5
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +3 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +2 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +4 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +5 -3
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +3 -2
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/invocation-identity.md +6 -5
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +1 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +4 -4
- package/package/corpus/skills/cratis-screenplay-command-surface/references/context.md +6 -5
- package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +5 -5
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +4 -3
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +4 -4
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +6 -4
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +10 -7
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +60 -10
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/screen-authoring-workflow.md +6 -5
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +11 -1
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +29 -5
- package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +1 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/references/guarded-actions.md +2 -2
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +12 -11
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +3 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +4 -4
- package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +3 -3
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +2 -2
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +6 -6
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +4 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +7 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +7 -6
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +364 -28
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +4 -4
- package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +4 -4
- package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +23 -13
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +1 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +6 -6
- package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +21 -0
- package/package/corpus/skills/cratis-specifications-csharp/references/application-scenarios.md +80 -4
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +18 -8
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +5 -3
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/case-tables-and-whole-numbers.md +127 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +5 -1
- package/package.json +1 -1
|
@@ -17,13 +17,13 @@ probe; older probes retain their original labels in the other references.
|
|
|
17
17
|
|
|
18
18
|
| Source | Pin | Evidence |
|
|
19
19
|
| --- | --- | --- |
|
|
20
|
-
| Screenplay language, standalone tool and MCP | **4.
|
|
21
|
-
| cratis CLI | **3.
|
|
22
|
-
| Screenplay bundled by CLI | **4.
|
|
23
|
-
| Stage bundled by CLI | **4.
|
|
20
|
+
| Screenplay language, standalone tool and MCP | **4.131.0** (`71f3ef37`) | Released tag `v4.131.0` and its published contract; `semantic-diff` source selections in `Source/DotNET/Screenplay.Mcp/McpRevisionDiff.cs` |
|
|
21
|
+
| cratis CLI | **3.46.1** (`73578fbf`) | Released tag `v3.46.1`; source-checked, not a new render/browser probe |
|
|
22
|
+
| Screenplay bundled by CLI | **4.130.0** | CLI `v3.46.1:Directory.Packages.props`; predates the 4.131.0 `semantic-diff` source objects |
|
|
23
|
+
| Stage bundled by CLI | **4.52.0** | Same file; default runtime image `cratis/stage:4.52.0`, confirmed by `Source/Cli.Specs/for_RunCommand/when_running/with_a_folder_and_the_default_stage_tag.cs` |
|
|
24
24
|
| Cratis.Arc.Screenplay bundled by CLI | **22.54.0** | Same file; this is the generator package, not a blanket rendered-app dependency pin |
|
|
25
25
|
| Chronicle / Fundamentals bundled by CLI | **19.32.0 / 7.22.8** | Same file |
|
|
26
|
-
| Stage 4.51.3 rendered backend | **Arc 22.50.5 / Chronicle 19.32.0** | Stage `v4.51.3:Source/Rendering.Cratis/Scaffolding/CratisBackendApplicationScaffoldProfile.cs`; client/testing/image match; scaffold disables embedded reverse extraction |
|
|
26
|
+
| Historical Stage 4.51.3 rendered backend | **Arc 22.50.5 / Chronicle 19.32.0** | Stage `v4.51.3:Source/Rendering.Cratis/Scaffolding/CratisBackendApplicationScaffoldProfile.cs`; client/testing/image match; scaffold disables embedded reverse extraction |
|
|
27
27
|
|
|
28
28
|
The published `screenplay-contract.json` beside this reference is the machine-readable authority for PLAY codes, MCP tools and parameters, and standalone CLI commands/options. Its unchanged release bytes are pinned by `screenplay-contract.version` to the standalone version above. Before adding a claim, search this large JSON file by exact `code` in `diagnostics`, or by exact `name` in `mcpTools`/`cliCommands`, and inspect that object's retirement flag, parameters or options; do not load the full file into context. For example, search for `"code": "PLAY0029"` or `"name": "read-workspace"`; `screenplay-contract-exceptions.json` preserves explicitly reasoned historical statements, not current-release exceptions. Coverage gaps are mention inventories, not proof that a skill teaches a feature.
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ on PATH can shadow a newer install; inspect `which -a cratis`.
|
|
|
33
33
|
|
|
34
34
|
## Two compilers, one rule
|
|
35
35
|
|
|
36
|
-
Standalone Screenplay 4.
|
|
36
|
+
Standalone Screenplay 4.131.0 and the CLI's 4.130.0 bundle are different releases.
|
|
37
37
|
Prefer standalone for the current language checks; CLI owns generation, Prologue
|
|
38
38
|
and rendering. Name the tool/version with every verdict. No verdict transfers
|
|
39
39
|
between differing compilers without checking the same inputs there.
|
|
@@ -65,20 +65,22 @@ for identity-stable selection.
|
|
|
65
65
|
|
|
66
66
|
## Admission boundaries
|
|
67
67
|
|
|
68
|
-
Screenplay `v4.
|
|
68
|
+
Screenplay `v4.131.0:Source/DotNET/Screenplay/Semantics/Versions.cs` supports schema
|
|
69
69
|
pairs through v10. Generated values/responses and policy negation select v7;
|
|
70
70
|
sources/streams and command/specification routes select v8; reaction
|
|
71
71
|
`runs as system [role "<Role>"]` selects v10 and reference-executes on 4.125.0.
|
|
72
72
|
The checked trusted-actor scenario is in captures-and-reactions
|
|
73
|
-
`references/invocation-identity.md`. CLI 3.41.0
|
|
74
|
-
source with PLAY0137 (
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
`references/invocation-identity.md`. The historical CLI 3.41.0/Screenplay 4.114.0
|
|
74
|
+
validation probe rejected its source with PLAY0137 (exit 5); that is not a
|
|
75
|
+
3.46.1 parser claim. Stage 4.52.0's direct planner uses EsmSchemaV7Support
|
|
76
|
+
(`Source/Rendering.Cratis/Semantics/SemanticCratisAdmission.cs`) and refuses v10
|
|
77
|
+
with STAGE-ESM-016; CLI's version gate separately refuses above v7 with
|
|
78
|
+
CLI-RENDER-004. A source construct
|
|
77
79
|
still requires explicit binder/runner/provider admission: operations, exact
|
|
78
80
|
numeric mode and reaction refusals/redelivery remain authorable but unadmitted
|
|
79
81
|
(`PLAY0268`). Never delete those contracts to obtain a green bind.
|
|
80
82
|
|
|
81
|
-
CLI 3.
|
|
83
|
+
CLI 3.46.1 `RenderedSemanticVersions.Newest` is **v7**:
|
|
82
84
|
`Source/Cli/Commands/Render/RenderedSemanticVersions.cs`. Models above it get
|
|
83
85
|
`CLI-RENDER-004` before planning/publication. v7 generated values/responses reach
|
|
84
86
|
Stage admission; they are not universally refused until CLI#261. That issue is
|
|
@@ -86,9 +88,17 @@ closed. Each unsupported construct still needs a Stage diagnostic, not a silent
|
|
|
86
88
|
omission or inferred support from package versions.
|
|
87
89
|
|
|
88
90
|
The renderable-subset and Stage references retain older probes explicitly;
|
|
89
|
-
read them as tested snapshots, not as a claim that Stage 4.
|
|
91
|
+
read them as tested snapshots, not as a claim that Stage 4.52.0 shares every
|
|
90
92
|
4.24.2 limitation. Query the actual bundled renderer before a V5 claim.
|
|
91
93
|
|
|
94
|
+
Stage case tables require 4.59.0; ESM v8 whole numbers as `long` and the
|
|
95
|
+
pre-v8 out-of-`int` refusal STAGE-ESM-031 require 4.61.0. CLI 3.46.1 defaults
|
|
96
|
+
to Stage 4.52.0, so neither new rule applies there. `cratis run --tag 4.63.2`
|
|
97
|
+
selects a newer sandbox image only (`RunSettings.cs`), not a renderer package.
|
|
98
|
+
`cratis render` has a statically bundled target (`RenderSettings.cs`,
|
|
99
|
+
`CratisRenderTarget.cs`); a newer renderer needs a CLI release that pins it.
|
|
100
|
+
The Stage skill teaches the version-gated examples.
|
|
101
|
+
|
|
92
102
|
At 4.127.0, `$identity` aliases built-in caller paths; declared identity details
|
|
93
103
|
remain metadata and their executable reads report PLAY0268. Bare `pii`/`secret`
|
|
94
104
|
still block binding; `personal` aliases `pii`. Legacy markers are accepted with
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
6
|
{ "kind": "play-compiles" },
|
|
7
|
-
{ "kind": "skill-contains", "value": "4.
|
|
7
|
+
{ "kind": "skill-contains", "value": "4.131.0" },
|
|
8
8
|
{ "kind": "skill-contains", "value": "PLAY0653", "file": "references/diagnostics.md" },
|
|
9
9
|
{ "kind": "skill-contains", "value": "PLAY0646", "file": "references/diagnostics.md" },
|
|
10
10
|
{ "kind": "skill-contains", "value": "PLAY0595", "file": "references/diagnostics.md" },
|
|
@@ -32,13 +32,13 @@ hand-writing an alternate shape.
|
|
|
32
32
|
without dropping it, silently falling back or replacing it with a default.
|
|
33
33
|
|
|
34
34
|
Keep those three lines separate in reports. Correct an old limitation only when
|
|
35
|
-
the package/version you are using proves the new level.
|
|
35
|
+
the package/version you are using proves the new level. Historical verified vector:
|
|
36
36
|
CLI 3.43.0 with its default `cratis/stage:4.52.0` and bundled Screenplay 4.127.0;
|
|
37
37
|
the executed vector renders on Scene 4.15.0. Packages published since are newer than
|
|
38
38
|
that vector and are not claimed verified: Scene 4.17.0, Screenplay 4.133.1, Stage
|
|
39
|
-
4.64.0, CLI 3.46.1 (its default Stage is still 4.52.0) and
|
|
40
|
-
three levels hold for the canonical `ScreenComposition`
|
|
41
|
-
|
|
39
|
+
4.64.0, CLI 3.46.1 (bundled Screenplay 4.130.0; its default Stage is still 4.52.0) and
|
|
40
|
+
Studio 0.152.2. All three levels hold for the canonical `ScreenComposition` corpus on
|
|
41
|
+
the historical vector:
|
|
42
42
|
|
|
43
43
|
- authoring and executable admission: MCP opens it with `sourceSuccess true`,
|
|
44
44
|
`semanticSuccess true`, `executableReady true`, and the stdio MCP harness sends
|
|
@@ -111,8 +111,8 @@ presentation offers, never access control. Downstream runtime support is separat
|
|
|
111
111
|
from parsing; do not publish an empty plain action as equivalent behavior.
|
|
112
112
|
The complete checked model and conditions are in
|
|
113
113
|
`cratis-screenplay-read-surface` `references/guarded-actions.md`, grounded in
|
|
114
|
-
Screenplay v4.125.0 `screens.md`. CLI 3.41.0/Stage 4.51.3
|
|
115
|
-
screen actions with STAGE-SCENE-ACTION-001, not proof of runtime selection.
|
|
114
|
+
Screenplay v4.125.0 `screens.md`. Historical CLI 3.41.0/Stage 4.51.3 checks reported
|
|
115
|
+
unsupported screen actions with STAGE-SCENE-ACTION-001, not proof of runtime selection.
|
|
116
116
|
|
|
117
117
|
## Exposed template configuration
|
|
118
118
|
|
|
@@ -22,6 +22,9 @@ This skill is verified against these exact public releases:
|
|
|
22
22
|
| `Cratis.Arc.Testing` | `22.16.0` | `CommandScenario<TCommand>` and `CommandResult` assertions |
|
|
23
23
|
| `Cratis.Chronicle.Testing` | `18.3.0` | `EventScenario`, `ReadModelScenario<T>`, `ReactorScenario<T>` |
|
|
24
24
|
|
|
25
|
+
Generated-value scenario pinning is verified separately against
|
|
26
|
+
`Cratis.Arc.Testing` **22.68.0** (introduced in **22.67.0**).
|
|
27
|
+
|
|
25
28
|
Reverify against the owning product repository before claiming support for
|
|
26
29
|
another version. Never translate an assertion or helper name from memory.
|
|
27
30
|
|
|
@@ -82,6 +85,24 @@ real kernel with an out-of-process integration specification instead.
|
|
|
82
85
|
|
|
83
86
|
Specification projects are named `<Source>.Specs` and run on xUnit.
|
|
84
87
|
|
|
88
|
+
### Pin server-generated Handle values
|
|
89
|
+
|
|
90
|
+
For Arc 22.67.0+, `CommandScenario<TCommand>` defaults to strict generation:
|
|
91
|
+
without a named pin or `AllowGeneration()`, `Execute` returns a command result
|
|
92
|
+
with `GeneratedValueNotPinned`, rather than throwing it. Import
|
|
93
|
+
`Cratis.Arc.Testing.Commands`; configure `PinGeneratedValue(name, concept)`
|
|
94
|
+
before the first execution, then assert the response/events and
|
|
95
|
+
`GeneratedValues.Last<T>(name)` or `All<T>(name)`.
|
|
96
|
+
|
|
97
|
+
Use `AllowGeneration()` only when the exact value is irrelevant. Late changes
|
|
98
|
+
throw `GeneratedValuesMustBePinnedBeforeExecution`. Nested-command pins require
|
|
99
|
+
both generic arguments: `PinGeneratedValue<TCommand, TOtherCommand>(name, value)`.
|
|
100
|
+
Read the minimal pinned specification and capture semantics in
|
|
101
|
+
[application-scenarios.md](references/application-scenarios.md#pin-generated-values).
|
|
102
|
+
A plain-call decision spec passes the known concept directly to `Handle()`; it
|
|
103
|
+
cannot prove pipeline generation or validation. Command declarations belong to
|
|
104
|
+
`cratis-arc-command`.
|
|
105
|
+
|
|
85
106
|
## Step 2 — Create the folder structure
|
|
86
107
|
|
|
87
108
|
```
|
package/package/corpus/skills/cratis-specifications-csharp/references/application-scenarios.md
CHANGED
|
@@ -86,6 +86,78 @@ from `Cratis.Arc.Chronicle.Testing`.
|
|
|
86
86
|
- **Validator and `Provide()` dependencies** are registered in
|
|
87
87
|
`_scenario.Services`; the concrete validator is discovered automatically.
|
|
88
88
|
|
|
89
|
+
### Pin generated values
|
|
90
|
+
|
|
91
|
+
Verified at **Arc v22.68.0**, available in `Cratis.Arc.Testing` **22.67.0+**.
|
|
92
|
+
For the `AllocateCartId` command from `cratis-arc-command`, whose
|
|
93
|
+
`Handle([GeneratedValue("cart")] CartId cartId)` returns that id, specify the
|
|
94
|
+
pipeline with a known concept pin. Import `Cratis.Arc.Commands` and
|
|
95
|
+
`Cratis.Arc.Testing.Commands`; the usual specification global usings supply
|
|
96
|
+
`Cratis.Specifications` and `Xunit`. In a dedicated spec project:
|
|
97
|
+
|
|
98
|
+
```csharp
|
|
99
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
100
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
101
|
+
|
|
102
|
+
using Cratis.Arc.Commands;
|
|
103
|
+
using Cratis.Arc.Testing.Commands;
|
|
104
|
+
|
|
105
|
+
namespace Shopping.Carts.for_AllocateCartId.when_allocating;
|
|
106
|
+
|
|
107
|
+
public class and_value_is_pinned : Specification
|
|
108
|
+
{
|
|
109
|
+
readonly CommandScenario<AllocateCartId> _scenario = new();
|
|
110
|
+
readonly CartId _cartId = new(Guid.Parse("9a073b78-423c-43bc-b94c-19e4c83d1001"));
|
|
111
|
+
CommandResult _result = default!;
|
|
112
|
+
|
|
113
|
+
void Establish() => _scenario.PinGeneratedValue("cart", _cartId);
|
|
114
|
+
async Task Because() => _result = await _scenario.Execute(new AllocateCartId());
|
|
115
|
+
void Destroy() => _scenario.Dispose();
|
|
116
|
+
|
|
117
|
+
[Fact] void should_succeed() => _result.ShouldBeSuccessful();
|
|
118
|
+
[Fact] void should_return_the_pinned_id() =>
|
|
119
|
+
((CommandResult<CartId>)_result).Response.ShouldEqual(_cartId);
|
|
120
|
+
[Fact] void should_capture_the_pinned_id() =>
|
|
121
|
+
_scenario.GeneratedValues.Last<CartId>("cart").ShouldEqual(_cartId);
|
|
122
|
+
[Fact] void should_capture_it_once() =>
|
|
123
|
+
_scenario.GeneratedValues.All<CartId>("cart").ShouldContainOnly(_cartId);
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
- Pins use the attribute's explicit name, or the C# parameter name without one.
|
|
128
|
+
Names are case-sensitive and pins are keyed by command type plus name.
|
|
129
|
+
- Supply the concept, not a raw `Guid`. Incompatible/null pins yield
|
|
130
|
+
`PinnedGeneratedValueHasWrongType` during execution. Pins still undergo normal
|
|
131
|
+
concept validation; only validated values are captured.
|
|
132
|
+
- Strict is the default. Without a pin, an unpinned generated parameter yields
|
|
133
|
+
`GeneratedValueNotPinned` as an exception outcome in `CommandResult`; `Execute`
|
|
134
|
+
does not throw it to the spec. Assert the unsuccessful/exception outcome when
|
|
135
|
+
specifying that failure, not a request-validation rejection.
|
|
136
|
+
- `AllowGeneration()` opts into normal generation for unpinned values, including
|
|
137
|
+
nested commands, when exact values do not matter. Explicit pins still win.
|
|
138
|
+
Each pin supplies the same value on every execution; it is not a queue.
|
|
139
|
+
- For a child invoked through `ICommandPipeline`, configure
|
|
140
|
+
`_scenario.PinGeneratedValue<ParentCommand, ChildCommand>("child", childId)`.
|
|
141
|
+
The extension declares `PinGeneratedValue<TOtherCommand>` but C# requires
|
|
142
|
+
**both** type arguments at the call site. This does not replace a same-named
|
|
143
|
+
parent pin.
|
|
144
|
+
- `Last<T>(name)` returns the latest capture of that name and declared type,
|
|
145
|
+
failing if absent. `All<T>(name)` returns a read-only snapshot in resolution
|
|
146
|
+
order across executions (empty if none). Both include nested commands. Same
|
|
147
|
+
name/type captures combine; use distinct names to distinguish commands.
|
|
148
|
+
- Configure pins and `AllowGeneration()` before the first execution, even if it
|
|
149
|
+
fails or has no generated parameters. Changes after that throw
|
|
150
|
+
`GeneratedValuesMustBePinnedBeforeExecution`; create a new scenario instead.
|
|
151
|
+
Validation alone neither generates values nor freezes configuration.
|
|
152
|
+
- Do not log or trace captures. Do not replace/seed the production generator.
|
|
153
|
+
A direct-call decision spec supplies the known argument to `Handle()` itself.
|
|
154
|
+
|
|
155
|
+
Guide: [Pin generated values in command specs](/arc/backend/csharp/testing/generated-values/).
|
|
156
|
+
Source: **Arc v22.68.0**, `Source/DotNET/Testing/Commands/CommandScenarioGeneratedValueExtensions.cs`,
|
|
157
|
+
`ScenarioGeneratedValueFixture.cs`, `ScenarioGeneratedValues.cs` and
|
|
158
|
+
`GeneratedValuesCommandScenarioExtender.cs`;
|
|
159
|
+
`Source/DotNET/Testing.Specs/Commands/for_CommandScenario/generated_values/when_pinning_a_value.cs`.
|
|
160
|
+
|
|
89
161
|
### Unhappy paths assert twice
|
|
90
162
|
|
|
91
163
|
```csharp
|
|
@@ -192,10 +264,14 @@ those substitutes after `Given` fires the events.
|
|
|
192
264
|
|
|
193
265
|
## Application conventions
|
|
194
266
|
|
|
195
|
-
- **Use a per-specification value for anything under a uniqueness
|
|
196
|
-
fresh `Guid`, or a truncated `Guid.NewGuid().ToString("N")[..9]`.
|
|
197
|
-
values cause order-dependent flakes.
|
|
198
|
-
|
|
267
|
+
- **Use a per-specification fixture value for anything under a shared uniqueness
|
|
268
|
+
check** — a fresh `Guid`, or a truncated `Guid.NewGuid().ToString("N")[..9]`.
|
|
269
|
+
Hardcoded values in shared storage cause order-dependent flakes. This is
|
|
270
|
+
fixture isolation, not advice to generate inside production `Handle()`;
|
|
271
|
+
for generated parameters, pin the typed expected fixture value before
|
|
272
|
+
execution. A known fixed pin is appropriate in an isolated scenario such as
|
|
273
|
+
the allocation-only example above. Do not add `[Collection(…)]` to work around
|
|
274
|
+
a collision; that is the wrong fix here.
|
|
199
275
|
- **Sequence numbers are zero-based.** The first event is `0`, the tail of two
|
|
200
276
|
events is `1`. The tail after a single append is `0`, never `1`.
|
|
201
277
|
- A behavior covering several subjects groups its specifications under
|
|
@@ -42,12 +42,12 @@ argument or an invalid semantic option.
|
|
|
42
42
|
|
|
43
43
|
| Source | Pin | Notes |
|
|
44
44
|
| --- | --- | --- |
|
|
45
|
-
| Stage | `4.52.0` (`v4.52.0`, `0e4fd87`) as the CLI 3.
|
|
46
|
-
| cratis CLI | `3.
|
|
47
|
-
| Screenplay | bundled `4.
|
|
45
|
+
| Stage | `4.52.0` (`v4.52.0`, `0e4fd87`) as the CLI 3.46.1 default; latest public `4.64.0` (Scene 4.16.0) is not in the verified vector | Default image `cratis/stage:4.52.0`; defines `STAGE-SCENE-ACTION-001` and `STAGE-SCENE-INTERACTION-001`. Case tables need 4.59.0, whole numbers as `long` need 4.61.0; the CLI default renderer applies neither. 4.52.0 was executed on CLI 3.43.0. Earlier executed baselines: 4.51.3, 4.51.1, 4.49.5 and `v4.24.2` (`32dcac4`) |
|
|
46
|
+
| cratis CLI | `3.46.1` (`v3.46.1`, `73578fbf`) | Source-checked `Directory.Packages.props` pins Stage 4.52.0 and Screenplay 4.130.0. `cratis run --tag` changes only the sandbox image; newer rendering needs a CLI pinning newer Stage. Executed render/browser/MCP baseline remains 3.43.0 (Stage 4.52.0, Screenplay 4.127.0), not a 3.46.1 probe; refusing an unresolvable UI profile and recovering a rendered application shipped in Cratis/cli#301. Older baselines: 3.41.0, 3.40.7, `v3.28.2` (`141c499`, Cratis/cli#253) |
|
|
47
|
+
| Screenplay | bundled `4.130.0`; standalone pin `4.131.0` | Claims through CLI 3.46.1 are 4.130.0 claims; 4.131.0 `semantic-diff` source objects need the standalone MCP |
|
|
48
48
|
| Rendered applications | Arc, Chronicle, Scene 4.15.0, .NET 10 | CLI 3.43.0 renders the canonical corpus to `.cratis-render.json`, backend artifacts, `.frontend/**`, `scene.json`, `src/bindings.ts`. Verify the generated package set for each render before claiming exact Scene runtime parity |
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
The retained admission and runtime evidence below was read at its named tags (`Source/Rendering.Cratis/**`, `README.md`,
|
|
51
51
|
`Documentation/**` in Stage; `Source/Cli/Commands/Render/**` and
|
|
52
52
|
`Documentation/reference/screenplay.md` in the CLI), and the vertical in
|
|
53
53
|
[references/render-example.md](references/render-example.md) was rendered, built and
|
|
@@ -140,11 +140,12 @@ Facts that surprise:
|
|
|
140
140
|
|
|
141
141
|
## Historical Stage 4.24 admission
|
|
142
142
|
|
|
143
|
-
Current pins are standalone Screenplay 4.
|
|
143
|
+
Current pins are standalone Screenplay 4.131.0 / CLI 3.46.1 / Stage 4.52.0.
|
|
144
144
|
Routes bind/reference-execute as v8; reaction `runs as` identity as v10.
|
|
145
|
-
CLI renders through v7 only (CLI-RENDER-004 for newer model versions)
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
CLI renders through v7 only (CLI-RENDER-004 for newer model versions).
|
|
146
|
+
The historical CLI 3.41.0/4.114.0 parser rejected `runs as` (PLAY0137);
|
|
147
|
+
that is not a current parser refusal. Stage 4.52.0's direct planner also audits
|
|
148
|
+
only through v7 (STAGE-ESM-016 otherwise). Source/identity contracts
|
|
148
149
|
stay intact for gap-fill; source acceptance is not target admission.
|
|
149
150
|
|
|
150
151
|
The following detailed 4.24.x probes are historical, not current pin claims.
|
|
@@ -195,6 +196,15 @@ Modeled specifications become xunit classes compiled in **Debug only**
|
|
|
195
196
|
`<slice namespace>.when_<snake>` (so `when_x.when_x`), queries `when_<snake>_is_queried`,
|
|
196
197
|
read models `when_<snake>_is_projected`.
|
|
197
198
|
|
|
199
|
+
Stage 4.59.0+ expands a case table to effective `<Specification>_<Case>` names
|
|
200
|
+
and one generated class per case; normalized path collisions refuse the plan
|
|
201
|
+
with `STAGE-CRATIS-004`. Failed case results include the case and effective fixtures.
|
|
202
|
+
Stage 4.61.0+ renders whole numbers as `long` from ESM v8, retains `int` below
|
|
203
|
+
v8 and refuses out-of-`int` literals there with `STAGE-ESM-031`. CLI 3.46.1's
|
|
204
|
+
Stage 4.52.0 renderer applies neither new rule. Read
|
|
205
|
+
[case tables and whole numbers](references/case-tables-and-whole-numbers.md)
|
|
206
|
+
for complete examples, stored-schema consequences and the sandbox-only `--tag` override.
|
|
207
|
+
|
|
198
208
|
For UI, record what the generated output claims separately from what the model
|
|
199
209
|
authored. On Stage 4.24 the generated scaffold is not screen parity evidence.
|
|
200
210
|
On public CLI 3.43.0 / `cratis/stage:4.52.0` the canonical corpus publishes,
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
- Source disagreements (trust the code)
|
|
11
11
|
|
|
12
12
|
Current pins are in `cratis-screenplay-toolchain` `references/versions.md`:
|
|
13
|
-
CLI 3.
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
Standalone Screenplay is 4.131.0; CLI 3.46.1 bundles Stage 4.52.0 / Screenplay
|
|
14
|
+
4.130.0 / Arc.Screenplay 22.54.0 / Chronicle 19.32.0 / Fundamentals 7.22.8.
|
|
15
|
+
It admits through ESM v7 to Stage planning; above v7 is CLI-RENDER-004.
|
|
16
|
+
The historical CLI 3.41.0 v7 canonical-corpus planning spec received
|
|
17
|
+
STAGE-ESM-028/029 for generated values/responses.
|
|
16
18
|
The detailed 4.24.x source/probe rows below have not been relabeled as current
|
|
17
19
|
runtime verification; run admission on the actual bundled renderer.
|
|
18
20
|
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
|
+
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
|
+
|
|
4
|
+
# Case tables and whole numbers: check the Stage version
|
|
5
|
+
|
|
6
|
+
## Contents
|
|
7
|
+
|
|
8
|
+
- CLI default versus Stage release
|
|
9
|
+
- One specification per case (Stage 4.59.0+)
|
|
10
|
+
- Whole numbers as long (Stage 4.61.0+)
|
|
11
|
+
- Released source evidence
|
|
12
|
+
|
|
13
|
+
## CLI default versus Stage release
|
|
14
|
+
|
|
15
|
+
CLI 3.46.1 bundles Screenplay 4.130.0 and Stage 4.52.0. Its default renderer
|
|
16
|
+
applies neither the case-table support introduced in Stage 4.59.0 nor the
|
|
17
|
+
whole-number rule introduced in 4.61.0. It renders whole-number types as `int`
|
|
18
|
+
and refuses models newer than ESM v7 with `CLI-RENDER-004` before Stage planning.
|
|
19
|
+
A newer standalone Screenplay compiler does not upgrade the bundled renderer.
|
|
20
|
+
|
|
21
|
+
`cratis run ./model --tag 4.63.2` selects a newer **sandbox image**; it does not
|
|
22
|
+
change `cratis render`. The renderer is statically bundled and has no Stage
|
|
23
|
+
package/image override. A newer renderer needs a CLI release that pins it.
|
|
24
|
+
Sandbox execution is not generated-application verification.
|
|
25
|
+
|
|
26
|
+
## One specification per case (Stage 4.59.0+)
|
|
27
|
+
|
|
28
|
+
Case tables expand before rendering. The effective specification names are
|
|
29
|
+
`<Specification>_<Case>`; Stage emits one Debug specification class per case,
|
|
30
|
+
then applies its usual `when_<snake>` naming. This complete example yields
|
|
31
|
+
`Registering_Small` and `Registering_Large`, rendered as
|
|
32
|
+
`when_registering_small` and `when_registering_large` (one file/class each):
|
|
33
|
+
|
|
34
|
+
```screenplay
|
|
35
|
+
concept ProjectId : String
|
|
36
|
+
concept ProjectName : String
|
|
37
|
+
module Projects
|
|
38
|
+
feature Registration
|
|
39
|
+
slice StateChange Register
|
|
40
|
+
command RegisterProject
|
|
41
|
+
projectId ProjectId identifier
|
|
42
|
+
name ProjectName
|
|
43
|
+
produces ProjectRegistered
|
|
44
|
+
for projectId
|
|
45
|
+
name = name
|
|
46
|
+
event ProjectRegistered
|
|
47
|
+
name ProjectName
|
|
48
|
+
specification Registering
|
|
49
|
+
parameter name ProjectName
|
|
50
|
+
case Small name = "small"
|
|
51
|
+
case Large name = "large"
|
|
52
|
+
when RegisterProject
|
|
53
|
+
projectId = "project-1"
|
|
54
|
+
name = case.name
|
|
55
|
+
then ProjectRegistered
|
|
56
|
+
name = case.name
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Generated path comparisons are case-insensitive. Adding `case large` alongside
|
|
60
|
+
`case Large` can pass source validation but normalizes to the same generated
|
|
61
|
+
path: Stage refuses the whole plan with `STAGE-CRATIS-004`, never overwrites one
|
|
62
|
+
case with another. Choose distinct names in the model; do not edit generated files.
|
|
63
|
+
|
|
64
|
+
A failing case in SpecRunner or Host results names its authored specification,
|
|
65
|
+
case and effective fixtures: `Case '<Case>' of '<Specification>': … Effective
|
|
66
|
+
fixtures: …`. Read the failure details and each case outcome; SpecRunner exit 0
|
|
67
|
+
alone is not a pass. Map generated Debug test classes back to effective cases,
|
|
68
|
+
not just to the authored table or a total count.
|
|
69
|
+
|
|
70
|
+
## Whole numbers as long (Stage 4.61.0+)
|
|
71
|
+
|
|
72
|
+
The **model's ESM version**, not the Stage package version alone, selects the
|
|
73
|
+
C# whole-number type: v8 and later use `long`; v1–v7 retain `int` for stored-schema
|
|
74
|
+
compatibility. This covers properties, concepts, command inputs, events, read
|
|
75
|
+
models, stream ids, sentinels and literals (`0L`, `2147483648L`). Check generated
|
|
76
|
+
frontend types separately; this C# admission rule does not establish their mapping.
|
|
77
|
+
Screenplay's Double-mode whole-number range is
|
|
78
|
+
±(2^53−1), not the entire C# `long` range; `numbers exact` remains unadmitted.
|
|
79
|
+
|
|
80
|
+
This routed model selects ESM v8. On Stage 4.61.0+, `Quantity` wraps `long` and
|
|
81
|
+
the fixture renders as `2147483648L`:
|
|
82
|
+
|
|
83
|
+
```screenplay
|
|
84
|
+
concept StockId : String
|
|
85
|
+
concept Quantity : Int
|
|
86
|
+
eventsource Stock
|
|
87
|
+
identifier StockId
|
|
88
|
+
stream Measurements
|
|
89
|
+
module Inventory
|
|
90
|
+
feature Stock
|
|
91
|
+
slice StateChange Record
|
|
92
|
+
command RecordStock
|
|
93
|
+
stockId StockId identifier
|
|
94
|
+
quantity Quantity
|
|
95
|
+
stream Stock.Measurements
|
|
96
|
+
produces StockRecorded
|
|
97
|
+
for stockId
|
|
98
|
+
quantity = quantity
|
|
99
|
+
event StockRecorded
|
|
100
|
+
quantity Quantity
|
|
101
|
+
specification RecordingLargeQuantity
|
|
102
|
+
when RecordStock
|
|
103
|
+
stockId = "stock-1"
|
|
104
|
+
quantity = 2147483648
|
|
105
|
+
then StockRecorded
|
|
106
|
+
quantity = 2147483648
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Without the `eventsource` declaration and command `stream` clause, the model is
|
|
110
|
+
below v8. On Stage 4.61.0+, that out-of-`int` fixture is refused with
|
|
111
|
+
`STAGE-ESM-031`; literals within −2147483648…2147483647 still render as `int`.
|
|
112
|
+
Do not remove the fixture, narrow its value or patch generated C# to pass.
|
|
113
|
+
Widening an already persisted event property from `int` to `long` requires a new
|
|
114
|
+
Chronicle event generation; changing model version is not a safe schema migration.
|
|
115
|
+
|
|
116
|
+
## Released source evidence
|
|
117
|
+
|
|
118
|
+
- Stage `v4.59.0`: `Source/Rendering.Cratis/for_CratisArtifactRenderPlanner/given/a_specification_case_table.cs`,
|
|
119
|
+
`when_executing_generated_case_table_specifications.cs`, `when_refusing_colliding_case_names.cs`,
|
|
120
|
+
`CratisArtifactRenderPlanner.cs`; `Source/Specifications/SemanticSpecificationExecutor.cs`
|
|
121
|
+
and `Source/SpecRunner/for_Program/when_running_semantic_case_tables.cs`.
|
|
122
|
+
- Stage `v4.61.0`: `Source/Rendering.Cratis/Semantics/SemanticTypeSystem.cs`,
|
|
123
|
+
`SemanticCratisAdmission.WholeNumbers.cs` and
|
|
124
|
+
`Source/Rendering.Cratis/Semantics/for_SemanticCratisAdmission/when_admitting_whole_number_literals/with_a_pre_v8_model.cs`.
|
|
125
|
+
- CLI `v3.46.1`: `Directory.Packages.props`,
|
|
126
|
+
`Source/Cli/Commands/Render/{RenderSettings,CratisRenderTarget,RenderedSemanticVersions}.cs`,
|
|
127
|
+
`Source/Cli/Commands/Run/{RunSettings,StageContainer}.cs`.
|
|
@@ -26,6 +26,10 @@
|
|
|
26
26
|
{ "kind": "skill-contains", "value": "Cratis/cli#253" },
|
|
27
27
|
{ "kind": "skill-contains", "value": "Silent fallback to a default screen is a failure" },
|
|
28
28
|
{ "kind": "skill-contains", "value": "package/image versions" },
|
|
29
|
-
{ "kind": "skill-contains", "value": "dropped authored UI" }
|
|
29
|
+
{ "kind": "skill-contains", "value": "dropped authored UI" },
|
|
30
|
+
{ "kind": "skill-contains", "value": "references/case-tables-and-whole-numbers.md" },
|
|
31
|
+
{ "kind": "skill-contains", "value": "STAGE-CRATIS-004" },
|
|
32
|
+
{ "kind": "skill-contains", "value": "STAGE-ESM-031" },
|
|
33
|
+
{ "kind": "skill-contains", "value": "Stage 4.52.0 renderer applies neither new rule" }
|
|
30
34
|
]
|
|
31
35
|
}
|