TARGET_DUPLICATE
Two runtime targets or Effect recovery targets use the same durable identity.
What failed
Crux found more than one exported flow() or durableTask() with the same
literal target name, or more than one Effect recovery definition for the same
(id, version) on a RuntimeProgram.
Why
Runtime target names and Effect recovery identities are persisted routing keys. A wake or a cold recovery must resolve one identity to exactly one declaration.
What still works
Object-bound calls still work while you fix the duplicate. Runtime artifact
generation, createRuntimeProgram(), and handler construction fail for the
conflicting program.
Fix
For flows and durable tasks, rename one target and regenerate artifacts:
crux runtime generateFor Effect recovery targets, pass one definition object per (id, version).
Identical objects collapse; different objects for the same pair throw:
createRuntimeProgram({
targets: [reviewFlow],
transports: [],
// One recoverable definition per (id, version).
effectTargets: [updateCustomer],
});If two modules both export a recoverable Effect with the same id and version,
export only one of them into effectTargets or change one version after
updating its recovery contract.
See Durability and restarts and the Effects guide.