{"record":{"id":"125eaf6e3f311d7b","repo":"sgl-project/sglang","slug":"full-pack-verification-requested-but-manifest-has","errorCode":null,"errorMessage":"full pack verification requested, but manifest has no full SHA-256","messagePattern":"full pack verification requested, but manifest has no full SHA-256","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/layers/moe/expert_pack.py","lineNumber":894,"sourceCode":"                    pack_offset=offset,\n                    pack_nbytes=nbytes,\n                    checksum=\"\",\n                    shape=logical_shape,\n                    quant_scheme=str(roles[physical_role][\"dtype\"]),\n                    transform_id=\"identity-v1\",\n                    block_size=256,\n                    generation=generation,\n                )\n\n        if previous_end != self.path.stat().st_size:\n            raise ValueError(\"Kimi expert-pack file has trailing or missing bytes\")\n        actual_index_sha256 = index_digest.hexdigest()\n        if actual_index_sha256 != pack_manifest[\"index_sha256\"]:\n            raise ValueError(\"Kimi expert-pack index SHA-256 does not match manifest\")\n        if verify_pack_sha256:\n            expected_sha256 = pack_manifest.get(\"sha256\")\n            if not expected_sha256:\n                raise ValueError(\n                    \"full pack verification requested, but manifest has no full SHA-256\"\n                )\n            if _sha256_file(self.path) != expected_sha256:\n                raise ValueError(\"Kimi expert-pack SHA-256 does not match manifest\")\n\n        self.header = ExpertPackHeader(\n            flags=REQUIRED_FLAGS,\n            index_count=expected_entry_count,\n            data_start=int(pack_manifest[\"data_start\"]),\n            alignment=int(pack_manifest[\"alignment\"]),\n            num_layers=expected_layers,\n            num_experts=expected_experts,\n            top_k=expected_top_k,\n            role_count=len(ROLE_NAMES),\n            model_identity_sha256=\"0\" * 64,\n            source_blob_sha256=str(self.manifest[\"source\"][\"inventory_sha256\"]),\n            config_sha256=str(model[\"config_sha256\"]),\n        )","sourceCodeStart":876,"sourceCodeEnd":912,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/moe/expert_pack.py#L876-L912","documentation":"The caller requested verify_pack_sha256=True but the manifest has no expert_pack.sha256 field, so full-file verification cannot be performed. The loader refuses to silently skip a requested integrity check.","triggerScenarios":"Calling the loader/pack opener with full verification enabled while using a manifest produced by a tool that only records index_sha256.","commonSituations":"See trigger scenarios.","solutions":["Regenerate the manifest with a full sha256 of the pack included","Or drop verify_pack_sha256 if index-level verification is sufficient for your workflow"],"exampleFix":"// before\nloader = KimiExpertPack(path, manifest, verify_pack_sha256=True)  # manifest lacks sha256\n// after\nmanifest['expert_pack']['sha256'] = _sha256_file(path).hex()\nloader = KimiExpertPack(path, manifest, verify_pack_sha256=True)","handlingStrategy":"validation","validationCode":"if verify_pack_sha256 and not manifest['expert_pack'].get('sha256'):\n    raise RuntimeError('manifest lacks full sha256; regenerate it or disable full verification')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate manifests with full sha256 included if you plan full verification"],"tags":["kimi","moe","expert-pack","sha256","missing-field"],"backgroundTag":"missing-manifest-field","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}