larksuite/cli · error · ErrInvalidRemap
%w: target %q does not exist in the composed skill tree
Error message
%w: target %q does not exist in the composed skill tree
What it means
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.
Source
Thrown at internal/skillref/resolver.go:75
seen[key] = true
if from.Path == "" {
if to.Path != "" {
return nil, fmt.Errorf(
"%w: whole-skill source %q requires a bare target skill, got %q",
ErrInvalidRemap, key, to.String())
}
r.skills[from.Skill] = to
} else {
r.exact[key] = to
}
exists, err := probe(content, to)
if err != nil {
return nil, fmt.Errorf("%w: cannot inspect target %q: %w",
ErrInvalidRemap, to.String(), err)
}
if !exists {
return nil, fmt.Errorf("%w: target %q does not exist in the composed skill tree",
ErrInvalidRemap, to.String())
}
}
return r, nil
}
// Resolve projects canonical through the exact-reference map first, then the
// whole-skill map, and finally identity. It returns ok=false when the projected
// target is not currently readable.
func (r *Resolver) Resolve(canonical Ref) (target Ref, ok bool) {
if r == nil {
return Ref{}, false
}
if exact, found := r.exact[canonical.String()]; found {
target = exact
} else if renamed, found := r.skills[canonical.Skill]; found {
target = Ref{Skill: renamed.Skill, Path: canonical.Path}
} else {View on GitHub (pinned to 7fd6ef3c07)
Solutions
- Ship the target skill/reference file, or point the mapping at an existing target
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/skillref/resolver.go:75 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of larksuite/cli@7fd6ef3c07 (2026-09-04).
Data as JSON: /api/errors/7dee5de8b9bf0e85.
Report an issue: GitHub.