You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
runtime: POST /api/v1/automation/:name/clone is not mounted on the HTTP server — every flow clone, from the API and from the Setup packaged-automation page, answers 404 ENDPOINT_NOT_FOUND #20676
The ADR-0126 §7.1 flow clone cannot be performed on a running server. POST /api/v1/automation/:name/clone answers 404 {"success":false,"error":{"code":"ENDPOINT_NOT_FOUND","message":"Not found"}} for every body (legal, empty, missing name, missing label, same name, illegal name), for every source (existing or not) and for every caller (admin and anonymous alike). The Setup → Packaged Automation page's Clone dialog therefore shows "Not found" for every submission and never shows the post-clone notice.
Measured on main at 6bff748b (showcase, objectstack dev, stock composition), twice on two separate cold boots; objectui console built at the pinned dd3f7e1b.
Reproduction
Boot the showcase (OS_PORT=PORT objectstack dev --ui --seed-admin -p PORT -d file:…) and sign in as the seeded admin.
POST /api/v1/automation/showcase_urgent_task_alert/clone with body {"name":"qa_urgent_alert_clone","label":"QA urgent alert clone"}.
Expected: a 2xx carrying the cloned flow and FLOW_CLONE_NOTICE. Actual: 404 ENDPOINT_NOT_FOUND; GET /api/v1/automation/qa_urgent_alert_clone → 404 RESOURCE_NOT_FOUND.
Positive control on the same prefix, same session: POST /api/v1/automation/showcase_notify_owner/toggle {"enabled":true} → 200.
UI: Setup → Packaged Automation → Clone on any flow row → legal name + label → Create clone → the dialog's alert reads "Not found"; the network trace shows POST /api/v1/automation/(flow)/clone → 404.
Mechanism (read from source at 6bff748b)
The domain arm exists: packages/runtime/src/domains/automation.ts, POST /:name/clone (body validation, 404 / 409 probes, cloneFlowDefinition, registerFlow).
The HTTP bridge never routes to it: registerAutomationRoutes in packages/runtime/src/dispatcher-plugin.ts mounts each /automation route explicitly (/:name, /:name/trigger, /:name/toggle, /:name/runs…), and has no /:name/clone mount — git log -S "/clone" -- packages/runtime/src/dispatcher-plugin.ts finds none ever. Hono's not-found answers before the dispatcher runs.
packages/runtime/src/domains/automation-flow-clone.test.ts stays green because it calls the domain handler directly; no dogfood test drives the clone over HTTP (the checklist's dispatcher-vs-hono-route trap).
The route is also absent from packages/runtime/src/route-ledger.ts (docs/qa/platform-checklist/FOLLOW-UPS.md §8a D22), so no ledger-vs-live parity check could flag the missing mount.
Every refusal that prescribes the clone points at the dead door: the ledger FLOW_DISABLED message ("…or run a clone of it under a new name.") and the Setup page copy ("clone a flow under a new name to customize it").
content/docs/build-without-code.mdx and content/docs/capabilities/integrations.mdx promise "clone your own".
The clone's own persistence question (FOLLOW-UPS §8a D18 — engine-only registration, restart survival, Studio reachability) could not be measured at all; it stays open behind this card.
Expected
The live server serves POST /api/v1/automation/:name/clone (and its environment-scoped twin) through the dispatcher, with the arms the domain handler already implements, and a live HTTP pin covers it.
QA-source: #20674 · automation.packaged-flow-clone-contract · c1, c4
QA-source: #20674 · automation.setup-packaged-automation-board · c7
What happens
The ADR-0126 §7.1 flow clone cannot be performed on a running server.
POST /api/v1/automation/:name/cloneanswers404 {"success":false,"error":{"code":"ENDPOINT_NOT_FOUND","message":"Not found"}}for every body (legal, empty, missing name, missing label, same name, illegal name), for every source (existing or not) and for every caller (admin and anonymous alike). The Setup → Packaged Automation page's Clone dialog therefore shows "Not found" for every submission and never shows the post-clone notice.Measured on
mainat6bff748b(showcase,objectstack dev, stock composition), twice on two separate cold boots; objectui console built at the pinneddd3f7e1b.Reproduction
OS_PORT=PORT objectstack dev --ui --seed-admin -p PORT -d file:…) and sign in as the seeded admin.POST /api/v1/automation/showcase_urgent_task_alert/clonewith body{"name":"qa_urgent_alert_clone","label":"QA urgent alert clone"}.FLOW_CLONE_NOTICE. Actual: 404ENDPOINT_NOT_FOUND;GET /api/v1/automation/qa_urgent_alert_clone→ 404RESOURCE_NOT_FOUND.POST /api/v1/automation/showcase_notify_owner/toggle {"enabled":true}→ 200.POST /api/v1/automation/(flow)/clone→ 404.Mechanism (read from source at
6bff748b)packages/runtime/src/domains/automation.ts,POST /:name/clone(body validation, 404 / 409 probes,cloneFlowDefinition,registerFlow).registerAutomationRoutesinpackages/runtime/src/dispatcher-plugin.tsmounts each/automationroute explicitly (/:name,/:name/trigger,/:name/toggle,/:name/runs…), and has no/:name/clonemount —git log -S "/clone" -- packages/runtime/src/dispatcher-plugin.tsfinds none ever. Hono's not-found answers before the dispatcher runs.packages/runtime/src/domains/automation-flow-clone.test.tsstays green because it calls the domain handler directly; no dogfood test drives the clone over HTTP (the checklist'sdispatcher-vs-hono-routetrap).packages/runtime/src/route-ledger.ts(docs/qa/platform-checklist/FOLLOW-UPS.md §8a D22), so no ledger-vs-live parity check could flag the missing mount.Consequences
FLOW_DISABLEDmessage ("…or run a clone of it under a new name.") and the Setup page copy ("clone a flow under a new name to customize it").content/docs/build-without-code.mdxandcontent/docs/capabilities/integrations.mdxpromise "clone your own".Expected
The live server serves
POST /api/v1/automation/:name/clone(and its environment-scoped twin) through the dispatcher, with the arms the domain handler already implements, and a live HTTP pin covers it.Full evidence chain: #20674 (F-1).
Generated by Claude Code