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:11 UTC
(causeway) 06/27: CAUSEWAY-4017: archives known action target export 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 c2b8157800fc0f700a38b0f021c91ea061e98569
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Jun 7 22:49:18 2026 +0100
CAUSEWAY-4017: archives known action target export change
---
.../.openspec.yaml | 0
.../design.md | 0
.../proposal.md | 0
.../specs/command-export-known-targets/spec.md | 0
.../specs/command-export-yaml-result/spec.md | 0
.../specs/safe-action-command-publishing/spec.md | 0
.../tasks.md | 0
.../specs/command-export-known-targets/spec.md | 8 +++++-
openspec/specs/command-export-yaml-result/spec.md | 32 ++++++++++++++++++++++
.../specs/safe-action-command-publishing/spec.md | 29 ++++++++++++++++++++
10 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/openspec/changes/require-known-action-targets/.openspec.yaml b/openspec/changes/archive/2026-06-07-require-known-action-targets/.openspec.yaml
similarity index 100%
rename from openspec/changes/require-known-action-targets/.openspec.yaml
rename to openspec/changes/archive/2026-06-07-require-known-action-targets/.openspec.yaml
diff --git a/openspec/changes/require-known-action-targets/design.md b/openspec/changes/archive/2026-06-07-require-known-action-targets/design.md
similarity index 100%
rename from openspec/changes/require-known-action-targets/design.md
rename to openspec/changes/archive/2026-06-07-require-known-action-targets/design.md
diff --git a/openspec/changes/require-known-action-targets/proposal.md b/openspec/changes/archive/2026-06-07-require-known-action-targets/proposal.md
similarity index 100%
rename from openspec/changes/require-known-action-targets/proposal.md
rename to openspec/changes/archive/2026-06-07-require-known-action-targets/proposal.md
diff --git a/openspec/changes/require-known-action-targets/specs/command-export-known-targets/spec.md b/openspec/changes/archive/2026-06-07-require-known-action-targets/specs/command-export-known-targets/spec.md
similarity index 100%
copy from openspec/changes/require-known-action-targets/specs/command-export-known-targets/spec.md
copy to openspec/changes/archive/2026-06-07-require-known-action-targets/specs/command-export-known-targets/spec.md
diff --git a/openspec/changes/require-known-action-targets/specs/command-export-yaml-result/spec.md b/openspec/changes/archive/2026-06-07-require-known-action-targets/specs/command-export-yaml-result/spec.md
similarity index 100%
rename from openspec/changes/require-known-action-targets/specs/command-export-yaml-result/spec.md
rename to openspec/changes/archive/2026-06-07-require-known-action-targets/specs/command-export-yaml-result/spec.md
diff --git a/openspec/changes/require-known-action-targets/specs/safe-action-command-publishing/spec.md b/openspec/changes/archive/2026-06-07-require-known-action-targets/specs/safe-action-command-publishing/spec.md
similarity index 100%
rename from openspec/changes/require-known-action-targets/specs/safe-action-command-publishing/spec.md
rename to openspec/changes/archive/2026-06-07-require-known-action-targets/specs/safe-action-command-publishing/spec.md
diff --git a/openspec/changes/require-known-action-targets/tasks.md b/openspec/changes/archive/2026-06-07-require-known-action-targets/tasks.md
similarity index 100%
rename from openspec/changes/require-known-action-targets/tasks.md
rename to openspec/changes/archive/2026-06-07-require-known-action-targets/tasks.md
diff --git a/openspec/changes/require-known-action-targets/specs/command-export-known-targets/spec.md b/openspec/specs/command-export-known-targets/spec.md
similarity index 97%
rename from openspec/changes/require-known-action-targets/specs/command-export-known-targets/spec.md
rename to openspec/specs/command-export-known-targets/spec.md
index be61e40611f..efef38e9dcd 100644
--- a/openspec/changes/require-known-action-targets/specs/command-export-known-targets/spec.md
+++ b/openspec/specs/command-export-known-targets/spec.md
@@ -1,4 +1,10 @@
-## ADDED Requirements
+# command-export-known-targets Specification
+
+## Purpose
+
+Defines command export known target validation rules.
+
+## Requirements
### Requirement: Export validates known action targets
The export manager SHALL validate the target of every selected action command before creating export YAML.
diff --git a/openspec/specs/command-export-yaml-result/spec.md b/openspec/specs/command-export-yaml-result/spec.md
index 2c566e762e9..aed635b6886 100644
--- a/openspec/specs/command-export-yaml-result/spec.md
+++ b/openspec/specs/command-export-yaml-result/spec.md
@@ -106,3 +106,35 @@ The system MUST NOT require the result bookmark to resolve to a live domain obje
- **WHEN** a ReplayableCommand wraps an imported command log entry whose result bookmark does not resolve to a local domain object
- **THEN** ReplayableCommand still displays the bookmark type and id as result metadata
+### Requirement: Exported command sequences contain only reachable action targets
+The system SHALL validate selected command export sequences before emitting YAML.
+The system SHALL rely on recorded result metadata at or after the export manager baseline to prove that later exported action targets are reachable from earlier commands in the same exportable range.
+An exported action command whose target is not a menu service root SHALL have a target bookmark that was recorded as the result of an earlier command in the baseline-bounded exportable range.
+Command export MUST NOT silently compensate for an unknown action target by fabricating result metadata or by inventing a path that was not recorded.
+If selected command log data contains an action with an unknown target, export SHALL reject the sequence with a clear validation message rather than emitting unreplayable YAML.
+The validation message SHALL identify the command that failed validation.
+
+#### Scenario: Export sequence uses earlier result as later target
+- **GIVEN** an export manager baseline is set
+- **AND** an exportable command at or after the baseline has result bookmark `demoCustomer:1`
+- **AND** a later selected action command targets bookmark `demoCustomer:1`
+- **WHEN** the commands are exported
+- **THEN** the exported YAML preserves both commands in replay order
+- **AND** the earlier command includes result metadata that makes the later target reachable
+
+#### Scenario: Export rejects unknown target in selected data
+- **GIVEN** an export manager baseline is set
+- **AND** a selected action command targets bookmark `demoCustomer:1`
+- **AND** the target is not a menu service root
+- **AND** no earlier command at or after the baseline has result bookmark `demoCustomer:1`
+- **WHEN** the commands are exported
+- **THEN** the system rejects the export sequence as unreplayable
+- **AND** the validation message identifies the selected command that failed
+- **AND** the system does not emit YAML for that invalid sequence
+
+#### Scenario: Export does not fabricate target path metadata
+- **GIVEN** an export manager baseline is set
+- **AND** a selected action command targets bookmark `demoCustomer:1`
+- **AND** no earlier command at or after the baseline has result bookmark `demoCustomer:1`
+- **WHEN** the commands are exported
+- **THEN** the system does not add synthetic result metadata solely to make the sequence appear reachable
diff --git a/openspec/specs/safe-action-command-publishing/spec.md b/openspec/specs/safe-action-command-publishing/spec.md
index 64dfbc403e4..c842478b3f4 100644
--- a/openspec/specs/safe-action-command-publishing/spec.md
+++ b/openspec/specs/safe-action-command-publishing/spec.md
@@ -101,3 +101,32 @@ Types that implement the command recording suppression marker interface MUST NOT
- **THEN** the owner type has no synthetic selector action for that collection
- **AND** the system exposes no selector command publishing metadata for that collection
+### Requirement: Logged navigation actions establish known export targets
+When command-log recording support is `ENABLED`, logged safe actions that return bookmarkable domain objects SHALL make those result bookmarks available as known targets for later command export validation.
+Synthetic parented collection navigate-to actions SHALL make their returned child bookmark available as a known export target when their command log entry stores that bookmark as the result.
+Synthetic scalar reference navigate-to actions SHALL make their returned referenced-object bookmark available as a known export target when their command log entry stores that bookmark as the result.
+Safe actions that do not store a result bookmark MUST NOT establish a known target for later exported actions.
+
+#### Scenario: Finder safe action establishes a later export target
+- **GIVEN** command-log recording support is `ENABLED`
+- **AND** a logged safe finder action returns bookmark `demoCustomer:1`
+- **WHEN** a later selected export action targets bookmark `demoCustomer:1`
+- **THEN** the later target is known from the safe action result if the safe action is within the export manager baseline
+
+#### Scenario: Parented collection navigate-to action establishes a child export target
+- **GIVEN** command-log recording support is `ENABLED`
+- **AND** a synthetic parented collection navigate-to command returns bookmark `demoLine:1`
+- **WHEN** a later selected export action targets bookmark `demoLine:1`
+- **THEN** the later target is known from the synthetic navigate-to result if the navigate-to command is within the export manager baseline
+
+#### Scenario: Scalar reference navigate-to action establishes a referenced export target
+- **GIVEN** command-log recording support is `ENABLED`
+- **AND** a synthetic scalar reference navigate-to command returns bookmark `demoLease:1`
+- **WHEN** a later selected export action targets bookmark `demoLease:1`
+- **THEN** the later target is known from the synthetic navigate-to result if the navigate-to command is within the export manager baseline
+
+#### Scenario: Safe action without result does not establish a later export target
+- **GIVEN** command-log recording support is `ENABLED`
+- **AND** a logged safe action has no result bookmark
+- **WHEN** a later selected export action targets bookmark `demoCustomer:1`
+- **THEN** the safe action without a result does not make bookmark `demoCustomer:1` known