{"record":{"id":"7dee5de8b9bf0e85","repo":"larksuite/cli","slug":"w-target-q-does-not-exist-in-the-composed-skill","errorCode":null,"errorMessage":"%w: target %q does not exist in the composed skill tree","messagePattern":"%w: target %q does not exist in the composed skill tree","errorType":"validation","errorClass":"ErrInvalidRemap","httpStatus":null,"severity":"error","filePath":"internal/skillref/resolver.go","lineNumber":75,"sourceCode":"\t\tseen[key] = true\n\n\t\tif from.Path == \"\" {\n\t\t\tif to.Path != \"\" {\n\t\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\t\"%w: whole-skill source %q requires a bare target skill, got %q\",\n\t\t\t\t\tErrInvalidRemap, key, to.String())\n\t\t\t}\n\t\t\tr.skills[from.Skill] = to\n\t\t} else {\n\t\t\tr.exact[key] = to\n\t\t}\n\t\texists, err := probe(content, to)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"%w: cannot inspect target %q: %w\",\n\t\t\t\tErrInvalidRemap, to.String(), err)\n\t\t}\n\t\tif !exists {\n\t\t\treturn nil, fmt.Errorf(\"%w: target %q does not exist in the composed skill tree\",\n\t\t\t\tErrInvalidRemap, to.String())\n\t\t}\n\t}\n\treturn r, nil\n}\n\n// Resolve projects canonical through the exact-reference map first, then the\n// whole-skill map, and finally identity. It returns ok=false when the projected\n// target is not currently readable.\nfunc (r *Resolver) Resolve(canonical Ref) (target Ref, ok bool) {\n\tif r == nil {\n\t\treturn Ref{}, false\n\t}\n\tif exact, found := r.exact[canonical.String()]; found {\n\t\ttarget = exact\n\t} else if renamed, found := r.skills[canonical.Skill]; found {\n\t\ttarget = Ref{Skill: renamed.Skill, Path: canonical.Path}\n\t} else {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/internal/skillref/resolver.go#L57-L93","documentation":"Resolver.New: the target reference parsed fine but does not exist in the composed skill tree. Unlike unmapped canonical references (which may be absent and are simply omitted), explicit targets are build-integrity declarations and must exist.","triggerScenarios":"Thrown at internal/skillref/resolver.go:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ship the target skill/reference file, or point the mapping at an existing target"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}