affaan-m/ECC · error · ValueError

Unknown workflow kind

Error message

Unknown workflow kind

What it means

Dispatch guard in load_graph/main: the --kind argument does not match a known workflow kind (e.g. 'apply-bundle'). No matching builder exists, so the graph loader refuses to proceed with an arbitrary config shape.

Solutions

  1. Use one of the supported kinds: 'apply', 'apply-motion', 'distill', or 'prop3d'
  2. For bundle workflows, use the apply-bundle code path in main rather than load_graph
  3. Check the CLI's accepted --kind values (argparse choices) before scripting calls
  4. If you need a new kind, add it to the tuple in load_graph plus a corresponding taste-<kind>.json file

Example fix

// before
graph = load_graph('apply-bundle')
// after
graph = load_graph('apply')  # or 'apply-motion' | 'distill' | 'prop3d'
Defensive patterns

Strategy: validation

Validate before calling

VALID_KINDS = {'apply', 'apply-motion', 'distill', 'prop3d'}
if kind not in VALID_KINDS:
    raise SystemExit(f'--kind must be one of {sorted(VALID_KINDS)}')

Try / catch

try:
    graph = load_graph(kind)
except ValueError as e:
    if str(e) == 'Unknown workflow kind':
        print('supported kinds: apply, apply-motion, distill, prop3d')

Prevention

When it happens

Trigger: Calling load_graph('apply-bundle') or another unsupported kind directly, or the CLI dispatching a kind value not in the allowlist.

Common situations: Passing a new/typo'd --kind CLI argument; scripting load_graph with a kind introduced in a newer version; confusing 'apply-bundle' (handled in main, not load_graph) with a loadable kind.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/c7ba569defa4e67d. Report an issue: GitHub.

Appendix: source

Thrown at skills/taste-application/scripts/workflow_graphs.py:114

    for name, node in nodes.items():
        reachable = visit(name, set())
        for ref in references_in({'input': node.get('input'), 'fields': node.get('fields')}):
            if ref[0] not in reachable:
                raise ValueError(f'{name} references undeclared dependency: {ref[0]}')
            if ref[0] == 'input':
                if len(ref) < 2 or ref[1] not in inputs:
                    raise ValueError('Unknown workflow input')
                used.add(ref[1])
    for ref in references_in(contents.get('output', {})):
        if ref[0] not in nodes:
            raise ValueError('Unknown output node')
    if used != set(inputs):
        raise ValueError(f'Unwired workflow inputs: {sorted(set(inputs) - used)}')


def load_graph(kind):
    if kind not in ('apply', 'apply-motion', 'distill', 'prop3d'):
        raise ValueError('Unknown workflow kind')
    graph = json.loads((WORKFLOWS / f'taste-{kind}.json').read_text())
    validate_graph(graph)
    return graph


def main():
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument('--kind', choices=('apply', 'apply-bundle', 'distill'), required=True)
    parser.add_argument('--config', type=Path, required=True)
    parser.add_argument('--out', type=Path, required=True)
    args = parser.parse_args()
    try:
        if args.kind == 'apply-bundle':
            from tasteforge.integration import build_application_bundle, load_application_request
            config = load_application_request(args.config)
        else:
            config = json.loads(args.config.read_text())
        if not isinstance(config, dict):

View on GitHub (pinned to 8321021c54)