{"record":{"id":"33815e8b7bac4baa","repo":"larksuite/cli","slug":"w-cannot-inspect-target-q-w","errorCode":null,"errorMessage":"%w: cannot inspect target %q: %w","messagePattern":"%w: cannot inspect target %q: %w","errorType":"exception","errorClass":"ErrInvalidRemap","httpStatus":null,"severity":"error","filePath":"internal/skillref/resolver.go","lineNumber":71,"sourceCode":"\t\tkey := from.String()\n\t\tif seen[key] {\n\t\t\treturn nil, fmt.Errorf(\"%w: source %q is mapped more than once\", ErrInvalidRemap, key)\n\t\t}\n\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 {","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/internal/skillref/resolver.go#L53-L89","documentation":"Wraps a probe failure when New verifies the remap target exists in the embedded content filesystem. If the target reference cannot be inspected (read error), resolver construction fails with ErrInvalidRemap.","triggerScenarios":"Thrown at internal/skillref/resolver.go:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the embedded-FS layout and readability of the target path"],"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"}