You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2026/06/08 07:37:18 UTC
(causeway) 13/27: CAUSEWAY-4023: archives replay command DTO preservation change
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch CAUSEWAY-4025
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit e761dd1b644461f41de31db4139f30432d26bea6
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Jun 8 06:17:08 2026 +0100
CAUSEWAY-4023: archives replay command DTO preservation change
---
.../.openspec.yaml | 0
.../design.md | 0
.../proposal.md | 0
.../specs/command-replay-result-mapping/spec.md | 0
.../tasks.md | 0
.../specs/command-replay-result-mapping/spec.md | 28 +++++++++++++++++++++-
6 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/openspec/changes/avoid-mutating-command-dto-on-replay-remap/.openspec.yaml b/openspec/changes/archive/2026-06-08-avoid-mutating-command-dto-on-replay-remap/.openspec.yaml
similarity index 100%
rename from openspec/changes/avoid-mutating-command-dto-on-replay-remap/.openspec.yaml
rename to openspec/changes/archive/2026-06-08-avoid-mutating-command-dto-on-replay-remap/.openspec.yaml
diff --git a/openspec/changes/avoid-mutating-command-dto-on-replay-remap/design.md b/openspec/changes/archive/2026-06-08-avoid-mutating-command-dto-on-replay-remap/design.md
similarity index 100%
rename from openspec/changes/avoid-mutating-command-dto-on-replay-remap/design.md
rename to openspec/changes/archive/2026-06-08-avoid-mutating-command-dto-on-replay-remap/design.md
diff --git a/openspec/changes/avoid-mutating-command-dto-on-replay-remap/proposal.md b/openspec/changes/archive/2026-06-08-avoid-mutating-command-dto-on-replay-remap/proposal.md
similarity index 100%
rename from openspec/changes/avoid-mutating-command-dto-on-replay-remap/proposal.md
rename to openspec/changes/archive/2026-06-08-avoid-mutating-command-dto-on-replay-remap/proposal.md
diff --git a/openspec/changes/avoid-mutating-command-dto-on-replay-remap/specs/command-replay-result-mapping/spec.md b/openspec/changes/archive/2026-06-08-avoid-mutating-command-dto-on-replay-remap/specs/command-replay-result-mapping/spec.md
similarity index 100%
rename from openspec/changes/avoid-mutating-command-dto-on-replay-remap/specs/command-replay-result-mapping/spec.md
rename to openspec/changes/archive/2026-06-08-avoid-mutating-command-dto-on-replay-remap/specs/command-replay-result-mapping/spec.md
diff --git a/openspec/changes/avoid-mutating-command-dto-on-replay-remap/tasks.md b/openspec/changes/archive/2026-06-08-avoid-mutating-command-dto-on-replay-remap/tasks.md
similarity index 100%
rename from openspec/changes/avoid-mutating-command-dto-on-replay-remap/tasks.md
rename to openspec/changes/archive/2026-06-08-avoid-mutating-command-dto-on-replay-remap/tasks.md
diff --git a/openspec/specs/command-replay-result-mapping/spec.md b/openspec/specs/command-replay-result-mapping/spec.md
index 96e2363050e..6e699f90ea8 100644
--- a/openspec/specs/command-replay-result-mapping/spec.md
+++ b/openspec/specs/command-replay-result-mapping/spec.md
@@ -42,12 +42,38 @@ The system MUST NOT require the SPI to receive parameter name or parameter index
### Requirement: Replay input remapping does not mutate recorded command data
The system SHALL preserve the imported command log entry's recorded command DTO when applying replay-time target or reference parameter remapping.
Replay input remapping SHALL affect the command DTO supplied to replay execution, not the recorded command DTO retained for audit and inspection.
+When target remapping supplies a replacement bookmark, the replay execution DTO SHALL use the replacement target bookmark and the recorded command DTO SHALL retain the original target bookmark.
+When reference parameter remapping supplies a replacement bookmark, the replay execution DTO SHALL use the replacement parameter reference bookmark and the recorded command DTO SHALL retain the original parameter reference bookmark.
+Replay retry SHALL start from the recorded command DTO and MUST NOT reuse a previously remapped execution DTO as recorded input.
+Replay failure MUST NOT leave remapped target or reference parameter values in the recorded command DTO.
-#### Scenario: Remapped replay preserves recorded command
+#### Scenario: Remapped replay target preserves recorded command
- **WHEN** command replay remaps recorded target bookmark `demoCustomer:1` to actual target bookmark `demoCustomer:2`
- **THEN** the replay execution receives target bookmark `demoCustomer:2`
- **AND** the imported command log entry still records target bookmark `demoCustomer:1`
+#### Scenario: Remapped replay reference parameter preserves recorded command
+- **WHEN** command replay remaps action reference parameter `customer` from recorded bookmark `demoCustomer:1` to actual bookmark `demoCustomer:2`
+- **THEN** the replay execution receives reference parameter `customer` with bookmark `demoCustomer:2`
+- **AND** the imported command log entry still records reference parameter `customer` with bookmark `demoCustomer:1`
+
+#### Scenario: Replay retry starts from recorded target bookmark
+- **GIVEN** a first replay remaps recorded target bookmark `demoCustomer:1` to actual target bookmark `demoCustomer:2`
+- **WHEN** the command is replayed or retried again
+- **THEN** replay input remapping is evaluated against recorded target bookmark `demoCustomer:1`
+- **AND** the stored command DTO does not use `demoCustomer:2` as the recorded target
+
+#### Scenario: Replay retry starts from recorded reference parameter bookmark
+- **GIVEN** a first replay remaps action reference parameter `customer` from recorded bookmark `demoCustomer:1` to actual bookmark `demoCustomer:2`
+- **WHEN** the command is replayed or retried again
+- **THEN** replay input remapping is evaluated against recorded parameter bookmark `demoCustomer:1`
+- **AND** the stored command DTO does not use `demoCustomer:2` as the recorded parameter reference
+
+#### Scenario: Replay failure preserves recorded command DTO
+- **WHEN** command replay remaps a recorded target or reference parameter bookmark before execution
+- **AND** replay execution fails
+- **THEN** the imported command log entry still records the original target and reference parameter bookmarks
+
### Requirement: Replay result mapping SPI is notified after successful replay
The system SHALL provide a command replay mapping SPI that applications can implement to receive replay result bookmark observations and provide replay input bookmark lookups.
After a command replay succeeds, the system SHALL notify the SPI when the imported command log entry has a recorded returned object bookmark and replay execution returns an actual result bookmark.