@cratis/pi 7.27.3 → 7.28.1
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/rules/reactors.md +30 -0
- package/package/corpus/rules/specs.scenarios.csharp.md +41 -0
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +13 -0
- 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-chronicle-reactor/SKILL.md +16 -1
- package/package/corpus/skills/cratis-chronicle-reactor/references/specifications.md +85 -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 +34 -0
- package/package/corpus/skills/cratis-specifications-csharp/references/application-scenarios.md +121 -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
|
@@ -15,7 +15,7 @@ Sources, streams and command/specification routes bind and reference-execute as
|
|
|
15
15
|
`specifications.md`, `Versions.cs`; the complete example below compiled with
|
|
16
16
|
`--warnaserror` and passed `screenplay test` on 4.125.0.
|
|
17
17
|
|
|
18
|
-
CLI 3.
|
|
18
|
+
CLI 3.46.1 renders only model versions up to v7: routed v8 models receive
|
|
19
19
|
`CLI-RENDER-004` before planning/publication. This is not a source-validation or
|
|
20
20
|
binder refusal. Keep the routed model as contract and gap-fill its realization;
|
|
21
21
|
never remove routing to obtain a render. Pins: `versions.md`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Traps (one line each, with the fix)
|
|
2
2
|
|
|
3
|
-
Current pins: Screenplay 4.
|
|
3
|
+
Current pins: Screenplay 4.131.0 / CLI 3.46.1 (`versions.md`). Unless explicitly
|
|
4
4
|
updated below, [probed]/[source] rows retain their historical v4.66.0/CLI 3.28.2
|
|
5
5
|
scope; negative capability claims there are not current verdicts. Current routes
|
|
6
6
|
bind as v8, v7 reaches Stage planning, reference tests have CLI/MCP routes, and
|
|
@@ -15,7 +15,7 @@ exact numbers are documented in the grammar. Compiler syntax: `cheat-sheet.md`.
|
|
|
15
15
|
7. Current V1 warns on absent projection/children/nested targets (PLAY0514) and unknown removal/capture events (PLAY0166). Opt-in field-origins checks find unmapped declared fields (PLAY0534) where coverage is known; still walk lineage for skipped/opaque shapes.
|
|
16
16
|
8. Severity does not soften a rule: `severity warning` still rejects the command.
|
|
17
17
|
9. Authorization (module AND feature AND construct) runs before validation; unauthorized is `then denied`, never `then error`.
|
|
18
|
-
10. Without a declared actor an invocation is caller-less. At 4.125.0 declare reaction `runs as system role "<Role>"` (ESM v10), keep its gate, and reference-test the trusted path. CLI 3.41.0
|
|
18
|
+
10. Without a declared actor an invocation is caller-less. At 4.125.0 declare reaction `runs as system role "<Role>"` (ESM v10), keep its gate, and reference-test the trusted path. The historical CLI 3.41.0/4.114.0 parser rejected this syntax (PLAY0137); current CLI 3.46.1 instead refuses its v10 at render admission (CLI-RENDER-004), and Stage 4.52.0 audits through v7 only. Arc gap-fill uses `[ExecuteCommandsAsSystem]` for returned commands, not a fictional `given caller`.
|
|
19
19
|
11. A reaction `produces` without `for` lands on the trigger's event source; clock and application triggers need an explicit `for`.
|
|
20
20
|
12. Read-model identity comes from its keyed queries, which must all use the same `by` property: `query XById => RM optional` + `by xId XId` with `xId` a read-model property, and the identifier equals the projection's effective key (table in slice-design `references/read-model-design.md`; full rule, including Stage's narrower admission and `STAGE-ESM-017`, in `cratis-stage-rendering-and-sandbox` `references/admission.md`). Never mark a read-model property `identifier`. (PLAY0268 when the keyed queries do not share one `by` property; PLAY0351 when a `given`/`then` readmodel block omits that property.)
|
|
21
21
|
13. Projection `key` routes only on `from` (projection-level: PLAY0381). `all` is per event source. Joins never create instances and match the joined event's source id. [probed]
|
|
@@ -31,7 +31,7 @@ exact numbers are documented in the grammar. Compiler syntax: `cheat-sheet.md`.
|
|
|
31
31
|
23. `@` escapes are mandatory for `tag`, `authorize`, `produces`, `reads`, `file`, `validate`, `sequence`, `occurred`, `causedBy`, `namespace`, `correlation`, `causation`, and projection `key`/`parent`/`with` as names.
|
|
32
32
|
24. Canonicalizing edits can drop unplaceable comments (PLAY0288; inspect `droppedCommentCount`); keep durable rationale in fenced Markdown `documentation`, not `//`, and summaries in `description`. Documentation survives canonical printing but changes neither executable bytes nor `modelRevision`; it is not rendered code.
|
|
33
33
|
25. MCP writes: propose, review, approval, apply by the identity owner (the session that owns the MCP connection); other subagents return edit requests; proposals are connection-local, at most 16 (`cratis-screenplay-model-authoring`).
|
|
34
|
-
26. Operations/systems and exact numbers remain unadmitted. Sources/streams/routes bind and reference-execute as ESM v8 at 4.125.0; generated values/responses bind as v7. CLI 3.
|
|
34
|
+
26. Operations/systems and exact numbers remain unadmitted. Sources/streams/routes bind and reference-execute as ESM v8 at 4.125.0; generated values/responses bind as v7. CLI 3.46.1 renders through v7 only, with construct-specific Stage refusals. Consult released grammar rather than inventing syntax from decisions.
|
|
35
35
|
27. Translate vs Automation is semantic: external facts become local facts in `Translate`; in-app event-to-event goes in `Automation`.
|
|
36
36
|
28. Personas drive the board: a persona must list every policy on the path, including module-level `IsAuthenticated`.
|
|
37
37
|
29. A sample's source check is not execution. Run selected admitted specifications through `screenplay test`/MCP; given==when clock still fires no scheduled occurrence.
|
|
@@ -46,7 +46,7 @@ exact numbers are documented in the grammar. Compiler syntax: `cheat-sheet.md`.
|
|
|
46
46
|
37. Personas remain outside ESM bytes, but 4.127.0 specifications accept `given caller as <Persona>`: one authenticated deterministic policy witness, not every matching caller. Inspect the chosen `or` branch; use explicit callers when synthesis is refused.
|
|
47
47
|
38. A rule that depends on stored state is `reads <View>` + `require <expr> message "..."` (stated intent; PLAY0268/0271 at binding are expected in design mode). The slice `description` must mark it NOT enforced in the model today (Screenplay#129/#209) and name the target: Arc `[ProtectedDecision]` + `DecisionRead<T>` (Arc v22.39.0 and later; available to gap-fill on Stage 4.51.3's Arc 22.50.5/Chronicle 19.32.0, not emitted protection), Chronicle DCB (`concurrency` scope), or a constraint where one fits. Forbidden: caller-supplied copies of state in `require`, boolean attestation inputs (`confirmsX == true`), rules hidden in `handler`/implementation-hint prose. An unguarded materialized read is unsafe for a protected decision.
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Identity/compliance traps checked at v4.127.0 (`identity.md`, `concepts.md`, `events.md`,
|
|
50
50
|
`purposes.md`, `diagnostics.md`):
|
|
51
51
|
- `$identity` built-ins alias `$context.identity`; declared detail reads are PLAY0268,
|
|
52
52
|
while an identity block alone does not block readiness. `scoped to` is opaque,
|
|
@@ -28,7 +28,7 @@ V3 are read from the MCP server or from a render, V1 and V5 from the CLIs.
|
|
|
28
28
|
|
|
29
29
|
| Tool | Command | Pass | Fail |
|
|
30
30
|
| --- | --- | --- | --- |
|
|
31
|
-
| Standalone 4.
|
|
31
|
+
| Standalone 4.131.0 (preferred) | `screenplay <model-root> --warnaserror --no-color` | exit 0 and a nonzero compiled file count | exit 1 defects; exit 2 could not run/invalid arguments or input |
|
|
32
32
|
| cratis (fallback) | `cratis screenplay validate <model-folder> --warnings-as-errors -o json-compact` | exit 0 | exit 5; exit 1 means missing path or no files |
|
|
33
33
|
|
|
34
34
|
- Validate the complete application root, not an independently selected fragment.
|
|
@@ -85,7 +85,7 @@ never "specifications pass".
|
|
|
85
85
|
`secret`, authorization, list queries, automations or rules to reach V3; record the
|
|
86
86
|
slice and the code in the gap list.
|
|
87
87
|
- A model is executable only on the compiler that bound it. V3 does not carry
|
|
88
|
-
to render admission: CLI 3.
|
|
88
|
+
to render admission: CLI 3.46.1 passes up to ESM v7 to Stage, refuses newer
|
|
89
89
|
models with CLI-RENDER-004, and its v7 corpus receives STAGE-ESM-028/029.
|
|
90
90
|
The old 3.28.x/Stage 4.24.x probes remain historical in the subset references.
|
|
91
91
|
|
|
@@ -151,9 +151,9 @@ source change makes earlier verdicts stale.
|
|
|
151
151
|
|
|
152
152
|
Historical corpus fences were checked with standalone 4.68.0 and CLI 3.28.2.
|
|
153
153
|
Do not promote those results to current pins without rerunning. Check each changed
|
|
154
|
-
complete fence with standalone 4.
|
|
154
|
+
complete fence with standalone 4.131.0 `--warnaserror`; run `screenplay test` for
|
|
155
155
|
specification examples, and verify expected-diagnostic examples against their
|
|
156
|
-
claimed codes. Where bundle compatibility matters, also check CLI 3.
|
|
156
|
+
claimed codes. Where bundle compatibility matters, also check CLI 3.46.1.
|
|
157
157
|
The `// Needs the standalone screenplay compiler (ESM v6)` first-line marker belonged to cratis
|
|
158
158
|
before 3.28.2, which could not validate those fences; no fence carries it now, and a
|
|
159
159
|
checker that still skips marked fences under `cratis` skips nothing. Examples meant to execute are also opened through MCP and
|
|
@@ -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,14 @@ 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
|
+
Reactor read-model seeding/absence, synchronous handler exceptions and the
|
|
26
|
+
`EventContext.From` UTC default are verified separately at **Chronicle 19.46.0**
|
|
27
|
+
and require **19.46.0+**; see the ReactorScenario section in
|
|
28
|
+
[application-scenarios.md](references/application-scenarios.md).
|
|
29
|
+
|
|
30
|
+
Generated-value scenario pinning is verified separately against
|
|
31
|
+
`Cratis.Arc.Testing` **22.68.0** (introduced in **22.67.0**).
|
|
32
|
+
|
|
25
33
|
Reverify against the owning product repository before claiming support for
|
|
26
34
|
another version. Never translate an assertion or helper name from memory.
|
|
27
35
|
|
|
@@ -80,8 +88,34 @@ never produces a concurrency violation. `ShouldHaveConcurrencyViolations()`
|
|
|
80
88
|
cannot pass for such an append and its negation passes vacuously — specify concurrency against the
|
|
81
89
|
real kernel with an out-of-process integration specification instead.
|
|
82
90
|
|
|
91
|
+
For a class-based `ReactorScenario<TReactor>` on **Chronicle 19.46.0+**, seed each
|
|
92
|
+
handler read-model parameter with `Given.ForEventSourceId(id).ReadModel(instance)`
|
|
93
|
+
or declare intentional absence with `.NoReadModel<T>()`; `Given` events do not
|
|
94
|
+
build it, even if passive. Missing setup throws
|
|
95
|
+
`ReadModelNotSeededForReactorScenario` even for a nullable parameter. Use the
|
|
96
|
+
resolved read-model key. See the ReactorScenario reference for diagnostics,
|
|
97
|
+
exception capture and UTC occurrence-time defaults.
|
|
98
|
+
|
|
83
99
|
Specification projects are named `<Source>.Specs` and run on xUnit.
|
|
84
100
|
|
|
101
|
+
### Pin server-generated Handle values
|
|
102
|
+
|
|
103
|
+
For Arc 22.67.0+, `CommandScenario<TCommand>` defaults to strict generation:
|
|
104
|
+
without a named pin or `AllowGeneration()`, `Execute` returns a command result
|
|
105
|
+
with `GeneratedValueNotPinned`, rather than throwing it. Import
|
|
106
|
+
`Cratis.Arc.Testing.Commands`; configure `PinGeneratedValue(name, concept)`
|
|
107
|
+
before the first execution, then assert the response/events and
|
|
108
|
+
`GeneratedValues.Last<T>(name)` or `All<T>(name)`.
|
|
109
|
+
|
|
110
|
+
Use `AllowGeneration()` only when the exact value is irrelevant. Late changes
|
|
111
|
+
throw `GeneratedValuesMustBePinnedBeforeExecution`. Nested-command pins require
|
|
112
|
+
both generic arguments: `PinGeneratedValue<TCommand, TOtherCommand>(name, value)`.
|
|
113
|
+
Read the minimal pinned specification and capture semantics in
|
|
114
|
+
[application-scenarios.md](references/application-scenarios.md#pin-generated-values).
|
|
115
|
+
A plain-call decision spec passes the known concept directly to `Handle()`; it
|
|
116
|
+
cannot prove pipeline generation or validation. Command declarations belong to
|
|
117
|
+
`cratis-arc-command`.
|
|
118
|
+
|
|
85
119
|
## Step 2 — Create the folder structure
|
|
86
120
|
|
|
87
121
|
```
|
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
|
|
@@ -190,12 +262,57 @@ async Task Because() =>
|
|
|
190
262
|
Construct with an `IServiceProvider` of substituted collaborators and assert on
|
|
191
263
|
those substitutes after `Given` fires the events.
|
|
192
264
|
|
|
265
|
+
### Read-model parameters — Chronicle 19.46.0+
|
|
266
|
+
|
|
267
|
+
`Given` events invoke the reactor; they **do not build read models**, including
|
|
268
|
+
passive ones. In the present-state specification, seed a pre-built instance:
|
|
269
|
+
|
|
270
|
+
```csharp
|
|
271
|
+
void Establish() => _scenario.Given.ForEventSourceId(_id).ReadModel(_author);
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
In a **separate absence specification**, deliberately let an `Author?` handler
|
|
275
|
+
parameter receive `null`:
|
|
276
|
+
|
|
277
|
+
```csharp
|
|
278
|
+
void Establish() => _scenario.Given.ForEventSourceId(_id).NoReadModel<Author>();
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Both return `ReactorSourceGivenBuilder<TReactor>` for chaining, not a `Task`.
|
|
282
|
+
Use the triggering source id by default or `ICanResolveReadModelKey.Resolve`'s
|
|
283
|
+
key when implemented. Absence matches the exact type and key and does not remove
|
|
284
|
+
a seeded instance. Missing setup throws `ReadModelNotSeededForReactorScenario`
|
|
285
|
+
(`Cratis.Chronicle.Testing.Reactors`), **even for nullable parameters**. Its
|
|
286
|
+
message names the type/key, explains both setups, and lists other seeded keys
|
|
287
|
+
for that type when any exist. Fix the fixture/key rather than hiding missing
|
|
288
|
+
setup with `NoReadModel<T>()`. This guard applies to `EventStoreForTesting`, not
|
|
289
|
+
production resolution or an explicitly supplied store of another type.
|
|
290
|
+
|
|
291
|
+
Also in **Chronicle 19.46.0+**, a synchronous handler throw surfaces its own
|
|
292
|
+
exception, not reflection's `TargetInvocationException`, preserving the handler
|
|
293
|
+
stack. Capture with `await Catch.Exception(() => _scenario.Given.ForEventSource(_id).Events(...))`
|
|
294
|
+
and assert the handler's exception type.
|
|
295
|
+
|
|
296
|
+
`EventContext.From(...)` defaults omitted `occurred` to `DateTimeOffset.UtcNow`,
|
|
297
|
+
previously local `Now`. Scenario contexts, `EventContext.Empty` and
|
|
298
|
+
`EmptyWithEventSourceId(...)` use this helper; explicit times retain their offset,
|
|
299
|
+
and the positional constructor has no such default.
|
|
300
|
+
|
|
301
|
+
Sources at **Chronicle tag `v19.46.0`**:
|
|
302
|
+
`Source/Clients/Testing/Reactors/{ReactorScenario,ReactorSourceGivenBuilder,ScenarioReactorMethodArgumentsResolver,ReadModelNotSeededForReactorScenario}.cs`
|
|
303
|
+
and `Source/Clients/DotNET/Events/EventContext.cs`. For exact signatures and
|
|
304
|
+
source-backed examples, read `cratis-chronicle-reactor/references/specifications.md`.
|
|
305
|
+
|
|
193
306
|
## Application conventions
|
|
194
307
|
|
|
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
|
-
|
|
308
|
+
- **Use a per-specification fixture value for anything under a shared uniqueness
|
|
309
|
+
check** — a fresh `Guid`, or a truncated `Guid.NewGuid().ToString("N")[..9]`.
|
|
310
|
+
Hardcoded values in shared storage cause order-dependent flakes. This is
|
|
311
|
+
fixture isolation, not advice to generate inside production `Handle()`;
|
|
312
|
+
for generated parameters, pin the typed expected fixture value before
|
|
313
|
+
execution. A known fixed pin is appropriate in an isolated scenario such as
|
|
314
|
+
the allocation-only example above. Do not add `[Collection(…)]` to work around
|
|
315
|
+
a collision; that is the wrong fix here.
|
|
199
316
|
- **Sequence numbers are zero-based.** The first event is `0`, the tail of two
|
|
200
317
|
events is `1`. The tail after a single append is `0`, never `1`.
|
|
201
318
|
- 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
|
}
|