From 47bcc64dcf9e4dcd27703c5b3dae16d7307dd299 Mon Sep 17 00:00:00 2001 From: ChunxueLi <54129170+ChunxueLi@users.noreply.github.com> Date: Tue, 28 Jul 2026 06:21:07 +0000 Subject: [PATCH] feat(scope-resolution): make MAX_PROPERTY_DISPATCH_FANOUT configurable via env --- .../scope-resolution/passes/property-dispatch.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gitnexus/src/core/ingestion/scope-resolution/passes/property-dispatch.ts b/gitnexus/src/core/ingestion/scope-resolution/passes/property-dispatch.ts index b22799776..fef9ed29d 100644 --- a/gitnexus/src/core/ingestion/scope-resolution/passes/property-dispatch.ts +++ b/gitnexus/src/core/ingestion/scope-resolution/passes/property-dispatch.ts @@ -52,8 +52,15 @@ import { findCallableBindingInScope } from '../scope/walkers.js'; * 2× that — dropping the motivating key was the failure the first value (8) * had. ponytail: flat cap; revisit with per-receiver narrowing if real * repos show useful keys being dropped (§12 of the #2437 plan). + * + * Override via `GITNEXUS_MAX_PROPERTY_DISPATCH_FANOUT` env var for repos with + * legitimate high-fanout property keys (e.g. large Vue codebases where + * `validator` exceeds the default). */ -export const MAX_PROPERTY_DISPATCH_FANOUT = 32; +export const MAX_PROPERTY_DISPATCH_FANOUT = (() => { + const env = Number(process.env.GITNEXUS_MAX_PROPERTY_DISPATCH_FANOUT); + return Number.isInteger(env) && env >= 1 ? env : 32; +})(); /** Below the 0.85 resolved baseline; same discount idea as interface-dispatch. */ export const PROPERTY_DISPATCH_CONFIDENCE = 0.7;