@cratis/pi 7.160.0 → 7.160.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/skills/cratis-screenplay-captures-and-reactions/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/reaction-forms.md +23 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +4 -1
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +3 -0
- package/package/corpus/skills/cratis-screenplay-projections/verification.json +2 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/references/screen-patterns.md +8 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +2 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +3 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +3 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +1 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +2 -1
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specifications/references/producerless-events.md +63 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/worked-example.md +2 -1
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +4 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +2 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +3 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +5 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/read-model-property-order.md +26 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/unknown-preserving-reader.md +57 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +11 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/action-subjects.md +27 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/guarded-interactions.md +2 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +5 -1
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +3 -1
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +2 -1
- package/package.json +1 -1
|
@@ -149,7 +149,7 @@ Read [references/capture-map-and-example.md](references/capture-map-and-example.
|
|
|
149
149
|
|
|
150
150
|
## `reaction`
|
|
151
151
|
|
|
152
|
-
Read [reaction forms](references/reaction-forms.md) when choosing a trigger,
|
|
152
|
+
Read [reaction forms](references/reaction-forms.md) (including how a host provider runs a reaction body) when choosing a trigger,
|
|
153
153
|
selecting occurrence values or mapping `produces` and `invokes`; complete documents
|
|
154
154
|
remain in `references/complete-examples.md`.
|
|
155
155
|
|
package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/reaction-forms.md
CHANGED
|
@@ -57,3 +57,26 @@ refusals and reference unsupported outcomes remain separate checks.
|
|
|
57
57
|
with `and`/`or`. Its source grammar includes `contains` and `starts with`, but the
|
|
58
58
|
executable binder refuses those operators with PLAY0268. Use the literal property
|
|
59
59
|
rules for validation, not as a way around condition admission.
|
|
60
|
+
|
|
61
|
+
## Reaction bodies run through a host provider
|
|
62
|
+
|
|
63
|
+
Requires Screenplay 4.258.0 or later (`screenplay --version`). Source: Screenplay
|
|
64
|
+
`Documentation/screenplay/reactions.md`.
|
|
65
|
+
|
|
66
|
+
A reference run executes an attached reaction body only when the host supplies an
|
|
67
|
+
`ISemanticBodyExecutionProvider` and a resolved, content-verified attachment. The run calls
|
|
68
|
+
`ReactAsync` for a standalone body on a reaction with exactly one event trigger and no `produces`,
|
|
69
|
+
`invokes` or routing override, after `where` passes.
|
|
70
|
+
|
|
71
|
+
- `ReactAsync` returns exactly one of nothing, an ordered event batch or an ordered command batch
|
|
72
|
+
(`SemanticReactionBodyResult`). A missing, default or mixed result is Unsupported with the
|
|
73
|
+
Reaction capability, never an empty result.
|
|
74
|
+
- The run validates every target and payload of the whole batch before settling anything. Command
|
|
75
|
+
payloads cannot supply generated properties. Commands settled earlier are not rolled back when a
|
|
76
|
+
later one is refused, as with `invokes` without `on refused`.
|
|
77
|
+
- Every other shape stays Unsupported (Reaction): clock and application triggers, unverified
|
|
78
|
+
bodies, provider failure and a run with no provider.
|
|
79
|
+
- A body that also declares `reads` stays refused (`PLAY0268`); return or invoke a command and put
|
|
80
|
+
the protected decision there.
|
|
81
|
+
- `PerformAsync` is a provider contract only. Performer queries are not admitted to the executable
|
|
82
|
+
model, so never present a performer as runnable.
|
|
@@ -69,6 +69,9 @@
|
|
|
69
69
|
{
|
|
70
70
|
"kind": "skill-contains",
|
|
71
71
|
"value": "[ExecuteCommandsAsSystem]"
|
|
72
|
-
}
|
|
72
|
+
},
|
|
73
|
+
{ "kind": "skill-contains", "value": "ISemanticBodyExecutionProvider", "file": "references/reaction-forms.md" },
|
|
74
|
+
{ "kind": "skill-contains", "value": "`PerformAsync` is a provider contract only", "file": "references/reaction-forms.md" },
|
|
75
|
+
{ "kind": "skill-contains", "value": "Requires Screenplay 4.258.0", "file": "references/reaction-forms.md" }
|
|
73
76
|
]
|
|
74
77
|
}
|
|
@@ -146,6 +146,9 @@ nested and variant block starts fresh sets. See [event scope](references/pdl-gra
|
|
|
146
146
|
|
|
147
147
|
## Property mapping and AutoMap
|
|
148
148
|
|
|
149
|
+
The order of a read model's properties is not a projection input; only a C# host's opt-in ESM 37.1
|
|
150
|
+
metadata records it ([property order](../cratis-screenplay-toolchain/references/read-model-property-order.md)).
|
|
151
|
+
|
|
149
152
|
⚠️ **AutoMap is on by default.** Matching property names are copied before your
|
|
150
153
|
explicit mappings run, and explicit mappings win. Turn it off with `no automap` at
|
|
151
154
|
**projection**, `every`/`all`, `join`, `children` or `nested` level — it
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
{ "kind": "skill-contains", "value": "PLAY0690", "file": "references/reducer-identity.md" },
|
|
31
31
|
{ "kind": "skill-contains", "value": "**A builder never names a sink.**" },
|
|
32
32
|
{ "kind": "skill-contains", "value": "sink People for graphs", "file": "references/graphs.md" },
|
|
33
|
-
{ "kind": "skill-contains", "value": "every `sink` line in it is the directive", "file": "references/graphs.md" }
|
|
33
|
+
{ "kind": "skill-contains", "value": "every `sink` line in it is the directive", "file": "references/graphs.md" },
|
|
34
|
+
{ "kind": "skill-contains", "value": "read-model-property-order.md" }
|
|
34
35
|
]
|
|
35
36
|
}
|
|
@@ -121,7 +121,14 @@ module Berths
|
|
|
121
121
|
State what an action acts on: `action CancelBooking for item` acts on the selected row or the record the screen shows,
|
|
122
122
|
`action BookBerth for screen` does not depend on a selection. An omitted subject is inferred from the declared data
|
|
123
123
|
and identifier types and reported as `PLAY0818` (and `PLAY0819` when the row binding differs from legacy name matching),
|
|
124
|
-
so write the clause.
|
|
124
|
+
so write the clause. With a header record beside one table of rows, `for item` acts on that table's collection
|
|
125
|
+
(Requires Screenplay 6.18.0 or later; see the UI composition skill's
|
|
126
|
+
[table narrowing](../../cratis-screenplay-ui-composition/references/action-subjects.md#table-narrowing)).
|
|
127
|
+
Source: Screenplay `Documentation/screenplay/action-subjects.md`.
|
|
128
|
+
|
|
129
|
+
Property declaration order is not preserved by default; a C# host can opt in to ESM 37.1 metadata,
|
|
130
|
+
but it does not let a model control a generated constructor (see
|
|
131
|
+
[read-model property order](../../cratis-screenplay-toolchain/references/read-model-property-order.md)).
|
|
125
132
|
|
|
126
133
|
## What a screen pattern is not
|
|
127
134
|
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
{ "kind": "skill-contains", "value": "| `PLAY0935` | Error | A `passive` read model names a sink |", "file": "references/sinks.md" },
|
|
33
33
|
{ "kind": "skill-contains", "value": "The model never names a database", "file": "references/sinks.md" },
|
|
34
34
|
{ "kind": "skill-contains", "value": "Read [sinks](references/sinks.md) before naming a sink." },
|
|
35
|
+
{ "kind": "skill-contains", "value": "acts on that table's collection", "file": "references/screen-patterns.md" },
|
|
36
|
+
{ "kind": "skill-contains", "value": "Property declaration order is not preserved by default", "file": "references/screen-patterns.md" },
|
|
35
37
|
{ "kind": "skill-contains", "value": "[passive read models](references/passive.md) before declaring one" },
|
|
36
38
|
{ "kind": "skill-contains", "value": "| `PLAY0859` | Error | A `query` returns a passive read model", "file": "references/passive.md" },
|
|
37
39
|
{ "kind": "skill-contains", "value": "Requires Screenplay 5.3.0", "file": "references/passive.md" }
|
|
@@ -35,7 +35,9 @@ Tool versions are covered in `cratis-screenplay-toolchain` `SKILL.md`; read it b
|
|
|
35
35
|
## Language modes that block target delivery
|
|
36
36
|
|
|
37
37
|
Read [language admission](../cratis-screenplay-toolchain/references/language-admission.md)
|
|
38
|
-
for version selection
|
|
38
|
+
for version selection ([unknown-preserving reads](../cratis-screenplay-toolchain/references/unknown-preserving-reader.md)
|
|
39
|
+
are not render admission; read-model [property order](../cratis-screenplay-toolchain/references/read-model-property-order.md)
|
|
40
|
+
is opt-in 37.1 metadata, not a constructor-order promise), and [current Stage boundaries](../cratis-stage-rendering-and-sandbox/references/current-boundaries.md)
|
|
39
41
|
for realization. Bounded atomic batches, source-event Translate captures/publication and resolved
|
|
40
42
|
C# validation bodies now render. Described handlers still refuse even in Stub
|
|
41
43
|
mode; query-performer gaps are a separate contract, not completed behavior. Protected reads still need an admitted shape. Semantic Host/executor
|
|
@@ -50,6 +50,8 @@
|
|
|
50
50
|
{ "kind": "skill-contains", "value": "Unsupported generated\ntypes (`STAGE-ESM-028`) and result combinations (`-038`)" },
|
|
51
51
|
{ "kind": "skill-contains", "value": "authored-UI parity" },
|
|
52
52
|
{ "kind": "skill-contains", "value": "responsible tool version" },
|
|
53
|
-
{ "kind": "skill-contains", "value": "`GraphSinks` into its render input, or a changed `sink` line never triggers a re-render" }
|
|
53
|
+
{ "kind": "skill-contains", "value": "`GraphSinks` into its render input, or a changed `sink` line never triggers a re-render" },
|
|
54
|
+
{ "kind": "skill-contains", "value": "unknown-preserving-reader.md" },
|
|
55
|
+
{ "kind": "skill-contains", "value": "not a constructor-order promise" }
|
|
54
56
|
]
|
|
55
57
|
}
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md
CHANGED
|
@@ -18,7 +18,7 @@ Typed example/override forms: `cratis-screenplay-specifications`
|
|
|
18
18
|
| Form | design | executable | renderable |
|
|
19
19
|
|---|---|---|---|
|
|
20
20
|
| `when <Cmd>` -> `then <Event>` / `then error` / `then denied` | yes | yes | yes |
|
|
21
|
-
| `given <Event>` with `for` | yes | yes (needed for keyed views) | yes |
|
|
21
|
+
| `given <Event>` with `for` | yes | yes (needed for keyed views); no producing command needed when a root projection supplies the identity type, see `cratis-screenplay-specifications` `references/producerless-events.md` | yes |
|
|
22
22
|
| `given readmodel` | yes | yes (complete instance with key) | only as the query-only lookup below |
|
|
23
23
|
| `when append <Event>` | yes | yes | supported single-hop reaction effects/invocation only; fan-out, deeper cascades and other refused assertions retain STAGE-ESM-011 |
|
|
24
24
|
| `then readmodel` / `then query` (keyed `ById`, `arguments`, `result`) | yes | yes | yes |
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
{ "kind": "skill-contains", "value": "One behaviour per spec" },
|
|
15
15
|
{ "kind": "skill-contains", "value": "No command has only two specs" },
|
|
16
16
|
{ "kind": "skill-contains", "value": "not scenario-complete" },
|
|
17
|
-
{ "kind": "skill-contains", "value": "per-view judgment was skipped" }
|
|
17
|
+
{ "kind": "skill-contains", "value": "per-view judgment was skipped" },
|
|
18
|
+
{ "kind": "skill-contains", "value": "references/producerless-events.md", "file": "references/spec-forms-by-mode.md" }
|
|
18
19
|
]
|
|
19
20
|
}
|
|
@@ -28,7 +28,7 @@ reference execution. Use `screenplay test` or MCP `run-specifications` for V4; S
|
|
|
28
28
|
tests are separate evidence. Propose → review → `run-specifications` with `proposalId` → apply.
|
|
29
29
|
PLAY0285 (an impossible `then`) unbinds the whole model and blocks every spec.
|
|
30
30
|
Unsupported/unbound is never a pass. Typed examples and
|
|
31
|
-
|
|
31
|
+
routes: [examples](references/examples-and-routes.md); [producerless events](references/producerless-events.md).
|
|
32
32
|
|
|
33
33
|
Requires Screenplay 4.145.0 or later (`screenplay --version`) for `run-specifications` with `proposalId`.
|
|
34
34
|
|
package/package/corpus/skills/cratis-screenplay-specifications/references/producerless-events.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
# Events without a producing command
|
|
5
|
+
|
|
6
|
+
Requires Screenplay 6.15.0 or later (`screenplay --version`). Source: Screenplay
|
|
7
|
+
`Documentation/screenplay/specifications.md`, "Event sources without one producing command".
|
|
8
|
+
|
|
9
|
+
A `given <Event> for <literal>`, a `when append <Event> for <literal>`, a named event example and
|
|
10
|
+
`for case.<parameter>` need an event-source identity type. A single producing command, or an
|
|
11
|
+
explicit route, supplies it and wins first. When no single producer supplies one distinct
|
|
12
|
+
destination type, a root read-model projection that consumes the event can supply it instead. Never
|
|
13
|
+
add a producer command only to make a specification compile: the model would then claim a
|
|
14
|
+
behavior nobody asked for.
|
|
15
|
+
|
|
16
|
+
The projection supplies the identity type when:
|
|
17
|
+
|
|
18
|
+
- it consumes the event by the event's own event source (the default key or `$eventSourceId`),
|
|
19
|
+
never by an event payload property;
|
|
20
|
+
- every matching root projection has exactly one required scalar read-model key, and all those keys
|
|
21
|
+
have the same type;
|
|
22
|
+
- the `for` value is a literal that fits that type.
|
|
23
|
+
|
|
24
|
+
Protected (`pii` or `secret`), optional, collection, structured, missing or conflicting identity
|
|
25
|
+
types stay refused, and an optional `for case.<parameter>` cannot supply a required identity even
|
|
26
|
+
when one row holds non-null text. When no identity type can be determined, `PLAY0273` names the
|
|
27
|
+
event and asks for a projection keyed on the event source or a producing command with a required
|
|
28
|
+
scalar destination. The `for` syntax and the selected ESM version do not change.
|
|
29
|
+
|
|
30
|
+
A view that counts slots per day, specified with `then readmodel`; a `then query` over `DayById`
|
|
31
|
+
asserts the same row. Both facts fold into one instance, so initialize required counters in the
|
|
32
|
+
projection that establishes the row:
|
|
33
|
+
|
|
34
|
+
```screenplay
|
|
35
|
+
module Demo
|
|
36
|
+
feature Days
|
|
37
|
+
slice StateView Calendar
|
|
38
|
+
event DayOpened
|
|
39
|
+
dayId String
|
|
40
|
+
event SlotTaken
|
|
41
|
+
dayId String
|
|
42
|
+
readmodel DayView
|
|
43
|
+
dayId String
|
|
44
|
+
slots Int
|
|
45
|
+
query DayById => DayView optional
|
|
46
|
+
by dayId String
|
|
47
|
+
projection DayProjection => DayView
|
|
48
|
+
from DayOpened
|
|
49
|
+
dayId = dayId
|
|
50
|
+
slots = 0
|
|
51
|
+
from SlotTaken
|
|
52
|
+
increment slots
|
|
53
|
+
specification CountingSlots
|
|
54
|
+
given DayOpened
|
|
55
|
+
for "2026-11-10"
|
|
56
|
+
dayId = "2026-11-10"
|
|
57
|
+
given SlotTaken
|
|
58
|
+
for "2026-11-10"
|
|
59
|
+
dayId = "2026-11-10"
|
|
60
|
+
then readmodel DayView
|
|
61
|
+
dayId = "2026-11-10"
|
|
62
|
+
slots = 1
|
|
63
|
+
```
|
|
@@ -105,7 +105,8 @@ module Invoicing
|
|
|
105
105
|
command. A `when append` specification may sit in a `StateView` slice, even for an
|
|
106
106
|
event another slice declares, as long as the event's producer gives it one
|
|
107
107
|
unambiguous destination type (binding resolves it from commands in other slices);
|
|
108
|
-
otherwise `for` fails with `PLAY0273
|
|
108
|
+
otherwise `for` fails with `PLAY0273` unless a root projection supplies the identity
|
|
109
|
+
([producerless events](producerless-events.md)). Only `when <Command>` needs the command's
|
|
109
110
|
own slice.
|
|
110
111
|
- `LookingUpAnExistingInvoice` performs the query as its action. It binds to
|
|
111
112
|
exactly what `then query` with `arguments` and `result` would, so on a version
|
|
@@ -84,6 +84,9 @@
|
|
|
84
84
|
"value": "never delete the reaction", "file": "references/reactions-and-cascades.md"
|
|
85
85
|
},
|
|
86
86
|
{ "kind": "skill-contains", "value": "Examples typed from another document", "file": "references/examples-and-routes.md" },
|
|
87
|
-
{ "kind": "skill-contains", "value": "`PLAY0520`", "file": "references/examples-and-routes.md" }
|
|
87
|
+
{ "kind": "skill-contains", "value": "`PLAY0520`", "file": "references/examples-and-routes.md" },
|
|
88
|
+
{ "kind": "skill-contains", "value": "Requires Screenplay 6.15.0", "file": "references/producerless-events.md" },
|
|
89
|
+
{ "kind": "skill-contains", "value": "Never\nadd a producer command only to make a specification compile", "file": "references/producerless-events.md" },
|
|
90
|
+
{ "kind": "skill-contains", "value": "references/producerless-events.md" }
|
|
88
91
|
]
|
|
89
92
|
}
|
|
@@ -140,6 +140,8 @@ with ordered imports means future files need explicit imports.
|
|
|
140
140
|
report PLAY0268); one explicit `key` keeps its earlier version. Read
|
|
141
141
|
`references/production-routes-and-filters.md`, [language admission](references/language-admission.md)
|
|
142
142
|
and read-surface `references/named-keys.md`.
|
|
143
|
+
- **Minor versions:** read [unknown-preserving reader](references/unknown-preserving-reader.md) and
|
|
144
|
+
[read-model property order](references/read-model-property-order.md).
|
|
143
145
|
- **Enum numbers (v12):** read command-surface `references/enum-numbers.md` for
|
|
144
146
|
pins, stored numbers and Stage output; `references/diagnostics.md` owns PLAY0667–0671.
|
|
145
147
|
- **Concept strategies (v15):** read
|
|
@@ -344,7 +344,9 @@ query with PLAY0268 and leave the whole model unbound. Everything else binds as
|
|
|
344
344
|
execute: reducer transitions, rule predicates, command and concept code validation, policy
|
|
345
345
|
predicates and reaction effects. Reaction effects bind only when the trigger has no
|
|
346
346
|
`reads`; a trigger with `reads` plus a `file` or inline effect fails binding. Reaction
|
|
347
|
-
bodies still leave their owner non-executable
|
|
347
|
+
bodies still leave their owner non-executable, unless the host supplies a body execution provider for a
|
|
348
|
+
standalone single-event reaction body (Requires Screenplay 4.258.0; see
|
|
349
|
+
[reaction bodies](../../cratis-screenplay-captures-and-reactions/references/reaction-forms.md#reaction-bodies-run-through-a-host-provider)).
|
|
348
350
|
|
|
349
351
|
- A `file` constraint **never binds**: PLAY0268 "file implementation is not admitted by
|
|
350
352
|
the executable model". Chronicle file constraints
|
|
@@ -37,6 +37,9 @@ exact language/semantic pairs; binding, reference execution and rendering are se
|
|
|
37
37
|
|
|
38
38
|
Constructs of decision 0098 with no executable-model content need no version: application-level hooks in a layout's actions outlet (`default <id> title "..." slice <Slice>` with an optional indented `authorize <Policy>`), and a capture over events that copies a list (`lines = $.lines`) or fans out with `children lines identified by sku`. Check `screenplay --version` against the release that admitted v29 and v30 before relying on them. Decision 0115 withdrew 0098's command specification that states the public event its outbound Translate slice publishes: a specification runs only its own slice, so the Translate slice states the public event in its own `when append` specification.
|
|
39
39
|
|
|
40
|
+
Read-model property order is opt-in ESM 37.1 metadata: see
|
|
41
|
+
[read-model property order](read-model-property-order.md).
|
|
42
|
+
|
|
40
43
|
## Compiler and target minimums
|
|
41
44
|
|
|
42
45
|
Requires Screenplay 4.181.0 or later (`screenplay --version`) for atomic batches; older compilers cannot admit the preamble.
|
|
@@ -131,3 +134,5 @@ Requires Stage 4.145.0 for reach-scoped reducer/validation-body refusals
|
|
|
131
134
|
handlers retain STAGE-IMPL-002; renderer implementation admission is unchanged.
|
|
132
135
|
Read [sandbox boundaries](../../cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md)
|
|
133
136
|
when a semantic run reaches a body or uses an authored reaction clock.
|
|
137
|
+
Read [unknown-preserving reader](unknown-preserving-reader.md) when a consumer
|
|
138
|
+
must retain unknown additions of a minor it does not register, without executing them.
|
package/package/corpus/skills/cratis-screenplay-toolchain/references/read-model-property-order.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
# Read-model property order (ESM 37.1)
|
|
5
|
+
|
|
6
|
+
Requires Screenplay 5.6.0 or later (`screenplay --version`). Read-model declaration order is optional,
|
|
7
|
+
ignorable metadata and is **not** preserved by default: the CLI, MCP, TypeScript compiler and editors
|
|
8
|
+
never request it, and it adds no `.play` syntax or diagnostic. A C# host opts in with
|
|
9
|
+
`SemanticModelBinder.Bind(name, document, documents, new SemanticBindingOptions(PreserveReadModelPropertyOrder: true))`,
|
|
10
|
+
which returns a `SemanticBindingOptionsResult` (`Compilation`, `Refusal`, `Success`).
|
|
11
|
+
|
|
12
|
+
- Only when the option is used and removing the metadata leaves a valid 37.0 model that reads the
|
|
13
|
+
application calendar or a clock does the model select language/semantic **37.1**. `schemaVersion`
|
|
14
|
+
stays 37 and each read model gains an optional `propertyOrder` after `properties`: a permutation of
|
|
15
|
+
every property identity, key included. `properties` stays id-sorted.
|
|
16
|
+
- A model that emits no metadata (no read models, or every read model already in canonical property
|
|
17
|
+
order) keeps its version and binds successfully. Any other model that is not a 37.0 candidate gets
|
|
18
|
+
`PropertyOrderMetadataRefusal` with no executable value. Default `Bind` and default options keep existing versions, bytes and
|
|
19
|
+
revisions.
|
|
20
|
+
- The golden is `full-esm-v37.1.json`, reached with `EsmGoldenVectors.GetMinor(SemanticVersion.V37_1)`;
|
|
21
|
+
`Get(int)` and `Versions` describe only `.0` goldens.
|
|
22
|
+
- A 37.0 consumer that reads through the [unknown-preserving reader](unknown-preserving-reader.md)
|
|
23
|
+
keeps the member as opaque bytes with the same revision.
|
|
24
|
+
|
|
25
|
+
Do not tell modelers that declaration order controls a generated constructor's parameter order: that
|
|
26
|
+
rendering is a Stage change; confirm it shipped before claiming otherwise.
|
package/package/corpus/skills/cratis-screenplay-toolchain/references/unknown-preserving-reader.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
# Unknown-preserving semantic model reader
|
|
5
|
+
|
|
6
|
+
Requires Screenplay 4.256.0 or later (`screenplay --version`). Source: Screenplay
|
|
7
|
+
`Documentation/screenplay/interoperability.md` ("Minor versions and unknown-preserving
|
|
8
|
+
admission").
|
|
9
|
+
|
|
10
|
+
A consumer that must retain unknown additions without executing them reads a model with
|
|
11
|
+
`UnknownPreservingSemanticModelReader.Read(bytes, EsmAdmissionRange)`. It is an opt-in reader beside
|
|
12
|
+
the strict reader, which is unchanged and still refuses every unknown member and unregistered
|
|
13
|
+
version. Reading carries no producer trust and no execution, rendering or reverse-recovery
|
|
14
|
+
authority; those admissions stay separate decisions.
|
|
15
|
+
|
|
16
|
+
## Admission
|
|
17
|
+
|
|
18
|
+
- The caller supplies one major with inclusive minimum and maximum minor. Both wire versions must
|
|
19
|
+
lie in that range, and the package must ship a frozen baseline descriptor for that major. The
|
|
20
|
+
reader is not limited to the latest major.
|
|
21
|
+
- Unknowns are admitted only above the major's highest registered minor. An exact registered pair
|
|
22
|
+
admits none.
|
|
23
|
+
- Classify admission from the document's own wire pair, not from the pair of the validated known
|
|
24
|
+
projection, which uses the highest registered pair of the major.
|
|
25
|
+
|
|
26
|
+
## What the reader keeps
|
|
27
|
+
|
|
28
|
+
- The original bytes, wire versions and full revision; a validated known projection; and
|
|
29
|
+
owner-addressable diagnostics for each unknown.
|
|
30
|
+
- Known or unknown is decided from the document's own major against the frozen baseline field set,
|
|
31
|
+
which holds what the published writer emits (for example `predecessor` and `priorRevisions` only
|
|
32
|
+
from major 4). Members after the baseline sit in an ordinal extension region.
|
|
33
|
+
- An unknown is security flagged only through a known structural position: authorization, policies,
|
|
34
|
+
callers and claims; identity mapping; compliance, personal and secret data; event-stream routing.
|
|
35
|
+
Every other unknown is Unclassified, not automatically unsafe. Never infer meaning inside an opaque
|
|
36
|
+
unknown subtree; consumers decide degradation and whether to disable an owner.
|
|
37
|
+
- Preserved unknowns are re-emitted byte-identically and never executed.
|
|
38
|
+
|
|
39
|
+
## Refusal boundary
|
|
40
|
+
|
|
41
|
+
A breach refuses the whole document with `InvalidSemanticContract`; nothing is truncated:
|
|
42
|
+
|
|
43
|
+
- a malformed or missing wire version, a version outside the range, or a language and semantic pair
|
|
44
|
+
that does not match;
|
|
45
|
+
- no frozen baseline descriptor for the major;
|
|
46
|
+
- duplicate members, non-NFC text or bytes that are not canonical, and a revision that does not match
|
|
47
|
+
the canonical bytes;
|
|
48
|
+
- container depth over 64, input over 8,388,608 bytes, more than 64 unknown boundaries per owner or
|
|
49
|
+
1,024 per document, more than 1,048,576 unknown value bytes, or an unknown name outside
|
|
50
|
+
`[a-z][A-Za-z0-9]*` of at most 64 characters (nested names included);
|
|
51
|
+
- an unknown discriminator value, or a known dangling reference.
|
|
52
|
+
|
|
53
|
+
Inside an opaque extension, object names are ordinal at every depth, arrays keep received order,
|
|
54
|
+
and absent stays distinct from null.
|
|
55
|
+
|
|
56
|
+
Renderer admission of an unknown-bearing model is separate work: this reader proves the bytes
|
|
57
|
+
were preserved, not that a Stage renderer accepts them.
|
|
@@ -89,6 +89,16 @@
|
|
|
89
89
|
{ "kind": "skill-contains", "value": "| PLAY0935 | E | A `passive` read model names a sink", "file": "references/diagnostics.md" },
|
|
90
90
|
{ "kind": "skill-contains", "value": "| PLAY0859 | E | A `query` returns a passive read model", "file": "references/diagnostics.md" },
|
|
91
91
|
{ "kind": "skill-contains", "value": "| PLAY0939 | W | A read-model property `sink`", "file": "references/diagnostics.md" },
|
|
92
|
-
{ "kind": "skill-contains", "value": "`ApplicationSyntax.sinks` (`SinkSyntax` with `name`, `stores`)", "file": "references/executable-subset.md" }
|
|
92
|
+
{ "kind": "skill-contains", "value": "`ApplicationSyntax.sinks` (`SinkSyntax` with `name`, `stores`)", "file": "references/executable-subset.md" },
|
|
93
|
+
{ "kind": "skill-contains", "value": "reaction-forms.md#reaction-bodies-run-through-a-host-provider", "file": "references/executable-subset.md" },
|
|
94
|
+
{ "kind": "skill-contains", "value": "UnknownPreservingSemanticModelReader.Read(bytes, EsmAdmissionRange)", "file": "references/unknown-preserving-reader.md" },
|
|
95
|
+
{ "kind": "skill-contains", "value": "Requires Screenplay 4.256.0", "file": "references/unknown-preserving-reader.md" },
|
|
96
|
+
{ "kind": "skill-contains", "value": "InvalidSemanticContract", "file": "references/unknown-preserving-reader.md" },
|
|
97
|
+
{ "kind": "skill-contains", "value": "unknown-preserving-reader.md", "file": "references/language-admission.md" },
|
|
98
|
+
{ "kind": "skill-contains", "value": "# Read-model property order (ESM 37.1)", "file": "references/read-model-property-order.md" },
|
|
99
|
+
{ "kind": "skill-contains", "value": "PropertyOrderMetadataRefusal", "file": "references/read-model-property-order.md" },
|
|
100
|
+
{ "kind": "skill-contains", "value": "is **not** preserved by default", "file": "references/read-model-property-order.md" },
|
|
101
|
+
{ "kind": "skill-contains", "value": "references/read-model-property-order.md" },
|
|
102
|
+
{ "kind": "skill-contains", "value": "references/unknown-preserving-reader.md" }
|
|
93
103
|
]
|
|
94
104
|
}
|
package/package/corpus/skills/cratis-screenplay-ui-composition/references/action-subjects.md
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
# Action subjects: `for item` and `for screen`
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Table narrowing
|
|
6
|
+
- Repair repeated advisories one occurrence at a time
|
|
7
|
+
|
|
3
8
|
Requires Screenplay 4.248.0 or later (`screenplay --version`). Source: Screenplay
|
|
4
9
|
`Documentation/screenplay/action-subjects.md` (decision 0110).
|
|
5
10
|
|
|
6
11
|
A plain or toolbar `action` states whether it acts on one chosen record or on the screen:
|
|
7
12
|
|
|
8
|
-
- `for item`: the nearest single `data` record, or the selected row of a collection.
|
|
13
|
+
- `for item`: the nearest single `data` record, or the selected row of a collection. When a screen
|
|
14
|
+
declares several `data` and a `table` in scope shows exactly one collection, that collection is the
|
|
15
|
+
subject (see [table narrowing](#table-narrowing)). Inputs bind
|
|
9
16
|
from it: explicit `with <input> from item.<field>` first, then case-sensitive same-name
|
|
10
17
|
fields, then one key field with the same declared concept.
|
|
11
18
|
- `for screen`: independent of selection; no row fills the inputs. Use it for actions that
|
|
@@ -56,6 +63,25 @@ module Work
|
|
|
56
63
|
column title label "Task"
|
|
57
64
|
```
|
|
58
65
|
|
|
66
|
+
## Table narrowing
|
|
67
|
+
|
|
68
|
+
Requires Screenplay 6.18.0 or later (`screenplay --version`). A screen often shows a header
|
|
69
|
+
record next to a table of rows. An authored plain or toolbar `for item` action then acts on the
|
|
70
|
+
one collection `data` that a `table` in scope shows, so the header does not make it ambiguous:
|
|
71
|
+
|
|
72
|
+
```play
|
|
73
|
+
data Header via query HeaderOf
|
|
74
|
+
data Row[] via query Rows
|
|
75
|
+
table Row
|
|
76
|
+
action RetryItem for item
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Unchanged and still ambiguous: a table over a record, two tables over two collections, and no
|
|
80
|
+
table. Guarded actions and inferred (omitted) subjects are unchanged. PLAY0346 names the candidate
|
|
81
|
+
`data`; use that list to pick the explicit fix: show one table, or move the action into a screen
|
|
82
|
+
section or slot with its own local `data`. The subject is a modeling statement, so do not
|
|
83
|
+
restructure a screen only to satisfy `for item`.
|
|
84
|
+
|
|
59
85
|
State the subject on every plain and toolbar action. Without it, the compiler infers `for item`
|
|
60
86
|
when there is exactly one collection `data`, one required non-generated identifier and one key
|
|
61
87
|
with the same concept, and `for screen` otherwise. Inference follows types, not intent: here
|
package/package/corpus/skills/cratis-screenplay-ui-composition/references/guarded-interactions.md
CHANGED
|
@@ -52,7 +52,8 @@ item, and clearing selection runs nothing; change uses the item that changed (se
|
|
|
52
52
|
single item or selected row, with guarded actions' sibling precedence. Check named
|
|
53
53
|
behaviors at each `uses` site. Component `context` or `selectedItem` bindings do
|
|
54
54
|
not supply the subject in this version; unresolved/equally near subjects report
|
|
55
|
-
PLAY0346
|
|
55
|
+
PLAY0346, which names the candidate data (see
|
|
56
|
+
[table narrowing](action-subjects.md#table-narrowing)).
|
|
56
57
|
|
|
57
58
|
Submit, event, interval and application triggers have no alternatives.
|
|
58
59
|
The one-line `on row-click navigate to … by …` remains unchanged. Opaque `where`
|
|
@@ -262,6 +262,10 @@
|
|
|
262
262
|
{ "kind": "skill-contains", "value": "where item.status == \"accepted\"", "file": "references/change-alternatives.md" },
|
|
263
263
|
{ "kind": "skill-contains", "value": "including the `otherwise` list", "file": "references/change-alternatives.md" },
|
|
264
264
|
{ "kind": "skill-contains", "value": "Compiler admission is not proof that a Stage renderer executes the gesture.", "file": "references/change-alternatives.md" },
|
|
265
|
-
{ "kind": "skill-contains", "value": "references/change-alternatives.md" }
|
|
265
|
+
{ "kind": "skill-contains", "value": "references/change-alternatives.md" },
|
|
266
|
+
{ "kind": "skill-contains", "value": "## Table narrowing", "file": "references/action-subjects.md" },
|
|
267
|
+
{ "kind": "skill-contains", "value": "Requires Screenplay 6.18.0", "file": "references/action-subjects.md" },
|
|
268
|
+
{ "kind": "skill-contains", "value": "PLAY0346 names the candidate", "file": "references/action-subjects.md" },
|
|
269
|
+
{ "kind": "skill-contains", "value": "action-subjects.md#table-narrowing", "file": "references/guarded-interactions.md" }
|
|
266
270
|
]
|
|
267
271
|
}
|
|
@@ -26,7 +26,9 @@ against Stage v4.197.0: matched language/ESM 1.0–30.0 and 32.0 are admitted, n
|
|
|
26
26
|
Stage then applies matched-pair and construct gates. V32 needs a direct caller of
|
|
27
27
|
the reviewed Stage baseline. See [CLI bundle details](../cratis-screenplay-toolchain/references/language-admission.md#stage-admission-and-execution).
|
|
28
28
|
Renderer, semantic Host/specification execution and legacy syntax admission are
|
|
29
|
-
separate gates.
|
|
29
|
+
separate gates. Reading a model that carries unknown additions is a further separate gate:
|
|
30
|
+
[the unknown-preserving reader](../cratis-screenplay-toolchain/references/unknown-preserving-reader.md)
|
|
31
|
+
retains them without executing or rendering them, so renderer admission of such a model is not implied.
|
|
30
32
|
Bounded atomic batches render; unverifiable query performers can produce explicit
|
|
31
33
|
gaps, not completed behavior. Described handlers still refuse even in Stub mode.
|
|
32
34
|
Keep protection and report remaining refusals.
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
{ "kind": "skill-contains", "value": "Stage#847 lands, which needs Chronicle#5427", "file": "references/current-boundaries.md" },
|
|
66
66
|
{ "kind": "skill-contains", "value": "required single non-date, non-decimal primitive/concept", "file": "references/current-boundaries.md" },
|
|
67
67
|
{ "kind": "skill-contains", "value": "Single-instance lookup by parts remains `STAGE-ESM-047`", "file": "references/current-boundaries.md" },
|
|
68
|
-
{ "kind": "skill-contains", "value": "including DateTime and decimal key parts", "file": "SKILL.md" }
|
|
68
|
+
{ "kind": "skill-contains", "value": "including DateTime and decimal key parts", "file": "SKILL.md" },
|
|
69
|
+
{ "kind": "skill-contains", "value": "unknown-preserving-reader.md", "file": "SKILL.md" }
|
|
69
70
|
]
|
|
70
71
|
}
|