{"record":{"id":"0308b2bf9c92fe9a","repo":"abhigyanpatwari/GitNexus","slug":"analyzer-dependency-graph-exceeded-limits-runtim","errorCode":null,"errorMessage":"Analyzer dependency graph exceeded ${limits.runtimeEdges} edges: ${packageRoot}","messagePattern":"Analyzer dependency graph exceeded (.+?) edges: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gitnexus/src/core/analyzer-identity.ts","lineNumber":1237,"sourceCode":"    const parent = queue[index];\n    // The declared half is enumerated for every package; the resolved-location\n    // half is scoped to the root package, where the 1998-resolution /\n    // 8829-extra-guard blow-up documented on\n    // `undeclaredLocalDevDependencyNames` cannot occur. Dropping this scope is\n    // the expensive regression, so it is pinned by a guard-count test.\n    const dependencies =\n      parent.root === packageRoot\n        ? [\n            ...new Set([\n              ...dependencyNames(parent.manifest),\n              ...undeclaredLocalDevDependencyNames(parent, pathGuards, limits),\n            ]),\n          ].sort(compareBytes)\n        : dependencyNames(parent.manifest);\n    for (const dependencyName of dependencies) {\n      budget.edges += 1;\n      if (budget.edges > limits.runtimeEdges) {\n        throw new Error(\n          `Analyzer dependency graph exceeded ${limits.runtimeEdges} edges: ${packageRoot}`,\n        );\n      }\n      const childRoot = resolveDependencyPackageRoot(\n        parent.root,\n        dependencyName,\n        pathGuards,\n        limits,\n      );\n      if (!childRoot) {\n        edges.push({\n          parentLocator: parent.locator,\n          parentLabel: parent.label,\n          dependencyName,\n          childLocator: '<missing>',\n          childLabel: '<missing>',\n        });\n        continue;","sourceCodeStart":1219,"sourceCodeEnd":1255,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/52924ef12c2290ceee4612526a828ec4cdf2047f/gitnexus/src/core/analyzer-identity.ts#L1219-L1255","documentation":"The dependency BFS enumerates every (parent, dependencyName) pair as an edge and enforces limits.runtimeEdges (default 100,000). The root package additionally folds in undeclared locally-linked dev dependencies (capped separately at 4 admissions). Exceeding the edge budget means the declared dependency graph is larger than any legitimate analyzer install, so the receipt computation aborts rather than silently truncating coverage — a truncated graph would make some runtime changes invisible to freshness checks.","triggerScenarios":"A gitnexus install whose transitive declared-dependency closure (dependencies + optionalDependencies + peerDependencies + locally-linked dev deps) produces more than 100,000 edges — e.g. a fork that added enormous dependency trees, or a test that lowered runtimeEdges via traversalLimits while the fixture still enumerates a full graph.","commonSituations":"Forks bundling a whole application's deps into the analyzer package; test budget overrides that are too tight; corrupted installs where the manifest graph loops through aliased packages.","solutions":["Slim the analyzer package's declared dependency surface back to a normal closure; move unrelated deps out of the gitnexus manifest.","Reinstall from the published package to restore the real dependency graph.","In tests, keep traversalLimits.runtimeEdges above the fixture's edge count (overrides can never exceed 100,000)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function isRuntimeEdgesLimitError(error: unknown): boolean {\n  return error instanceof Error && /^Analyzer dependency graph exceeded \\d+ edges:/.test(error.message);\n}","tryCatchPattern":"try {\n  identity = resolveAnalyzerRunnerIdentity(import.meta.url);\n} catch (error) {\n  if (isRuntimeEdgesLimitError(error)) {\n    reportUserError('Dependency closure exceeds 100k edges; slim the manifest or reinstall the published package.');\n  }\n  throw error;\n}","preventionTips":["Keep the gitnexus manifest's dependency closure analyzer-scoped in forks.","Run from the published install in production environments.","Keep test runtimeEdges overrides above the fixture graph size."],"tags":["gitnexus","analyzer-identity","limits","dependency-graph"],"backgroundTag":"traversal-limit-exceeded","analyzedSha":"52924ef12c2290ceee4612526a828ec4cdf2047f","analyzedAt":"2026-08-20T23:29:22.980Z","contentChangedAt":"2026-08-20T23:29:22.980Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}