@cratis/pi 7.66.0 → 7.68.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.
Files changed (51) hide show
  1. package/package/corpus/product-sync.json +3 -3
  2. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +1 -1
  3. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/atomic-batches-and-source-mappings.md +1 -1
  4. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +4 -3
  5. package/package/corpus/skills/cratis-screenplay-command-surface/references/date-comparisons.md +13 -2
  6. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +2 -2
  7. package/package/corpus/skills/cratis-screenplay-model-authoring/references/state-and-recovery.md +1 -0
  8. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +1 -1
  9. package/package/corpus/skills/cratis-screenplay-model-review/references/public-keys-and-routes.md +4 -2
  10. package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +2 -2
  11. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +1 -1
  12. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +1 -1
  13. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/stop-or-assume.md +1 -1
  14. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +6 -1
  15. package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +8 -1
  16. package/package/corpus/skills/cratis-screenplay-projections/references/pdl-grammar.md +42 -2
  17. package/package/corpus/skills/cratis-screenplay-projections/references/reducer-identity.md +88 -0
  18. package/package/corpus/skills/cratis-screenplay-projections/verification.json +2 -1
  19. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +14 -7
  20. package/package/corpus/skills/cratis-screenplay-read-surface/references/equality-filters.md +1 -1
  21. package/package/corpus/skills/cratis-screenplay-read-surface/references/named-keys.md +168 -58
  22. package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +2 -2
  23. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +1 -1
  24. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +1 -1
  25. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +2 -2
  26. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +3 -3
  27. package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +5 -7
  28. package/package/corpus/skills/cratis-screenplay-slice-design/references/public-boundaries-and-keys.md +5 -3
  29. package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +7 -3
  30. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +3 -2
  31. package/package/corpus/skills/cratis-screenplay-specifications/references/query-rejections.md +4 -0
  32. package/package/corpus/skills/cratis-screenplay-specifications/references/vocabulary.md +17 -0
  33. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +3 -1
  34. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/read-model-keys.md +46 -0
  35. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +11 -5
  36. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +17 -2
  37. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +22 -8
  38. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +31 -9
  39. package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +15 -5
  40. package/package/corpus/skills/cratis-screenplay-toolchain/references/production-routes-and-filters.md +1 -1
  41. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +3 -3
  42. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +1722 -76
  43. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  44. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +3 -2
  45. package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +64 -3
  46. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +8 -2
  47. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +5 -4
  48. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +12 -7
  49. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +17 -0
  50. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +1 -1
  51. package/package.json +1 -1
@@ -13,7 +13,7 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
13
13
  9. Authorization (module AND feature AND construct) runs before validation; unauthorized is `then denied`, never `then error`.
14
14
  10. Without a declared actor an invocation is caller-less. Declare reaction `runs as system role "<Role>"` (ESM v10), keep its gate, and reference-test the trusted path. Stage renders role and authenticated reaction identity; claim-reading or opaque system gates refuse STAGE-ESM-034. Arc gap-fill uses `[ExecuteCommandsAsSystem]` for returned commands, not a fictional `given caller`.
15
15
  11. A reaction `produces` without `for` lands on the trigger's event source; clock and application triggers need an explicit `for`.
16
- 12. Explicit trailing `key` marks replace inference (never `identifier`); multipart read-model keys remain PLAY0268. Without marks, single-instance queries in the owning slice must agree on `by xId XId`, where `xId` is a read-model property. Only with no such identifier and an admitted list query does `*Id` inference run (collection-key exclusions: read-surface `references/named-keys.md`); queryless views need explicit `key`. 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`. (Without explicit `key`, PLAY0268 when identity inference is ambiguous or absent; PLAY0351 when a `given`/`then` readmodel block omits that property.)
16
+ 12. Explicit trailing `key` marks replace inference (never `identifier`); several parts bind as v27 with an untyped projection `key` block per root `from` and `remove with`. Without marks, single-instance queries in the owning slice must agree on `by xId XId`, where `xId` is a read-model property. Only with no such identifier and an admitted list query does `*Id` inference run (collection-key exclusions: read-surface `references/named-keys.md`); queryless views need explicit `key`. 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`. (Without explicit `key`, PLAY0268 when identity inference is ambiguous or absent; PLAY0351 when a `given`/`then` readmodel block omits that property.)
17
17
  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.
