Define deterministic unified-manager command movement through synchronized command-log and DTO retimestamping without persistence-schema changes.
When command-log recording support is ENABLED, the unified manager SHALL provide one moveCommands action associated with commandsInSequence. It SHALL move one or more selected commands earlier or later by retimestamping them after an unselected target command. Selected and target choices SHALL come from the current baseline-and-limit-bounded sequence, with selected commands removed from target choices. Direct invocation MUST reject disabled recording support, an empty selection, a missing target, a selected target, or any selected or target interaction id outside the fresh current sequence before changing any timestamp. Excluded commands MUST NOT be selectable or targetable, and separate moveCommandsUp and moveCommandsDown actions MUST NOT be exposed.
A, B, and C and selected commands B and CA is offeredB and C are not offeredA, B, CC is moved after A or A is moved after CA is active and command B is excluded or outside the current bounded sequenceB as target or includes it in the selected blockThe action SHALL derive selected order from the fresh manager sequence before mutation and SHALL place the first selected command exactly one second after the target timestamp. For each later selected command, it SHALL preserve the original elapsed time from its preceding selected command only when that gap is positive and at least one second; otherwise it SHALL use a one-second increment. The action SHALL update each selected entry's command-log timestamp and embedded CommandDto timestamp to the same value. It MUST NOT change the target timestamp, any unselected entry timestamp, replay states, results, repository membership, manager baseline, or manager limit.
A and B are 2.5 seconds apart and target C has timestamp 10:00:00C without timing squashA has timestamp 10:00:01B has timestamp 10:00:03.5The movement action SHALL provide a squashTimings boolean parameter defaulting to false. When false, it SHALL apply the preserve-gap policy with the one-second minimum. When true, it SHALL discard every original selected-command gap, place the first selected command one second after the target, and place each later selected command exactly one second after its predecessor while retaining selected manager order.
A, B, and C have arbitrary original gapsA is one second after the targetB is one second after AC is one second after BsquashTimings is falseCauseway 4 SHALL persist moved command-log and DTO timestamps through the existing managed CommandLogEntry mutation contract and Jakarta Persistence adapter. W1 MUST NOT add a persistent order field, datastore migration, JDO-specific implementation, or restored commandlog JDO adapter. Reloading moved entries SHALL retain matching timestamps and established timestamp-based queries SHALL observe the new order.