Skip to content

fix(runtime): say the flow clone notice in one business line - #28072

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-f316bo
Oct 30, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-f316bo

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

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

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_016WV4cxQRTfRrRf5wo1ZC3U

The clone door's notice was seven sentences of engine prose (status
draft, lifecycle labels, both switches). The console shows it beside a
"Switch the original off" button, so it now states the two facts the
admin must know in one line: the copy runs alongside the original until
one is switched off, and it still uses what the original used. The
detail stays in the constant's TSDoc.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cxQRTfRrRf5wo1ZC3U
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Oct 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see

Coarse fallback — 28 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json c1b52de22e87680ceb3b093c4c6035b0ef894a3f → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 627b299959907d0264f8152f3dfe7524e9210471 — the merge of head 83b42f1c881ea676ac53b2c79b35190214a485b8 into base c1b52de22e87680ceb3b093c4c6035b0ef894a3f, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 627b299959907d0264f8152f3dfe7524e9210471 && git checkout 627b299959907d0264f8152f3dfe7524e9210471
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c1b52de22e87680ceb3b093c4c6035b0ef894a3f 83b42f1c881ea676ac53b2c79b35190214a485b8 && git checkout -B drift-repro c1b52de22e87680ceb3b093c4c6035b0ef894a3f && git merge --no-ff 83b42f1c881ea676ac53b2c79b35190214a485b8

node scripts/docs-audit/affected-docs.mjs --json c1b52de22e87680ceb3b093c4c6035b0ef894a3f

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#3 · os-elon-musk · session_016WV4czuTWNgKR22fKv7jia

Seat ACCEPT · PR #28072 · head 83b42f1c881ea676ac53b2c79b35190214a485b8 · 2026-10-30T11:50Z

维护者速读

  • 改了什么: 克隆流程后返回给管理员的提示,从七句引擎术语缩成一句业务话:「副本会和原流程同时运行,直到你关掉其中一个;它仍然使用原流程的子流程、动作和对象。」
  • 为什么改: 控制台把这段提示原样显示在「关闭原流程」按钮旁边,旧文大半在重复屏幕上已有的东西(The flow clone notice is a paragraph of engine prose; say it in one line (#27356 row 18) #27886)。
  • 风险与回滚: 只改一个提示字符串和它的注释、测试;回滚即还原 flow-clone.ts。两条必须告知的事实(会双跑、引用不重指向,ADR-0126 §9)都保留。
  • 先看: packages/runtime/src/flow-clone.ts 的 FLOW_CLONE_NOTICE。
  • 两分钟验证: 在控制台克隆一个打包流程,看结果提示是否为上面那一句。
  • 需要你做的: 无(Tier S,按本期落地授权由席位落地)。

席位核对

  • Shape: draft → main, Fixes #27886. 3 files (+51/−42): packages/runtime/src/flow-clone.ts, its test domains/automation-flow-clone.test.ts, one changeset. check-governed-merges --pr 28072: NOT governed.
  • Premise: the thread re-measured the seven-sentence notice on main @ 5aee2065 before the change.
  • Read of the diff: the constant is one sentence; both facts the TSDoc calls required stay (runs alongside the original = the double-fire warning; same subflows, actions and objects = ADR-0126 §9's "the surface tells the admin so"). The engine words and switch locations moved into the TSDoc, not lost. The pin asserts both phrases, exactly one sentence, and none of draft / status / off-switch / lifecycle / Studio; the existing toBe(FLOW_CLONE_NOTICE) and no-endpoint pins stay. Red control shown (main's file restored → the pin fails).
  • Declarations: Clause-②: no, Metadata-protocol: none; @objectstack/runtime patch. The notice is response copy, not an accept set; no contract review is owed.
  • Out of scope: ui/packages/app-shell/src/views/setup/PackagedAutomationPage.test.tsx keeps a stale copy of the old notice as a fixture (still green, the page renders what the stub returns) → ui: the PackagedAutomationPage test fixture still carries the old seven-sentence flow clone notice after #27886 #28073 (domain:ui, blocked on this PR). Skills-docs: none.
  • Gate check-runs on this head: 48 total, 35 success, 13 skipped by the path filter, 0 failed. mergeable_state: clean.
  • Landing: Tier S, under the maintainer's landing grant for this term (2026-10-29 22:05Z, seat thread). Ready + auto-merge through the relay.

ACCEPT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The flow clone notice is a paragraph of engine prose; say it in one line (#27356 row 18)

2 participants