{"record":{"id":"181bbef31e59e3d8","repo":"github/spec-kit","slug":"response-exceeds-the-max-workflow-yaml-bytes-by","errorCode":null,"errorMessage":"response exceeds the {_MAX_WORKFLOW_YAML_BYTES}-byte workflow size limit","messagePattern":"response exceeds the (.+?)-byte workflow size limit","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/workflows/_commands.py","lineNumber":496,"sourceCode":"    }\n\n\ndef _sniff_workflow_archive_format(data: bytes):\n    \"\"\"Return a supported archive format when suffixless response bytes match.\"\"\"\n    from io import BytesIO\n\n    try:\n        return detect_archive_format(\n            Path(\"workflow-download\"),\n            archive_file=BytesIO(data),\n        )\n    except ValueError:\n        return None\n\n\ndef _enforce_workflow_yaml_size(data: bytes) -> None:\n    if len(data) > _MAX_WORKFLOW_YAML_BYTES:\n        raise ValueError(\n            f\"response exceeds the {_MAX_WORKFLOW_YAML_BYTES}-byte workflow size limit\"\n        )\n\n\ndef _validate_workflow_id_or_exit(workflow_id: str) -> None:\n    \"\"\"Validate that ``workflow_id`` is a safe installed-workflow directory name.\"\"\"\n    if (\n        workflow_id in _RESERVED_WORKFLOW_IDS\n        or not _WORKFLOW_ID_PATTERN.fullmatch(workflow_id)\n    ):\n        console.print(\n            f\"[red]Error:[/red] Invalid workflow ID: {_escape_markup(repr(workflow_id))}\"\n        )\n        raise typer.Exit(1)\n\n\ndef _safe_workflow_id_dir(workflows_dir: Path, workflow_id: str) -> Path:\n    \"\"\"Validate the per-id install directory before any write and return it.","sourceCodeStart":478,"sourceCodeEnd":514,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/workflows/_commands.py#L478-L514","documentation":"Error \"response exceeds the {_MAX_WORKFLOW_YAML_BYTES}-byte workflow size limit\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/workflows/_commands.py:496 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the workflow YAML size below the size limit, or install from a local file."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}