gitnexus 1.6.6-rc.154 → 1.6.6-rc.156

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +10 -0
  2. package/dist/_shared/index.d.ts +0 -4
  3. package/dist/_shared/index.d.ts.map +1 -1
  4. package/dist/_shared/index.js +0 -3
  5. package/dist/_shared/index.js.map +1 -1
  6. package/dist/_shared/scope-resolution/module-scope-index.d.ts +1 -2
  7. package/dist/_shared/scope-resolution/module-scope-index.d.ts.map +1 -1
  8. package/dist/_shared/scope-resolution/module-scope-index.js +1 -2
  9. package/dist/_shared/scope-resolution/module-scope-index.js.map +1 -1
  10. package/dist/_shared/scope-resolution/registries/evidence.d.ts +2 -3
  11. package/dist/_shared/scope-resolution/registries/evidence.d.ts.map +1 -1
  12. package/dist/_shared/scope-resolution/registries/evidence.js +2 -3
  13. package/dist/_shared/scope-resolution/registries/evidence.js.map +1 -1
  14. package/dist/core/ingestion/languages/csharp/index.d.ts +3 -4
  15. package/dist/core/ingestion/languages/csharp/index.js +3 -4
  16. package/dist/core/ingestion/languages/php/index.d.ts +3 -4
  17. package/dist/core/ingestion/languages/php/index.js +3 -4
  18. package/dist/core/ingestion/languages/python/index.d.ts +3 -4
  19. package/dist/core/ingestion/languages/python/index.js +3 -4
  20. package/dist/core/ingestion/languages/typescript/index.d.ts +3 -4
  21. package/dist/core/ingestion/languages/typescript/index.js +3 -4
  22. package/dist/core/ingestion/local-symbol-pruner.d.ts +11 -0
  23. package/dist/core/ingestion/local-symbol-pruner.js +63 -0
  24. package/dist/core/ingestion/pipeline-phases/communities.d.ts +1 -1
  25. package/dist/core/ingestion/pipeline-phases/communities.js +5 -2
  26. package/dist/core/ingestion/pipeline-phases/index.d.ts +1 -0
  27. package/dist/core/ingestion/pipeline-phases/index.js +1 -0
  28. package/dist/core/ingestion/pipeline-phases/mro.d.ts +1 -1
  29. package/dist/core/ingestion/pipeline-phases/mro.js +2 -2
  30. package/dist/core/ingestion/pipeline-phases/processes.d.ts +1 -1
  31. package/dist/core/ingestion/pipeline-phases/processes.js +5 -3
  32. package/dist/core/ingestion/pipeline-phases/prune-local-symbols.d.ts +14 -0
  33. package/dist/core/ingestion/pipeline-phases/prune-local-symbols.js +26 -0
  34. package/dist/core/ingestion/pipeline.d.ts +14 -1
  35. package/dist/core/ingestion/pipeline.js +4 -2
  36. package/dist/core/ingestion/variable-extractors/generic.js +27 -2
  37. package/package.json +1 -1
  38. package/dist/_shared/scope-resolution/shadow/aggregate.d.ts +0 -63
  39. package/dist/_shared/scope-resolution/shadow/aggregate.d.ts.map +0 -1
  40. package/dist/_shared/scope-resolution/shadow/aggregate.js +0 -122
  41. package/dist/_shared/scope-resolution/shadow/aggregate.js.map +0 -1
  42. package/dist/_shared/scope-resolution/shadow/diff.d.ts +0 -59
  43. package/dist/_shared/scope-resolution/shadow/diff.d.ts.map +0 -1
  44. package/dist/_shared/scope-resolution/shadow/diff.js +0 -79
  45. package/dist/_shared/scope-resolution/shadow/diff.js.map +0 -1
package/README.md CHANGED
@@ -423,6 +423,16 @@ Three env vars expose the pool's resilience layers (respawn budget, cumulative-t
423
423
  | `GITNEXUS_WORKER_MAX_CUMULATIVE_TIMEOUT_MS` | `5 × subBatchTimeoutMs` | Total retry wall-time budget per job before quarantining. Bounds exponentially-growing retry waits. |
424
424
  | `GITNEXUS_WORKER_CONSECUTIVE_FAILURE_THRESHOLD` | `max(3, poolSize)` | Per-slot consecutive deaths before the pool's circuit breaker trips. After tripping, dispatches require a fresh pool. |
425
425
 
426
+ ### Graph cleanup tuning
427
+
428
+ After scope resolution, analyze prunes inert block-local value symbols (a function-local `const`/`let`/`var` that ends up with only its structural `File→DEFINES` edge) to keep the graph focused on cross-symbol relationships. Module/file-scope symbols, class members, and any local with a real edge are always kept.
429
+
430
+ | Variable | Default | Effect |
431
+ | ------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------- |
432
+ | `GITNEXUS_KEEP_LOCAL_VALUE_SYMBOLS` | unset | Set to `1`/`true` to keep inert block-local value symbols instead of pruning them. |
433
+
434
+ Programmatic callers can pass `keepLocalValueSymbols: true` in `PipelineOptions` instead of setting the env var.
435
+
426
436
  ## Privacy
427
437
 
428
438
  - All processing happens locally on your machine
@@ -58,8 +58,4 @@ export { resilientFetch, ResilientFetchExhaustedError, RETRY_AFTER_CAP_MS, parse
58
58
  export type { ResilientFetchOptions } from './integrations/resilient-fetch.js';
59
59
  export { UNDERSTAND_QUICKLY_DISPATCH_URL, UNDERSTAND_QUICKLY_EVENT_TYPE, UNDERSTAND_QUICKLY_TOKEN_ENV, buildUqDispatchPayload, isValidOwnerRepo, parseOwnerRepoFromRemote, stripGitSuffix, } from './integrations/understand-quickly.js';
60
60
  export type { UqDispatchPayload } from './integrations/understand-quickly.js';
61
- export { diffResolutions } from './scope-resolution/shadow/diff.js';
62
- export type { ShadowAgreement, ShadowCallsite, ShadowDiff, } from './scope-resolution/shadow/diff.js';
63
- export { aggregateDiffs } from './scope-resolution/shadow/aggregate.js';
64
- export type { LanguageParityRow, ShadowParityReport } from './scope-resolution/shadow/aggregate.js';
65
61
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,WAAW,EACX,cAAc,EACd,SAAS,EACT,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAGzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,WAAW,EAAE,MAAM,mB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EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACjG,YAAY,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EACL,cAAc,EACd,4BAA4B,EAC5B,kBAAkB,EAClB,eAAe,GAChB,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAG/E,OAAO,EACL,+BAA+B,EAC/B,6BAA6B,EAC7B,4BAA4B,EAC5B,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,cAAc,GACf,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC"}
@@ -43,7 +43,4 @@ export { CircuitBreaker, CircuitOpenError, getBreaker } from './integrations/cir
43
43
  export { resilientFetch, ResilientFetchExhaustedError, RETRY_AFTER_CAP_MS, parseRetryAfter, } from './integrations/resilient-fetch.js';
44
44
  // Understand-Quickly registry integration (opt-in)
45
45
  export { UNDERSTAND_QUICKLY_DISPATCH_URL, UNDERSTAND_QUICKLY_EVENT_TYPE, UNDERSTAND_QUICKLY_TOKEN_ENV, buildUqDispatchPayload, isValidOwnerRepo, parseOwnerRepoFromRemote, stripGitSuffix, } from './integrations/understand-quickly.js';
46
- // Shadow-mode diff + aggregation (RFC §6.3; Ring 2 SHARED #918)
47
- export { diffResolutions } from './scope-resolution/shadow/diff.js';
48
- export { aggregateDiffs } from './scope-resolution/shadow/aggregate.js';
49
46
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,mBAAmB;AACnB,OAAO,EACL,WAAW,EACX,cAAc,EACd,SAAS,EACT,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AAGpC,mBAAmB;AACnB,OAAO,EAAE,kB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AC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG1E,8EAA8E;AAC9E,wEAAwE;AACxE,wEAAwE;AACxE,8DAA8D;AAC9D,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAEjG,OAAO,EACL,cAAc,EACd,4BAA4B,EAC5B,kBAAkB,EAClB,eAAe,GAChB,MAAM,mCAAmC,CAAC;AAG3C,mDAAmD;AACnD,OAAO,EACL,+BAA+B,EAC/B,6BAA6B,EAC7B,4BAA4B,EAC5B,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,cAAc,GACf,MAAM,sCAAsC,CAAC"}
@@ -8,8 +8,7 @@
8
8
  *
9
9
  * Part of RFC #909 Ring 2 SHARED — #913.
10
10
  *
11
- * Consumed by: #915 (SCC finalize link pass), #923 (shadow harness when
12
- * resolving callsite file → enclosing module).
11
+ * Consumed by: #915 (SCC finalize link pass).
13
12
  */
