Skip to content

spec(flow): FlowSchema accepts edges whose source/target names no node and repeated (source,target) pairs; the engine then runs the target once per incoming edge #22088

Description

@objectstack-fleet

Filing gate ① — product defect with a named location and a reproduction. reach: POST /api/v1/meta/flow/repro_edges/publish?package=com.example.repairs answered 200 for a flow whose nodes are [start, end] and whose edges are start→node_1, node_1→end; the live read then reports _diagnostics: {valid: true}. A second published flow with three start→node_1 edges executed node_1 three times per trigger.

Who acts on it: objectstack triage (spec / automation owner). ⛔ Not a claim. Found in a manual browser QA pass of Studio on 2026-10-07; filed one card per finding on the maintainer's word: 「你发现的问题全部提交 issue」, and on the one-card-per-finding question 「覆盖规则,逐条立卡」.

What happens

The flow contract accepts, saves and publishes:

  • an edge whose source or target names no node in the flow;
  • several edges with the same (source, target) and different ids.
    At runtime the engine follows each incoming edge, so the duplicated target ran once per edge: one record update → three create_record executions → three identical rows (run detail in sys_automation_run.steps_json).

Where it comes from (read in source)

FlowSchema's superRefine (packages/spec/src/automation/flow.zod.ts) refuses duplicate node ids and duplicate edge ids, but nothing checks that an edge's endpoints exist or that a (source, target) pair is unique.

Expected

Save/publish refuse an edge to a missing node, and refuse (or collapse) a repeated (source, target) pair of the same edge type and condition, with a located message.

Suggested direction (triage to rule)

Add both checks to the same superRefine region walk, so os validate, the draft door and publish agree. The objectui half — the designer that produced these edges — is filed on objectui.

Environment

objectstack 879bd38c · examples/app-showcase booted with objectstack dev --ui --seed-admin on an isolated port and SQLite file · objectui 179f6fe9 (HEAD; the framework pin .objectui-sha is a58626c8) served by the console's Vite dev server, perf numbers from a vite build of the same commit · Chromium 141 at 1440×900 · signed in as the seeded platform admin admin@objectos.ai unless stated.

Duplicate check

Dedupe words: flow edge target missing node · duplicate source target edges · flow published diagnostics valid · node executed per incoming edge

Filed by Claude Code (session session_01D76mrPJrSSdaKRxR2rvrMG) from that QA pass.


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

Labels

area:workflowApprovals and automation — the work that runs without a person driving itbugSomething isn't workingdomain:specpriority:p1High: required for production / M2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions