Skip to content

docs(carto-create-workflow): declare edge-fed inputs so the canvas renders lines - #55

Open
ernesmb wants to merge 1 commit into
masterfrom
docs/carto-create-workflow-declare-edge-fed-inputs
Open

docs(carto-create-workflow): declare edge-fed inputs so the canvas renders lines#55
ernesmb wants to merge 1 commit into
masterfrom
docs/carto-create-workflow-declare-edge-fed-inputs

Conversation

@ernesmb

@ernesmb ernesmb commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Problem

Workflows authored via the CLI sometimes render on the Workflows canvas with no input dot and no connecting line between nodes — even though the workflow executes correctly. Reported by Luna in #product-support.

Root cause: the canvas draws each node's input connection dot from data.inputs. An edge attaches to a target handle whose id equals the input's name (the schema doc states "input names are the targetHandle names"). If an edge's targetHandle names an input that isn't declared in the target node's data.inputs, there's no handle to attach to → no line renders. The engine is unaffected because it wires data straight from the edges array.

Why nothing flags it: validate's only edge cross-check verifies source/target reference real node IDs — never that targetHandle is a declared input. So validate / verify-remote / create all pass and the breakage only appears when the user opens the DAG.

In the reproduction file Luna sent, the native.customsql node was already fixed (sourcea/sourceb/sourcec declared with value:null), but the two native.limit nodes still omitted source, so those edges drew no line — matching her "same problem, no line" note.

Change

Adds a declare-edge-fed-inputs critical rule to carto-create-workflow/SKILL.md (Phase 4), plus a cross-link from the schema handles table row:

  • States the invariant: every edge-fed input must be declared in data.inputs with value: null, and explains why validate can't see it.
  • Reliable habit: copy all the component's Table inputs from components get, not just the config inputs you set values for — with per-component handle names (source; sourcea/b/c; lefttable/righttable; maintable/secondarytable; main/secondary).
  • A mechanical jq cross-check to run before presenting. Verified against Luna's real file: it flags exactly the two native.limit edges and clears once source: null is added.

make validate passes.

Follow-up (CLI)

The durable fix is a structural check in the CLI's validate (edge targetHandle must be a declared input on the target node). Deferred until the in-flight CLI refactor lands — tracked in sc-562982.

🤖 Generated with Claude Code

…nders lines

Workflows created via the CLI sometimes render with no input dot and no
connecting line between nodes, even though the workflow executes fine. The
Workflows canvas draws each node's input connection dot from `data.inputs`;
an edge whose `targetHandle` names an input that isn't declared in the target
node's `data.inputs` has no handle to attach to, so no line is drawn. The
engine is unaffected because it wires data from the `edges` array directly.

`validate` / `verify-remote` / `create` don't catch this — the only edge
cross-check verifies source/target reference real node IDs, not that the
targetHandle is a declared input. So the breakage only surfaces visually when
the user opens the DAG.

This adds a `declare-edge-fed-inputs` critical rule to the skill (declare every
edge-fed input with `value: null`, copy all Table inputs from `components get`),
per-component handle-name examples, and a mechanical jq cross-check to run
before presenting. Also cross-links it from the `schema handles` table row.

A structural fix in the CLI's `validate` is the durable solution; it's deferred
until the in-flight CLI refactor lands (tracked separately).

Reported by Luna in #product-support.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant