From 1ef8fcc653b1e6bcfd01e5d1b35ad198e398ce10 Mon Sep 17 00:00:00 2001 From: Mohsen Zainalpour Date: Tue, 27 Oct 2026 08:37:48 -0400 Subject: [PATCH 1/3] chore(deps): bump rift engine to 0.24.0 and write behaviors the way it admits them rift 0.24.0 aligns behaviors with Mountebank, and three shapes this SDK wrote are now ignored or refused: - a _behaviors object beside a response-level repeat is ignored whole (rift#1709). Reading an engine export (repeat + behaviors array) and writing it back produced exactly that, silently dropping every behavior. The block is now written as the array whenever a response-level repeat is present. - an array element holding repeat is refused (rift#1582). In the array form the effective repeat now goes beside the response; this reverses #217's choice to keep it in the array for rift 0.17.0. - an array element holding a list of copy/lookup is refused (rift#1639). A list is now written, and read, one item per element. rift 0.24.0 also confines an admin-API imposter's lookup CSVs and require() to --scripts-dir (rift#1617), refusing every lookup without one, so SpawnOptions gains scriptsDir and the conformance spawn lane passes the corpus root. --- docs/design/sdk-api.md | 6 +++ pom.xml | 2 +- rift-java-conformance/README.md | 6 +-- .../conformance/ConformanceTransport.java | 6 ++- .../rift/conformance/LiveEngine.java | 13 ++++++ .../rift/conformance/LookupGrammarIT.java | 7 ++-- .../github/achirdlabs/rift/SpawnOptions.java | 21 ++++++++++ .../achirdlabs/rift/model/Behaviors.java | 39 +++++++++++++++--- .../achirdlabs/rift/model/Response.java | 23 ++++++++--- .../achirdlabs/rift/spawn/RiftProcess.java | 4 ++ .../rift/model/BehaviorRunOrderTest.java | 14 ++++--- .../rift/model/BehaviorsWriteFormTest.java | 38 +++++++----------- .../rift/model/FaultScriptRepeatTest.java | 5 ++- .../rift/model/ProxyInjectBehaviorsTest.java | 6 +-- .../rift/model/ResponseLevelRepeatTest.java | 28 ++++++------- .../rift/spawn/SpawnScriptsDirTest.java | 40 +++++++++++++++++++ .../testcontainers/RiftContainerTest.java | 6 +-- 17 files changed, 194 insertions(+), 70 deletions(-) create mode 100644 rift-java-core/src/test/java/io/github/achirdlabs/rift/spawn/SpawnScriptsDirTest.java diff --git a/docs/design/sdk-api.md b/docs/design/sdk-api.md index 2cceeeb..9eba1a6 100644 --- a/docs/design/sdk-api.md +++ b/docs/design/sdk-api.md @@ -564,6 +564,12 @@ public sealed interface BehaviorChain> // interchangeable, since rift 0.17.0 honours only the block one. When both are present both are // kept; `Behaviors.effectiveRepeat()` reports which applies. The DSL's `repeat(int)` emits the // block spelling. +// From rift 0.24.0 the write follows what that engine admits: a `_behaviors` object beside a +// response-level `repeat` is ignored (rift#1709), so the block is then written as the array; an +// array element may not hold `repeat` (rift#1582, rift#1672), so in the array form the effective +// `repeat` is written beside the response and any other is dropped; and an element may not hold a +// list of `copy`/`lookup` (rift#1639), so a list is written one item per element and read back the +// same way. This trades rift 0.17.0's block-only `repeat` for an imposter the pinned engine accepts. IsSpec templated() // rename of template(); _rift.templated // declarative flow-state writes after the response (_rift.stateOps, rift >= 0.18.0; #227). Run in // chain order after templating and behaviors; engine-version gated at create/replaceAll. diff --git a/pom.xml b/pom.xml index 089485d..57e1916 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,7 @@ 17 - 0.23.0 + 0.24.0