18
18
  14. AutoMap is on by default: same-named event properties fill read-model properties silently (scoped: case-insensitive, same type only; flat-bound: exact name, no type check, so a type mismatch invalidates the model). Use `no automap` for control.
19
19
  15. `given readmodel` bypasses the projection; prove a projection with `given` events + `when append`/command + `then readmodel`/`then query`.
@@ -40,7 +40,7 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
40
40
 
41
41
  34. A `from <Event> key <property>` routes only if every such event carries that property: an event that frees or updates a row keyed by another stream's id must carry that id in its payload, or the row never changes. The compiler may not report a missing key property; check by hand.
42
42
  35. `description`/`documentation` are authoring metadata: board, MCP and Prologue show them; `cratis render` emits them only as XML doc comments (invalid XML characters are CLI-RENDER-005), never as behavior. A rule only in prose is unenforced in rendered code; make it a rule layer, a spec or a recorded target requirement.
43
- 36. One unadmitted construct (operations, `numbers exact`, composite view keys) blocks whole-model binding. Routing is admitted (v8), unlike composite view keys. Overrides replace the whole route, filters never match unrouted facts. Do not remove routing or authorization to render a model.
43
+ 36. One unadmitted construct (operations, `numbers exact`) blocks whole-model binding. Routing is admitted (v8), as are flat composite view keys (v27). Overrides replace the whole route, filters never match unrouted facts. Do not remove routing or authorization to render a model.
44
44
  37. Personas remain outside ESM bytes, but 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.
45
45
  38. A stored-state rule uses `reads <View>` and `require` with an indented message. Opt into `command reads protected` for eligible v25 views; absence rejects and matching decide/commit changes conflict. Legacy reads remain unprotected. The Cratis C# renderer refuses protected reads (STAGE-ESM-044), not the v25 pair; semantic Host/executor support is separate: hand-written Arc `[ProtectedDecision]` + `DecisionRead<T>` or Chronicle consistency enforcement needs separate target verification; use a constraint for uniqueness. 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.
46
46
  Requires Arc 22.39.0 or later for `[ProtectedDecision]`.
@@ -69,3 +69,4 @@ Traps 39 to 44 are tool traps.
69
69
  42. A symlinked model path is refused by the MCP server (macOS `/tmp` is a symlink); pass the physical path. Proposals are connection-local (at most 16); `apply` persists identities to `.screenplay/identities.json` and is not crash-atomic across files; never retry `apply` after `ApplyOutcomeUnknown`.
70
70
  43. `modelRevision` is canonical semantic (line positions and descriptions do not change it; a file move only if it changes logical placement or application identity) and, without `identities.json`, changes with the root folder name; it is not comparable with a render's `semanticRevision`. Source identity for verdicts is the commit plus the digest from the source-identity helper (`cratis-screenplay-modeling-lifecycle` `references/verdicts-and-modes.md` "Source identity").
71
71
  44. `cratis render` neither builds nor tests; `--name` is required for plain source; `.cratis-render/` is control state and is never staged; rendered apps pin their own Arc and Chronicle versions (`[ProtectedDecision]` is available to gap-fill, not automatically emitted). `cratis` file mode versus folder mode (trap 6) and a stale `cratis` on `PATH` (`which -a cratis`) both silently change what a verdict means.
72
+ 45. A reducer cannot be re-keyed: its instances follow the event-source id, so a query `by` another identity type warns PLAY0690 (`--warnaserror` fails it; editors only show it when the host supplies native findings). Aggregate by a payload value with a projection keyed on each `from`, or a join: projections [reducer identity](../../cratis-screenplay-projections/references/reducer-identity.md).
@@ -3,6 +3,7 @@
3
3
  ## Contents
4
4
 
5
5
  - V1: authorable
6
+ - Declared validation gate (`screenplay.json`)
6
7
  - Release-baseline gate (independent of V1–V5)
7
8
  - V2: executable diagnostics