14
13
  import type { ScopeId } from './types.js';
15
14
  export interface ModuleScopeIndex {
@@ -1 +1 @@
1
- {"version":3,"file":"module-scope-index.d.ts","sourceRoot":"","sources":["../../src/scope-resolution/module-scope-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAC3C,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,GAAG,gBAAgB,CAO5F"}
1
+ {"version":3,"file":"module-scope-index.d.ts","sourceRoot":"","sources":["../../src/scope-resolution/module-scope-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAC3C,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,GAAG,gBAAgB,CAO5F"}
@@ -8,8 +8,7 @@
8
8
  *
9
9
  * Part of RFC #909 Ring 2 SHARED — #913.
10
10
  *
11
- * Consumed by: #915 (SCC finalize link pass), #923 (shadow harness when
12
- * resolving callsite file → enclosing module).
11
+ * Consumed by: #915 (SCC finalize link pass).
13
12
  */
14
13
  /**
15
14
  * Build a `ModuleScopeIndex` from a flat list of `{ filePath, moduleScopeId }`
@@ -1 +1 @@
1
- {"version":3,"file":"module-scope-index.js","sourceRoot":"","sources":["../../src/scope-resolution/module-scope-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;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UAAU,CAAC,CAAC;AAC/B,CAAC;AAED,+EAA+E;AAE/E,SAAS,SAAS,CAAC,UAAgC;IACjD,OAAO;QACL,UAAU;QACV,IAAI,IAAI;YACN,OAAO,UAAU,CAAC,IAAI,CAAC;QACzB,CAAC;QACD,GAAG,CAAC,QAAgB;YAClB,OAAO,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;QACD,GAAG,CAAC,QAAgB;YAClB,OAAO,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -44,13 +44,12 @@ export interface RawSignals {
44
44
  *
45
45
  * Emission order mirrors the `EvidenceWeights` layout: where-found →
46
46
  * type-binding → corroborators → arity → degraded. Stable order makes
47
- * the per-signal contributions easy to reason about in tests and in the
48
- * shadow-mode parity dashboard.
47
+ * the per-signal contributions easy to reason about in tests.
49
48
  */
50
49
  export declare function composeEvidence(signals: RawSignals): readonly ResolutionEvidence[];
51
50
  /**
52
51
  * Sum evidence weights and clamp to `[0, 1]`. Separate from `composeEvidence`
53
- * so tests and the parity dashboard can inspect the raw evidence list.
52
+ * so tests can inspect the raw evidence list.
54
53
  */
55
54
  export declare function confidenceFromEvidence(evidence: readonly ResolutionEvidence[]): number;
56
55
  //# sourceMappingURL=evidence.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../../src/scope-resolution/registries/evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGlE;;;;GAIG;AACH,MAAM,WAAW,UAAU;IAEzB,qEAAqE;IACrE,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,kBAAkB,GAAG,aAAa,CAAC;IAC5E,uEAAuE;IACvE,QAAQ,CAAC,eAAe,CAAC,EA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ACvE,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IAGzB,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,cAAc,CAAC;IAGlE,yEAAyE;IACzE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CACtC;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS,kBAAkB,EAAE,CA6ElF;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,CAMtF"}
@@ -22,8 +22,7 @@ import { EvidenceWeights, typeBindingWeightAtDepth } from '../evidence-weights.j
22
22
  *
23
23
  * Emission order mirrors the `EvidenceWeights` layout: where-found →
24
24
  * type-binding → corroborators → arity → degraded. Stable order makes
25
- * the per-signal contributions easy to reason about in tests and in the
26
- * shadow-mode parity dashboard.
25
+ * the per-signal contributions easy to reason about in tests.
27
26
  */
28
27
  export function composeEvidence(signals) {
29
28
  const out = [];
@@ -96,7 +95,7 @@ export function composeEvidence(signals) {
96
95
  }
97
96
  /**
98
97
  * Sum evidence weights and clamp to `[0, 1]`. Separate from `composeEvidence`
99
- * so tests and the parity dashboard can inspect the raw evidence list.
98
+ * so tests can inspect the raw evidence list.
100
99
  */
101
100
  export function confidenceFromEvidence(evidence) {
102
101
  let sum = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"evidence.js","sourceRoot":"","sources":["../../../src/scope-resolution/registries/evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAkCnF;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,OAAmB;IACjD,MAAM,GAAG,GAAyB,EAAE,CAAC;IAErC,0EAA0E;IAC1E,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACjC,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;YACV,OAAO,eAAe,CAAC,KAAK,CAAC;QAC/B,KAAK,QAAQ;YACX,OAAO,eAAe,CAAC,MAAM,CAAC;QAChC,KAAK,UAAU;YACb,OAAO,eAAe,CAAC,QAAQ,CAAC;QAClC,KAAK,WAAW;YACd,OAAO,eAAe,CAAC,SAAS,CAAC;QACnC,KAAK,UAAU;YACb,OAAO,eAAe,CAAC,QAAQ,CAAC;QAClC,KAAK,kBAAkB;YACrB,OAAO,eAAe,CAAC,eAAe,CAAC;QACzC,KAAK,aAAa;YAChB,mEAAmE;YACnE,iEAAiE;YACjE,kEAAkE;YAClE,sEAAsE;YACtE,4CAA4C;YAC5C,OAAO,eAAe,CAAC,UAAU,CAAC;IACtC,CAAC;AACH,CAAC;AAED,SAAS,sBAAsB,CAC7B,MAAyC;IAEzC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;QACjB,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU,CAAC;QAChB,KAAK,WAAW,CAAC;QACjB,KAAK,UAAU;YACb,OAAO,QAAQ,CAAC;QAClB,KAAK,kBAAkB;YACrB,OAAO,kBAAkB,CAAC;QAC5B,KAAK,aAAa;YAChB,OAAO,aAAa,CAAC;IACzB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"evidence.js","sourceRoot":"","sources":["../../../src/scope-resolution/registries/evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAkCnF;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,OAAmB;IACjD,MAAM,GAAG,GAAyB,EAAE,CAAC;IAErC,0EAA0E;IAC1E,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACjC,MAAM,UAAU,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,OAAO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C;QAChC,KAAK,UAAU;YACb,OAAO,eAAe,CAAC,QAAQ,CAAC;QAClC,KAAK,WAAW;YACd,OAAO,eAAe,CAAC,SAAS,CAAC;QACnC,KAAK,UAAU;YACb,OAAO,eAAe,CAAC,QAAQ,CAAC;QAClC,KAAK,kBAAkB;YACrB,OAAO,eAAe,CAAC,eAAe,CAAC;QACzC,KAAK,aAAa;YAChB,mEAAmE;YACnE,iEAAiE;YACjE,kEAAkE;YAClE,sEAAsE;YACtE,4CAA4C;YAC5C,OAAO,eAAe,CAAC,UAAU,CAAC;IACtC,CAAC;AACH,CAAC;AAED,SAAS,sBAAsB,CAC7B,MAAyC;IAEzC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;QACjB,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU,CAAC;QAChB,KAAK,WAAW,CAAC;QACjB,KAAK,UAAU;YACb,OAAO,QAAQ,CAAC;QAClB,KAAK,kBAAkB;YACrB,OAAO,kBAAkB,CAAC;QAC5B,KAAK,aAAa;YAChB,OAAO,aAAa,CAAC;IACzB,CAAC;AACH,CAAC"}
@@ -68,10 +68,9 @@
68
68
  * `using static X = Y.Z;`, attributes, and preprocessor-gated
69
69
  * declarations are all recognized correctly.
70
70
  *
71
- * Shadow-harness corpus parity is the authoritative signal for which
72
- * of these matter in practice. The CI parity gate blocks any PR that
73
- * regresses either the legacy or registry-primary run of
74
- * `test/integration/resolvers/csharp.test.ts`.
71
+ * The `test/integration/resolvers/csharp.test.ts` resolver suite is the
72
+ * authoritative signal for which of these matter in practice; it runs in
73
+ * the standard CI test workflow, so a regression blocks the merge.
75
74
  */
76
75
  export { emitCsharpScopeCaptures } from './captures.js';
77
76
  export { getCsharpCaptureCacheStats, resetCsharpCaptureCacheStats } from './cache-stats.js';
@@ -68,10 +68,9 @@
68
68
  * `using static X = Y.Z;`, attributes, and preprocessor-gated
69
69
  * declarations are all recognized correctly.
70
70
  *
71
- * Shadow-harness corpus parity is the authoritative signal for which
72
- * of these matter in practice. The CI parity gate blocks any PR that
73
- * regresses either the legacy or registry-primary run of
74
- * `test/integration/resolvers/csharp.test.ts`.
71
+ * The `test/integration/resolvers/csharp.test.ts` resolver suite is the
72
+ * authoritative signal for which of these matter in practice; it runs in
73
+ * the standard CI test workflow, so a regression blocks the merge.
75
74
  */
76
75
  export { emitCsharpScopeCaptures } from './captures.js';
77
76
  export { getCsharpCaptureCacheStats, resetCsharpCaptureCacheStats } from './cache-stats.js';
@@ -54,10 +54,9 @@
54
54
  * 6. **Intersection types in parameters** — `T&U $param` takes the first
55
55
  * named part (`T`). This matches the legacy type-extractor's behavior.
56
56
  *
57
- * Shadow-harness corpus parity is the authoritative signal for which of
58
- * these matter in practice. The CI parity gate blocks any PR that regresses
59
- * either the legacy or registry-primary run of
60
- * `test/integration/resolvers/php.test.ts`.
57
+ * The `test/integration/resolvers/php.test.ts` resolver suite is the
58
+ * authoritative signal for which of these matter in practice; it runs in
59
+ * the standard CI test workflow, so a regression blocks the merge.
61
60
  */
62
61
  export { emitPhpScopeCaptures } from './captures.js';
63
62
  export { getPhpCaptureCacheStats, resetPhpCaptureCacheStats } from './cache-stats.js';
@@ -54,10 +54,9 @@
54
54
  * 6. **Intersection types in parameters** — `T&U $param` takes the first
55
55
  * named part (`T`). This matches the legacy type-extractor's behavior.
56
56
  *
57
- * Shadow-harness corpus parity is the authoritative signal for which of
58
- * these matter in practice. The CI parity gate blocks any PR that regresses
59
- * either the legacy or registry-primary run of
60
- * `test/integration/resolvers/php.test.ts`.
57
+ * The `test/integration/resolvers/php.test.ts` resolver suite is the
58
+ * authoritative signal for which of these matter in practice; it runs in
59
+ * the standard CI test workflow, so a regression blocks the merge.
61
60
  */
62
61
  export { emitPhpScopeCaptures } from './captures.js';
63
62
  export { getPhpCaptureCacheStats, resetPhpCaptureCacheStats } from './cache-stats.js';
@@ -66,10 +66,9 @@
66
66
  * site where the enclosing class can't be statically determined
67
67
  * is left unresolved.
68
68
  *
69
- * Shadow-harness corpus parity is the authoritative signal for which
70
- * of these matter in practice. The CI parity gate blocks any PR that
71
- * regresses either the legacy or registry-primary run of
72
- * `test/integration/resolvers/python.test.ts`.
69
+ * The `test/integration/resolvers/python.test.ts` resolver suite is the
70
+ * authoritative signal for which of these matter in practice; it runs in
71
+ * the standard CI test workflow, so a regression blocks the merge.
73
72
  */
74
73
  export { emitPythonScopeCaptures } from './captures.js';
75
74
  export { getPythonCaptureCacheStats, resetPythonCaptureCacheStats } from './cache-stats.js';
@@ -66,10 +66,9 @@
66
66
  * site where the enclosing class can't be statically determined
67
67
  * is left unresolved.
68
68
  *
69
- * Shadow-harness corpus parity is the authoritative signal for which
70
- * of these matter in practice. The CI parity gate blocks any PR that
71
- * regresses either the legacy or registry-primary run of
72
- * `test/integration/resolvers/python.test.ts`.
69
+ * The `test/integration/resolvers/python.test.ts` resolver suite is the
70
+ * authoritative signal for which of these matter in practice; it runs in
71
+ * the standard CI test workflow, so a regression blocks the merge.
73
72
  */
74
73
  export { emitPythonScopeCaptures } from './captures.js';
75
74
  export { getPythonCaptureCacheStats, resetPythonCaptureCacheStats } from './cache-stats.js';
@@ -80,10 +80,9 @@
80
80
  * identifiers are narrowed (`user instanceof User`). Member paths
81
81
  * such as `user.address instanceof Address` remain unresolved.
82
82
  *
83
- * Shadow-harness corpus parity on `test/integration/resolvers/
84
- * typescript.test.ts` is the authoritative signal for which of these
85
- * matter in practice. The CI parity gate blocks any PR that regresses
86
- * either the legacy or registry-primary run.
83
+ * The `test/integration/resolvers/typescript.test.ts` resolver suite is
84
+ * the authoritative signal for which of these matter in practice; it runs
85
+ * in the standard CI test workflow, so a regression blocks the merge.
87
86
  */
88
87
  export { emitTsScopeCaptures } from './captures.js';
89
88
  export { getTypescriptCaptureCacheStats, resetTypescriptCaptureCacheStats } from './cache-stats.js';
@@ -80,10 +80,9 @@
80
80
  * identifiers are narrowed (`user instanceof User`). Member paths
81
81
  * such as `user.address instanceof Address` remain unresolved.
82
82
  *
83
- * Shadow-harness corpus parity on `test/integration/resolvers/
84
- * typescript.test.ts` is the authoritative signal for which of these
85
- * matter in practice. The CI parity gate blocks any PR that regresses
86
- * either the legacy or registry-primary run.
83
+ * The `test/integration/resolvers/typescript.test.ts` resolver suite is
84
+ * the authoritative signal for which of these matter in practice; it runs
85
+ * in the standard CI test workflow, so a regression blocks the merge.
87
86
  */
88
87
  export { emitTsScopeCaptures } from './captures.js';
89
88
  export { getTypescriptCaptureCacheStats, resetTypescriptCaptureCacheStats } from './cache-stats.js';
@@ -0,0 +1,11 @@
1
+ import type { KnowledgeGraph } from '../graph/types.js';
2
+ export interface LocalSymbolPruneStats {
3
+ candidateNodes: number;
4
+ prunedNodes: number;
5
+ keptWithSemanticEdges: number;
6
+ skippedByEnv: boolean;
7
+ }
8
+ export declare const shouldKeepLocalValueSymbols: () => boolean;
9
+ export declare const pruneLocalValueSymbols: (graph: KnowledgeGraph, options?: {
10
+ keepLocalValueSymbols?: boolean;
11
+ }) => LocalSymbolPruneStats;
@@ -0,0 +1,63 @@
1
+ import { parseTruthyEnv } from './utils/env.js';
2
+ const LOCAL_VALUE_LABELS = new Set(['Const', 'Variable', 'Static']);
3
+ const KEEP_LOCAL_VALUE_SYMBOLS_ENV = 'GITNEXUS_KEEP_LOCAL_VALUE_SYMBOLS';
4
+ export const shouldKeepLocalValueSymbols = () => parseTruthyEnv(process.env[KEEP_LOCAL_VALUE_SYMBOLS_ENV]);
5
+ const emptyStats = (skippedByEnv) => ({
6
+ candidateNodes: 0,
7
+ prunedNodes: 0,
8
+ keptWithSemanticEdges: 0,
9
+ skippedByEnv,
10
+ });
11
+ const isLocalValueCandidate = (node) => {
12
+ if (!LOCAL_VALUE_LABELS.has(node.label))
13
+ return false;
14
+ return node.properties.scope === 'block';
15
+ };
16
+ // True when `rel` is the structural `File -> DEFINES -> candidate` edge. Callers
17
+ // guard on the candidate already being the edge target, so only the source label
18
+ // needs checking here.
19
+ const isFileDefinesEdge = (graph, rel) => {
20
+ if (rel.type !== 'DEFINES')
21
+ return false;
22
+ return graph.getNode(rel.sourceId)?.label === 'File';
23
+ };
24
+ export const pruneLocalValueSymbols = (graph, options = {}) => {
25
+ if (options.keepLocalValueSymbols ?? shouldKeepLocalValueSymbols()) {
26
+ return emptyStats(true);
27
+ }
28
+ const candidateIds = new Set();
29
+ for (const node of graph.iterNodes()) {
30
+ if (isLocalValueCandidate(node))
31
+ candidateIds.add(node.id);
32
+ }
33
+ if (candidateIds.size === 0)
34
+ return emptyStats(false);
35
+ const candidatesWithSemanticEdges = new Set();
36
+ for (const rel of graph.iterRelationships()) {
37
+ // Any outgoing edge from a candidate is a semantic edge: the only structural
38
+ // edge a block-local value symbol carries is the incoming File -> DEFINES, on
39
+ // which the candidate is the target, never the source.
40
+ if (candidateIds.has(rel.sourceId)) {
41
+ candidatesWithSemanticEdges.add(rel.sourceId);
42
+ }
43
+ // An incoming edge is semantic unless it is the structural File -> DEFINES.
44
+ if (candidateIds.has(rel.targetId)) {
45
+ if (!isFileDefinesEdge(graph, rel)) {
46
+ candidatesWithSemanticEdges.add(rel.targetId);
47
+ }
48
+ }
49
+ }
50
+ let prunedNodes = 0;
51
+ for (const candidateId of candidateIds) {
52
+ if (candidatesWithSemanticEdges.has(candidateId))
53
+ continue;
54
+ if (graph.removeNode(candidateId))
55
+ prunedNodes++;
56
+ }
57
+ return {
58
+ candidateNodes: candidateIds.size,
59
+ prunedNodes,
60
+ keptWithSemanticEdges: candidatesWithSemanticEdges.size,
61
+ skippedByEnv: false,
62
+ };
63
+ };
@@ -4,7 +4,7 @@
4
4
  * Detects code communities via Leiden algorithm and creates
5
5
  * Community nodes + MEMBER_OF edges.
6
6
  *
7
- * @deps mro
7
+ * @deps mro, pruneLocalSymbols
8
8
  * @reads graph (all nodes and relationships)
9
9
  * @writes graph (Community nodes, MEMBER_OF edges)
10
10
  */
@@ -4,7 +4,7 @@
4
4
  * Detects code communities via Leiden algorithm and creates
5
5
  * Community nodes + MEMBER_OF edges.
6
6
  *
7
- * @deps mro
7
+ * @deps mro, pruneLocalSymbols
8
8
  * @reads graph (all nodes and relationships)
9
9
  * @writes graph (Community nodes, MEMBER_OF edges)
10
10
  */
@@ -14,7 +14,10 @@ import { isDev } from '../utils/env.js';
14
14
  import { logger } from '../../logger.js';
15
15
  export const communitiesPhase = {
16
16
  name: 'communities',
17
- deps: ['mro', 'structure'],
17
+ // `pruneLocalSymbols` is declared explicitly (not just transitively via `mro`)
18
+ // so community detection always reads the trimmed graph even if a future option
19
+ // drops `mro` from the phase list.
20
+ deps: ['mro', 'pruneLocalSymbols', 'structure'],
18
21
  async execute(ctx, deps) {
19
22
  const { totalFiles } = getPhaseOutput(deps, 'structure');
20
23
  ctx.onProgress({
@@ -14,6 +14,7 @@ export { toolsPhase, type ToolsOutput, type ToolDef } from './tools.js';
14
14
  export { ormPhase, type ORMOutput } from './orm.js';
15
15
  export { crossFilePhase, type CrossFileOutput } from './cross-file.js';
16
16
  export { scopeResolutionPhase, type ScopeResolutionOutput, } from '../scope-resolution/pipeline/phase.js';
17
+ export { pruneLocalSymbolsPhase, type PruneLocalSymbolsOutput } from './prune-local-symbols.js';
17
18
  export { mroPhase, type MROOutput } from './mro.js';
18
19
  export { communitiesPhase, type CommunitiesOutput } from './communities.js';
19
20
  export { processesPhase, type ProcessesOutput } from './processes.js';
@@ -15,6 +15,7 @@ export { toolsPhase } from './tools.js';
15
15
  export { ormPhase } from './orm.js';
16
16
  export { crossFilePhase } from './cross-file.js';
17
17
  export { scopeResolutionPhase, } from '../scope-resolution/pipeline/phase.js';
18
+ export { pruneLocalSymbolsPhase } from './prune-local-symbols.js';
18
19
  export { mroPhase } from './mro.js';
19
20
  export { communitiesPhase } from './communities.js';
20
21
  export { processesPhase } from './processes.js';
@@ -4,7 +4,7 @@
4
4
  * Computes Method Resolution Order (MRO) and creates METHOD_OVERRIDES
5
5
  * and METHOD_IMPLEMENTS edges.
6
6
  *
7
- * @deps crossFile, scopeResolution
7
+ * @deps crossFile, scopeResolution, pruneLocalSymbols
8
8
  * @reads graph (all nodes and relationships)
9
9
  * @writes graph (METHOD_OVERRIDES, METHOD_IMPLEMENTS edges)
10
10
  */
@@ -4,7 +4,7 @@
4
4
  * Computes Method Resolution Order (MRO) and creates METHOD_OVERRIDES
5
5
  * and METHOD_IMPLEMENTS edges.
6
6
  *
7
- * @deps crossFile, scopeResolution
7
+ * @deps crossFile, scopeResolution, pruneLocalSymbols
8
8
  * @reads graph (all nodes and relationships)
9
9
  * @writes graph (METHOD_OVERRIDES, METHOD_IMPLEMENTS edges)
10
10
  */
@@ -14,7 +14,7 @@ import { isDev } from '../utils/env.js';
14
14
  import { logger } from '../../logger.js';
15
15
  export const mroPhase = {
16
16
  name: 'mro',
17
- deps: ['crossFile', 'scopeResolution', 'structure'],
17
+ deps: ['crossFile', 'scopeResolution', 'pruneLocalSymbols', 'structure'],
18
18
  async execute(ctx, deps) {
19
19
  const { totalFiles } = getPhaseOutput(deps, 'structure');
20
20
  ctx.onProgress({
@@ -4,7 +4,7 @@
4
4
  * Detects execution flows (processes) and creates Process nodes +
5
5
  * STEP_IN_PROCESS edges. Also links Route/Tool nodes to processes.
6
6
  *
7
- * @deps communities, routes, tools
7
+ * @deps communities, routes, tools, pruneLocalSymbols
8
8
  * @reads graph (all nodes and relationships), communityResult, routeRegistry, toolDefs
9
9
  * @writes graph (Process nodes, STEP_IN_PROCESS edges, ENTRY_POINT_OF edges)
10
10
  */
@@ -4,7 +4,7 @@
4
4
  * Detects execution flows (processes) and creates Process nodes +
5
5
  * STEP_IN_PROCESS edges. Also links Route/Tool nodes to processes.
6
6
  *
7
- * @deps communities, routes, tools
7
+ * @deps communities, routes, tools, pruneLocalSymbols
8
8
  * @reads graph (all nodes and relationships), communityResult, routeRegistry, toolDefs
9
9
  * @writes graph (Process nodes, STEP_IN_PROCESS edges, ENTRY_POINT_OF edges)
10
10
  */
@@ -16,8 +16,10 @@ import { logger } from '../../logger.js';
16
16
  export const processesPhase = {
17
17
  name: 'processes',
18
18
  // `structure` supplies `totalFiles` (progress counter) without the spurious
19
- // structural data dependency on `parse`.
20
- deps: ['communities', 'routes', 'tools', 'structure'],
19
+ // structural data dependency on `parse`. `pruneLocalSymbols` is declared
20
+ // explicitly so process extraction always reads the trimmed graph even if a
21
+ // future option drops the intervening `mro`/`communities` phases.
22
+ deps: ['communities', 'routes', 'tools', 'pruneLocalSymbols', 'structure'],
21
23
  async execute(ctx, deps) {
22
24
  const { totalFiles } = getPhaseOutput(deps, 'structure');
23
25
  const { communityResult } = getPhaseOutput(deps, 'communities');
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Phase: pruneLocalSymbols
3
+ *
4
+ * Drops inert function/block-local value symbols after scope resolution has
5
+ * already used them for binding and call resolution.
6
+ *
7
+ * @deps scopeResolution
8
+ * @reads graph (nodes and relationships)
9
+ * @writes graph (removes unreferenced local Const/Variable/Static nodes)
10
+ */
11
+ import type { PipelinePhase } from './types.js';
12
+ import { type LocalSymbolPruneStats } from '../local-symbol-pruner.js';
13
+ export type PruneLocalSymbolsOutput = LocalSymbolPruneStats;
14
+ export declare const pruneLocalSymbolsPhase: PipelinePhase<PruneLocalSymbolsOutput>;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Phase: pruneLocalSymbols
3
+ *
4
+ * Drops inert function/block-local value symbols after scope resolution has
5
+ * already used them for binding and call resolution.
6
+ *
7
+ * @deps scopeResolution
8
+ * @reads graph (nodes and relationships)
9
+ * @writes graph (removes unreferenced local Const/Variable/Static nodes)
10
+ */
11
+ import { pruneLocalValueSymbols } from '../local-symbol-pruner.js';
12
+ import { isDev } from '../utils/env.js';
13
+ import { logger } from '../../logger.js';
14
+ export const pruneLocalSymbolsPhase = {
15
+ name: 'pruneLocalSymbols',
16
+ deps: ['scopeResolution'],
17
+ async execute(ctx) {
18
+ const stats = pruneLocalValueSymbols(ctx.graph, {
19
+ keepLocalValueSymbols: ctx.options?.keepLocalValueSymbols,
20
+ });
21
+ if (isDev && !stats.skippedByEnv && stats.prunedNodes > 0) {
22
+ logger.info(`Pruned ${stats.prunedNodes}/${stats.candidateNodes} inert local value symbols`);
23
+ }
24
+ return stats;
25
+ },
26
+ };
@@ -17,7 +17,12 @@
17
17
  import { type PipelineProgress } from '../../_shared/index.js';
18
18
  import { PipelineResult } from '../../types/pipeline.js';
19
19
  export interface PipelineOptions {
20
- /** Skip MRO, community detection, and process extraction for faster test runs. */
20
+ /**
21
+ * Skip MRO, community detection, and process extraction for faster test runs.
22
+ * The `pruneLocalSymbols` phase still runs — it is graph construction (it cleans
23
+ * up inert local symbols), not graph analysis — so set `keepLocalValueSymbols`
24
+ * to retain those nodes under `skipGraphPhases`.
25
+ */
21
26
  skipGraphPhases?: boolean;
22
27
  /**
23
28
  * Request parsing with the worker pool disabled. The sequential parser was
@@ -90,5 +95,13 @@ export interface PipelineOptions {
90
95
  * without leaking `process.env` state across invocations.
91
96
  */
92
97
  chunkByteBudget?: number;
98
+ /**
99
+ * Keep inert block-local value symbols (Const/Variable/Static) that the
100
+ * `pruneLocalSymbols` phase would otherwise drop. Mirrors the
101
+ * `GITNEXUS_KEEP_LOCAL_VALUE_SYMBOLS` env var, but threaded per-call so
102
+ * long-running hosts (eval-server, MCP daemon) can opt out without leaking
103
+ * `process.env` state across invocations. When undefined, the env var decides.
104
+ */
105
+ keepLocalValueSymbols?: boolean;
93
106
  }
94
107
  export declare const runPipelineFromRepo: (repoPath: string, onProgress: (progress: PipelineProgress) => void, options?: PipelineOptions) => Promise<PipelineResult>;
@@ -15,7 +15,7 @@
15
15
  * See ARCHITECTURE.md for the full phase dependency diagram.
16
16
  */
17
17
  import { createKnowledgeGraph } from '../graph/graph.js';
18
- import { runPipeline, getPhaseOutput, scanPhase, structurePhase, markdownPhase, cobolPhase, parsePhase, routesPhase, toolsPhase, ormPhase, crossFilePhase, scopeResolutionPhase, mroPhase, communitiesPhase, processesPhase, } from './pipeline-phases/index.js';
18
+ import { runPipeline, getPhaseOutput, scanPhase, structurePhase, markdownPhase, cobolPhase, parsePhase, routesPhase, toolsPhase, ormPhase, crossFilePhase, scopeResolutionPhase, pruneLocalSymbolsPhase, mroPhase, communitiesPhase, processesPhase, } from './pipeline-phases/index.js';
19
19
  // ── Phase registry ─────────────────────────────────────────────────────────
20
20
  /**
21
21
  * All pipeline phases with their dependency relationships.
@@ -23,7 +23,8 @@ import { runPipeline, getPhaseOutput, scanPhase, structurePhase, markdownPhase,
23
23
  * Phase dependency graph:
24
24
  *
25
25
  * scan → structure → [markdown, cobol] → parse → [routes, tools, orm]
26
- * → crossFile → mro → communities → processes
26
+ * → crossFile → scopeResolution → pruneLocalSymbols
27
+ * → mro → communities → processes
27
28
  *
28
29
  * To add a new phase: create a file in pipeline-phases/, export the phase
29
30
  * object, and add it to the appropriate position in this array.
@@ -40,6 +41,7 @@ function buildPhaseList(options) {
40
41
  ormPhase,
41
42
  crossFilePhase,
42
43
  scopeResolutionPhase,
44
+ pruneLocalSymbolsPhase,
43
45
  ];
44
46
  if (!options?.skipGraphPhases) {
45
47
  phases.push(mroPhase, communitiesPhase, processesPhase);
@@ -1,4 +1,23 @@
1
1
  // gitnexus/src/core/ingestion/variable-extractors/generic.ts
2
+ /**
3
+ * Type-declaration node types whose body can be a bare `block`. tree-sitter-python
4
+ * models a class body as a `block` node — the same node type used for function and
5
+ * control-flow bodies — so a class attribute would otherwise look block-scoped. Most
6
+ * other grammars give class bodies dedicated node types (`class_body`,
7
+ * `declaration_list`, `body_statement`), which are not in the block-scope list below,
8
+ * so this guard is a no-op for them but keeps the rule language-agnostic.
9
+ */
10
+ const CLASS_LIKE_CONTAINERS = new Set([
11
+ 'class_definition',
12
+ 'class_declaration',
13
+ 'class_specifier',
14
+ 'struct_item',
15
+ 'impl_item',
16
+ 'trait_item',
17
+ 'interface_declaration',
18
+ 'enum_declaration',
19
+ 'object_declaration',
20
+ ]);
2
21
  /**
3
22
  * Create a VariableExtractor from a declarative config.
4
23
  */
@@ -26,7 +45,7 @@ export function createVariableExtractor(config) {
26
45
  t === 'compilation_unit') {
27
46
  return 'module';
28
47
  }
29
- // Function/method/block boundaries indicate block scope
48
+ // Function/method boundaries indicate block scope
30
49
  if (t === 'function_declaration' ||
31
50
  t === 'function_definition' ||
32
51
  t === 'function_item' ||
@@ -35,11 +54,17 @@ export function createVariableExtractor(config) {
35
54
  t === 'arrow_function' ||
36
55
  t === 'function_expression' ||
37
56
  t === 'lambda' ||
38
- t === 'block' ||
39
57
  t === 'function_body' ||
40
58
  t === 'compound_statement') {
41
59
  return 'block';
42
60
  }
61
+ // A bare `block` is block scope UNLESS it is a class body. A class member
62
+ // (e.g. Python `class C: MAX = 100`) is not an inert function-local — keep
63
+ // walking so it resolves to its true enclosing scope ('module' for a
64
+ // top-level class) instead of being misclassified and pruned.
65
+ if (t === 'block' && !(current.parent && CLASS_LIKE_CONTAINERS.has(current.parent.type))) {
66
+ return 'block';
67
+ }
43
68
  current = current.parent;
44
69
  }
45
70
  return 'file';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitnexus",
3
- "version": "1.6.6-rc.154",
3
+ "version": "1.6.6-rc.156",
4
4
  "description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
5
5
  "author": "Abhigyan Patwari",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",
@@ -1,63 +0,0 @@
1
- /**
2
- * Shadow-mode aggregation — per-language parity %, per-evidence-kind
3
- * breakdown of divergences. Consumed by the parity dashboard (RING2-PKG-5).
4
- *
5
- * Pure functions; no I/O. The harness persists per-run JSON; the dashboard
6
- * reads `.gitnexus/shadow-parity/latest.json` and renders.
7
- *
8
- * Related types — `ShadowAgreement`, `ShadowCallsite`, `ShadowDiff` — are
9
- * defined alongside `diffResolutions` in `./diff.ts` and re-exported
10
- * through the top-level `gitnexus-shared` barrel. Consumers import all
11
- * three from `gitnexus-shared`, not from this module.
12
- *
13
- * Part of RFC #909 Ring 2 SHARED — #918.
14
- */
15
- import type { SupportedLanguages } from '../../languages.js';
16
- import type { ResolutionEvidence } from '../types.js';
17
- import type { ShadowDiff } from './diff.js';
18
- export interface LanguageParityRow {
19
- readonly language: SupportedLanguages;
20
- readonly totalCalls: number;
21
- readonly bothAgree: number;
22
- readonly onlyLegacy: number;
23
- readonly onlyNew: number;
24
- readonly bothDisagree: number;
25
- readonly bothEmpty: number;
26
- /**
27
- * Fraction in [0, 1]. Numerator = `bothAgree`; denominator = "calls where
28
- * at least one side resolved" = `totalCalls - bothEmpty`.
29
- *
30
- * When the denominator is 0 (all calls for this language were
31
- * `both-empty`), returns 0. Callers rendering the dashboard should treat
32
- * a 0 parity alongside `totalCalls === bothEmpty` as "no signal" rather
33
- * than "total disagreement".
34
- */
35
- readonly parity: number;
36
- /**
37
- * Divergence signals broken down by `ResolutionEvidence.kind`. Sourced
38
- * from `ShadowDiff.evidenceDelta` on non-agreeing rows only — `both-agree`
39
- * and `both-empty` do not contribute.
40
- */
41
- readonly evidenceBreakdown: ReadonlyMap<ResolutionEvidence['kind'], number>;
42
- }
43
- export interface ShadowParityReport {
44
- readonly generatedAt: string;
45
- readonly perLanguage: readonly LanguageParityRow[];
46
- readonly overall: Omit<LanguageParityRow, 'language' | 'evidenceBreakdown'>;
47
- }
48
- /**
49
- * Aggregate a stream of `ShadowDiff` records into a `ShadowParityReport`,
50
- * bucketed by language. Pure function.
51
- *
52
- * - `perLanguage` rows are sorted alphabetically by `SupportedLanguages`
53
- * value for stable JSON output (the dashboard reads
54
- * `.gitnexus/shadow-parity/latest.json` and diffing snapshots is useful).
55
- * - `overall` is the column-wise sum across languages.
56
- * - `generatedAt` is injected via the `now` parameter so tests stay
57
- * deterministic; production callers let it default to `new Date()`.
58
- */
59
- export declare function aggregateDiffs(diffs: readonly {
60
- readonly language: SupportedLanguages;
61
- readonly diff: ShadowDiff;
62
- }[], now?: Date): ShadowParityReport;
63
- //# sourceMappingURL=aggregate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"aggregate.d.ts","sourceRoot":"","sources":["../../../src/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Shadow-mode aggregation — per-language parity %, per-evidence-kind
3
- * breakdown of divergences. Consumed by the parity dashboard (RING2-PKG-5).
4
- *
5
- * Pure functions; no I/O. The harness persists per-run JSON; the dashboard
6
- * reads `.gitnexus/shadow-parity/latest.json` and renders.
7
- *
8
- * Related types — `ShadowAgreement`, `ShadowCallsite`, `ShadowDiff` — are
9
- * defined alongside `diffResolutions` in `./diff.ts` and re-exported
10
- * through the top-level `gitnexus-shared` barrel. Consumers import all
11
- * three from `gitnexus-shared`, not from this module.
12
- *
13
- * Part of RFC #909 Ring 2 SHARED — #918.
14
- */
15
- // ─── Public API ─────────────────────────────────────────────────────────────
16
- /**
17
- * Aggregate a stream of `ShadowDiff` records into a `ShadowParityReport`,
18
- * bucketed by language. Pure function.
19
- *
20
- * - `perLanguage` rows are sorted alphabetically by `SupportedLanguages`
21
- * value for stable JSON output (the dashboard reads
22
- * `.gitnexus/shadow-parity/latest.json` and diffing snapshots is useful).
23
- * - `overall` is the column-wise sum across languages.
24
- * - `generatedAt` is injected via the `now` parameter so tests stay
25
- * deterministic; production callers let it default to `new Date()`.
26
- */
27
- export function aggregateDiffs(diffs, now = new Date()) {
28
- const perLanguageMap = new Map();
29
- for (const { language, diff } of diffs) {
30
- let counts = perLanguageMap.get(language);
31
- if (!counts) {
32
- counts = makeEmptyCounts();
33
- perLanguageMap.set(language, counts);
34
- }
35
- tallyDiff(counts, diff);
36
- }
37
- const perLanguage = Array.from(perLanguageMap.entries())
38
- .map(([language, counts]) => buildRow(language, counts))
39
- .sort((a, b) => a.language.localeCompare(b.language));
40
- const overall = buildOverallRow(perLanguage);
41
- return {
42
- generatedAt: now.toISOString(),
43
- perLanguage,
44
- overall,
45
- };
46
- }
47
- function makeEmptyCounts() {
48
- return {
49
- totalCalls: 0,
50
- bothAgree: 0,
51
- onlyLegacy: 0,
52
- onlyNew: 0,
53
- bothDisagree: 0,
54
- bothEmpty: 0,
55
- evidenceBreakdown: new Map(),
56
- };
57
- }
58
- function tallyDiff(counts, diff) {
59
- counts.totalCalls += 1;
60
- incrementAgreement(counts, diff.agreement);
61
- if (diff.agreement === 'both-agree' || diff.agreement === 'both-empty')
62
- return;
63
- for (const ev of diff.evidenceDelta) {
64
- counts.evidenceBreakdown.set(ev.kind, (counts.evidenceBreakdown.get(ev.kind) ?? 0) + 1);
65
- }
66
- }
67
- function incrementAgreement(counts, agreement) {
68
- switch (agreement) {
69
- case 'both-agree':
70
- counts.bothAgree += 1;
71
- return;
72
- case 'only-legacy':
73
- counts.onlyLegacy += 1;
74
- return;
75
- case 'only-new':
76
- counts.onlyNew += 1;
77
- return;
78
- case 'both-disagree':
79
- counts.bothDisagree += 1;
80
- return;
81
- case 'both-empty':
82
- counts.bothEmpty += 1;
83
- return;
84
- }
85
- }
86
- function buildRow(language, counts) {
87
- const resolved = counts.totalCalls - counts.bothEmpty;
88
- const parity = resolved > 0 ? counts.bothAgree / resolved : 0;
89
- return {
90
- language,
91
- totalCalls: counts.totalCalls,
92
- bothAgree: counts.bothAgree,
93
- onlyLegacy: counts.onlyLegacy,
94
- onlyNew: counts.onlyNew,
95
- bothDisagree: counts.bothDisagree,
96
- bothEmpty: counts.bothEmpty,
97
- parity,
98
- // Freeze via `new Map` on a sorted-kind copy so downstream consumers
99
- // can't mutate the aggregator's internal state.
100
- evidenceBreakdown: new Map(Array.from(counts.evidenceBreakdown.entries()).sort(([a], [b]) => a.localeCompare(b))),
101
- };
102
- }
103
- function buildOverallRow(perLanguage) {
104
- let totalCalls = 0;
105
- let bothAgree = 0;
106
- let onlyLegacy = 0;
107
- let onlyNew = 0;
108
- let bothDisagree = 0;
109
- let bothEmpty = 0;
110
- for (const row of perLanguage) {
111
- totalCalls += row.totalCalls;
112
- bothAgree += row.bothAgree;
113
- onlyLegacy += row.onlyLegacy;
114
- onlyNew += row.onlyNew;
115
- bothDisagree += row.bothDisagree;
116
- bothEmpty += row.bothEmpty;
117
- }
118
- const resolved = totalCalls - bothEmpty;
119
- const parity = resolved > 0 ? bothAgree / resolved : 0;
120
- return { totalCalls, bothAgree, onlyLegacy, onlyNew, bothDisagree, bothEmpty, parity };
121
- }
122
- //# sourceMappingURL=aggregate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"aggregate.js","sourceRoot":"","sources":["../../../src/scope-resolution/shadow/aggregate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAwCH,+EAA+E;AAE/E;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAsF,EACtF,MAAY,IAAI,IAAI,EAAE;IAEtB,MAAM,cAAc,GAAG,IAAI,GAAG,EAAqC,CAAC;IAEpE,KAAK,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,KAAK,EAAE,CAAC;QACvC,IAAI,MAAM,GAAG,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,GAAG,eAAe,EAAE,CAAC;YAC3B,cAAc,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC;QACD,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,MAAM,WAAW,GAAwB,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;SAC1E,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;SACvD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IAExD,MAAM,OAAO,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;IAE7C,OAAO;QACL,WAAW,EAAE,GAAG,CAAC,WAAW,EAAE;QAC9B,WAAW;QACX,OAAO;KACR,CAAC;AACJ,CAAC;AAcD,SA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AC,YAAY,CAAC;QACjC,SAAS,IAAI,GAAG,CAAC,SAAS,CAAC;IAC7B,CAAC;IACD,MAAM,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IACxC,MAAM,MAAM,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;AACzF,CAAC"}
@@ -1,59 +0,0 @@
1
- /**
2
- * Shadow-mode diff logic — RFC §6.3.
3
- *
4
- * Pure comparison logic for shadow mode. Takes two `Resolution[]` (legacy
5
- * DAG result + new scope-based registry result) and produces a structured
6
- * diff record for the parity dashboard.
7
- *
8
- * Consumed by the Ring 2 PKG shadow harness (#923), which dual-runs each
9
- * call through legacy + new paths, diffs results, and persists per-run JSON
10
- * for the parity dashboard.
11
- *
12
- * Part of RFC #909 Ring 2 SHARED — #918.
13
- */
14
- import type { Resolution, ResolutionEvidence } from '../types.js';
15
- export type ShadowAgreement = 'both-agree' | 'only-legacy' | 'only-new' | 'both-disagree' | 'both-empty';
16
- export interface ShadowDiff {
17
- readonly callsite: ShadowCallsite;
18
- readonly legacy: Resolution | null;
19
- readonly newResult: Resolution | null;
20
- readonly agreement: ShadowAgreement;
21
- /**
22
- * Symmetric difference of the two top resolutions' `evidence` arrays,
23
- * keyed on `ResolutionEvidence.kind`.
24
- *
25
- * - For `'both-agree'` and `'both-empty'` agreements, always empty.
26
- * - For `'both-disagree'`, contains evidence kinds present on exactly one
27
- * side (not in both).
28
- * - For `'only-legacy'`, contains all of legacy's top evidence.
29
- * - For `'only-new'`, contains all of new's top evidence.
30
- */
31
- readonly evidenceDelta: readonly ResolutionEvidence[];
32
- }
33
- export interface ShadowCallsite {
34
- readonly filePath: string;
35
- readonly line: number;
36
- readonly col: number;
37
- readonly calledName: string;
38
- }
39
- /**
40
- * Compare two `Resolution[]` arrays (top matches at `[0]`) and produce a
41
- * `ShadowDiff`. Pure function.
42
- *
43
- * Agreement rules:
44
- * - both arrays empty → `'both-empty'`, `evidenceDelta: []`
45
- * - legacy empty, new non-empty → `'only-new'`, `evidenceDelta` = new's top evidence
46
- * - legacy non-empty, new empty → `'only-legacy'`, `evidenceDelta` = legacy's top evidence
47
- * - both non-empty, same top `def.nodeId` → `'both-agree'`, `evidenceDelta: []`
48
- * - both non-empty, different top `def.nodeId` → `'both-disagree'`,
49
- * `evidenceDelta` = symmetric difference by `ResolutionEvidence.kind`
50
- * (first occurrence of a kind-only-on-legacy then kind-only-on-new; order
51
- * preserved from input arrays)
52
- *
53
- * Evidence-delta rationale: callers aggregating divergences want to know
54
- * which signal kinds explain a disagreement. Keying on `kind` (not full
55
- * equality over `weight`/`note`) avoids spurious deltas when the same
56
- * signal fires with slightly different calibration weights on each side.
57
- */
58
- export declare function diffResolutions(callsite: ShadowCallsite, legacy: readonly Resolution[], newResult: readonly Resolution[]): ShadowDiff;
59
- //# sourceMappingURL=diff.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../src/scope-resolution/shadow/diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAIlE,MAAM,MAAM,eAAe,GACvB,YAAY,GACZ,aAAa,GACb,UAAU,GACV,eAAe,GACf,YAAY,CAAC;AAEjB,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC;;;;;;;;;OASG;IACH,QAAQ,CAAC,aAAa,EAAE,SAAS,kBAAkB,EAAE,CAAC;CACvD;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAID;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,SAAS,UAAU,EAAE,EAC7B,SAAS,EAAE,SAAS,UAAU,EAAE,GAC/B,UAAU,CAoBZ"}
@@ -1,79 +0,0 @@
1
- /**
2
- * Shadow-mode diff logic — RFC §6.3.
3
- *
4
- * Pure comparison logic for shadow mode. Takes two `Resolution[]` (legacy
5
- * DAG result + new scope-based registry result) and produces a structured
6
- * diff record for the parity dashboard.
7
- *
8
- * Consumed by the Ring 2 PKG shadow harness (#923), which dual-runs each
9
- * call through legacy + new paths, diffs results, and persists per-run JSON
10
- * for the parity dashboard.
11
- *
12
- * Part of RFC #909 Ring 2 SHARED — #918.
13
- */
14
- // ─── Public API ─────────────────────────────────────────────────────────────
15
- /**
16
- * Compare two `Resolution[]` arrays (top matches at `[0]`) and produce a
17
- * `ShadowDiff`. Pure function.
18
- *
19
- * Agreement rules:
20
- * - both arrays empty → `'both-empty'`, `evidenceDelta: []`
21
- * - legacy empty, new non-empty → `'only-new'`, `evidenceDelta` = new's top evidence
22
- * - legacy non-empty, new empty → `'only-legacy'`, `evidenceDelta` = legacy's top evidence
23
- * - both non-empty, same top `def.nodeId` → `'both-agree'`, `evidenceDelta: []`
24
- * - both non-empty, different top `def.nodeId` → `'both-disagree'`,
25
- * `evidenceDelta` = symmetric difference by `ResolutionEvidence.kind`
26
- * (first occurrence of a kind-only-on-legacy then kind-only-on-new; order
27
- * preserved from input arrays)
28
- *
29
- * Evidence-delta rationale: callers aggregating divergences want to know
30
- * which signal kinds explain a disagreement. Keying on `kind` (not full
31
- * equality over `weight`/`note`) avoids spurious deltas when the same
32
- * signal fires with slightly different calibration weights on each side.
33
- */
34
- export function diffResolutions(callsite, legacy, newResult) {
35
- const legacyTop = legacy.length > 0 ? legacy[0] : null;
36
- const newTop = newResult.length > 0 ? newResult[0] : null;
37
- const agreement = (() => {
38
- if (legacyTop === null && newTop === null)
39
- return 'both-empty';
40
- if (legacyTop === null)
41
- return 'only-new';
42
- if (newTop === null)
43
- return 'only-legacy';
44
- return legacyTop.def.nodeId === newTop.def.nodeId ? 'both-agree' : 'both-disagree';
45
- })();
46
- const evidenceDelta = computeEvidenceDelta(legacyTop, newTop, agreement);
47
- return {
48
- callsite,
49
- legacy: legacyTop,
50
- newResult: newTop,
51
- agreement,
52
- evidenceDelta,
53
- };
54
- }
55
- // ─── Internal helpers ───────────────────────────────────────────────────────
56
- /**
57
- * Symmetric difference of two evidence arrays, keyed on
58
- * `ResolutionEvidence.kind`. Preserves input order: legacy-only signals
59
- * first (in legacy's original order), then new-only signals (in new's order).
60
- *
61
- * For `'both-agree'` / `'both-empty'` the delta is empty by contract. For
62
- * `'only-legacy'` / `'only-new'` one side's evidence is the delta (nothing to
63
- * subtract against).
64
- */
65
- function computeEvidenceDelta(legacy, newResult, agreement) {
66
- if (agreement === 'both-agree' || agreement === 'both-empty')
67
- return [];
68
- if (agreement === 'only-legacy')
69
- return legacy.evidence;
70
- if (agreement === 'only-new')
71
- return newResult.evidence;
72
- // both-disagree: symmetric difference keyed on `kind`
73
- const legacyKinds = new Set(legacy.evidence.map((e) => e.kind));
74
- const newKinds = new Set(newResult.evidence.map((e) => e.kind));
75
- const onlyInLegacy = legacy.evidence.filter((e) => !newKinds.has(e.kind));
76
- const onlyInNew = newResult.evidence.filter((e) => !legacyKinds.has(e.kind));
77
- return [...onlyInLegacy, ...onlyInNew];
78
- }
79
- //# sourceMappingURL=diff.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"diff.js","sourceRoot":"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