{"record":{"id":"9b8bb2520703ad3c","repo":"abhigyanpatwari/GitNexus","slug":"callable-value-flow-candidate-set-exceeded-the-ca","errorCode":null,"errorMessage":"callable-value-flow: candidate set exceeded the cap; no partial CALLS emitted","messagePattern":"callable-value-flow: candidate set exceeded the cap; no partial CALLS emitted","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"gitnexus/src/core/ingestion/scope-resolution/pipeline/run.ts","lineNumber":1238,"sourceCode":"      {\n        lang: provider.language,\n        skippedKeys: propertyDispatch.skippedKeys,\n        skippedKeyNames: propertyDispatch.skippedKeyNames,\n        fanoutCap: MAX_PROPERTY_DISPATCH_FANOUT,\n      },\n      'property-dispatch: keys over the fan-out cap were dropped (no CALLS synthesized for them)',\n    );\n  }\n  const callableValueFlow =\n    calleeIdAccumulator === undefined\n      ? {\n          emitted: 0,\n          resolvedInvokes: 0,\n          ambiguousInvokes: 0,\n          unmatchedInvokes: 0,\n          iterations: 0,\n        }\n      : emitCallableValueFlow({\n          graph,\n          scopes: indexes,\n          parsedFiles: emitParsedFiles,\n          nodeLookup: postHeritageNodeLookup,\n          calleeIds: calleeIdAccumulator,\n          language: provider.language,\n          collapseByCallerTarget: provider.collapseMemberCallsByCallerTarget === true,\n          isCallableValueTarget: provider.isCallableValueTarget,\n          hasFileLocalCallableLinkage: provider.hasFileLocalCallableLinkage,\n          deferredIndirectSites,\n          callSignaturesBySite: deferredIndirectCollection.callSignaturesBySite,\n          onWarn: (warning) =>\n            logger.warn(\n              warning,\n              'callable-value-flow: candidate set exceeded the cap; no partial CALLS emitted',\n            ),\n        });\n  const importsEmitted = callableFlowOnly","sourceCodeStart":1220,"sourceCodeEnd":1256,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/0d1aed942f0e8b5d3bac27519fff441aceea722d/gitnexus/src/core/ingestion/scope-resolution/pipeline/run.ts#L1220-L1256","documentation":"The callable-value-flow pass bounds how many candidate targets one callable site may have (MAX_CALLABLE_VALUE_TARGETS, default 32, overridable via GITNEXUS_MAX_CALLABLE_VALUE_TARGETS). Above the cap the site is treated as overflowed and NO CALLS edges are emitted for it — a deliberate cliff, not a partial emit. The onWarn surfaces the site so the lost call chain is visible.","triggerScenarios":"Emit-phase indexing where one callable value site (a variable/name bound to 33+ candidate callables, e.g. wide reassignment or a large dispatch table) overflows the bucket; the pass calls onWarn with a payload containing language, context (site description), candidateCount, and cap, which run.ts logs under this message.","commonSituations":"Repos with wide callable registries (function tables keyed by name), heavily overloaded dynamic assignment patterns, migration/utility modules re-exporting dozens of functions through one binding, or a lowered cap env value.","solutions":["Set GITNEXUS_MAX_CALLABLE_VALUE_TARGETS above the widest site's candidate count (e.g. 64–128) and re-run analyze","Use the warning payload's context field to find the offending site, then narrow it in your own code (distinct names instead of one binding accumulating 33+ callables)","Verify recovery with context()/impact() on a call site that previously missed its targets","Keep the override proportional — every lifted site multiplies CALLS edges during emit"],"exampleFix":"# before\nexport GITNEXUS_MAX_CALLABLE_VALUE_TARGETS=   # unset → default 32, site overflowed\nnpx gitnexus analyze\n# after\nexport GITNEXUS_MAX_CALLABLE_VALUE_TARGETS=96\nnpx gitnexus analyze   # overflowed site's CALLS chain emitted","handlingStrategy":"validation","validationCode":"// Check the warn payload fields before relying on callable-flow coverage:\n// the message carries { language, context, candidateCount, cap }.\nconst dropped = logLines.filter((l) => l.msg?.includes('callable-value-flow: candidate set exceeded'));\nif (dropped.length > 0) {\n  console.warn('sites losing CALLS:', dropped.map((d) => d.context));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Avoid binding 33+ callables to one name/site; split wide dispatch tables into narrower names","Set GITNEXUS_MAX_CALLABLE_VALUE_TARGETS for repos with legitimately wide callable tables","Watch for the all-or-nothing cliff: an overflowed site emits NO partial CALLS, so verify coverage after overrides"],"tags":["static-analysis","callable-values","calls-edges","graph-coverage","configuration"],"backgroundTag":"result-set-truncation","analyzedSha":"0d1aed942f0e8b5d3bac27519fff441aceea722d","analyzedAt":"2026-08-20T23:29:22.980Z","contentChangedAt":"2026-08-20T23:29:22.980Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}