vxcontrol/pentagi · error
%w: sources %q and %q share the same base name %q
Error message
%w: sources %q and %q share the same base name %q
What it means
Error "%w: sources %q and %q share the same base name %q" thrown in vxcontrol/pentagi.
Source
Thrown at backend/pkg/server/services/resources.go:711
// Verify every source exists.
if len(srcs) != len(srcPaths) {
tx.Rollback()
found := resourcesByPath(srcs)
for _, sp := range srcPaths {
if _, ok := found[sp]; !ok {
return result, fmt.Errorf("%w: resource %q not found", errResourceNotFound, sp)
}
}
}
// ── Within-batch target-basename conflict check ───────────────────────────
// Two sources sharing a basename would both land at the same target path.
basenameToSrc := make(map[string]string, len(srcs))
for _, src := range srcs {
if prev, conflict := basenameToSrc[src.Name]; conflict {
tx.Rollback()
return result, fmt.Errorf(
"%w: sources %q and %q share the same base name %q",
errResourceConflict, prev, src.Path, src.Name,
)
}
basenameToSrc[src.Name] = src.Path
}
// Self-move guard: no source may be a directory that contains dstPath.
for _, src := range srcs {
if src.IsDir && resources.PathHasPrefix(dstPath, src.Path) {
tx.Rollback()
return result, fmt.Errorf(
"%w: cannot move directory %q into itself", errResourceInvalid, src.Path,
)
}
if resources.FilePath(dstPath, src.Name) == src.Path {
tx.Rollback()
return result, fmt.Errorf(View on GitHub (pinned to ea665308ba)
When it happens
Trigger: Thrown at backend/pkg/server/services/resources.go:711 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vxcontrol/pentagi@ea665308ba (2026-09-01).
Data as JSON: /api/errors/7b7993c03fba6c75.
Report an issue: GitHub.