{"record":{"id":"b7e42294b6f0b6ba","repo":"multica-ai/multica","slug":"repository-not-found-in-workspace-registry-s","errorCode":null,"errorMessage":"repository not found in workspace registry: %s","messagePattern":"repository not found in workspace registry: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"server/cmd/multica/cmd_repo.go","lineNumber":310,"sourceCode":"\tremovedSet := make(map[string]struct{}, len(urls))\n\tremoved := []workspaceRepo{}\n\trepos := make([]workspaceRepo, 0, len(ws.Repos))\n\tfor _, repo := range ws.Repos {\n\t\tif _, ok := removeSet[repo.URL]; ok {\n\t\t\tremoved = append(removed, repo)\n\t\t\tremovedSet[repo.URL] = struct{}{}\n\t\t\tcontinue\n\t\t}\n\t\trepos = append(repos, repo)\n\t}\n\tmissing := []string{}\n\tfor _, u := range urls {\n\t\tif _, ok := removedSet[u]; !ok {\n\t\t\tmissing = append(missing, u)\n\t\t}\n\t}\n\tif len(missing) > 0 {\n\t\treturn fmt.Errorf(\"repository not found in workspace registry: %s\", strings.Join(missing, \", \"))\n\t}\n\n\tws, err = patchWorkspaceRepos(ctx, client, workspaceID, repos)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tresult := repoMutationResult{\n\t\tWorkspaceID: ws.ID,\n\t\tRemoved:     removed,\n\t\tRepos:       ws.Repos,\n\t}\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"json\" {\n\t\treturn cli.PrintJSON(os.Stdout, result)\n\t}\n\trows := make([][]string, 0, len(removed))\n\tfor _, repo := range removed {","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_repo.go#L292-L328","documentation":"Returned by runRepoRemove after filtering the workspace registry: some of the URLs requested for removal were not present in ws.Repos, so nothing was removed for them and the command aborts before patching. This is an all-or-nothing guard — the PATCH is skipped, so even the URLs that did match stay in the registry.","triggerScenarios":"Running `multica repo remove <url>` where <url> is not byte-identical to an entry in the workspace registry (trailing .git, scheme difference http/https, trailing slash, different case host), or removing a repo that was already removed by someone else after the fetch.","commonSituations":"Copy-pasting a GitHub HTTPS URL when the registry stores the SSH or .git form; concurrent edits from another agent/CLI; assuming fuzzy URL matching — the comparison is exact string match on repo.URL.","solutions":["List the registry first (`multica repo list`) and copy the exact URL string from its output for the remove command.","Normalize your input to match the stored form exactly (with or without .git, same scheme).","If some entries were already removed concurrently, re-run remove only for the entries still present.","If you want best-effort removal, script it: check membership via `multica repo list --output json` first and remove only matching URLs."],"exampleFix":"# before\nmultica repo remove https://github.com/acme/api   # registry stores https://github.com/acme/api.git\n\n# after\nmultica repo list   # copy exact URL\nmultica repo remove https://github.com/acme/api.git","handlingStrategy":"validation","validationCode":"# remove only URLs actually present in the registry\nmultica repo list --output json > /tmp/repos.json\njq -r '.repos[].url' /tmp/repos.json | grep -Fx \"$URL\" \\\n  && multica repo remove \"$URL\" \\\n  || echo \"skip: $URL not in registry\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy the exact URL string from `multica repo list` output; matching is exact, not fuzzy.","Normalize URL form (scheme, .git suffix, trailing slash) once at registration time so removes always match.","Remember the command is all-or-nothing: one bad URL cancels removal of all."],"tags":["go","cli","validation","exact-match","workspace-registry"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}