Skip to content

fix(workflow): keep a saved connection in its workspace - #530

Merged
huyplb merged 2 commits into
mainfrom
fix/workflow-review
Oct 13, 2026
Merged

huyplb merged 2 commits into
mainfrom
fix/workflow-review

Conversation

@huyplb

@huyplb huyplb commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Membership is required to save, run, or inspect a workflow that uses one, including rows a run already fetched. The designer keeps fields it does not edit, and the engine refuses to listen off loopback without a token.


Note

High Risk
Changes authentication (engine listen binding, service token guards), authorization (workspace-scoped connection checks on save/run/read), and workflow trust (origin); proxy allowlist and run snapshot behavior affect who can reach engine data.

Overview
Keeps saved FoxSchema connections scoped to their workspace when workflows are saved, run, or inspected through the proxy: it walks linked credentialIds, checks workspace membership via notUsableBy, and for runs uses GET /runs/:id/snapshot so edits/deletes to the live workflow cannot hide connections already used.

Fixes workflow designer data loss on load/save by carrying through fields the UI does not edit (name, version, origin, errorHandler, pipe timeoutMs, HTTP token-refresh headers/body) and adding compile-time engineShapes checks so local editor types cannot drift from @foxschema/workflow-engine/definitions. The engine refuses to promote origin on PUT for non-authored workflows; duplicate drops shared webhook paths.

Hardens engine exposure and proxy surface: workflow-server won't bind off loopback without WORKFLOW_ENGINE_TOKEN; internal mounts use a shared engineTokenGuard; run steering endpoints are removed from the allowlist until UI exists; settings PUT validates known engine enums. Run/event streaming pushes on append (with fallback poll), and the Runs panel / debug hook resume SSE after the last loaded seq and poll only when the stream is down.

Smaller fixes: trigger dialog drops dead Save/Test buttons and placeholder sections; CSV parser performance + formula-safe file sink; query API keys redacted in reported HTTP URLs; workflow list avoids loading full run history; E2E workflow-designer-roundtrip added.

Reviewed by Cursor Bugbot for commit 3129834. Bugbot is set up for automated code reviews on this repo. Configure here.

Membership is required to save, run, or inspect a workflow that uses one, including rows a run already fetched. The designer keeps fields it does not edit, and the engine refuses to listen off loopback without a token.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: dc4bdc6d-ecab-4850-bdb8-8e7da1aca628)

@github-actions

Copy link
Copy Markdown
Contributor

Test IDs

Added (6)

  • workflow-designer-id
  • workflow-designer-load
  • workflow-designer-save
  • workflow-designer-triggers
  • workflow-trigger-config
  • workflow-trigger-config-note

{…} is a part filled in at run time. The full tree: docs/testing/TEST_IDS.md.

The suite was added without a place in the runner, so the check that every e2e file is listed failed.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 3c8b3b2c-02f0-42e5-b915-50f50a38e4d6)

@huyplb
huyplb merged commit fe66cbf into main Oct 13, 2026
13 checks passed
@huyplb
huyplb deleted the fix/workflow-review branch October 13, 2026 22:32
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