abhigyanpatwari/GitNexus · error

Analyzer runtime payload scan exceeded

Error message

Analyzer runtime payload scan exceeded ${limits.runtimePayloads} payloads: ${root}

What it means

Every runtime payload eligible for hashing (per shouldHashRuntimePayload) increments budget.artifacts, capped by limits.runtimePayloads (default 100,000); this branch counts unfollowed symlinks whose link text must be recorded (cycle-free retarget detection). Exceeding the cap aborts because a partially covered payload set would produce a receipt blind to some runtime changes. Note symlink targets outside the package contribute link text only — that is a documented trade-off, not an error.

Solutions

  1. Reduce payload count in the offending package (dedupe symlinked directories, remove caches/generated files).
  2. Reinstall dependency packages cleanly to drop accumulated artifacts.
  3. In tests, keep traversalLimits.runtimePayloads above the fixture's real payload count (default cap 100,000).
Defensive patterns

Strategy: try-catch

Type guard

function isRuntimePayloadsLimitError(error: unknown): boolean {
  return error instanceof Error && /^Analyzer runtime payload scan exceeded \d+ payloads:/.test(error.message);
}

Try / catch

try {
  identity = resolveAnalyzerRunnerIdentity(import.meta.url);
} catch (error) {
  if (isRuntimePayloadsLimitError(error)) {
    reportUserError('A dependency tree exceeds 100k hashable payloads; dedupe linked directories or reinstall.');
  }
  throw error;
}

Prevention

When it happens

Trigger: A runtime package tree contains more than 100,000 hashable payloads — including unfollowed symlinks recorded by name (linked directories like dist -> build in workspace checkouts count) — or tests tightened runtimePayloads below the fixture's payload count.

Common situations: Workspace-linked checkouts where many symlinked directories each count as one payload; dependencies shipping enormous numbers of small loadable files (Wasm/native addons); test overrides set too low.

Related errors


AI-assisted analysis of abhigyanpatwari/GitNexus@52924ef12c (2026-08-20). Data as JSON: /api/errors/7e8cb788062871d0. Report an issue: GitHub.

Appendix: source

Thrown at gitnexus/src/core/analyzer-identity.ts:1380

        // for every name, not just the pruned four — `dist -> build`, a
        // vendored-grammar link, anything a sibling checkout ships.
        //
        // Such links are RECORDED by their link text rather than followed.
        // Following them would (a) recurse without cycle protection — this
        // traversal has none, so `self -> .` would ride the depth limit, which
        // THROWS, trading one hard abort for another; (b) re-scan trees already
        // reached by their real path, inflating the entry/byte budgets that
        // also throw; and (c) need a whole containment/TOCTOU trust boundary
        // for targets outside the package. Recording the text is cycle-free,
        // costs one `readlink`, and still moves the receipt when the link is
        // retargeted. The trade-off is that a link's target contributes no
        // content of its own: when it points outside the package, only the
        // link text is covered. Links that DO resolve to a regular file keep
        // their content digest below, unchanged.
        if (shouldHashRuntimePayload(relativePath)) {
          budget.artifacts += 1;
          if (budget.artifacts > limits.runtimePayloads) {
            throw new Error(
              `Analyzer runtime payload scan exceeded ${limits.runtimePayloads} payloads: ${root}`,
            );
          }
          artifacts.push({
            absolutePath,
            canonicalPath: `${canonicalPrefix}/${relativePath}`,
            kind: 'unfollowed-symlink',
          });
        }
      } else if (
        (stat.isFile() || stat.isSymbolicLink()) &&
        shouldHashRuntimePayload(relativePath)
      ) {
        const readableState = snapshotReadableFile(absolutePath);
        const payloadBytes = stateSize(readableState.target, absolutePath);
        budget.artifacts += 1;
        if (budget.artifacts > limits.runtimePayloads) {
          throw new Error(

View on GitHub (pinned to 52924ef12c)