Repository navigation
Commit 95f545e
fix(runtime): say the flow clone notice in one business line (#28072)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DR7SzDBhXQGAHb2Ls1TDmTM)_
Fixes #27886
domain:server#3 card thread · os-elon-musk ·
session_016WV4cxQRTfRrRf5wo1ZC3U
## What changes
`FLOW_CLONE_NOTICE` (`packages/runtime/src/flow-clone.ts`), the notice
`POST /api/v1/automation/:name/clone` returns with `{ flow, notice }`,
goes from seven sentences of engine prose to one line:
> The copy runs alongside the original until you switch one of them off,
and it still uses the same subflows, actions and objects as the
original.
The detail the old paragraph carried (`status: 'draft'` is not an
off-switch, references are not re-pointed, the Packaged automation
`Switch "…" off` action does not reach the clone, the clone is switched
off in Studio with its Enabled switch and a publish) now lives in the
constant's TSDoc. The REST recipe stays in the client SDK's
`automation.toggle` TSDoc, unchanged.
The runtime pin in `domains/automation-flow-clone.test.ts` now asserts
both facts by their new wording, exactly one sentence, and no engine
words (`draft`, `status`, `off-switch`, `lifecycle`, `Studio`). The
existing `toBe(FLOW_CLONE_NOTICE)` and no-endpoint pins stay.
## Why
Triage 6515426773: the packaged-flow clone notice is one business line.
The console shows it verbatim beside a "Switch the original off" button,
so most of the paragraph repeated the screen. Re-measured on `main` at
5aee206: the notice was the seven-sentence string the card quotes.
Both facts are kept on purpose. "Runs alongside the original" is the
double-fire warning the card asks to keep. "Still uses the same
subflows, actions and objects" is the ADR-0126 §9 line ("the clone's
references stay pointed at what the original pointed at, and the surface
tells the admin so"), said in business words, so the shortening does not
drop an ADR requirement.
## Verification
- `vitest run src/domains/automation-flow-clone.test.ts
src/dispatcher-plugin.automation-clone-mount.integration.test.ts`: 23
passed.
- Red control: with `origin/main`'s `flow-clone.ts` restored, the
rewritten notice test fails (1 failed, 18 passed); restored to this
diff, green.
- `dispatch-gates --ran`: 60 derived families accounted for, 58 exit 0,
2 exit 3 in the fresh worktree. Re-run after their prerequisites:
`check-plugin-teardown-shape --self-test` exit 0 after fetching its
pinned commit; `check:dual-build-cjs-loads` NOT MEASURED (needs every
package's dist).
- `pnpm lint` exit 0; `pnpm --filter @objectstack/runtime typecheck`
exit 0.
- The dogfood door test
(`qa/dogfood/test/automation-flow-clone-door.dogfood.test.ts`) asserts
`toBe(FLOW_CLONE_NOTICE)` by import, so it follows the constant; not run
locally.
Clause-②: no
Metadata-protocol: none
Skills-docs: none. `grep -rn "re-pointed\|alongside the
original\|lifecycle label and NOT\|does not reach the clone" skills/
docs/ content/` finds no copy of the notice; the one Setup mention
(`content/docs/build-without-code.mdx:38`) does not quote it.
Out of scope, for the seat:
`ui/packages/app-shell/src/views/setup/PackagedAutomationPage.test.tsx`
keeps a fixture `CLONE_NOTICE` with the first two old sentences. The
page test pins that whatever notice arrives is shown unedited, so it
stays green, but the fixture text is now stale (`ui/` is outside this
order's surface).
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (not touched)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_016WV4cxQRTfRrRf5wo1ZC3U
Co-authored-by: Claude <noreply@anthropic.com>1 parent b1b35a3 commit 95f545e
3 files changed
Lines changed: 51 additions & 42 deletions
File tree
- .changeset
- packages/runtime/src
- domains
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
| 445 | + | |
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
| 452 | + | |
456 | 453 | | |
457 | 454 | | |
458 | 455 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
466 | 465 | | |
467 | 466 | | |
468 | 467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 161 | + | |
164 | 162 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
182 | 188 | | |
183 | 189 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 190 | + | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
0 commit comments