{"record":{"id":"da52e91b1838a47c","repo":"sgl-project/sglang","slug":"unsupported-tar-material-header-schema-header-ge","errorCode":null,"errorMessage":"unsupported tar material header schema: {header.get('schema')!r}","messagePattern":"unsupported tar material header schema: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py","lineNumber":176,"sourceCode":"    except ValueError as exc:\n        raise ValueError(\n            \"tar material URI must contain '<tar_path>:<encoded_header>'\"\n        ) from exc\n    if len(encoded_header) > MINIMAX_H3_TAR_HEADER_MAX_ENCODED_CHARS:\n        raise ValueError(\"tar material URI encoded header is too large\")\n    padded = encoded_header + \"=\" * (-len(encoded_header) % 4)\n    try:\n        header = json.loads(\n            base64.b64decode(\n                padded.encode(\"ascii\"), altchars=b\"-_\", validate=True\n            ).decode(\"utf-8\")\n        )\n    except Exception as exc:\n        raise ValueError(\"tar material URI has an invalid encoded header\") from exc\n    if not isinstance(header, dict):\n        raise ValueError(\"tar material URI header must be a JSON object\")\n    if header.get(\"schema\") != \"sglang.tar_member_ref/v1\":\n        raise ValueError(\n            f\"unsupported tar material header schema: {header.get('schema')!r}\"\n        )\n    try:\n        offset = int(header[\"offset_data\"])\n        size = int(header[\"size\"])\n    except (KeyError, TypeError, ValueError) as exc:\n        raise ValueError(\n            \"tar material header requires integer offset_data and size\"\n        ) from exc\n    if offset < 0 or size < 0:\n        raise ValueError(\"tar material offset_data and size must be non-negative\")\n    return (\n        Path(tar_path).expanduser(),\n        offset,\n        size,\n        str(header.get(\"member\") or \"\") or None,\n    )\n","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py#L158-L194","documentation":"The decoded tar header must carry the exact schema marker 'sglang.tar_member_ref/v1' in its 'schema' field. Any other value (or a missing schema key yielding None) raises this error, protecting against incompatible or mis-versioned header formats.","triggerScenarios":"A header with schema set to a different version string (e.g. 'sglang.tar_member_ref/v2'), a typo, or a header missing the schema field entirely (header.get('schema') is None).","commonSituations":"Format evolution without a migration path, third-party producers inventing their own schema strings, or copy/paste errors in header templates.","solutions":["Set schema exactly to 'sglang.tar_member_ref/v1' in generated headers","Upgrade producers and consumers together when bumping the schema version","Import the schema constant from the library if exposed, rather than hardcoding the string"],"exampleFix":"// before\nheader = {\"schema\": \"tar_member_ref\", \"offset_data\": o, \"size\": s}\n// after\nheader = {\"schema\": \"sglang.tar_member_ref/v1\", \"offset_data\": o, \"size\": s}","handlingStrategy":"validation","validationCode":"assert header.get('schema') == 'sglang.tar_member_ref/v1', 'unexpected tar header schema'","typeGuard":"def header_schema_ok(header) -> bool:\n    return isinstance(header, dict) and header.get('schema') == 'sglang.tar_member_ref/v1'","tryCatchPattern":null,"preventionTips":["Set the schema field explicitly in every producer","Import the schema constant from the library if available"],"tags":["minimax-h3","tar-uri","schema-version","material-io"],"backgroundTag":"schema-validation-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}