{"record":{"id":"59b70d930d45bc93","repo":"abhigyanpatwari/GitNexus","slug":"group-sync-manifest-link-link-type-link-con","errorCode":null,"errorMessage":"[group/sync] manifest link ${link.type}:${link.contract} references repos not in config.repos: ${dangling.join(', ')} — cross-links will use synthetic UIDs","messagePattern":"\\[group/sync\\] manifest link (.+?):(.+?) references repos not in config\\.repos: (.+?) — cross-links will use synthetic UIDs","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"gitnexus/src/core/group/sync.ts","lineNumber":324,"sourceCode":"  // would not open, or an extractor threw partway and the repo's staged\n  // contracts were dropped. Kept separate from `missingRepos` because the two\n  // need different answers from the operator: a missing repo must be indexed or\n  // removed from the group, whereas this one is usually a version skew or a\n  // lock and the logged error says which. Collapsing them (as this did) reports\n  // a LadybugDB storage-version mismatch as \"repo not found\".\n  const unreadableRepos: string[] = [];\n  const repoSnapshots: Record<string, RepoSnapshot> = {};\n  let autoContracts: StoredContract[] = [];\n  const manifestCrossLinks: CrossLink[] = [];\n  let registryEntries: RegistryEntry[] | undefined;\n\n  // Group-path → pool identity for repos that successfully initialized. Drives\n  // windowed manifest resolution below (re-init + lease per window). Keyed by\n  // group path because manifest links reference repos by group path.\n  const repoHandles = new Map<string, { poolId: string; lbugPath: string; repoPath: string }>();\n  // Keep resolved disk paths even when extraction fails and removes the\n  // corresponding handle; workspace discovery does not need a readable index.\n  const resolvedRepoPaths = new Map<string, string>();\n  // Every eviction lease this sync holds. Window loops release their own leases\n  // (bounding residency); this set is the defensive outer-finally sweep —\n  // release disposers are idempotent, so double-release is a safe no-op.\n  const activeReleases = new Set<() => void>();\n\n  try {\n    const eo = opts?.extractorOverride;\n    if (eo && eo.length === 0) {\n      autoContracts = await (eo as () => Promise<StoredContract[]>)();\n    } else {\n      // Strict: an unreadable registry must not present as an empty one here.\n      // `missingRepos` is derived from this list, and an all-missing sync is\n      // allowed to write — so a lenient `[]` on EACCES/corruption would replace\n      // a good contracts.json with an empty one and exit 0 (#3011, one frame up).\n      registryEntries = await readRegistryStrict();\n      const entries = registryEntries;\n      const resolve = opts?.resolveRepoHandle ?? defaultResolveHandle(entries);\n      if (!opts?.resolveRepoHandle) {","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/ac9a4e9abd8fd3058c070b72c23402a4f887929a/gitnexus/src/core/group/sync.ts#L306-L342","documentation":"During group sync, a manifest-declared link (link.type:link.contract) has from/to endpoints that are not in knownRepos — the set of repos that actually initialized and hold a pool handle, not merely everything listed in config.repos. Cross-links for those endpoints fall back to synthetic UIDs, so they cannot be traced to real indexed symbols.","triggerScenarios":"A repo referenced by a link was removed from (or never added to) config.repos, or its initialization failed (bad path, permissions) so it never gained a pool handle; the message names the exact dangling endpoints.","commonSituations":"Removing or renaming a group repo without updating the links manifest; typos in repo names in link declarations; a repo whose path fails to init during sync (clone missing, permissions).","solutions":["Add the missing repo(s) named in the message to the group's config.repos with correct paths","Fix why the repo failed to initialize (path, missing clone, permissions) so it gains a pool handle","Remove or update stale link entries referencing repos no longer in the group","Re-run group sync and confirm cross-links use real symbol UIDs"],"exampleFix":"# before — group config\nrepos = [\"api\", \"web\"]\n# links manifest references \"mobile\" (not configured)\n\n# after — add the repo or drop the link\nrepos = [\"api\", \"web\", \"mobile\"]","handlingStrategy":"validation","validationCode":"// Validate before sync: every link endpoint must be a configured repo\nconst configured = new Set(groupConfig.repos); // config.repos entries\nconst dangling = allLinks.flatMap((link) =>\n  [link.from, link.to].filter((repo) => !configured.has(repo)),\n);\nif (dangling.length > 0) {\n  throw new Error(\n    `links reference unconfigured repos: ${[...new Set(dangling)].join(', ')} — ` +\n    `add them to config.repos or remove the links`,\n  );\n}","typeGuard":"function linkEndpointsConfigured(link: { from: string; to: string }, configured: ReadonlySet<string>): boolean {\n  return configured.has(link.from) && configured.has(link.to);\n}","tryCatchPattern":null,"preventionTips":["Keep the links manifest in lockstep with config.repos — update links whenever a repo is added, removed, or renamed","Validate repo paths and permissions before sync so every configured repo actually initializes and gains a pool handle","Add a pre-sync lint that fails on any link endpoint not present in config.repos"],"tags":["group","sync","cross-links","config","dangling-reference"],"backgroundTag":"dangling-config-reference","analyzedSha":"ac9a4e9abd8fd3058c070b72c23402a4f887929a","analyzedAt":"2026-08-20T23:29:22.980Z","contentChangedAt":"2026-08-20T23:29:22.980Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}