Skip to content

fix(workflows): resolve manifest service aliases in workflow dependency checks - #5848

Open
0xacee wants to merge 1 commit into
Osmantic:public-betafrom
0xacee:fix/workflow-dep-aliases
Open

0xacee wants to merge 1 commit into
Osmantic:public-betafrom
0xacee:fix/workflow-dep-aliases

Conversation

@0xacee

@0xacee 0xacee commented Sep 19, 2026

Copy link
Copy Markdown

Summary

POST /api/workflows/{id}/enable (and the workflow list availability flags) can never succeed for the shipped voice-to-voice workflow.

  • The catalog (config/n8n/catalog.json) declares its dependencies as ["whisper", "llama-server", "kokoro"].
  • The Kokoro service's manifest id is tts; kokoro is only a declared alias (extensions/services/tts/manifest.yamlaliases: [kokoro]).
  • check_workflow_dependencies resolved deps against SERVICES keys plus a single hardcoded legacy alias (ollama → llama-server). kokoro resolved to nothing → results["kokoro"] = Falseenable responds 400 Missing dependencies: kokoro even while TTS runs healthy, and the workflow list marks it permanently unavailable.

Why this matters

Enabling voice-to-voice fails 100% of the time on a correct install, with an error message blaming a "missing" service that is actually running. Manifests have declared aliases for a while (kokoro, llm, workflows, webui, agent, …); any future workflow or feature check written against those names hits the same trap.

Fix

  • config.py: expose the manifest's aliases list on each SERVICES entry (additive field).
  • routers/workflows.py: _service_aliases() builds the alias→id map from SERVICES, and check_workflow_dependencies resolves each dep through the legacy map first, then manifest aliases. Unknown deps still return False unchanged.

Tests

  • test_check_workflow_dependencies_manifest_alias: SERVICES["tts"] = {aliases: ["kokoro"]} + healthy mock → result["kokoro"] is True, and the health probe is called with the resolved id tts. Fails on public-beta base (result["kokoro"] is False), passes here.
  • test_check_workflow_dependencies_manifest_alias_unhealthy: same alias with a down service → False (no false-positive availability).
  • Full tests/test_workflows.py: 49/49 pass; py_compile + git diff --check clean.

Overlap check

Searched open PRs touching routers/workflows.py, config.py, tests/test_workflows.py: #5644 (activation-failure reporting inside enable_workflow), #5672 (malformed catalog/executions tolerance), #5829/#5828 (inventory traversal, export), #5554 (exact-name matching), plus mechanical idioms PRs (#5485, #5567, #5571, #5575). This change is confined to check_workflow_dependencies and one additive service_config field — disjoint from all of them.

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