Skip to content

Commit 8433419

Browse files
committed
fix(runtime): the clone notice makes no claim about the clone's source
The clone door takes any registered flow as its source, with no provenance test, so "the toggle switches packaged flows only, such as the one it was copied from" is false when a customer-authored flow is cloned. The notice, its docblock and the runtime changeset now say only what holds for every clone: the toggle switches packaged flows only and refuses the clone. The prescription is unchanged: switch the clone off through its own status, via PUT /api/v1/automation/NAME. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XY5uCwTjZj7884yYtyur4H
1 parent d7eb865 commit 8433419

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎.changeset/20726-clone-notice-status-switch.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
fix(runtime): the clone door's notice names the clone's own off-switch, its status (#20726)
66

7-
`POST /api/v1/automation/:name/clone` answers a `notice` saying the clone is armed. It told the admin to switch the clone off through `POST /api/v1/automation/NAME/toggle`. A clone carries no package envelope, so it is a flow authored in the deployment, and that switch refuses it: the switch turns packaged flows on and off only. The notice now names the clone's own switch: send its complete definition with `status: 'obsolete'` to `PUT /api/v1/automation/NAME`. It also says that the toggle switches packaged flows only, such as the flow the clone was copied from. The response shape is unchanged; only the notice text moves.
7+
`POST /api/v1/automation/:name/clone` answers a `notice` saying the clone is armed. It told the admin to switch the clone off through `POST /api/v1/automation/NAME/toggle`. A clone carries no package envelope, so it is a flow authored in the deployment, and that switch refuses it: the switch turns packaged flows on and off only. The notice now names the clone's own switch: send its complete definition with `status: 'obsolete'` to `PUT /api/v1/automation/NAME`. It also says that the toggle switches packaged flows only and refuses the clone, whatever flow the clone was copied from. The response shape is unchanged; only the notice text moves.

‎packages/runtime/src/flow-clone.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ export const FLOW_CLONE_DROPPED_KEYS: readonly string[] = Object.freeze([
152152
* `status`, published through `PUT /:name`. A clone carries no package
153153
* envelope (see {@link FLOW_CLONE_DROPPED_KEYS}), so it is a flow authored in
154154
* this deployment, and the activation toggle — which switches packaged flows
155-
* only — refuses it. The toggle is named for the flow it was copied from,
156-
* which is the packaged one.
155+
* only — refuses it. That holds whatever the clone was copied from: the clone
156+
* door takes any registered flow as its source, packaged or not, so the
157+
* notice makes no claim about the source's provenance.
157158
*/
158159
export const FLOW_CLONE_NOTICE =
159160
'References are not re-pointed: this clone calls exactly what the original called '
@@ -163,7 +164,7 @@ export const FLOW_CLONE_NOTICE =
163164
+ 'If that is not what you want, switch the clone off through its own status: send its '
164165
+ 'complete definition with `status: \'obsolete\'` to `PUT /api/v1/automation/<name>`. '
165166
+ 'The activation toggle (`POST /api/v1/automation/<name>/toggle`) switches packaged flows '
166-
+ 'only, such as the one it was copied from, and refuses the clone.';
167+
+ 'only and refuses the clone.';
167168

168169
/** ADR-0112 envelope for the same-name refusal: a status AND a code. */
169170
export const FLOW_CLONE_NAME_TAKEN_STATUS = 409;

0 commit comments

Comments
 (0)