{"record":{"id":"ea172fa700fb7be4","repo":"JuliusBrussee/caveman","slug":"native-pack-invalid-identity","errorCode":null,"errorMessage":"native pack: invalid identity","messagePattern":"native pack: invalid identity","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"proxy/internal/nativepack/pack.go","lineNumber":93,"sourceCode":"\t}\n\ttaskType = strings.ToLower(strings.TrimSpace(taskType))\n\tvar selected Skill\n\tfound := false\n\tfor _, skill := range pack.Skills {\n\t\tfor _, candidate := range skill.TaskTypes {\n\t\t\tif candidate == taskType {\n\t\t\t\tif !found || skill.Precedence > selected.Precedence {\n\t\t\t\t\tselected, found = skill, true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn selected, found\n}\n\nfunc validate(pack Pack) error {\n\tif pack.Schema != \"caveman.native-pack.v1\" || pack.ID == \"\" || pack.Version == \"\" || pack.Protocol < 1 {\n\t\treturn errors.New(\"native pack: invalid identity\")\n\t}\n\tif !pack.Core.Mandatory || pack.Core.Instructions == \"\" || pack.Core.EstimatedTokens > pack.Core.PromptTokenBudget {\n\t\treturn errors.New(\"native pack: invalid Core budget or instructions\")\n\t}\n\towners := map[string][]Skill{}\n\tids := map[string]bool{}\n\tfor _, skill := range pack.Skills {\n\t\tif skill.ID == \"\" || ids[skill.ID] || skill.Activation != \"classified\" || skill.Instructions == \"\" || len(skill.Instructions) > skill.PromptByteBudget {\n\t\t\treturn fmt.Errorf(\"native pack: invalid skill %q\", skill.ID)\n\t\t}\n\t\tids[skill.ID] = true\n\t\tfor _, taskType := range skill.TaskTypes {\n\t\t\towners[taskType] = append(owners[taskType], skill)\n\t\t}\n\t}\n\tfor _, skill := range pack.Skills {\n\t\tfor _, conflict := range skill.Conflicts {\n\t\t\tif !ids[conflict] {","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/proxy/internal/nativepack/pack.go#L75-L111","documentation":"Native-pack validation found an invalid identity: schema is not 'caveman.native-pack.v1', or ID, Version, or Protocol is empty/zero. The loader rejects packs that do not declare a known schema and complete identity before any skill is trusted.","triggerScenarios":"Thrown at proxy/internal/nativepack/pack.go:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set schema to caveman.native-pack.v1 with non-empty id and version","Bump the protocol field to a positive version matching the loader"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}