{"record":{"id":"5b2458782c0283b9","repo":"shareAI-lab/learn-claude-code","slug":"meta-requires-name-and-description","errorCode":null,"errorMessage":"meta requires `name` and `description`","messagePattern":"meta requires `name` and `description`","errorType":"exception","errorClass":"WorkflowInputError","httpStatus":null,"severity":"error","filePath":"s16_workflow_runtime/code.py","lineNumber":125,"sourceCode":"    finally:\n        if handle is not None:\n            try:\n                fcntl.flock(handle.fileno(), fcntl.LOCK_UN)\n            finally:\n                handle.close()\n        local_lock.release()\n        with _run_locks_guard:\n            if not local_lock.locked() and _run_locks.get(run_id) is local_lock:\n                _run_locks.pop(run_id, None)\n\n\n# -- Metadata Validation --\ndef validate_meta(meta):\n    \"\"\"Validate name, description, and optional phases before launch.\"\"\"\n    if not isinstance(meta, dict):\n        raise WorkflowInputError(\"meta must be an object literal\")\n    if not meta.get(\"name\") or not meta.get(\"description\"):\n        raise WorkflowInputError(\"meta requires `name` and `description`\")\n    if not isinstance(meta[\"name\"], str) or not WORKFLOW_NAME_RE.fullmatch(meta[\"name\"]):\n        raise WorkflowInputError(\n            \"meta.name must be a 1-64 character slug using letters, numbers, '.', '_', or '-'\"\n        )\n    if not isinstance(meta[\"description\"], str):\n        raise WorkflowInputError(\"meta.description must be a string\")\n    if \"phases\" in meta:\n        if not isinstance(meta[\"phases\"], list) or not all(\n            isinstance(phase, str) and phase for phase in meta[\"phases\"]\n        ):\n            raise WorkflowInputError(\"meta.phases must be a list of non-empty strings\")\n    return meta\n\n\ndef check_permission(meta, settings=None):\n    \"\"\"Apply the s03 allow/deny gate before launching a workflow.\"\"\"\n    settings = settings or {}\n    if meta[\"name\"] in settings.get(\"deny\", []):","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/shareAI-lab/learn-claude-code/blob/985456f4adea6f4df8fbad4112245dbd97444eae/s16_workflow_runtime/code.py#L107-L143","documentation":"validate_meta requires both 'name' and 'description' to be present and truthy in the meta dict. A missing key, empty string, or None for either raises WorkflowInputError before the workflow starts. This is the mandatory-field gate that runs ahead of the finer name/description format checks.","triggerScenarios":"run(meta={\"name\": \"ingest\", \"description\": \"\"}) — empty description is falsy. Forgetting the description key entirely. Conditionally building meta and skipping description for 'internal' workflows.","commonSituations":"Templates or snippets copied without filling all fields. Optional-description assumptions carried over from other workflow engines where description is optional.","solutions":["Set both fields to non-empty strings: a one-line summary is enough for description","If generating meta programmatically, assert both keys before launch","Keep a lint/test that validates every workflow fixture through validate_meta"],"exampleFix":"# before\nmeta = {\"name\": \"ingest\"}\n\n# after\nmeta = {\"name\": \"ingest\", \"description\": \"Ingest nightly feeds into the warehouse\"}","handlingStrategy":"validation","validationCode":"def has_required_meta_fields(meta: dict) -> bool:\n    return bool(meta.get(\"name\")) and bool(meta.get(\"description\"))\n\nassert has_required_meta_fields(meta), \"meta requires non-empty name and description\"","typeGuard":"def meta_has_name_and_description(meta) -> bool:\n    return isinstance(meta, dict) and bool(meta.get(\"name\")) and bool(meta.get(\"description\"))","tryCatchPattern":"try:\n    validate_meta(meta)\nexcept WorkflowInputError as exc:\n    if \"requires `name` and `description`\" in str(exc):\n        meta.setdefault(\"description\", \"(no description provided)\")\n        validate_meta(meta)\n    else:\n        raise","preventionTips":["Fill both fields in every workflow template","Validate fixtures through validate_meta in tests","Treat description as mandatory, unlike some other engines"],"tags":["workflow","validation","metadata","required-fields"],"backgroundTag":null,"analyzedSha":"985456f4adea6f4df8fbad4112245dbd97444eae","analyzedAt":"2026-08-14T22:02:26.028Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}