From a0cd0d0c71ef53dd8bc0239cc858a3ce36f73809 Mon Sep 17 00:00:00 2001 From: Einar Date: Thu, 8 Oct 2026 21:15:12 +0200 Subject: [PATCH 1/3] Update CLI Stage runtime to 4.39 --- Directory.Packages.props | 2 +- Documentation/reference/screenplay.md | 4 +-- .../when_planning_a_supported_application.cs | 1 + ...with_a_folder_and_the_default_stage_tag.cs | 25 ++++++++++++++++ ...h_a_play_file_and_the_default_stage_tag.cs | 30 +++++++++++++++++++ .../when_resolving_the_default_tag.cs | 2 ++ 6 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 Source/Cli.Specs/for_RunCommand/when_running/with_a_folder_and_the_default_stage_tag.cs create mode 100644 Source/Cli.Specs/for_RunCommand/when_running/with_a_play_file_and_the_default_stage_tag.cs diff --git a/Directory.Packages.props b/Directory.Packages.props index ef32d9c3..786673d0 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,7 +7,7 @@ 0.18.0 4.87.0 - 4.30.0 + 4.39.0 diff --git a/Documentation/reference/screenplay.md b/Documentation/reference/screenplay.md index d1542304..aa66df16 100644 --- a/Documentation/reference/screenplay.md +++ b/Documentation/reference/screenplay.md @@ -11,7 +11,7 @@ cratis screenplay mcp [PATH] cratis screenplay desktop install ``` -The CLI bundles Screenplay 4.87.0 (including its MCP server), Stage 4.30.0, and the Arc source adapter 22.52.0. The compiler binds the ESM v7 surface, but Stage 4.30.0 renders ESM v1 to v4 only: `cratis render` refuses models that use v5 or v6 constructs such as Automation and Translate slices, and refuses an evolved event until Stage can render its event-type migrations. Validation rejects `numbers exact` and `implementation` attachments on concept, built-in, and whole-command rules. +The CLI bundles Screenplay 4.87.0 (including its MCP server), Stage 4.39.0, and the Arc source adapter 22.52.0. The compiler binds the ESM v7 surface, but `cratis render` admits ESM v6 and older only: it refuses generated command values, command responses and policy negation until Stage can render them, and refuses an evolved event until Stage can render its event-type migrations. Validation rejects `numbers exact` and `implementation` attachments on concept, built-in, and whole-command rules. For the embedded stdio server, the `visualize-model` MCP App, and native AI host registration, see [Screenplay MCP](screenplay-mcp.md). For Claude Desktop and ChatGPT Desktop installation, see [Screenplay desktop MCP](screenplay-desktop-mcp.md). @@ -29,7 +29,7 @@ A newer bundled compiler can produce a newer executable semantic model (ESM) ver | `cratis screenplay mcp` | Admitted for authoring and reading. The embedded server binds v7 models, pages their executable model (generated properties, responses, generation fixtures and return expectations) and reports execution readiness. Reference execution is not offered: neither the CLI nor the embedded server runs specifications. | | `cratis render` | Not admitted. A model that compiles to v7 reports the blocking `CLI-RENDER-004` diagnostic before execution planning, and nothing is planned or published. Rendering generated values and responses is tracked in [Cratis/Stage#175](https://github.com/Cratis/Stage/issues/175), and policy negation in [Cratis/Stage#209](https://github.com/Cratis/Stage/issues/209). | | `cratis screenplay generate` | From Arc 22.52.0, the Arc adapter recovers supported generated UUID values and command responses by default for commands without successful scenarios. Output containing these constructs compiles to ESM v7, which `cratis render` currently refuses with `CLI-RENDER-004`, even without `--authoring-only-constructs`; see [Cratis/Stage#175](https://github.com/Cratis/Stage/issues/175). Unsupported shapes and values needed by pre-generation protection remain in code with `SP0052`. Marten and Critter Stack retain their existing recovery surface. | -| `cratis run` | Not applicable to the CLI. The Stage container compiles the mounted `.play` files with its own Screenplay release, 4.66.0 in Stage 4.30.0, which does not parse constructs added since: policy negation, `depends on`, `example`, conditional screen actions or specification event routes. A model using them can pass `cratis screenplay validate` and still fail `cratis run`. | +| `cratis run` | Not applicable to the CLI. The Stage container compiles the mounted `.play` files with its own Screenplay release, 4.84.1 in Stage 4.39.0. A model using syntax added after that Stage release can pass `cratis screenplay validate` and still fail `cratis run`. | ## `cratis render [PATH]` or `cratis render --workspace ` diff --git a/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs b/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs index a844c39f..a728c173 100644 --- a/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs +++ b/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs @@ -30,6 +30,7 @@ Task Because() [Fact] void should_plan_the_exact_facade_target_version() => _result.TargetVersion.ShouldEqual(_expected.TargetVersion); [Fact] void should_plan_the_exact_facade_renderer() => _result.Renderer.ShouldEqual(_expected.Renderer); [Fact] void should_plan_the_exact_facade_renderer_version() => _result.RendererVersion.ShouldEqual(_expected.RendererVersion); + [Fact] void should_plan_with_the_released_stage_439_renderer() => _result.RendererVersion.ShouldEqual("4.39.0"); [Fact] void should_plan_the_same_application_name() => _result.ApplicationName.ShouldEqual(_expected.ApplicationName); [Fact] void should_plan_the_same_semantic_revision() => _result.SemanticRevision.ShouldEqual(_expected.SemanticRevision); [Fact] void should_plan_the_exact_facade_artifacts() => diff --git a/Source/Cli.Specs/for_RunCommand/when_running/with_a_folder_and_the_default_stage_tag.cs b/Source/Cli.Specs/for_RunCommand/when_running/with_a_folder_and_the_default_stage_tag.cs new file mode 100644 index 00000000..741a6dda --- /dev/null +++ b/Source/Cli.Specs/for_RunCommand/when_running/with_a_folder_and_the_default_stage_tag.cs @@ -0,0 +1,25 @@ +// Copyright (c) Cratis. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Cratis.Cli.for_RunCommand.when_running; + +[Collection(CliSpecsCollection.Name)] +public class with_a_folder_and_the_default_stage_tag : given.a_run_command +{ + int _result; + + void Establish() => File.WriteAllText(Path.Combine(Directory.CreateDirectory(Path.Combine(_folder, "features")).FullName, "invoicing.play"), "domain Invoicing\n"); + + async Task Because() => _result = await Run(_folder, "--port", "9191", "--workbench-port", "35001"); + + [Unix.Fact] void should_start_the_released_stage_image_that_matches_the_renderer_packages() => + DockerArguments.ShouldContain($"cratis/stage:{StageContainer.DefaultTag}"); + + [Unix.Fact] void should_run_stage_439_by_default() => + DockerArguments.ShouldContain("cratis/stage:4.39.0"); + + [Unix.Fact] void should_mount_only_the_selected_folder_read_only() => + DockerArguments.ShouldContain($"{_folder}:/eventmodel:ro"); + + [Unix.Fact] void should_report_that_the_container_stopped_before_it_was_ready() => _result.ShouldEqual(ExitCodes.ServerError); +} diff --git a/Source/Cli.Specs/for_RunCommand/when_running/with_a_play_file_and_the_default_stage_tag.cs b/Source/Cli.Specs/for_RunCommand/when_running/with_a_play_file_and_the_default_stage_tag.cs new file mode 100644 index 00000000..8a9f8207 --- /dev/null +++ b/Source/Cli.Specs/for_RunCommand/when_running/with_a_play_file_and_the_default_stage_tag.cs @@ -0,0 +1,30 @@ +// Copyright (c) Cratis. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Cratis.Cli.for_RunCommand.when_running; + +[Collection(CliSpecsCollection.Name)] +public class with_a_play_file_and_the_default_stage_tag : given.a_run_command +{ + string _path; + int _result; + + void Establish() + { + _path = Path.Combine(_folder, "invoicing.play"); + File.WriteAllText(_path, "domain Invoicing\n"); + } + + async Task Because() => _result = await Run(_path, "--port", "9191", "--workbench-port", "35001"); + + [Unix.Fact] void should_start_the_released_stage_image_that_matches_the_renderer_packages() => + DockerArguments.ShouldContain($"cratis/stage:{StageContainer.DefaultTag}"); + + [Unix.Fact] void should_run_stage_439_by_default() => + DockerArguments.ShouldContain("cratis/stage:4.39.0"); + + [Unix.Fact] void should_mount_only_the_selected_file_read_only() => + DockerArguments.ShouldContain($"{_path}:/eventmodel/input.play:ro"); + + [Unix.Fact] void should_report_that_the_container_stopped_before_it_was_ready() => _result.ShouldEqual(ExitCodes.ServerError); +} diff --git a/Source/Cli.Specs/for_StageContainer/when_resolving_the_default_tag.cs b/Source/Cli.Specs/for_StageContainer/when_resolving_the_default_tag.cs index a004ffc1..6607b193 100644 --- a/Source/Cli.Specs/for_StageContainer/when_resolving_the_default_tag.cs +++ b/Source/Cli.Specs/for_StageContainer/when_resolving_the_default_tag.cs @@ -26,6 +26,8 @@ void Establish() => _renderer = typeof(ArtifactRenderPlan).Assembly [Fact] void should_run_the_stage_the_renderer_came_from() => _tag.ShouldEqual(_renderer); + [Fact] void should_run_the_released_stage_439_image() => _tag.ShouldEqual("4.39.0"); + [Fact] void should_not_run_a_moving_tag() => _tag.ShouldNotEqual(StageContainer.FallbackTag); /// From 983be6a74084ad0cd1098cc86e30a9c4788c4378 Mon Sep 17 00:00:00 2001 From: Einar Date: Thu, 8 Oct 2026 21:52:26 +0200 Subject: [PATCH 2/3] Align CLI specs with Stage 4.39 --- .../when_planning_a_supported_application.cs | 4 +++- .../with_inline_policy.cs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs b/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs index 05d38a37..01bf5c71 100644 --- a/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs +++ b/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs @@ -1,6 +1,7 @@ // Copyright (c) Cratis. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System.Reflection; using Cratis.Screenplay.Semantics; using Cratis.Screenplay.Semantics.Execution; using Cratis.Stage.Contracts.Rendering; @@ -30,7 +31,8 @@ Task Because() [Fact] void should_plan_the_exact_facade_target_version() => _result.TargetVersion.ShouldEqual(_expected.TargetVersion); [Fact] void should_plan_the_exact_facade_renderer() => _result.Renderer.ShouldEqual(_expected.Renderer); [Fact] void should_plan_the_exact_facade_renderer_version() => _result.RendererVersion.ShouldEqual(_expected.RendererVersion); - [Fact] void should_plan_with_the_released_stage_439_renderer() => _result.RendererVersion.ShouldEqual("4.39.0"); + [Fact] void should_load_the_released_stage_439_renderer_package() => + typeof(CratisRendering).Assembly.GetCustomAttribute()!.InformationalVersion.Split('+')[0].ShouldEqual("4.39.0"); [Fact] void should_plan_the_same_application_name() => _result.ApplicationName.ShouldEqual(_expected.ApplicationName); [Fact] void should_plan_the_same_semantic_revision() => _result.SemanticRevision.ShouldEqual(_expected.SemanticRevision); [Fact] void should_plan_the_exact_facade_artifacts() => diff --git a/Source/Cli.Specs/for_ScreenplayPlanning/when_rendering_implementation_attachments/with_inline_policy.cs b/Source/Cli.Specs/for_ScreenplayPlanning/when_rendering_implementation_attachments/with_inline_policy.cs index 4bfae4d1..d1d355b7 100644 --- a/Source/Cli.Specs/for_ScreenplayPlanning/when_rendering_implementation_attachments/with_inline_policy.cs +++ b/Source/Cli.Specs/for_ScreenplayPlanning/when_rendering_implementation_attachments/with_inline_policy.cs @@ -9,7 +9,8 @@ public class with_inline_policy : given.a_model_root void Establish() => WriteSource(PolicySource); async Task Because() => _result = await _planning.Plan(new(_path, "Orders", "cratis"), CancellationToken.None); - [Fact] void should_report_the_precise_v3_rejection() => _result.Diagnostics.Select(_ => _.Code).ShouldContain("STAGE-ESM-015"); + [Fact] void should_report_the_parser_rejection_before_stage_blocks_publication() => _result.Diagnostics.Select(_ => _.Code).ShouldContain("PLAY0478"); + [Fact] void should_report_the_stage_publication_blocker() => _result.Diagnostics.Select(_ => _.Code).ShouldContain("STAGE-ESM-006"); [Fact] void should_not_report_a_missing_body() => _result.Diagnostics.Select(_ => _.Code).ShouldNotContain("STAGE-ESM-020"); [Fact] void should_not_publish_artifacts() => _result.Artifacts!.Artifacts.ShouldBeEmpty(); } From c33373ab733ec833a34bd18e54ee8b8e85c7e35b Mon Sep 17 00:00:00 2001 From: Einar Date: Thu, 8 Oct 2026 22:33:47 +0200 Subject: [PATCH 3/3] Update CLI Stage runtime to 4.40 --- Directory.Packages.props | 2 +- Documentation/reference/screenplay.md | 4 ++-- .../when_planning_a_supported_application.cs | 4 ++-- .../when_running/with_a_folder_and_the_default_stage_tag.cs | 4 ++-- .../with_a_play_file_and_the_default_stage_tag.cs | 4 ++-- .../for_StageContainer/when_resolving_the_default_tag.cs | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 786673d0..c47439dd 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,7 +7,7 @@ 0.18.0 4.87.0 - 4.39.0 + 4.40.0 diff --git a/Documentation/reference/screenplay.md b/Documentation/reference/screenplay.md index 37b65344..d62676f6 100644 --- a/Documentation/reference/screenplay.md +++ b/Documentation/reference/screenplay.md @@ -11,7 +11,7 @@ cratis screenplay mcp [PATH] cratis screenplay desktop install ``` -The CLI bundles Screenplay 4.87.0 (including its MCP server), Stage 4.39.0, and the Arc source adapter 22.52.0. `cratis render` admits ESM v1 through v7, but the renderer still refuses unsupported constructs within those versions: reactions, captures, triggers and Automation/Translate slices report `STAGE-ESM-024`, and read-model absence assertions report `STAGE-ESM-027`. It also refuses an evolved event until Stage can render its event-type migrations. Validation rejects `numbers exact` and `implementation` attachments on concept, built-in, and whole-command rules. +The CLI bundles Screenplay 4.87.0 (including its MCP server), Stage 4.40.0, and the Arc source adapter 22.52.0. `cratis render` admits ESM v1 through v7, but the renderer still refuses unsupported constructs within those versions: reactions, captures, triggers and Automation/Translate slices report `STAGE-ESM-024`, and read-model absence assertions report `STAGE-ESM-027`. It also refuses an evolved event until Stage can render its event-type migrations. Validation rejects `numbers exact` and `implementation` attachments on concept, built-in, and whole-command rules. For the embedded stdio server, the `visualize-model` MCP App, and native AI host registration, see [Screenplay MCP](screenplay-mcp.md). For Claude Desktop and ChatGPT Desktop installation, see [Screenplay desktop MCP](screenplay-desktop-mcp.md). @@ -29,7 +29,7 @@ A newer bundled compiler can produce a newer executable semantic model (ESM) ver | `cratis screenplay mcp` | Admitted for authoring and reading. The embedded server binds v7 models, pages their executable model (generated properties, responses, generation fixtures and return expectations) and reports execution readiness. Reference execution is not offered: neither the CLI nor the embedded server runs specifications. | | `cratis render` | Admitted. Policy negation renders. Generated command values and command responses are refused by the renderer with `STAGE-ESM-028` and `STAGE-ESM-029`, respectively; see [Cratis/Stage#175](https://github.com/Cratis/Stage/issues/175). Stage refuses a specification whose unauthenticated caller carries roles or claims with `STAGE-ESM-011`; this includes the unchanged canonical negation example. A refusal leaves no publishable artifacts. Versions newer than v7 are still blocked by `CLI-RENDER-004`. | | `cratis screenplay generate` | From Arc 22.52.0, the Arc adapter recovers supported generated UUID values and command responses by default for commands without successful scenarios. Output containing these constructs compiles to ESM v7, which `cratis render` admits, but the renderer refuses generated values with `STAGE-ESM-028` and responses with `STAGE-ESM-029`, even without `--authoring-only-constructs`; see [Cratis/Stage#175](https://github.com/Cratis/Stage/issues/175). Unsupported shapes and values needed by pre-generation protection remain in code with `SP0052`. Marten and Critter Stack retain their existing recovery surface. | -| `cratis run` | The Stage 4.39.0 container compiles the mounted `.play` files with its own Screenplay release, 4.84.1. A screen `action` with `when … execute` alternatives is refused by Stage with `STAGE-SCENE-ACTION-001` and likely prevents the container from starting. Passing `cratis screenplay validate` does not establish Stage support. | +| `cratis run` | The Stage 4.40.0 container compiles the mounted `.play` files with its own Screenplay release, 4.84.1. A screen `action` with `when … execute` alternatives is refused by Stage with `STAGE-SCENE-ACTION-001` and likely prevents the container from starting. Passing `cratis screenplay validate` does not establish Stage support. | ## `cratis render [PATH]` or `cratis render --workspace ` diff --git a/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs b/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs index 01bf5c71..50cdc273 100644 --- a/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs +++ b/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs @@ -31,8 +31,8 @@ Task Because() [Fact] void should_plan_the_exact_facade_target_version() => _result.TargetVersion.ShouldEqual(_expected.TargetVersion); [Fact] void should_plan_the_exact_facade_renderer() => _result.Renderer.ShouldEqual(_expected.Renderer); [Fact] void should_plan_the_exact_facade_renderer_version() => _result.RendererVersion.ShouldEqual(_expected.RendererVersion); - [Fact] void should_load_the_released_stage_439_renderer_package() => - typeof(CratisRendering).Assembly.GetCustomAttribute()!.InformationalVersion.Split('+')[0].ShouldEqual("4.39.0"); + [Fact] void should_load_the_released_stage_440_renderer_package() => + typeof(CratisRendering).Assembly.GetCustomAttribute()!.InformationalVersion.Split('+')[0].ShouldEqual("4.40.0"); [Fact] void should_plan_the_same_application_name() => _result.ApplicationName.ShouldEqual(_expected.ApplicationName); [Fact] void should_plan_the_same_semantic_revision() => _result.SemanticRevision.ShouldEqual(_expected.SemanticRevision); [Fact] void should_plan_the_exact_facade_artifacts() => diff --git a/Source/Cli.Specs/for_RunCommand/when_running/with_a_folder_and_the_default_stage_tag.cs b/Source/Cli.Specs/for_RunCommand/when_running/with_a_folder_and_the_default_stage_tag.cs index 741a6dda..295791e8 100644 --- a/Source/Cli.Specs/for_RunCommand/when_running/with_a_folder_and_the_default_stage_tag.cs +++ b/Source/Cli.Specs/for_RunCommand/when_running/with_a_folder_and_the_default_stage_tag.cs @@ -15,8 +15,8 @@ public class with_a_folder_and_the_default_stage_tag : given.a_run_command [Unix.Fact] void should_start_the_released_stage_image_that_matches_the_renderer_packages() => DockerArguments.ShouldContain($"cratis/stage:{StageContainer.DefaultTag}"); - [Unix.Fact] void should_run_stage_439_by_default() => - DockerArguments.ShouldContain("cratis/stage:4.39.0"); + [Unix.Fact] void should_run_stage_440_by_default() => + DockerArguments.ShouldContain("cratis/stage:4.40.0"); [Unix.Fact] void should_mount_only_the_selected_folder_read_only() => DockerArguments.ShouldContain($"{_folder}:/eventmodel:ro"); diff --git a/Source/Cli.Specs/for_RunCommand/when_running/with_a_play_file_and_the_default_stage_tag.cs b/Source/Cli.Specs/for_RunCommand/when_running/with_a_play_file_and_the_default_stage_tag.cs index 8a9f8207..1e39271d 100644 --- a/Source/Cli.Specs/for_RunCommand/when_running/with_a_play_file_and_the_default_stage_tag.cs +++ b/Source/Cli.Specs/for_RunCommand/when_running/with_a_play_file_and_the_default_stage_tag.cs @@ -20,8 +20,8 @@ void Establish() [Unix.Fact] void should_start_the_released_stage_image_that_matches_the_renderer_packages() => DockerArguments.ShouldContain($"cratis/stage:{StageContainer.DefaultTag}"); - [Unix.Fact] void should_run_stage_439_by_default() => - DockerArguments.ShouldContain("cratis/stage:4.39.0"); + [Unix.Fact] void should_run_stage_440_by_default() => + DockerArguments.ShouldContain("cratis/stage:4.40.0"); [Unix.Fact] void should_mount_only_the_selected_file_read_only() => DockerArguments.ShouldContain($"{_path}:/eventmodel/input.play:ro"); diff --git a/Source/Cli.Specs/for_StageContainer/when_resolving_the_default_tag.cs b/Source/Cli.Specs/for_StageContainer/when_resolving_the_default_tag.cs index 6607b193..de139792 100644 --- a/Source/Cli.Specs/for_StageContainer/when_resolving_the_default_tag.cs +++ b/Source/Cli.Specs/for_StageContainer/when_resolving_the_default_tag.cs @@ -26,7 +26,7 @@ void Establish() => _renderer = typeof(ArtifactRenderPlan).Assembly [Fact] void should_run_the_stage_the_renderer_came_from() => _tag.ShouldEqual(_renderer); - [Fact] void should_run_the_released_stage_439_image() => _tag.ShouldEqual("4.39.0"); + [Fact] void should_run_the_released_stage_440_image() => _tag.ShouldEqual("4.40.0"); [Fact] void should_not_run_a_moving_tag() => _tag.ShouldNotEqual(StageContainer.FallbackTag);