8
9
  - V3: binding-ready
@@ -51,8 +52,67 @@ render, V1 and V5 from the CLIs. Read installed versions with `screenplay --vers
51
52
  - Warnings are failures here. PLAY0029 (a construct dropped silently) and the unresolved-name
52
53
  warnings are the defects this verdict exists to catch.
53
54
  - Syntax and consistency checks (PLAY0282 to PLAY0294) run; binding does not.
55
+ - A `screenplay.json` at the model root supplies checks, warnings-as-errors, scope and open-questions
56
+ mode to both commands above, so they need not repeat those flags; drop `--warnaserror` only when
57
+ `--print-gate` shows `warningsAsErrors: true`. Read the effective gate before
58
+ reporting (next section).
54
59
  - Report: `V1 pass (screenplay <version>, 3 files)`, `V1 fail: PLAY0029 in a.play, line 12`.
55
60
 
61
+ ## Declared validation gate (`screenplay.json`)
62
+
63
+ A repository declares its V1 gate once, in an authored `screenplay.json` at the model root,
64
+ beside the tool-owned `.screenplay/`. Prefer it to repeating `--check`, `--warnaserror`,
65
+ `--scope` and `--open-questions` in every script: every run then enforces the same gate.
66
+ `screenplay.json` is the only file there people write; no tool creates or edits it.
67
+
68
+ ```json
69
+ {
70
+ "$schema": "https://raw.githubusercontent.com/Cratis/Screenplay/main/Documentation/screenplay/screenplay-v1.schema.json",
71
+ "validation": {
72
+ "checks": ["field-origins", "query-keys", "navigation"],
73
+ "warningsAsErrors": true,
74
+ "scope": "Workspaces.Tracking",
75
+ "openQuestions": "fail"
76
+ }
77
+ }
78
+ ```
79
+
80
+ - Every member is optional. A `checks` item is one check name, diagnostic code or `all`
81
+ (never a comma list); `all` expands to every check the running tool supports, so an upgrade can
82
+ strengthen the gate, while an explicit list pins it. `openQuestions` is `report` or `fail`;
83
+ omitted means notes are not evaluated.
84
+ - The model root is the nearest folder at or above the target (a file's parent) that holds
85
+ `screenplay.json` or `.screenplay/`. The search includes but never crosses the first folder with
86
+ `.git`; with no match the target folder is the root and the defaults apply. Nested models keep
87
+ their own gates; imports never affect the search.
88
+ - A command-line option replaces only its own setting. Omitting `--warnaserror` keeps
89
+ `warningsAsErrors: true`, and any `--check` replaces the file's whole list. `--no-gate-file`
90
+ ignores the file, even an invalid one; a relaxed run is not the repository's gate, so say so.
91
+
92
+ | Need | Standalone | `cratis screenplay validate` |
93
+ | --- | --- | --- |
94
+ | Effective gate and the source of each value, no compile (exit 0 unless the file is refused) | `screenplay <root> --print-gate` (text) | `--print-gate` (text, or the gate object under `-o json`) |
95
+ | Machine-readable verdict | `--format json`: one document with `diagnostics`, `openQuestions`, `refusal`, `exitCode`, `gate` | `-o json-compact`: the summary carries `gate` |
96
+ | Ignore the file | `--no-gate-file` | `--no-gate-file` |
97
+
98
+ Each gate value reports `commandLine`, `file` or `default` as its source. Report the gate with
99
+ the verdict: `V1 pass (screenplay <version>, gate screenplay.json: field-origins, query-keys,
100
+ warnings as errors, 3 files)`.
101
+
102
+ **A refused gate file is "could not run", never a pass or a fail.** Malformed JSON, a duplicate
103
+ member, an unknown key, an unknown check name or a wrong type is refused as invalid, and a
104
+ directory, symlink or unreadable file is refused as unreadable; neither is ignored or repaired. The
105
+ standalone tool exits **2** and the CLI exits **1**, each with `path:line:column`. Report
106
+ `V1 not run: gate file refused (<path:line:column>)`, fix the file and rerun.
107
+ A scope declared in the file combined with `cratis screenplay validate --executable` also exits 1:
108
+ check binding separately or pass `--no-gate-file` and name it.
109
+
110
+ Requires Screenplay 4.165.0 or later (`screenplay --version`) for `screenplay.json`, `--format`,
111
+ `--print-gate` and `--no-gate-file`; an older tool does not read the file and runs without the
112
+ gate, so a clean result there says nothing about it. `cratis screenplay validate` reads the file
113
+ from Cratis CLI 3.65.0 or later (`cratis --version`); an older CLI ignores it, so use the standalone
114
+ tool for the gate.
115
+
56
116
  ## Release-baseline gate (independent of V1–V5)
57
117
 
58
118
  Run `screenplay baseline check <model-root>` before accepting edits to released event
@@ -180,9 +240,10 @@ What Stage admits: `renderable-subset.md`.
180
240
 
181
241
  | Layer | Route | Result |
182
242
  | --- | --- | --- |
183
- | Source validation | `screenplay <root> --warnaserror --no-color` | 0 clean; 1 reported defects; 2 could not run or invalid arguments or input. `--scope` limits the reported set, not compilation |
243
+ | Source validation | `screenplay <root> --warnaserror --no-color` | 0 clean; 1 reported defects; 2 could not run or invalid arguments or input, including a refused `screenplay.json`. `--scope` limits the reported set, not compilation |
244
+ | Declared gate | `screenplay <root> --print-gate`; `--format json`; `--no-gate-file` | Reads `screenplay.json`; `--print-gate` exits 0 without compiling unless the file is refused; a gate-promoted warning or an open question in `fail` mode exits 1 |
184
245
  | Completeness | add `--check <name>[,<name>]` (repeatable) or `--check all` | Opt-in warnings; whole-source errors skip checks, not pass them |
185
- | CLI source validation | `cratis screenplay validate <root> --warnings-as-errors -o json-compact` | Read the producer exit and the JSON errors, warnings and file count |
246
+ | CLI source validation | `cratis screenplay validate <root> --warnings-as-errors -o json-compact` | Read the producer exit and the JSON errors, warnings and file count; 5 validation error (including gate-promoted warnings), 1 invalid input (including a refused `screenplay.json`) |
186
247
  | Binding | MCP workspace readiness and `executable-diagnostics` | V2 reads diagnostics; V3 requires binding with no blocking diagnostics |
187
248
  | Reference specifications | `screenplay test <root> [--filter <address>] [--format text\|json]`, or MCP `run-specifications` (`specification`, `scope`, `offset`, `limit`, `expectedSourceRevision`, `proposalId`) | 0 all selected passed; 1 failed; 2 invalid arguments, input, selection or IO; 3 unsupported or unbound. Counts of zero do not prove coverage |
188
249
  | Release baseline | `screenplay baseline admit <root> --release <label>`; `screenplay baseline check <root>` | 0 success; 1 changed or missing revision; 2 unavailable, unreadable or invalid input or write failure |
@@ -221,7 +282,7 @@ change ESM or V1–V5 verdicts. Read model-authoring
221
282
  [model notes](../../cratis-screenplay-model-authoring/references/model-notes.md) when
222
283
  recording, resolving, paging or reviewing orphan impact.
223
284
 
224
- Requires Screenplay 4.144.0 or later (`screenplay --version`) for `--open-questions`; `cratis screenplay validate` has no such option, so use the standalone tool for this gate.
285
+ Requires Screenplay 4.144.0 or later (`screenplay --version`) for `--open-questions`. `cratis screenplay validate` accepts the same option from Cratis CLI 3.60.0 or later (exit 5 when a question remains in `fail` mode, 1 when notes are unreadable); with an older CLI use the standalone tool. `validation.openQuestions` in `screenplay.json` selects the mode without the flag.
225
286
 
226
287
  ## Revisions and descriptions
227
288
 
@@ -12,11 +12,17 @@
12
12
  { "kind": "skill-contains", "value": "PLAY0666", "file": "references/diagnostics.md" },
13
13
  { "kind": "skill-contains", "value": "bind/reference-execute as v11", "file": "references/executable-subset.md" },
14
14
  { "kind": "skill-contains", "value": "A consumer admitting v10 must include all three", "file": "references/production-routes-and-filters.md" },
15
- { "kind": "skill-contains", "value": "Composite view keys remain authoring-only (PLAY0268)" },
15
+ { "kind": "skill-contains", "value": "Flat composite read-model keys select v27" },
16
16
  { "kind": "skill-contains", "value": "the **whole source, stream and stream id**", "file": "references/production-routes-and-filters.md" },
17
17
  { "kind": "play-compiles" },
18
18
  { "kind": "skill-contains", "value": "Requires Screenplay 4.144.0", "file": "references/verdicts.md" },
19
- { "kind": "skill-contains", "value": "`cratis screenplay validate` has no such option", "file": "references/verdicts.md" },
19
+ { "kind": "skill-contains", "value": "accepts the same option from Cratis CLI 3.60.0", "file": "references/verdicts.md" },
20
+ { "kind": "skill-contains", "value": "A refused gate file is \"could not run\"", "file": "references/verdicts.md" },
21
+ { "kind": "skill-contains", "value": "Requires Screenplay 4.165.0 or later", "file": "references/verdicts.md" },
22
+ { "kind": "skill-contains", "value": "Cratis CLI 3.65.0 or later", "file": "references/verdicts.md" },
23
+ { "kind": "skill-contains", "value": "--print-gate", "file": "references/cheat-sheet.md" },
24
+ { "kind": "skill-contains", "value": "PLAY0690", "file": "references/diagnostics.md" },
25
+ { "kind": "skill-contains", "value": "Requires Screenplay 4.170.0 or later", "file": "references/diagnostics.md" },
20
26
  { "kind": "skill-contains", "value": "--open-questions fail", "file": "references/verdicts.md" },
21
27
  { "kind": "skill-contains", "value": "unreadable notes exit **2**", "file": "references/verdicts.md" },
22
28
  { "kind": "skill-contains", "value": "MCP/CLI only, **no PLAY code**", "file": "references/verdicts.md" },
@@ -74,8 +74,9 @@ printed), `1` is a missing input. Add `-o json` for the counts and the publicati
74
74
  Facts that surprise:
75
75
 
76
76
  - **Binding uses the CLI's bundled compiler**, not the standalone one. Version admission
77
- does not imply construct support: exact ESM v1–v21 and v23–v25 pairs are admitted,
78
- while v22/v26 and mixed pairs refuse `STAGE-ESM-016`. Pattern/random generation and checksum validation
77
+ does not imply construct support: exact ESM v1–v21 and v23–v26 pairs are admitted,
78
+ while v22/v27 and mixed pairs refuse `STAGE-ESM-016`. Date/DateTime command comparisons (v26)
79
+ execute in the semantic Host and executor but refuse `STAGE-ESM-046` in the renderer. Pattern/random generation and checksum validation
79
80
  render with an admitting renderer; `generate rule` still refuses `STAGE-ESM-028`.
80
81
  Read [references/admission.md](references/admission.md) for the introducing-release
81
82
  prerequisites, all-Proven unpinned specifications and construct/pin checks (-011/-038).
@@ -132,9 +133,9 @@ One blocker publishes nothing. Codes, limits and fixes: [references/admission.md
132
133
  The Cratis C# renderer refuses protected reads with `STAGE-ESM-044`, described handlers `STAGE-IMPL-002`
133
134
  (even Stub mode), and atomic mode in admitted pairs `STAGE-ESM-043`.
134
135
  - **Binding refusals (`PLAY0268`/`PLAY0271`):** legacy reads, `concurrency`, attached
135
- handlers, context/single-result filters, opaque scope/performer, composite `by`,
136
+ handlers, context/single-result filters, opaque scope/performer, a list-query `by` block,
136
137
  enum/identity compliance and subject lineage. Eligible protected reads bind v25;
137
- pending handlers with unconditional productions bind v23, but neither renders.
138
+ pending handlers with unconditional productions bind v23, but neither renders. A read model with several key parts (v27) refuses `STAGE-ESM-016`.
138
139
  Never drop protection.
139
140
 
140
141
  A refusal is not a licence to weaken the model: drop no specification, event generation or
@@ -11,8 +11,8 @@
11
11
  - Specification rules (`STAGE-ESM-011`)
12
12
  - Refusals seen while drafting a model
13
13
 
14
- Stage admits exact ESM v1–v21 and v23–v25 language/semantic pairs, then checks
15
- constructs. V22, v26 and mixed or unknown pairs report `STAGE-ESM-016`. The CLI's bundled renderer
14
+ Stage admits exact ESM v1–v21 and v23–v26 language/semantic pairs, then checks
15
+ constructs. V22, v27 and mixed or unknown pairs report `STAGE-ESM-016`. The CLI's bundled renderer
16
16
  may stop at v16 and refuse newer models with `CLI-RENDER-004`.
17
17
 
18
18
  Requires Stage 4.96.0 for v16, 4.101.0 for v17, 4.102.0 for v19, 4.106.0 for v18, and 4.103.0 for rendered redelivery; older renderers refuse the respective shapes.
@@ -34,9 +34,13 @@ Requires Stage 4.129.0 for semantic Host/executor protected reads; older engines
34
34
  Described handlers refuse STAGE-IMPL-002, even Stub mode; atomic mode in an
35
35
  admitted pair refuses STAGE-ESM-043. Version admission never implements a body,
36
36
  batch or rendered protected decision. Chronological Date/DateTime command comparisons
37
- select v26 in Screenplay but still refuse STAGE-ESM-016 here; standalone reference
38
- success is not rendering or Host/executor admission. Keep the date rule and use
39
- authorized gap-fill rather than downgrading to ordinal text or millisecond precision.
37
+ select v26. The semantic Host and specification executor run them; the renderer,
38
+ legacy engines and default sandbox engine refuse them with STAGE-ESM-046, naming the
39
+ property, and emit no artifacts. Standalone reference success is not rendering. Keep
40
+ the date rule and use authorized gap-fill rather than downgrading to ordinal text or
41
+ millisecond precision.
42
+
43
+ Requires Stage 4.135.0 for v26 admission; older Stage refuses v26 with STAGE-ESM-016.
40
44
 
41
45
  Binding with the CLI's bundled compiler is a separate
42
46
  prerequisite. The exhaustive construct table is `references/renderable-subset.md` in
@@ -135,13 +139,13 @@ Requires Stage 4.90.0 for snapshot/live lists, 4.96.0 for non-text secrets and 4
135
139
  | `STAGE-ESM-005` | Code validation or rule predicate bodies; or a command beyond the first capability (optional event property, event revision other than the first, validation or requirement that cannot be rendered, neither `produces` nor a response) | Use declarative validation; non-initial event generations are not rendered |
136
140
  | `STAGE-ESM-006` | `produces` that cannot render without changing its destination or mappings (expression/enum conditions, literal or computed mappings, `for` not a command identifier, mappings not one-to-one with event properties, duplicate tags) | Map properties one to one; supported conditional productions render as guarded events, not separate commands |
137
141
  | `STAGE-ESM-007`, `-008`, `-009` | Projection count per read model (exactly one projection or reducer each); unresolvable properties or no single read-model transition (**flat** projections only); affected instance not one, not keyed by an event property, or not the event-source identity (flat projections only) | One projection per read model; see "Projections" below |
138
- | `STAGE-ESM-010` | A query is neither an optional snapshot lookup by the read-model identifier nor a supported snapshot/observable collection query; each query is checked on its own. Both collection modes render. Concept-typed keys and filters retain Arc validation, including composite members and collection elements; nullable concept keys or optional concept filters with `not empty` cannot preserve null semantics | Keyed `XById => X optional` queries or snapshot/observable lists. Equality filters render on both collections; DateTime filters, required filters after optional ones and unsupported null-validation shapes refuse 010. Filter-name collisions refuse 012. Context/single-result filters, opaque scope/performer and composite `by` remain PLAY0268 |
142
+ | `STAGE-ESM-010` | A query is neither an optional snapshot lookup by the read-model identifier nor a supported snapshot/observable collection query; each query is checked on its own. Both collection modes render. Concept-typed keys and filters retain Arc validation, including composite members and collection elements; nullable concept keys or optional concept filters with `not empty` cannot preserve null semantics | Keyed `XById => X optional` queries or snapshot/observable lists. Equality filters render on both collections; DateTime filters, required filters after optional ones and unsupported null-validation shapes refuse 010. Filter-name collisions refuse 012. Context/single-result filters, opaque scope/performer and a list-query `by` block remain PLAY0268; a read model with several key parts (v27) refuses `STAGE-ESM-016` |
139
143
  | `STAGE-ESM-011` | A specification cannot render (see the rules below) | Reshape it only if the assertion keeps its meaning; otherwise keep the specification, record the gap, and gap-fill with the specification as the oracle. Never weaken or delete it to get a render |
140
144
  | `STAGE-ESM-012` | Generated C# names collide (properties, types, namespaces, constraints) | Rename |
141
145
  | `STAGE-ESM-013` | An event-context value other than `$context.occurred` mapped in `produces` | Map a command property when that preserves the meaning; otherwise gap-fill |
142
146
  | `STAGE-ESM-014` | A constraint Chronicle cannot reproduce (kind, scope, message; multi-claim in one command; optional or composite targets) | A different constraint is a requirement change for the model owner; otherwise gap-fill |
143
147
  | `STAGE-ESM-015` | Authorization Stage cannot render exactly: a role-claim URI, an opaque policy nested inside a condition, an unresolved or non-portable policy, no single identifier, an opaque-policy subject that is not text, Uuid, Date or DateTime (a restriction on opaque-policy subjects, separate from declarative claim targets), an unsupported claim artifact. Role-only, authenticated, opaque pure policies, claim conditions with Uuid, Date, DateTime or text targets (numeric and Boolean claim matches render as always false) and `not`/and/or render; roles are read through the identity's `RoleClaimType` | Reshape the policy to a portable condition; otherwise gap-fill |
144
- | `STAGE-ESM-016` | Model language/semantic pair is not admitted by the installed Stage; exact v1–v21 and v23–v25 pairs are admitted, v22/v26 and mixed pairs refused; older Stage also refuses the versions listed in the minimums above. A CLI bundle stopping at v16 reports `CLI-RENDER-004` above v16 first. v14 filters and v15 generation join v11 numbers, v12 enum numbers and v13 compliance as supported constructs, not blanket construct support | Not fixable by editing: the model needs a newer renderer. Keep the model, record the gap, gap-fill |
148
+ | `STAGE-ESM-016` | Model language/semantic pair is not admitted by the installed Stage; exact v1–v21 and v23–v26 pairs are admitted, v22/v27 and mixed pairs refused; older Stage also refuses the versions listed in the minimums above. A CLI bundle stopping at v16 reports `CLI-RENDER-004` above v16 first. v14 filters and v15 generation join v11 numbers, v12 enum numbers and v13 compliance as supported constructs, not blanket construct support | Not fixable by editing: the model needs a newer renderer. Keep the model, record the gap, gap-fill |
145
149
  | `STAGE-ESM-017` | Read model or projection cannot render (property names that collide with Chronicle paths or expression syntax, mappings that overwrite the key or child identity, composite keys, unsupported `all` mappings, the refused scope shapes below) | Reshape the projection without changing what it records, or record the gap |
146
150
  | `STAGE-ESM-018` | `$strings.` key missing in the default locale or containing formatting characters | Fix the strings |
147
151
  | `STAGE-ESM-019` | Reducer structure or body not admitted (outside a `StateView`, impure, does not compile) | An equivalent pure body, or gap-fill |
@@ -164,6 +168,7 @@ Requires Stage 4.90.0 for snapshot/live lists, 4.96.0 for non-text secrets and 4
164
168
  | `STAGE-ESM-042` | Unknown validation rule kinds; checksum on the legacy syntax path (semantic checksum renders) | Keep the rule; use an admitting semantic renderer or gap-fill |
165
169
  | `STAGE-ESM-043` | `reaction batches atomic` in an admitted version pair | Keep the batch boundary; gap-fill without splitting it |
166
170
  | `STAGE-ESM-044` | Protected-read preamble, command reads or read-backed conditions/mappings in the Cratis C# renderer; legacy Host/structural runner also refuse the preamble | Keep protection; semantic Host/executor support is separate from generated-app enforcement |
171
+ | `STAGE-ESM-046` | Date/DateTime comparison in `require`, `produces when` or a validation rule (including through concepts) in the renderer, legacy engines or default sandbox engine; names the property | Keep the date rule; the semantic Host/executor run it; deliver rendering through gap-fill that compares exact calendar dates and UTC ticks |
167
172
  | `STAGE-ESM-045` | Non-Error requirement on a protected command, including reaction-invoked commands; semantic admission refuses before reads, requirements or facts | Keep the severity contract; record the execution gap, never silently promote or drop the requirement |
168
173
  | `STAGE-IMPL-002` | Described command handler, naming command and RequirementId; also refused in Stub mode | Supply authorized implementation outside rendering; no generated stub is emitted |
169
174
  | `STAGE-ESM-037` | Events and commands from one handler, even across separate triggers on the same event in one reaction. The scaffold's Arc supports mixed results, but appends events before commands; a refused command causes redelivery and duplicate events | **Do not split the modeled reaction or drop an effect.** Gap-fill only with a proven retry-safe implementation; `[OnceOnly]` excludes replay, not retry |
@@ -4,6 +4,7 @@
4
4
 
5
5
  - The sandbox: a partial, disposable runtime
6
6
  - Protected command reads
7
+ - Date comparisons (v26)
7
8
  - Refusals shared by both engines
8
9
  - The specification runner
9
10
  - Choosing between them
@@ -128,6 +129,22 @@ even an unrelated one, before committing an accepted command. This interim guard
128
129
  is stricter than the reference's dependency-scoped decide/commit conflicts; do not
129
130
  claim full reference conflict parity or generated-application protection.
130
131
 
132
+ ## Date comparisons (v26)
133
+
134
+ Requires Stage 4.135.0 for v26 admission; older Stage refuses v26 with `STAGE-ESM-016`.
135
+ The semantic Host and specification executor compare `Date` as calendar days and
136
+ `DateTime` as UTC ticks in `require`, `produces when` and validation rules, including
137
+ through concepts. A participating `DateTime` input without an offset or `Z` rejects
138
+ with Validation after authorization and before any rule. `then` stays ordinal. The
139
+ renderer, legacy engines and default sandbox engine refuse these comparisons with
140
+ `STAGE-ESM-046`, naming the property; no date validators or artifacts are emitted.
141
+
142
+ One ordering differs from the reference: the reference checks authorization, then
143
+ offsets, then opaque C# validation, so an offset-less DateTime beside opaque
144
+ validation is a Validation rejection there. The specification executor refuses opaque
145
+ validation at run admission and the Host refuses it before authorization, so both Stage
146
+ paths report `Unsupported`, which never counts as a pass.
147
+
131
148
  ## Refusals shared by both engines
132
149
 
133
150
  Both engines refuse public events (`STAGE-ESM-032`), foreign or source-event captures
@@ -24,7 +24,7 @@
24
24
  { "kind": "skill-contains", "value": "`cratis run` has no `--engine` option", "file": "references/sandbox-and-specrunner.md" },
25
25
  { "kind": "skill-contains", "value": "the environment setting below", "file": "references/sandbox-and-specrunner.md" },
26
26
  { "kind": "skill-contains", "value": "fresh in-memory Chronicle log per specification", "file": "references/sandbox-and-specrunner.md" },
27
- { "kind": "skill-contains", "value": "exact ESM v1–v21 and v23–v25 pairs" },
27
+ { "kind": "skill-contains", "value": "exact ESM v1–v21 and v23–v26 pairs" },
28
28
  { "kind": "skill-contains", "value": "STAGE-ESM-044" },
29
29
  { "kind": "skill-contains", "value": "STAGE-IMPL-002" },
30
30
  { "kind": "skill-contains", "value": "all-Proven rules permit unpinned rendered", "file": "references/admission.md" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.66.0",
3
+ "version": "7.68.0",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [