@opensip-cli/graph 0.1.0
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.
- package/LICENSE +202 -0
- package/NOTICE +8 -0
- package/README.md +31 -0
- package/dist/__tests__/baseline-plane.test.d.ts +11 -0
- package/dist/__tests__/baseline-plane.test.d.ts.map +1 -0
- package/dist/__tests__/baseline-plane.test.js +60 -0
- package/dist/__tests__/baseline-plane.test.js.map +1 -0
- package/dist/__tests__/cache/engine-version.test.d.ts +12 -0
- package/dist/__tests__/cache/engine-version.test.d.ts.map +1 -0
- package/dist/__tests__/cache/engine-version.test.js +79 -0
- package/dist/__tests__/cache/engine-version.test.js.map +1 -0
- package/dist/__tests__/cache/invalidate.test.d.ts +9 -0
- package/dist/__tests__/cache/invalidate.test.d.ts.map +1 -0
- package/dist/__tests__/cache/invalidate.test.js +228 -0
- package/dist/__tests__/cache/invalidate.test.js.map +1 -0
- package/dist/__tests__/cli/contribution-from-signals.test.d.ts +17 -0
- package/dist/__tests__/cli/contribution-from-signals.test.d.ts.map +1 -0
- package/dist/__tests__/cli/contribution-from-signals.test.js +89 -0
- package/dist/__tests__/cli/contribution-from-signals.test.js.map +1 -0
- package/dist/__tests__/cli/detect.test.d.ts +2 -0
- package/dist/__tests__/cli/detect.test.d.ts.map +1 -0
- package/dist/__tests__/cli/detect.test.js +96 -0
- package/dist/__tests__/cli/detect.test.js.map +1 -0
- package/dist/__tests__/cli/graph-config.test.d.ts +9 -0
- package/dist/__tests__/cli/graph-config.test.d.ts.map +1 -0
- package/dist/__tests__/cli/graph-config.test.js +113 -0
- package/dist/__tests__/cli/graph-config.test.js.map +1 -0
- package/dist/__tests__/cli/graph-execute.test.d.ts +9 -0
- package/dist/__tests__/cli/graph-execute.test.d.ts.map +1 -0
- package/dist/__tests__/cli/graph-execute.test.js +434 -0
- package/dist/__tests__/cli/graph-execute.test.js.map +1 -0
- package/dist/__tests__/cli/graph.test.d.ts +12 -0
- package/dist/__tests__/cli/graph.test.d.ts.map +1 -0
- package/dist/__tests__/cli/graph.test.js +589 -0
- package/dist/__tests__/cli/graph.test.js.map +1 -0
- package/dist/__tests__/cli/heap-preflight.test.d.ts +11 -0
- package/dist/__tests__/cli/heap-preflight.test.d.ts.map +1 -0
- package/dist/__tests__/cli/heap-preflight.test.js +150 -0
- package/dist/__tests__/cli/heap-preflight.test.js.map +1 -0
- package/dist/__tests__/cli/language-mismatch.test.d.ts +10 -0
- package/dist/__tests__/cli/language-mismatch.test.d.ts.map +1 -0
- package/dist/__tests__/cli/language-mismatch.test.js +155 -0
- package/dist/__tests__/cli/language-mismatch.test.js.map +1 -0
- package/dist/__tests__/cli/lookup.test.d.ts +7 -0
- package/dist/__tests__/cli/lookup.test.d.ts.map +1 -0
- package/dist/__tests__/cli/lookup.test.js +104 -0
- package/dist/__tests__/cli/lookup.test.js.map +1 -0
- package/dist/__tests__/cli/orchestrate.test.d.ts +12 -0
- package/dist/__tests__/cli/orchestrate.test.d.ts.map +1 -0
- package/dist/__tests__/cli/orchestrate.test.js +315 -0
- package/dist/__tests__/cli/orchestrate.test.js.map +1 -0
- package/dist/__tests__/cli/positional-paths.test.d.ts +5 -0
- package/dist/__tests__/cli/positional-paths.test.d.ts.map +1 -0
- package/dist/__tests__/cli/positional-paths.test.js +87 -0
- package/dist/__tests__/cli/positional-paths.test.js.map +1 -0
- package/dist/__tests__/cli/pressure-monitor.test.d.ts +11 -0
- package/dist/__tests__/cli/pressure-monitor.test.d.ts.map +1 -0
- package/dist/__tests__/cli/pressure-monitor.test.js +94 -0
- package/dist/__tests__/cli/pressure-monitor.test.js.map +1 -0
- package/dist/__tests__/cli/sarif-export.test.d.ts +8 -0
- package/dist/__tests__/cli/sarif-export.test.d.ts.map +1 -0
- package/dist/__tests__/cli/sarif-export.test.js +94 -0
- package/dist/__tests__/cli/sarif-export.test.js.map +1 -0
- package/dist/__tests__/cli/session-contract.test.d.ts +17 -0
- package/dist/__tests__/cli/session-contract.test.d.ts.map +1 -0
- package/dist/__tests__/cli/session-contract.test.js +225 -0
- package/dist/__tests__/cli/session-contract.test.js.map +1 -0
- package/dist/__tests__/cli/symbol-index.test.d.ts +7 -0
- package/dist/__tests__/cli/symbol-index.test.d.ts.map +1 -0
- package/dist/__tests__/cli/symbol-index.test.js +117 -0
- package/dist/__tests__/cli/symbol-index.test.js.map +1 -0
- package/dist/__tests__/cli/tool-show-mode.test.d.ts +10 -0
- package/dist/__tests__/cli/tool-show-mode.test.d.ts.map +1 -0
- package/dist/__tests__/cli/tool-show-mode.test.js +128 -0
- package/dist/__tests__/cli/tool-show-mode.test.js.map +1 -0
- package/dist/__tests__/cli/workspace-runner-polyglot.test.d.ts +10 -0
- package/dist/__tests__/cli/workspace-runner-polyglot.test.d.ts.map +1 -0
- package/dist/__tests__/cli/workspace-runner-polyglot.test.js +120 -0
- package/dist/__tests__/cli/workspace-runner-polyglot.test.js.map +1 -0
- package/dist/__tests__/graph-catalog-drift.test.d.ts +24 -0
- package/dist/__tests__/graph-catalog-drift.test.d.ts.map +1 -0
- package/dist/__tests__/graph-catalog-drift.test.js +34 -0
- package/dist/__tests__/graph-catalog-drift.test.js.map +1 -0
- package/dist/__tests__/internal-surface.test.d.ts +17 -0
- package/dist/__tests__/internal-surface.test.d.ts.map +1 -0
- package/dist/__tests__/internal-surface.test.js +45 -0
- package/dist/__tests__/internal-surface.test.js.map +1 -0
- package/dist/__tests__/lang-adapter/body-digest.test.d.ts +13 -0
- package/dist/__tests__/lang-adapter/body-digest.test.d.ts.map +1 -0
- package/dist/__tests__/lang-adapter/body-digest.test.js +51 -0
- package/dist/__tests__/lang-adapter/body-digest.test.js.map +1 -0
- package/dist/__tests__/lang-adapter/edge-helpers.test.d.ts +12 -0
- package/dist/__tests__/lang-adapter/edge-helpers.test.d.ts.map +1 -0
- package/dist/__tests__/lang-adapter/edge-helpers.test.js +147 -0
- package/dist/__tests__/lang-adapter/edge-helpers.test.js.map +1 -0
- package/dist/__tests__/lang-adapter/registry.test.d.ts +9 -0
- package/dist/__tests__/lang-adapter/registry.test.d.ts.map +1 -0
- package/dist/__tests__/lang-adapter/registry.test.js +228 -0
- package/dist/__tests__/lang-adapter/registry.test.js.map +1 -0
- package/dist/__tests__/persistence/catalog-repo.test.d.ts +2 -0
- package/dist/__tests__/persistence/catalog-repo.test.d.ts.map +1 -0
- package/dist/__tests__/persistence/catalog-repo.test.js +188 -0
- package/dist/__tests__/persistence/catalog-repo.test.js.map +1 -0
- package/dist/__tests__/persistence/session-payload.test.d.ts +2 -0
- package/dist/__tests__/persistence/session-payload.test.d.ts.map +1 -0
- package/dist/__tests__/persistence/session-payload.test.js +81 -0
- package/dist/__tests__/persistence/session-payload.test.js.map +1 -0
- package/dist/__tests__/persistence/session-replay.test.d.ts +10 -0
- package/dist/__tests__/persistence/session-replay.test.d.ts.map +1 -0
- package/dist/__tests__/persistence/session-replay.test.js +196 -0
- package/dist/__tests__/persistence/session-replay.test.js.map +1 -0
- package/dist/__tests__/public-api.test.d.ts +19 -0
- package/dist/__tests__/public-api.test.d.ts.map +1 -0
- package/dist/__tests__/public-api.test.js +96 -0
- package/dist/__tests__/public-api.test.js.map +1 -0
- package/dist/__tests__/render/catalog-json-types.test.d.ts +10 -0
- package/dist/__tests__/render/catalog-json-types.test.d.ts.map +1 -0
- package/dist/__tests__/render/catalog-json-types.test.js +121 -0
- package/dist/__tests__/render/catalog-json-types.test.js.map +1 -0
- package/dist/__tests__/render/catalog-json.test.d.ts +19 -0
- package/dist/__tests__/render/catalog-json.test.d.ts.map +1 -0
- package/dist/__tests__/render/catalog-json.test.js +435 -0
- package/dist/__tests__/render/catalog-json.test.js.map +1 -0
- package/dist/__tests__/render/opensip-id-derivation.test.d.ts +21 -0
- package/dist/__tests__/render/opensip-id-derivation.test.d.ts.map +1 -0
- package/dist/__tests__/render/opensip-id-derivation.test.js +159 -0
- package/dist/__tests__/render/opensip-id-derivation.test.js.map +1 -0
- package/dist/__tests__/render/rule-id-mapping.test.d.ts +13 -0
- package/dist/__tests__/render/rule-id-mapping.test.d.ts.map +1 -0
- package/dist/__tests__/render/rule-id-mapping.test.js +50 -0
- package/dist/__tests__/render/rule-id-mapping.test.js.map +1 -0
- package/dist/__tests__/render/sarif-opensip.test.d.ts +20 -0
- package/dist/__tests__/render/sarif-opensip.test.d.ts.map +1 -0
- package/dist/__tests__/render/sarif-opensip.test.js +235 -0
- package/dist/__tests__/render/sarif-opensip.test.js.map +1 -0
- package/dist/__tests__/resolution-mode.test.d.ts +10 -0
- package/dist/__tests__/resolution-mode.test.d.ts.map +1 -0
- package/dist/__tests__/resolution-mode.test.js +96 -0
- package/dist/__tests__/resolution-mode.test.js.map +1 -0
- package/dist/__tests__/resolve-callee.test.d.ts +2 -0
- package/dist/__tests__/resolve-callee.test.d.ts.map +1 -0
- package/dist/__tests__/resolve-callee.test.js +119 -0
- package/dist/__tests__/resolve-callee.test.js.map +1 -0
- package/dist/__tests__/rules/_entry-points.test.d.ts +8 -0
- package/dist/__tests__/rules/_entry-points.test.d.ts.map +1 -0
- package/dist/__tests__/rules/_entry-points.test.js +74 -0
- package/dist/__tests__/rules/_entry-points.test.js.map +1 -0
- package/dist/__tests__/rules/_helpers.d.ts +18 -0
- package/dist/__tests__/rules/_helpers.d.ts.map +1 -0
- package/dist/__tests__/rules/_helpers.js +72 -0
- package/dist/__tests__/rules/_helpers.js.map +1 -0
- package/dist/__tests__/rules/always-throws-branch.test.d.ts +9 -0
- package/dist/__tests__/rules/always-throws-branch.test.d.ts.map +1 -0
- package/dist/__tests__/rules/always-throws-branch.test.js +113 -0
- package/dist/__tests__/rules/always-throws-branch.test.js.map +1 -0
- package/dist/__tests__/rules/cycle-and-coupling.test.d.ts +13 -0
- package/dist/__tests__/rules/cycle-and-coupling.test.d.ts.map +1 -0
- package/dist/__tests__/rules/cycle-and-coupling.test.js +224 -0
- package/dist/__tests__/rules/cycle-and-coupling.test.js.map +1 -0
- package/dist/__tests__/rules/duplicated-function-body-config.test.d.ts +8 -0
- package/dist/__tests__/rules/duplicated-function-body-config.test.d.ts.map +1 -0
- package/dist/__tests__/rules/duplicated-function-body-config.test.js +132 -0
- package/dist/__tests__/rules/duplicated-function-body-config.test.js.map +1 -0
- package/dist/__tests__/rules/duplicated-function-body-cross-package.test.d.ts +10 -0
- package/dist/__tests__/rules/duplicated-function-body-cross-package.test.d.ts.map +1 -0
- package/dist/__tests__/rules/duplicated-function-body-cross-package.test.js +274 -0
- package/dist/__tests__/rules/duplicated-function-body-cross-package.test.js.map +1 -0
- package/dist/__tests__/rules/feature-column-parity.test.d.ts +11 -0
- package/dist/__tests__/rules/feature-column-parity.test.d.ts.map +1 -0
- package/dist/__tests__/rules/feature-column-parity.test.js +169 -0
- package/dist/__tests__/rules/feature-column-parity.test.js.map +1 -0
- package/dist/__tests__/rules/high-blast-untested.test.d.ts +13 -0
- package/dist/__tests__/rules/high-blast-untested.test.d.ts.map +1 -0
- package/dist/__tests__/rules/high-blast-untested.test.js +108 -0
- package/dist/__tests__/rules/high-blast-untested.test.js.map +1 -0
- package/dist/__tests__/rules/large-function.test.d.ts +11 -0
- package/dist/__tests__/rules/large-function.test.d.ts.map +1 -0
- package/dist/__tests__/rules/large-function.test.js +105 -0
- package/dist/__tests__/rules/large-function.test.js.map +1 -0
- package/dist/__tests__/rules/no-side-effect-path.test.d.ts +10 -0
- package/dist/__tests__/rules/no-side-effect-path.test.d.ts.map +1 -0
- package/dist/__tests__/rules/no-side-effect-path.test.js +301 -0
- package/dist/__tests__/rules/no-side-effect-path.test.js.map +1 -0
- package/dist/__tests__/rules/orphan-subtree-config.test.d.ts +8 -0
- package/dist/__tests__/rules/orphan-subtree-config.test.d.ts.map +1 -0
- package/dist/__tests__/rules/orphan-subtree-config.test.js +176 -0
- package/dist/__tests__/rules/orphan-subtree-config.test.js.map +1 -0
- package/dist/__tests__/rules/registry.test.d.ts +11 -0
- package/dist/__tests__/rules/registry.test.d.ts.map +1 -0
- package/dist/__tests__/rules/registry.test.js +50 -0
- package/dist/__tests__/rules/registry.test.js.map +1 -0
- package/dist/__tests__/rules/severity-override.test.d.ts +11 -0
- package/dist/__tests__/rules/severity-override.test.d.ts.map +1 -0
- package/dist/__tests__/rules/severity-override.test.js +67 -0
- package/dist/__tests__/rules/severity-override.test.js.map +1 -0
- package/dist/__tests__/rules/test-only-reachable.test.d.ts +9 -0
- package/dist/__tests__/rules/test-only-reachable.test.d.ts.map +1 -0
- package/dist/__tests__/rules/test-only-reachable.test.js +142 -0
- package/dist/__tests__/rules/test-only-reachable.test.js.map +1 -0
- package/dist/__tests__/rules/wide-function.test.d.ts +9 -0
- package/dist/__tests__/rules/wide-function.test.d.ts.map +1 -0
- package/dist/__tests__/rules/wide-function.test.js +64 -0
- package/dist/__tests__/rules/wide-function.test.js.map +1 -0
- package/dist/__tests__/test-utils/with-graph-scope.d.ts +14 -0
- package/dist/__tests__/test-utils/with-graph-scope.d.ts.map +1 -0
- package/dist/__tests__/test-utils/with-graph-scope.js +26 -0
- package/dist/__tests__/test-utils/with-graph-scope.js.map +1 -0
- package/dist/__tests__/tool-branches.test.d.ts +18 -0
- package/dist/__tests__/tool-branches.test.d.ts.map +1 -0
- package/dist/__tests__/tool-branches.test.js +262 -0
- package/dist/__tests__/tool-branches.test.js.map +1 -0
- package/dist/__tests__/tool-register.test.d.ts +16 -0
- package/dist/__tests__/tool-register.test.d.ts.map +1 -0
- package/dist/__tests__/tool-register.test.js +419 -0
- package/dist/__tests__/tool-register.test.js.map +1 -0
- package/dist/__tests__/tool.test.d.ts +18 -0
- package/dist/__tests__/tool.test.d.ts.map +1 -0
- package/dist/__tests__/tool.test.js +65 -0
- package/dist/__tests__/tool.test.js.map +1 -0
- package/dist/baseline-strategy.d.ts +28 -0
- package/dist/baseline-strategy.d.ts.map +1 -0
- package/dist/baseline-strategy.js +27 -0
- package/dist/baseline-strategy.js.map +1 -0
- package/dist/cache/engine-version.d.ts +69 -0
- package/dist/cache/engine-version.d.ts.map +1 -0
- package/dist/cache/engine-version.js +60 -0
- package/dist/cache/engine-version.js.map +1 -0
- package/dist/cache/invalidate.d.ts +60 -0
- package/dist/cache/invalidate.d.ts.map +1 -0
- package/dist/cache/invalidate.js +120 -0
- package/dist/cache/invalidate.js.map +1 -0
- package/dist/cli/__tests__/build-envelope.test.d.ts +8 -0
- package/dist/cli/__tests__/build-envelope.test.d.ts.map +1 -0
- package/dist/cli/__tests__/build-envelope.test.js +70 -0
- package/dist/cli/__tests__/build-envelope.test.js.map +1 -0
- package/dist/cli/__tests__/dispatch-envelope.test.d.ts +15 -0
- package/dist/cli/__tests__/dispatch-envelope.test.d.ts.map +1 -0
- package/dist/cli/__tests__/dispatch-envelope.test.js +73 -0
- package/dist/cli/__tests__/dispatch-envelope.test.js.map +1 -0
- package/dist/cli/__tests__/dispatch-suppression-root.test.d.ts +18 -0
- package/dist/cli/__tests__/dispatch-suppression-root.test.d.ts.map +1 -0
- package/dist/cli/__tests__/dispatch-suppression-root.test.js +91 -0
- package/dist/cli/__tests__/dispatch-suppression-root.test.js.map +1 -0
- package/dist/cli/__tests__/graph-config-schema.test.d.ts +7 -0
- package/dist/cli/__tests__/graph-config-schema.test.d.ts.map +1 -0
- package/dist/cli/__tests__/graph-config-schema.test.js +60 -0
- package/dist/cli/__tests__/graph-config-schema.test.js.map +1 -0
- package/dist/cli/__tests__/graph-gate-mode.test.d.ts +15 -0
- package/dist/cli/__tests__/graph-gate-mode.test.d.ts.map +1 -0
- package/dist/cli/__tests__/graph-gate-mode.test.js +99 -0
- package/dist/cli/__tests__/graph-gate-mode.test.js.map +1 -0
- package/dist/cli/__tests__/graph-recipes.test.d.ts +7 -0
- package/dist/cli/__tests__/graph-recipes.test.d.ts.map +1 -0
- package/dist/cli/__tests__/graph-recipes.test.js +24 -0
- package/dist/cli/__tests__/graph-recipes.test.js.map +1 -0
- package/dist/cli/__tests__/graph-report.test.d.ts +7 -0
- package/dist/cli/__tests__/graph-report.test.d.ts.map +1 -0
- package/dist/cli/__tests__/graph-report.test.js +138 -0
- package/dist/cli/__tests__/graph-report.test.js.map +1 -0
- package/dist/cli/__tests__/graph-tracer.test.d.ts +11 -0
- package/dist/cli/__tests__/graph-tracer.test.d.ts.map +1 -0
- package/dist/cli/__tests__/graph-tracer.test.js +41 -0
- package/dist/cli/__tests__/graph-tracer.test.js.map +1 -0
- package/dist/cli/__tests__/graph-worker.test.d.ts +13 -0
- package/dist/cli/__tests__/graph-worker.test.d.ts.map +1 -0
- package/dist/cli/__tests__/graph-worker.test.js +127 -0
- package/dist/cli/__tests__/graph-worker.test.js.map +1 -0
- package/dist/cli/__tests__/list-files.test.d.ts +12 -0
- package/dist/cli/__tests__/list-files.test.d.ts.map +1 -0
- package/dist/cli/__tests__/list-files.test.js +146 -0
- package/dist/cli/__tests__/list-files.test.js.map +1 -0
- package/dist/cli/__tests__/live-suppression-parity.test.d.ts +23 -0
- package/dist/cli/__tests__/live-suppression-parity.test.d.ts.map +1 -0
- package/dist/cli/__tests__/live-suppression-parity.test.js +136 -0
- package/dist/cli/__tests__/live-suppression-parity.test.js.map +1 -0
- package/dist/cli/__tests__/orchestrate-spans.test.d.ts +18 -0
- package/dist/cli/__tests__/orchestrate-spans.test.d.ts.map +1 -0
- package/dist/cli/__tests__/orchestrate-spans.test.js +108 -0
- package/dist/cli/__tests__/orchestrate-spans.test.js.map +1 -0
- package/dist/cli/__tests__/shard-worker.test.d.ts +10 -0
- package/dist/cli/__tests__/shard-worker.test.d.ts.map +1 -0
- package/dist/cli/__tests__/shard-worker.test.js +153 -0
- package/dist/cli/__tests__/shard-worker.test.js.map +1 -0
- package/dist/cli/__tests__/workspace-report.test.d.ts +6 -0
- package/dist/cli/__tests__/workspace-report.test.d.ts.map +1 -0
- package/dist/cli/__tests__/workspace-report.test.js +89 -0
- package/dist/cli/__tests__/workspace-report.test.js.map +1 -0
- package/dist/cli/apply-suppressions.d.ts +86 -0
- package/dist/cli/apply-suppressions.d.ts.map +1 -0
- package/dist/cli/apply-suppressions.js +101 -0
- package/dist/cli/apply-suppressions.js.map +1 -0
- package/dist/cli/apply-suppressions.test.d.ts +12 -0
- package/dist/cli/apply-suppressions.test.d.ts.map +1 -0
- package/dist/cli/apply-suppressions.test.js +85 -0
- package/dist/cli/apply-suppressions.test.js.map +1 -0
- package/dist/cli/build-envelope.d.ts +53 -0
- package/dist/cli/build-envelope.d.ts.map +1 -0
- package/dist/cli/build-envelope.js +88 -0
- package/dist/cli/build-envelope.js.map +1 -0
- package/dist/cli/detect.d.ts +37 -0
- package/dist/cli/detect.d.ts.map +1 -0
- package/dist/cli/detect.js +60 -0
- package/dist/cli/detect.js.map +1 -0
- package/dist/cli/equivalence-check-command.d.ts +45 -0
- package/dist/cli/equivalence-check-command.d.ts.map +1 -0
- package/dist/cli/equivalence-check-command.js +196 -0
- package/dist/cli/equivalence-check-command.js.map +1 -0
- package/dist/cli/graph/graph-aux-command-specs.d.ts +60 -0
- package/dist/cli/graph/graph-aux-command-specs.d.ts.map +1 -0
- package/dist/cli/graph/graph-aux-command-specs.js +390 -0
- package/dist/cli/graph/graph-aux-command-specs.js.map +1 -0
- package/dist/cli/graph/graph-command-spec.d.ts +43 -0
- package/dist/cli/graph/graph-command-spec.d.ts.map +1 -0
- package/dist/cli/graph/graph-command-spec.js +456 -0
- package/dist/cli/graph/graph-command-spec.js.map +1 -0
- package/dist/cli/graph-config-schema.d.ts +70 -0
- package/dist/cli/graph-config-schema.d.ts.map +1 -0
- package/dist/cli/graph-config-schema.js +68 -0
- package/dist/cli/graph-config-schema.js.map +1 -0
- package/dist/cli/graph-config.d.ts +53 -0
- package/dist/cli/graph-config.d.ts.map +1 -0
- package/dist/cli/graph-config.js +111 -0
- package/dist/cli/graph-config.js.map +1 -0
- package/dist/cli/graph-modes.d.ts +36 -0
- package/dist/cli/graph-modes.d.ts.map +1 -0
- package/dist/cli/graph-modes.js +161 -0
- package/dist/cli/graph-modes.js.map +1 -0
- package/dist/cli/graph-options.d.ts +143 -0
- package/dist/cli/graph-options.d.ts.map +1 -0
- package/dist/cli/graph-options.js +15 -0
- package/dist/cli/graph-options.js.map +1 -0
- package/dist/cli/graph-progress.d.ts +31 -0
- package/dist/cli/graph-progress.d.ts.map +1 -0
- package/dist/cli/graph-progress.js +56 -0
- package/dist/cli/graph-progress.js.map +1 -0
- package/dist/cli/graph-recipes.d.ts +23 -0
- package/dist/cli/graph-recipes.d.ts.map +1 -0
- package/dist/cli/graph-recipes.js +44 -0
- package/dist/cli/graph-recipes.js.map +1 -0
- package/dist/cli/graph-report.d.ts +79 -0
- package/dist/cli/graph-report.d.ts.map +1 -0
- package/dist/cli/graph-report.js +186 -0
- package/dist/cli/graph-report.js.map +1 -0
- package/dist/cli/graph-runner.d.ts +106 -0
- package/dist/cli/graph-runner.d.ts.map +1 -0
- package/dist/cli/graph-runner.js +274 -0
- package/dist/cli/graph-runner.js.map +1 -0
- package/dist/cli/graph-tracer.d.ts +27 -0
- package/dist/cli/graph-tracer.d.ts.map +1 -0
- package/dist/cli/graph-tracer.js +33 -0
- package/dist/cli/graph-tracer.js.map +1 -0
- package/dist/cli/graph-worker.d.ts +29 -0
- package/dist/cli/graph-worker.d.ts.map +1 -0
- package/dist/cli/graph-worker.js +86 -0
- package/dist/cli/graph-worker.js.map +1 -0
- package/dist/cli/graph.d.ts +171 -0
- package/dist/cli/graph.d.ts.map +1 -0
- package/dist/cli/graph.js +1041 -0
- package/dist/cli/graph.js.map +1 -0
- package/dist/cli/heap-preflight.d.ts +62 -0
- package/dist/cli/heap-preflight.d.ts.map +1 -0
- package/dist/cli/heap-preflight.js +176 -0
- package/dist/cli/heap-preflight.js.map +1 -0
- package/dist/cli/list-files.d.ts +37 -0
- package/dist/cli/list-files.d.ts.map +1 -0
- package/dist/cli/list-files.js +166 -0
- package/dist/cli/list-files.js.map +1 -0
- package/dist/cli/lookup.d.ts +19 -0
- package/dist/cli/lookup.d.ts.map +1 -0
- package/dist/cli/lookup.js +87 -0
- package/dist/cli/lookup.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/_equivalence-harness.d.ts +47 -0
- package/dist/cli/orchestrate/__tests__/_equivalence-harness.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/_equivalence-harness.js +331 -0
- package/dist/cli/orchestrate/__tests__/_equivalence-harness.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/_flat-large-fixture.d.ts +69 -0
- package/dist/cli/orchestrate/__tests__/_flat-large-fixture.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/_flat-large-fixture.js +181 -0
- package/dist/cli/orchestrate/__tests__/_flat-large-fixture.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/canonical-file-set.test.d.ts +8 -0
- package/dist/cli/orchestrate/__tests__/canonical-file-set.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/canonical-file-set.test.js +51 -0
- package/dist/cli/orchestrate/__tests__/canonical-file-set.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/catalog-builder-incremental.test.d.ts +9 -0
- package/dist/cli/orchestrate/__tests__/catalog-builder-incremental.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/catalog-builder-incremental.test.js +147 -0
- package/dist/cli/orchestrate/__tests__/catalog-builder-incremental.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/cross-shard-resolve.test.d.ts +12 -0
- package/dist/cli/orchestrate/__tests__/cross-shard-resolve.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/cross-shard-resolve.test.js +509 -0
- package/dist/cli/orchestrate/__tests__/cross-shard-resolve.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/determinism.test.d.ts +19 -0
- package/dist/cli/orchestrate/__tests__/determinism.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/determinism.test.js +163 -0
- package/dist/cli/orchestrate/__tests__/determinism.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/edge-identity.test.d.ts +9 -0
- package/dist/cli/orchestrate/__tests__/edge-identity.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/edge-identity.test.js +103 -0
- package/dist/cli/orchestrate/__tests__/edge-identity.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/equivalence-check.test.d.ts +10 -0
- package/dist/cli/orchestrate/__tests__/equivalence-check.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/equivalence-check.test.js +277 -0
- package/dist/cli/orchestrate/__tests__/equivalence-check.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/equivalence-repo-scale.test.d.ts +51 -0
- package/dist/cli/orchestrate/__tests__/equivalence-repo-scale.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/equivalence-repo-scale.test.js +183 -0
- package/dist/cli/orchestrate/__tests__/equivalence-repo-scale.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/equivalence.test.d.ts +47 -0
- package/dist/cli/orchestrate/__tests__/equivalence.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/equivalence.test.js +259 -0
- package/dist/cli/orchestrate/__tests__/equivalence.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/exact-boundary-recovery.test.d.ts +9 -0
- package/dist/cli/orchestrate/__tests__/exact-boundary-recovery.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/exact-boundary-recovery.test.js +105 -0
- package/dist/cli/orchestrate/__tests__/exact-boundary-recovery.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/export-index.test.d.ts +12 -0
- package/dist/cli/orchestrate/__tests__/export-index.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/export-index.test.js +346 -0
- package/dist/cli/orchestrate/__tests__/export-index.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/flat-large-fixture.test.d.ts +16 -0
- package/dist/cli/orchestrate/__tests__/flat-large-fixture.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/flat-large-fixture.test.js +99 -0
- package/dist/cli/orchestrate/__tests__/flat-large-fixture.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/flat-monorepo-strategy.test.d.ts +11 -0
- package/dist/cli/orchestrate/__tests__/flat-monorepo-strategy.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/flat-monorepo-strategy.test.js +271 -0
- package/dist/cli/orchestrate/__tests__/flat-monorepo-strategy.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/function-set-parity.test.d.ts +38 -0
- package/dist/cli/orchestrate/__tests__/function-set-parity.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/function-set-parity.test.js +163 -0
- package/dist/cli/orchestrate/__tests__/function-set-parity.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/incremental-merge.test.d.ts +8 -0
- package/dist/cli/orchestrate/__tests__/incremental-merge.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/incremental-merge.test.js +153 -0
- package/dist/cli/orchestrate/__tests__/incremental-merge.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/partition-files.test.d.ts +10 -0
- package/dist/cli/orchestrate/__tests__/partition-files.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/partition-files.test.js +104 -0
- package/dist/cli/orchestrate/__tests__/partition-files.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/resolution-completeness-floor.test.d.ts +21 -0
- package/dist/cli/orchestrate/__tests__/resolution-completeness-floor.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/resolution-completeness-floor.test.js +59 -0
- package/dist/cli/orchestrate/__tests__/resolution-completeness-floor.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/shard-model.test.d.ts +8 -0
- package/dist/cli/orchestrate/__tests__/shard-model.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/shard-model.test.js +77 -0
- package/dist/cli/orchestrate/__tests__/shard-model.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/shard-runner-spawn.test.d.ts +13 -0
- package/dist/cli/orchestrate/__tests__/shard-runner-spawn.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/shard-runner-spawn.test.js +103 -0
- package/dist/cli/orchestrate/__tests__/shard-runner-spawn.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/sharded-graph.test.d.ts +13 -0
- package/dist/cli/orchestrate/__tests__/sharded-graph.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/sharded-graph.test.js +257 -0
- package/dist/cli/orchestrate/__tests__/sharded-graph.test.js.map +1 -0
- package/dist/cli/orchestrate/__tests__/worker-pool.test.d.ts +6 -0
- package/dist/cli/orchestrate/__tests__/worker-pool.test.d.ts.map +1 -0
- package/dist/cli/orchestrate/__tests__/worker-pool.test.js +38 -0
- package/dist/cli/orchestrate/__tests__/worker-pool.test.js.map +1 -0
- package/dist/cli/orchestrate/cache-orchestrator.d.ts +42 -0
- package/dist/cli/orchestrate/cache-orchestrator.d.ts.map +1 -0
- package/dist/cli/orchestrate/cache-orchestrator.js +92 -0
- package/dist/cli/orchestrate/cache-orchestrator.js.map +1 -0
- package/dist/cli/orchestrate/canonical-file-set.d.ts +51 -0
- package/dist/cli/orchestrate/canonical-file-set.d.ts.map +1 -0
- package/dist/cli/orchestrate/canonical-file-set.js +58 -0
- package/dist/cli/orchestrate/canonical-file-set.js.map +1 -0
- package/dist/cli/orchestrate/catalog-builder.d.ts +121 -0
- package/dist/cli/orchestrate/catalog-builder.d.ts.map +1 -0
- package/dist/cli/orchestrate/catalog-builder.js +279 -0
- package/dist/cli/orchestrate/catalog-builder.js.map +1 -0
- package/dist/cli/orchestrate/catalog-stats.d.ts +31 -0
- package/dist/cli/orchestrate/catalog-stats.d.ts.map +1 -0
- package/dist/cli/orchestrate/catalog-stats.js +52 -0
- package/dist/cli/orchestrate/catalog-stats.js.map +1 -0
- package/dist/cli/orchestrate/cross-shard-resolve.d.ts +190 -0
- package/dist/cli/orchestrate/cross-shard-resolve.d.ts.map +1 -0
- package/dist/cli/orchestrate/cross-shard-resolve.js +523 -0
- package/dist/cli/orchestrate/cross-shard-resolve.js.map +1 -0
- package/dist/cli/orchestrate/edge-identity.d.ts +48 -0
- package/dist/cli/orchestrate/edge-identity.d.ts.map +1 -0
- package/dist/cli/orchestrate/edge-identity.js +68 -0
- package/dist/cli/orchestrate/edge-identity.js.map +1 -0
- package/dist/cli/orchestrate/equivalence-check.d.ts +227 -0
- package/dist/cli/orchestrate/equivalence-check.d.ts.map +1 -0
- package/dist/cli/orchestrate/equivalence-check.js +264 -0
- package/dist/cli/orchestrate/equivalence-check.js.map +1 -0
- package/dist/cli/orchestrate/exact-boundary-recovery.d.ts +33 -0
- package/dist/cli/orchestrate/exact-boundary-recovery.d.ts.map +1 -0
- package/dist/cli/orchestrate/exact-boundary-recovery.js +62 -0
- package/dist/cli/orchestrate/exact-boundary-recovery.js.map +1 -0
- package/dist/cli/orchestrate/flat-monorepo-strategy.d.ts +171 -0
- package/dist/cli/orchestrate/flat-monorepo-strategy.d.ts.map +1 -0
- package/dist/cli/orchestrate/flat-monorepo-strategy.js +328 -0
- package/dist/cli/orchestrate/flat-monorepo-strategy.js.map +1 -0
- package/dist/cli/orchestrate/incremental-merge.d.ts +46 -0
- package/dist/cli/orchestrate/incremental-merge.d.ts.map +1 -0
- package/dist/cli/orchestrate/incremental-merge.js +236 -0
- package/dist/cli/orchestrate/incremental-merge.js.map +1 -0
- package/dist/cli/orchestrate/partition-chunk.d.ts +36 -0
- package/dist/cli/orchestrate/partition-chunk.d.ts.map +1 -0
- package/dist/cli/orchestrate/partition-chunk.js +37 -0
- package/dist/cli/orchestrate/partition-chunk.js.map +1 -0
- package/dist/cli/orchestrate/partition-files.d.ts +52 -0
- package/dist/cli/orchestrate/partition-files.d.ts.map +1 -0
- package/dist/cli/orchestrate/partition-files.js +94 -0
- package/dist/cli/orchestrate/partition-files.js.map +1 -0
- package/dist/cli/orchestrate/resolution-trace.d.ts +11 -0
- package/dist/cli/orchestrate/resolution-trace.d.ts.map +1 -0
- package/dist/cli/orchestrate/resolution-trace.js +27 -0
- package/dist/cli/orchestrate/resolution-trace.js.map +1 -0
- package/dist/cli/orchestrate/shard-model.d.ts +99 -0
- package/dist/cli/orchestrate/shard-model.d.ts.map +1 -0
- package/dist/cli/orchestrate/shard-model.js +23 -0
- package/dist/cli/orchestrate/shard-model.js.map +1 -0
- package/dist/cli/orchestrate/shard-runner.d.ts +65 -0
- package/dist/cli/orchestrate/shard-runner.d.ts.map +1 -0
- package/dist/cli/orchestrate/shard-runner.js +169 -0
- package/dist/cli/orchestrate/shard-runner.js.map +1 -0
- package/dist/cli/orchestrate/sharded-graph.d.ts +86 -0
- package/dist/cli/orchestrate/sharded-graph.d.ts.map +1 -0
- package/dist/cli/orchestrate/sharded-graph.js +227 -0
- package/dist/cli/orchestrate/sharded-graph.js.map +1 -0
- package/dist/cli/orchestrate/types.d.ts +31 -0
- package/dist/cli/orchestrate/types.d.ts.map +1 -0
- package/dist/cli/orchestrate/types.js +24 -0
- package/dist/cli/orchestrate/types.js.map +1 -0
- package/dist/cli/orchestrate/worker-pool.d.ts +16 -0
- package/dist/cli/orchestrate/worker-pool.d.ts.map +1 -0
- package/dist/cli/orchestrate/worker-pool.js +39 -0
- package/dist/cli/orchestrate/worker-pool.js.map +1 -0
- package/dist/cli/orchestrate.d.ts +106 -0
- package/dist/cli/orchestrate.d.ts.map +1 -0
- package/dist/cli/orchestrate.js +228 -0
- package/dist/cli/orchestrate.js.map +1 -0
- package/dist/cli/positional-paths.d.ts +23 -0
- package/dist/cli/positional-paths.d.ts.map +1 -0
- package/dist/cli/positional-paths.js +64 -0
- package/dist/cli/positional-paths.js.map +1 -0
- package/dist/cli/pressure-monitor.d.ts +62 -0
- package/dist/cli/pressure-monitor.d.ts.map +1 -0
- package/dist/cli/pressure-monitor.js +110 -0
- package/dist/cli/pressure-monitor.js.map +1 -0
- package/dist/cli/profile.d.ts +82 -0
- package/dist/cli/profile.d.ts.map +1 -0
- package/dist/cli/profile.js +120 -0
- package/dist/cli/profile.js.map +1 -0
- package/dist/cli/report-data.d.ts +46 -0
- package/dist/cli/report-data.d.ts.map +1 -0
- package/dist/cli/report-data.js +48 -0
- package/dist/cli/report-data.js.map +1 -0
- package/dist/cli/resolve-adapters.d.ts +19 -0
- package/dist/cli/resolve-adapters.d.ts.map +1 -0
- package/dist/cli/resolve-adapters.js +38 -0
- package/dist/cli/resolve-adapters.js.map +1 -0
- package/dist/cli/sarif-export.d.ts +40 -0
- package/dist/cli/sarif-export.d.ts.map +1 -0
- package/dist/cli/sarif-export.js +69 -0
- package/dist/cli/sarif-export.js.map +1 -0
- package/dist/cli/shard-worker.d.ts +25 -0
- package/dist/cli/shard-worker.d.ts.map +1 -0
- package/dist/cli/shard-worker.js +98 -0
- package/dist/cli/shard-worker.js.map +1 -0
- package/dist/cli/symbol-index.d.ts +51 -0
- package/dist/cli/symbol-index.d.ts.map +1 -0
- package/dist/cli/symbol-index.js +120 -0
- package/dist/cli/symbol-index.js.map +1 -0
- package/dist/cli/workspace-report.d.ts +32 -0
- package/dist/cli/workspace-report.d.ts.map +1 -0
- package/dist/cli/workspace-report.js +107 -0
- package/dist/cli/workspace-report.js.map +1 -0
- package/dist/cli/workspace-runner.d.ts +104 -0
- package/dist/cli/workspace-runner.d.ts.map +1 -0
- package/dist/cli/workspace-runner.js +166 -0
- package/dist/cli/workspace-runner.js.map +1 -0
- package/dist/cross-package/export-index.d.ts +118 -0
- package/dist/cross-package/export-index.d.ts.map +1 -0
- package/dist/cross-package/export-index.js +296 -0
- package/dist/cross-package/export-index.js.map +1 -0
- package/dist/cross-package/posix-path.d.ts +16 -0
- package/dist/cross-package/posix-path.d.ts.map +1 -0
- package/dist/cross-package/posix-path.js +18 -0
- package/dist/cross-package/posix-path.js.map +1 -0
- package/dist/cross-package/resolve.d.ts +68 -0
- package/dist/cross-package/resolve.d.ts.map +1 -0
- package/dist/cross-package/resolve.js +83 -0
- package/dist/cross-package/resolve.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +61 -0
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +25 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +38 -0
- package/dist/internal.js.map +1 -0
- package/dist/lang-adapter/body-digest.d.ts +46 -0
- package/dist/lang-adapter/body-digest.d.ts.map +1 -0
- package/dist/lang-adapter/body-digest.js +49 -0
- package/dist/lang-adapter/body-digest.js.map +1 -0
- package/dist/lang-adapter/edge-helpers.d.ts +104 -0
- package/dist/lang-adapter/edge-helpers.d.ts.map +1 -0
- package/dist/lang-adapter/edge-helpers.js +120 -0
- package/dist/lang-adapter/edge-helpers.js.map +1 -0
- package/dist/lang-adapter/registry.d.ts +59 -0
- package/dist/lang-adapter/registry.d.ts.map +1 -0
- package/dist/lang-adapter/registry.js +100 -0
- package/dist/lang-adapter/registry.js.map +1 -0
- package/dist/lang-adapter/selector.d.ts +39 -0
- package/dist/lang-adapter/selector.d.ts.map +1 -0
- package/dist/lang-adapter/selector.js +140 -0
- package/dist/lang-adapter/selector.js.map +1 -0
- package/dist/lang-adapter/types.d.ts +217 -0
- package/dist/lang-adapter/types.d.ts.map +1 -0
- package/dist/lang-adapter/types.js +18 -0
- package/dist/lang-adapter/types.js.map +1 -0
- package/dist/owner-key.d.ts +22 -0
- package/dist/owner-key.d.ts.map +1 -0
- package/dist/owner-key.js +25 -0
- package/dist/owner-key.js.map +1 -0
- package/dist/persistence/__tests__/shard-fragment-cache.test.d.ts +8 -0
- package/dist/persistence/__tests__/shard-fragment-cache.test.d.ts.map +1 -0
- package/dist/persistence/__tests__/shard-fragment-cache.test.js +126 -0
- package/dist/persistence/__tests__/shard-fragment-cache.test.js.map +1 -0
- package/dist/persistence/catalog-repo.d.ts +77 -0
- package/dist/persistence/catalog-repo.d.ts.map +1 -0
- package/dist/persistence/catalog-repo.js +229 -0
- package/dist/persistence/catalog-repo.js.map +1 -0
- package/dist/persistence/schema.d.ts +249 -0
- package/dist/persistence/schema.d.ts.map +1 -0
- package/dist/persistence/schema.js +53 -0
- package/dist/persistence/schema.js.map +1 -0
- package/dist/persistence/session-payload.d.ts +96 -0
- package/dist/persistence/session-payload.d.ts.map +1 -0
- package/dist/persistence/session-payload.js +116 -0
- package/dist/persistence/session-payload.js.map +1 -0
- package/dist/persistence/session-replay.d.ts +15 -0
- package/dist/persistence/session-replay.d.ts.map +1 -0
- package/dist/persistence/session-replay.js +80 -0
- package/dist/persistence/session-replay.js.map +1 -0
- package/dist/pipeline/__tests__/assign-packages.test.d.ts +2 -0
- package/dist/pipeline/__tests__/assign-packages.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/assign-packages.test.js +88 -0
- package/dist/pipeline/__tests__/assign-packages.test.js.map +1 -0
- package/dist/pipeline/__tests__/constrain-edges.test.d.ts +2 -0
- package/dist/pipeline/__tests__/constrain-edges.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/constrain-edges.test.js +228 -0
- package/dist/pipeline/__tests__/constrain-edges.test.js.map +1 -0
- package/dist/pipeline/__tests__/features.test.d.ts +9 -0
- package/dist/pipeline/__tests__/features.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/features.test.js +458 -0
- package/dist/pipeline/__tests__/features.test.js.map +1 -0
- package/dist/pipeline/__tests__/indexes-imports.test.d.ts +2 -0
- package/dist/pipeline/__tests__/indexes-imports.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/indexes-imports.test.js +114 -0
- package/dist/pipeline/__tests__/indexes-imports.test.js.map +1 -0
- package/dist/pipeline/assign-packages.d.ts +18 -0
- package/dist/pipeline/assign-packages.d.ts.map +1 -0
- package/dist/pipeline/assign-packages.js +86 -0
- package/dist/pipeline/assign-packages.js.map +1 -0
- package/dist/pipeline/constrain-edges.d.ts +34 -0
- package/dist/pipeline/constrain-edges.d.ts.map +1 -0
- package/dist/pipeline/constrain-edges.js +139 -0
- package/dist/pipeline/constrain-edges.js.map +1 -0
- package/dist/pipeline/feature-deps.d.ts +19 -0
- package/dist/pipeline/feature-deps.d.ts.map +1 -0
- package/dist/pipeline/feature-deps.js +28 -0
- package/dist/pipeline/feature-deps.js.map +1 -0
- package/dist/pipeline/features.d.ts +50 -0
- package/dist/pipeline/features.d.ts.map +1 -0
- package/dist/pipeline/features.js +462 -0
- package/dist/pipeline/features.js.map +1 -0
- package/dist/pipeline/indexes.d.ts +27 -0
- package/dist/pipeline/indexes.d.ts.map +1 -0
- package/dist/pipeline/indexes.js +159 -0
- package/dist/pipeline/indexes.js.map +1 -0
- package/dist/recipes/__tests__/built-in-recipes.test.d.ts +5 -0
- package/dist/recipes/__tests__/built-in-recipes.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/built-in-recipes.test.js +24 -0
- package/dist/recipes/__tests__/built-in-recipes.test.js.map +1 -0
- package/dist/recipes/__tests__/registry.test.d.ts +7 -0
- package/dist/recipes/__tests__/registry.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/registry.test.js +34 -0
- package/dist/recipes/__tests__/registry.test.js.map +1 -0
- package/dist/recipes/__tests__/resolve.test.d.ts +10 -0
- package/dist/recipes/__tests__/resolve.test.d.ts.map +1 -0
- package/dist/recipes/__tests__/resolve.test.js +38 -0
- package/dist/recipes/__tests__/resolve.test.js.map +1 -0
- package/dist/recipes/built-in-recipes.d.ts +26 -0
- package/dist/recipes/built-in-recipes.d.ts.map +1 -0
- package/dist/recipes/built-in-recipes.js +43 -0
- package/dist/recipes/built-in-recipes.js.map +1 -0
- package/dist/recipes/registry.d.ts +31 -0
- package/dist/recipes/registry.d.ts.map +1 -0
- package/dist/recipes/registry.js +48 -0
- package/dist/recipes/registry.js.map +1 -0
- package/dist/recipes/resolve.d.ts +31 -0
- package/dist/recipes/resolve.d.ts.map +1 -0
- package/dist/recipes/resolve.js +70 -0
- package/dist/recipes/resolve.js.map +1 -0
- package/dist/recipes/types.d.ts +58 -0
- package/dist/recipes/types.d.ts.map +1 -0
- package/dist/recipes/types.js +39 -0
- package/dist/recipes/types.js.map +1 -0
- package/dist/render/__tests__/catalog-json.test.d.ts +9 -0
- package/dist/render/__tests__/catalog-json.test.d.ts.map +1 -0
- package/dist/render/__tests__/catalog-json.test.js +132 -0
- package/dist/render/__tests__/catalog-json.test.js.map +1 -0
- package/dist/render/catalog-json-types.d.ts +114 -0
- package/dist/render/catalog-json-types.d.ts.map +1 -0
- package/dist/render/catalog-json-types.js +23 -0
- package/dist/render/catalog-json-types.js.map +1 -0
- package/dist/render/catalog-json.d.ts +43 -0
- package/dist/render/catalog-json.d.ts.map +1 -0
- package/dist/render/catalog-json.js +303 -0
- package/dist/render/catalog-json.js.map +1 -0
- package/dist/render/opensip-id-derivation.d.ts +73 -0
- package/dist/render/opensip-id-derivation.d.ts.map +1 -0
- package/dist/render/opensip-id-derivation.js +65 -0
- package/dist/render/opensip-id-derivation.js.map +1 -0
- package/dist/render/rule-id-mapping.d.ts +61 -0
- package/dist/render/rule-id-mapping.d.ts.map +1 -0
- package/dist/render/rule-id-mapping.js +82 -0
- package/dist/render/rule-id-mapping.js.map +1 -0
- package/dist/resolve-callee.d.ts +50 -0
- package/dist/resolve-callee.d.ts.map +1 -0
- package/dist/resolve-callee.js +80 -0
- package/dist/resolve-callee.js.map +1 -0
- package/dist/rules/__tests__/__fixtures__/catalog.fixture.d.ts +22 -0
- package/dist/rules/__tests__/__fixtures__/catalog.fixture.d.ts.map +1 -0
- package/dist/rules/__tests__/__fixtures__/catalog.fixture.js +143 -0
- package/dist/rules/__tests__/__fixtures__/catalog.fixture.js.map +1 -0
- package/dist/rules/__tests__/create-graph-signal.test.d.ts +8 -0
- package/dist/rules/__tests__/create-graph-signal.test.d.ts.map +1 -0
- package/dist/rules/__tests__/create-graph-signal.test.js +55 -0
- package/dist/rules/__tests__/create-graph-signal.test.js.map +1 -0
- package/dist/rules/__tests__/define-rule.test.d.ts +13 -0
- package/dist/rules/__tests__/define-rule.test.d.ts.map +1 -0
- package/dist/rules/__tests__/define-rule.test.js +102 -0
- package/dist/rules/__tests__/define-rule.test.js.map +1 -0
- package/dist/rules/__tests__/fingerprint-golden.test.d.ts +21 -0
- package/dist/rules/__tests__/fingerprint-golden.test.d.ts.map +1 -0
- package/dist/rules/__tests__/fingerprint-golden.test.js +69 -0
- package/dist/rules/__tests__/fingerprint-golden.test.js.map +1 -0
- package/dist/rules/__tests__/registry.test.d.ts +6 -0
- package/dist/rules/__tests__/registry.test.d.ts.map +1 -0
- package/dist/rules/__tests__/registry.test.js +37 -0
- package/dist/rules/__tests__/registry.test.js.map +1 -0
- package/dist/rules/__tests__/rule-behaviors.test.d.ts +9 -0
- package/dist/rules/__tests__/rule-behaviors.test.d.ts.map +1 -0
- package/dist/rules/__tests__/rule-behaviors.test.js +204 -0
- package/dist/rules/__tests__/rule-behaviors.test.js.map +1 -0
- package/dist/rules/__tests__/signal-output.snapshot.test.d.ts +11 -0
- package/dist/rules/__tests__/signal-output.snapshot.test.d.ts.map +1 -0
- package/dist/rules/__tests__/signal-output.snapshot.test.js +55 -0
- package/dist/rules/__tests__/signal-output.snapshot.test.js.map +1 -0
- package/dist/rules/_approximation.d.ts +23 -0
- package/dist/rules/_approximation.d.ts.map +1 -0
- package/dist/rules/_approximation.js +28 -0
- package/dist/rules/_approximation.js.map +1 -0
- package/dist/rules/_entry-points.d.ts +27 -0
- package/dist/rules/_entry-points.d.ts.map +1 -0
- package/dist/rules/_entry-points.js +81 -0
- package/dist/rules/_entry-points.js.map +1 -0
- package/dist/rules/_severity-override.d.ts +32 -0
- package/dist/rules/_severity-override.d.ts.map +1 -0
- package/dist/rules/_severity-override.js +33 -0
- package/dist/rules/_severity-override.js.map +1 -0
- package/dist/rules/always-throws-branch.d.ts +26 -0
- package/dist/rules/always-throws-branch.d.ts.map +1 -0
- package/dist/rules/always-throws-branch.js +66 -0
- package/dist/rules/always-throws-branch.js.map +1 -0
- package/dist/rules/create-graph-signal.d.ts +38 -0
- package/dist/rules/create-graph-signal.d.ts.map +1 -0
- package/dist/rules/create-graph-signal.js +35 -0
- package/dist/rules/create-graph-signal.js.map +1 -0
- package/dist/rules/cycle.d.ts +29 -0
- package/dist/rules/cycle.d.ts.map +1 -0
- package/dist/rules/cycle.js +166 -0
- package/dist/rules/cycle.js.map +1 -0
- package/dist/rules/cycle.memberlocations.test.d.ts +11 -0
- package/dist/rules/cycle.memberlocations.test.d.ts.map +1 -0
- package/dist/rules/cycle.memberlocations.test.js +84 -0
- package/dist/rules/cycle.memberlocations.test.js.map +1 -0
- package/dist/rules/define-rule.d.ts +67 -0
- package/dist/rules/define-rule.d.ts.map +1 -0
- package/dist/rules/define-rule.js +66 -0
- package/dist/rules/define-rule.js.map +1 -0
- package/dist/rules/duplicated-function-body.d.ts +40 -0
- package/dist/rules/duplicated-function-body.d.ts.map +1 -0
- package/dist/rules/duplicated-function-body.js +232 -0
- package/dist/rules/duplicated-function-body.js.map +1 -0
- package/dist/rules/high-blast-untested.d.ts +26 -0
- package/dist/rules/high-blast-untested.d.ts.map +1 -0
- package/dist/rules/high-blast-untested.js +82 -0
- package/dist/rules/high-blast-untested.js.map +1 -0
- package/dist/rules/large-function.d.ts +22 -0
- package/dist/rules/large-function.d.ts.map +1 -0
- package/dist/rules/large-function.js +72 -0
- package/dist/rules/large-function.js.map +1 -0
- package/dist/rules/no-side-effect-path.d.ts +31 -0
- package/dist/rules/no-side-effect-path.d.ts.map +1 -0
- package/dist/rules/no-side-effect-path.js +217 -0
- package/dist/rules/no-side-effect-path.js.map +1 -0
- package/dist/rules/orphan-subtree.d.ts +11 -0
- package/dist/rules/orphan-subtree.d.ts.map +1 -0
- package/dist/rules/orphan-subtree.js +104 -0
- package/dist/rules/orphan-subtree.js.map +1 -0
- package/dist/rules/registry.d.ts +35 -0
- package/dist/rules/registry.d.ts.map +1 -0
- package/dist/rules/registry.js +96 -0
- package/dist/rules/registry.js.map +1 -0
- package/dist/rules/test-only-reachable.d.ts +9 -0
- package/dist/rules/test-only-reachable.d.ts.map +1 -0
- package/dist/rules/test-only-reachable.js +101 -0
- package/dist/rules/test-only-reachable.js.map +1 -0
- package/dist/rules/unexpected-coupling.d.ts +29 -0
- package/dist/rules/unexpected-coupling.d.ts.map +1 -0
- package/dist/rules/unexpected-coupling.js +0 -0
- package/dist/rules/unexpected-coupling.js.map +1 -0
- package/dist/rules/wide-function.d.ts +18 -0
- package/dist/rules/wide-function.d.ts.map +1 -0
- package/dist/rules/wide-function.js +58 -0
- package/dist/rules/wide-function.js.map +1 -0
- package/dist/scope-augmentation.d.ts +58 -0
- package/dist/scope-augmentation.d.ts.map +1 -0
- package/dist/scope-augmentation.js +29 -0
- package/dist/scope-augmentation.js.map +1 -0
- package/dist/tool.d.ts +29 -0
- package/dist/tool.d.ts.map +1 -0
- package/dist/tool.js +241 -0
- package/dist/tool.js.map +1 -0
- package/dist/types.d.ts +642 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +136 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared occurrence/edge IDENTITY — the ONE module that owns how call/dependency
|
|
3
|
+
* edges are keyed to their owning occurrence and stitched back onto it.
|
|
4
|
+
*
|
|
5
|
+
* WHY THIS EXISTS (the drift it closes):
|
|
6
|
+
* ADR-0003 mandates edges be keyed by OCCURRENCE — `ownerEdgeKey(bodyHash,
|
|
7
|
+
* filePath)` — not by `bodyHash` alone: two functions with byte-identical
|
|
8
|
+
* bodies in different files (e.g. `stripStrings` duplicated across the language
|
|
9
|
+
* adapters) share a hash, so a hash-only bucket UNIONS their edges, inventing
|
|
10
|
+
* phantom cross-package coupling. The EXACT path complied (its resolver returns
|
|
11
|
+
* an `ownerEdgeKey`-keyed map; `catalog-builder.stitchEdges` reads it the same
|
|
12
|
+
* way). The CROSS-SHARD merge did NOT — it bucketed/stitched by `bc.ownerHash`
|
|
13
|
+
* alone (a second, drifting keying scheme). That drift is the root cause of the
|
|
14
|
+
* F1 ADR-0003 violation.
|
|
15
|
+
*
|
|
16
|
+
* This module is the single home of that identity. Both engines import it; no
|
|
17
|
+
* consumer keys edges by a bare `bodyHash`. The Phase-1 fitness check
|
|
18
|
+
* (`no-bodyhash-keying-outside-identity`) forbids re-deriving an owner-keyed
|
|
19
|
+
* edge map anywhere else, so the drift cannot recur.
|
|
20
|
+
*
|
|
21
|
+
* Pure: no fs, no engine state — both engines and the equivalence harness import
|
|
22
|
+
* the same helpers.
|
|
23
|
+
*/
|
|
24
|
+
import { ownerEdgeKey } from '../../owner-key.js';
|
|
25
|
+
export { ownerEdgeKey } from '../../owner-key.js';
|
|
26
|
+
/**
|
|
27
|
+
* Bucket a flat list of edge-bearing items into a `Map<ownerEdgeKey, CallEdge[]>`,
|
|
28
|
+
* keyed via {@link ownerEdgeKey} (NOT by `bodyHash` alone). `keyParts` extracts
|
|
29
|
+
* the owning occurrence's `(bodyHash, filePath)` from each item; `edgeOf`
|
|
30
|
+
* extracts the edge. Append-order within a bucket is preserved (callers sort
|
|
31
|
+
* downstream for determinism). The canonical owner-keyed bucket: every consumer
|
|
32
|
+
* routes through this instead of re-deriving an owner key inline.
|
|
33
|
+
*/
|
|
34
|
+
export function bucketEdgesByOwner(items, keyParts, edgeOf) {
|
|
35
|
+
const byOwner = new Map();
|
|
36
|
+
for (const item of items) {
|
|
37
|
+
const { bodyHash, filePath } = keyParts(item);
|
|
38
|
+
const key = ownerEdgeKey(bodyHash, filePath);
|
|
39
|
+
const bucket = byOwner.get(key);
|
|
40
|
+
if (bucket)
|
|
41
|
+
bucket.push(edgeOf(item));
|
|
42
|
+
else
|
|
43
|
+
byOwner.set(key, [edgeOf(item)]);
|
|
44
|
+
}
|
|
45
|
+
return byOwner;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Stitch recovered edges onto each occurrence, keyed by
|
|
49
|
+
* `ownerEdgeKey(o.bodyHash, o.filePath)` so ONLY the owning occurrence receives
|
|
50
|
+
* its edges (body-twins in different files never smear). `combine` decides how an
|
|
51
|
+
* occurrence's existing `calls` and its recovered edges merge (e.g. replace,
|
|
52
|
+
* concatenate, or drop-placeholder-then-concat) and returns the new occurrence —
|
|
53
|
+
* keeping the keying in one place while leaving the per-engine merge policy to
|
|
54
|
+
* the caller. An occurrence with no recovered edges is returned unchanged.
|
|
55
|
+
*/
|
|
56
|
+
export function stitchEdgesByOwner(functions, edgesByOwnerKey, combine) {
|
|
57
|
+
const out = Object.create(null);
|
|
58
|
+
for (const [name, occs] of Object.entries(functions)) {
|
|
59
|
+
if (!occs)
|
|
60
|
+
continue;
|
|
61
|
+
out[name] = occs.map((o) => {
|
|
62
|
+
const recovered = edgesByOwnerKey.get(ownerEdgeKey(o.bodyHash, o.filePath));
|
|
63
|
+
return recovered === undefined || recovered.length === 0 ? o : combine(o, recovered);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return out;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=edge-identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-identity.js","sourceRoot":"","sources":["../../../src/cli/orchestrate/edge-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAChC,KAAkB,EAClB,QAA+E,EAC/E,MAA6B;IAE7B,MAAM,OAAO,GAAG,IAAI,GAAG,EAAsB,CAAC;IAC9C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC9C,MAAM,GAAG,GAAG,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC7C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,MAAM;YAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;;YACjC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAChC,SAAkE,EAClE,eAAyD,EACzD,OAAwF;IAExF,MAAM,GAAG,GAAkD,MAAM,CAAC,MAAM,CAAC,IAAI,CAG5E,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QACrD,IAAI,CAAC,IAAI;YAAE,SAAS;QACpB,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACzB,MAAM,SAAS,GAAG,eAAe,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC5E,OAAO,SAAS,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;QACvF,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* REAL-REPO equivalence guardrail — the dogfood gate that catches an
|
|
3
|
+
* edge-resolution regression on a genuine multi-package TypeScript monorepo.
|
|
4
|
+
*
|
|
5
|
+
* WHY THIS EXISTS (the gap it closes):
|
|
6
|
+
* The in-test equivalence gate (`__tests__/equivalence*.test.ts`) builds BOTH
|
|
7
|
+
* engines through a SYNTHETIC text adapter that reuses the production
|
|
8
|
+
* cross-package helpers (`resolveSpecifierToPackage` + `buildExportIndex`), so
|
|
9
|
+
* the two engines "agree by construction" — it structurally CANNOT model the
|
|
10
|
+
* real TypeScript `dist/*.d.ts` resolution where the
|
|
11
|
+
* exact-engine-under-resolution bug actually lived. That is false confidence.
|
|
12
|
+
*
|
|
13
|
+
* This guardrail instead builds BOTH catalogs on a REAL repo (default: this
|
|
14
|
+
* one) with the REAL TypeScript adapter — so workspace `@scope/pkg` imports
|
|
15
|
+
* resolve through Node16 to built `dist/*.d.ts`, exactly the divergence class
|
|
16
|
+
* the bug occupied. It then diffs (exact ≡ sharded) via `diffCatalogs` and
|
|
17
|
+
* classifies the residual by OWNER FILE:
|
|
18
|
+
*
|
|
19
|
+
* - functionsOnly{A,B} MUST be 0 (the function sets are byte-equal
|
|
20
|
+
* post-reconciliation) — any non-zero is a hard FAILURE.
|
|
21
|
+
* - TEST/FIXTURE-owned edge divergences are benign (the graph rules skip
|
|
22
|
+
* test files, so they are gate-invisible) — counted separately, never
|
|
23
|
+
* gated.
|
|
24
|
+
* - PRODUCTION edge divergences are the meaningful signal, classified by
|
|
25
|
+
* DIRECTION on the unified model (ADR-0033): phantom (sharded-only),
|
|
26
|
+
* decline (exact-only), conflict (both resolve to different targets). Each
|
|
27
|
+
* direction is compared against its COMMITTED FLOOR; the guardrail FAILS
|
|
28
|
+
* when any direction EXCEEDS its floor (a NEW divergence on the unified
|
|
29
|
+
* model) and PASSES (with a tighten hint) on a decrease. Per-direction
|
|
30
|
+
* gating so a fixed conflict can't mask a new phantom. A ratchet, mirroring
|
|
31
|
+
* the repo's net-new SARIF philosophy. (The both-engine-DECLINE blind spot
|
|
32
|
+
* this differential cannot see is guarded by the pinned-corpus completeness
|
|
33
|
+
* floor in `resolution-completeness-floor.test.ts`.)
|
|
34
|
+
*
|
|
35
|
+
* Engine-layer + language-agnostic: it drives `runGraph` (exact) and
|
|
36
|
+
* `runShardedGraph` (sharded) through the same shard-resolution the production
|
|
37
|
+
* `graph` command uses (`resolveShardsForCwd`), so there is ONE resolver, never
|
|
38
|
+
* a drifting copy. Cold + no-cache on both sides (a fresh oracle every run).
|
|
39
|
+
*/
|
|
40
|
+
import type { EdgeDifference } from './cross-shard-resolve.js';
|
|
41
|
+
import type { Shard } from './shard-model.js';
|
|
42
|
+
import type { Catalog, ResolutionMode } from '../../types.js';
|
|
43
|
+
/** A function-set divergence: one engine discovered a function the other did not. */
|
|
44
|
+
export type FunctionSetBreach = readonly string[];
|
|
45
|
+
/**
|
|
46
|
+
* Owner-file classification of an edge divergence. Matches the paths the graph
|
|
47
|
+
* rules skip (so the divergence is gate-invisible): any `__tests__/` or
|
|
48
|
+
* `__fixtures__/` tree segment, or a `*.test.*` / `*.spec.*` filename. Operates
|
|
49
|
+
* on project-relative catalog `filePath`s, posix-normalized.
|
|
50
|
+
*/
|
|
51
|
+
export declare function isTestOrFixturePath(filePath: string): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* The DIRECTION of a resolved-edge divergence — which engine resolved the site,
|
|
54
|
+
* once both engines run ONE model (Phase 3 convergence, ADR-0033). Direction no
|
|
55
|
+
* longer encodes "wrongness" (neither engine is the oracle: a sharded-only edge
|
|
56
|
+
* is frequently a REAL edge the single-program type checker under-resolved, e.g.
|
|
57
|
+
* `scope.graph?.rules.getAll()` through an optional chain). It is a DIAGNOSTIC
|
|
58
|
+
* label — "which bound is insufficient" — and each direction is ratcheted to its
|
|
59
|
+
* measured floor so any NEW divergence on the unified model fails, with a
|
|
60
|
+
* documented residual class per direction.
|
|
61
|
+
*
|
|
62
|
+
* - `phantom` — sharded resolved, exact declined (exact-only gap)
|
|
63
|
+
* - `decline` — exact resolved, sharded declined (sharded-only gap)
|
|
64
|
+
* - `conflict` — BOTH resolved, to DIFFERENT targets (a real disambiguation
|
|
65
|
+
* bug: at least one engine picked the wrong same-name occurrence)
|
|
66
|
+
*
|
|
67
|
+
* `conflict` is the load-bearing class — both engines confidently disagree, so
|
|
68
|
+
* one is provably wrong. `phantom`/`decline` are one-sided gaps where the other
|
|
69
|
+
* engine simply has more/less reach.
|
|
70
|
+
*/
|
|
71
|
+
export type DivergenceDirection = 'phantom' | 'decline' | 'conflict';
|
|
72
|
+
/** Classify a resolved divergence by which engine(s) resolved it. */
|
|
73
|
+
export declare function divergenceDirection(d: EdgeDifference): DivergenceDirection;
|
|
74
|
+
/**
|
|
75
|
+
* A committed budget: the per-direction ratchet floors for production resolved-
|
|
76
|
+
* edge divergences on the unified model (ADR-0033). Replaces the single
|
|
77
|
+
* `productionResolvedEdgeDivergences` total: after convergence, a flat total can
|
|
78
|
+
* hide a direction flip (a fixed conflict masking a new phantom). Each direction
|
|
79
|
+
* is gated independently; any count EXCEEDING its floor FAILS, a decrease passes
|
|
80
|
+
* with a tighten hint, equal passes.
|
|
81
|
+
*/
|
|
82
|
+
export interface EquivalenceBudget {
|
|
83
|
+
/** Accepted sharded-only (exact-declined) production divergences. */
|
|
84
|
+
readonly phantomDivergences: number;
|
|
85
|
+
/** Accepted exact-only (sharded-declined) production divergences. */
|
|
86
|
+
readonly declineDivergences: number;
|
|
87
|
+
/** Accepted both-resolved-differently production divergences (the same-name
|
|
88
|
+
* disambiguation class — a real bug, tracked for follow-up). */
|
|
89
|
+
readonly conflictDivergences: number;
|
|
90
|
+
/**
|
|
91
|
+
* Accepted SCC membership divergences. SCCs are a DOWNSTREAM consequence of the
|
|
92
|
+
* resolved-edge residual (a differing cross-package edge can reshape a
|
|
93
|
+
* component), so on a repo with a non-zero edge residual SCC differences are
|
|
94
|
+
* expected and budgeted, not hard-failed. Same ratchet semantics.
|
|
95
|
+
*/
|
|
96
|
+
readonly sccDivergences: number;
|
|
97
|
+
/**
|
|
98
|
+
* Optional human note recorded alongside the numbers (what each residual class
|
|
99
|
+
* is). Ignored by the comparison.
|
|
100
|
+
*/
|
|
101
|
+
readonly note?: string;
|
|
102
|
+
}
|
|
103
|
+
/** The classified outcome of one equivalence run. */
|
|
104
|
+
export interface EquivalenceReport {
|
|
105
|
+
/** functionsOnlyInA (exact-only) — MUST be empty (a hard failure if not). */
|
|
106
|
+
readonly functionsOnlyInExact: FunctionSetBreach;
|
|
107
|
+
/** functionsOnlyInB (sharded-only) — MUST be empty (a hard failure if not). */
|
|
108
|
+
readonly functionsOnlyInSharded: FunctionSetBreach;
|
|
109
|
+
/** SCC membership divergences (budgeted — a downstream consequence of edges). */
|
|
110
|
+
readonly sccDifferences: readonly string[];
|
|
111
|
+
/** Every differing edge key, owner-attributed (resolved + structural). */
|
|
112
|
+
readonly allEdgeDifferences: readonly EdgeDifference[];
|
|
113
|
+
/**
|
|
114
|
+
* RESOLVED-edge divergences owned by a PRODUCTION file — the gated signal
|
|
115
|
+
* (dropped/added real edges in non-test code). The directional partitions
|
|
116
|
+
* below sum to this.
|
|
117
|
+
*/
|
|
118
|
+
readonly productionResolvedDifferences: readonly EdgeDifference[];
|
|
119
|
+
/** Production divergences where SHARDED resolved but EXACT declined. */
|
|
120
|
+
readonly productionPhantom: readonly EdgeDifference[];
|
|
121
|
+
/** Production divergences where EXACT resolved but SHARDED declined. */
|
|
122
|
+
readonly productionDecline: readonly EdgeDifference[];
|
|
123
|
+
/** Production divergences where BOTH resolved, to DIFFERENT targets. */
|
|
124
|
+
readonly productionConflict: readonly EdgeDifference[];
|
|
125
|
+
/**
|
|
126
|
+
* RESOLVED-edge divergences owned by a TEST/FIXTURE file — benign
|
|
127
|
+
* (gate-invisible: the graph rules skip test files). Reported, not gated.
|
|
128
|
+
*/
|
|
129
|
+
readonly testResolvedDifferences: readonly EdgeDifference[];
|
|
130
|
+
/**
|
|
131
|
+
* STRUCTURAL divergences — a call site recorded as UNRESOLVED (`to: []`) on one
|
|
132
|
+
* engine and absent on the other. Neither resolved a target, so this does not
|
|
133
|
+
* change the resolved call graph; reported for transparency, never gated.
|
|
134
|
+
*/
|
|
135
|
+
readonly structuralDifferences: readonly EdgeDifference[];
|
|
136
|
+
/** Catalog function counts, for the report header. */
|
|
137
|
+
readonly exactFunctionCount: number;
|
|
138
|
+
readonly shardedFunctionCount: number;
|
|
139
|
+
}
|
|
140
|
+
/** Build the exact + sharded catalogs on `cwd`, diff, and classify by owner file. */
|
|
141
|
+
export interface BuildEquivalenceInput {
|
|
142
|
+
/** Target repo root (default: process.cwd()). */
|
|
143
|
+
readonly cwd: string;
|
|
144
|
+
/**
|
|
145
|
+
* The resolved shard set for `cwd` (≥2 shards). Resolved by the caller via the
|
|
146
|
+
* production `resolveShardsForCwd` so the guardrail shards the project the
|
|
147
|
+
* SAME way a real `graph` run does. An empty/≤1 set is a usage error (the repo
|
|
148
|
+
* must be shardable for the comparison to be meaningful).
|
|
149
|
+
*/
|
|
150
|
+
readonly shards: readonly Shard[];
|
|
151
|
+
/** CLI entry script for spawning shard workers (`process.argv[1]`). */
|
|
152
|
+
readonly cliScript: string;
|
|
153
|
+
/** Exact single-program build (the oracle). */
|
|
154
|
+
readonly buildExact: (cwd: string) => Promise<Catalog | null>;
|
|
155
|
+
/** Sharded build. */
|
|
156
|
+
readonly buildSharded: (input: {
|
|
157
|
+
shards: readonly Shard[];
|
|
158
|
+
projectRoot: string;
|
|
159
|
+
cliScript: string;
|
|
160
|
+
resolutionMode: ResolutionMode;
|
|
161
|
+
}) => Promise<Catalog>;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Run the real-repo equivalence comparison and classify the residual. Diffs as
|
|
165
|
+
* `diffCatalogs(exact, sharded)` — so `functionsOnlyInA` is exact-only and
|
|
166
|
+
* `functionsOnlyInB` is sharded-only — then partitions the edge differences by
|
|
167
|
+
* owner file (production vs test/fixture).
|
|
168
|
+
*
|
|
169
|
+
* @throws {Error} If the exact (single-program) build produces no catalog — the
|
|
170
|
+
* target repo must contain analyzable source for the comparison to be meaningful.
|
|
171
|
+
*/
|
|
172
|
+
export declare function buildEquivalenceReport(input: BuildEquivalenceInput): Promise<EquivalenceReport>;
|
|
173
|
+
/**
|
|
174
|
+
* Resolved CROSS-PACKAGE edge count in a catalog — the completeness metric for
|
|
175
|
+
* the pinned-corpus floor (ADR-0033). A `crossShard` edge with a non-empty
|
|
176
|
+
* target set is a recovered cross-package call; declined boundary calls are
|
|
177
|
+
* PRUNED from the catalog (they leave only the intra placeholder), so this count
|
|
178
|
+
* IS the resolved numerator. On a PINNED corpus (fixed call-site denominator) a
|
|
179
|
+
* non-decreasing count is equivalent to a non-decreasing resolution RATE — it
|
|
180
|
+
* catches a both-engine completeness regression (one that drops edges in BOTH
|
|
181
|
+
* engines, so the differential gate above stays silent).
|
|
182
|
+
*/
|
|
183
|
+
export declare function countResolvedCrossPackageEdges(catalog: Catalog): number;
|
|
184
|
+
/** The verdict of comparing a report against a budget. */
|
|
185
|
+
export interface EquivalenceVerdict {
|
|
186
|
+
/** True ⇒ the guardrail FAILS (non-zero exit). */
|
|
187
|
+
readonly failed: boolean;
|
|
188
|
+
/** True ⇒ a function-set breach (a hard failure regardless of budget). */
|
|
189
|
+
readonly functionSetBreached: boolean;
|
|
190
|
+
/** Observed sharded-only (exact-declined) production divergence count. */
|
|
191
|
+
readonly phantomCount: number;
|
|
192
|
+
/** Observed exact-only (sharded-declined) production divergence count. */
|
|
193
|
+
readonly declineCount: number;
|
|
194
|
+
/** Observed both-resolved-differently production divergence count. */
|
|
195
|
+
readonly conflictCount: number;
|
|
196
|
+
/** Total observed production resolved-edge divergence count (sum of the three). */
|
|
197
|
+
readonly productionCount: number;
|
|
198
|
+
/** Observed SCC divergence count. */
|
|
199
|
+
readonly sccCount: number;
|
|
200
|
+
/** The budget's accepted SCC count. */
|
|
201
|
+
readonly sccBudget: number;
|
|
202
|
+
/** Human-readable lines for the CLI output (always populated). */
|
|
203
|
+
readonly lines: readonly string[];
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Compare a report against the committed budget and produce the gate verdict +
|
|
207
|
+
* human-readable lines. After Phase 3 convergence (ADR-0033) the gate is the
|
|
208
|
+
* DIRECTIONAL soundness invariant: any NEW divergence on the unified model fails,
|
|
209
|
+
* each direction ratcheted to its measured floor.
|
|
210
|
+
*
|
|
211
|
+
* - Any function-set breach (functionsOnly{Exact,Sharded}) ⇒ HARD FAIL: the
|
|
212
|
+
* function SET must be byte-equal post-reconciliation (a discovery/merge
|
|
213
|
+
* regression, never an edge gap).
|
|
214
|
+
* - phantom / decline / conflict production divergences each > their floor ⇒
|
|
215
|
+
* FAIL, printing the offending owner edges for the breached direction(s).
|
|
216
|
+
* Gating per-direction (not a flat total) so a fixed conflict can't mask a
|
|
217
|
+
* new phantom.
|
|
218
|
+
* - SCC divergences > budget ⇒ FAIL (a downstream consequence of the edge
|
|
219
|
+
* residual — budgeted, not hard-failed, since the real-repo residual is
|
|
220
|
+
* non-zero).
|
|
221
|
+
* - any metric < its floor ⇒ PASS, with a hint to tighten that number.
|
|
222
|
+
* - == floor ⇒ PASS.
|
|
223
|
+
*
|
|
224
|
+
* Structural (unresolved-vs-absent) divergences are reported but never gated.
|
|
225
|
+
*/
|
|
226
|
+
export declare function judgeEquivalence(report: EquivalenceReport, budget: EquivalenceBudget): EquivalenceVerdict;
|
|
227
|
+
//# sourceMappingURL=equivalence-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equivalence-check.d.ts","sourceRoot":"","sources":["../../../src/cli/orchestrate/equivalence-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE9D,qFAAqF;AACrF,MAAM,MAAM,iBAAiB,GAAG,SAAS,MAAM,EAAE,CAAC;AAElD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAS7D;AAgBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAErE,qEAAqE;A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jC,qCAAqC;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,uCAAuC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,iBAAiB,GACxB,kBAAkB,CAkGpB"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* REAL-REPO equivalence guardrail — the dogfood gate that catches an
|
|
3
|
+
* edge-resolution regression on a genuine multi-package TypeScript monorepo.
|
|
4
|
+
*
|
|
5
|
+
* WHY THIS EXISTS (the gap it closes):
|
|
6
|
+
* The in-test equivalence gate (`__tests__/equivalence*.test.ts`) builds BOTH
|
|
7
|
+
* engines through a SYNTHETIC text adapter that reuses the production
|
|
8
|
+
* cross-package helpers (`resolveSpecifierToPackage` + `buildExportIndex`), so
|
|
9
|
+
* the two engines "agree by construction" — it structurally CANNOT model the
|
|
10
|
+
* real TypeScript `dist/*.d.ts` resolution where the
|
|
11
|
+
* exact-engine-under-resolution bug actually lived. That is false confidence.
|
|
12
|
+
*
|
|
13
|
+
* This guardrail instead builds BOTH catalogs on a REAL repo (default: this
|
|
14
|
+
* one) with the REAL TypeScript adapter — so workspace `@scope/pkg` imports
|
|
15
|
+
* resolve through Node16 to built `dist/*.d.ts`, exactly the divergence class
|
|
16
|
+
* the bug occupied. It then diffs (exact ≡ sharded) via `diffCatalogs` and
|
|
17
|
+
* classifies the residual by OWNER FILE:
|
|
18
|
+
*
|
|
19
|
+
* - functionsOnly{A,B} MUST be 0 (the function sets are byte-equal
|
|
20
|
+
* post-reconciliation) — any non-zero is a hard FAILURE.
|
|
21
|
+
* - TEST/FIXTURE-owned edge divergences are benign (the graph rules skip
|
|
22
|
+
* test files, so they are gate-invisible) — counted separately, never
|
|
23
|
+
* gated.
|
|
24
|
+
* - PRODUCTION edge divergences are the meaningful signal, classified by
|
|
25
|
+
* DIRECTION on the unified model (ADR-0033): phantom (sharded-only),
|
|
26
|
+
* decline (exact-only), conflict (both resolve to different targets). Each
|
|
27
|
+
* direction is compared against its COMMITTED FLOOR; the guardrail FAILS
|
|
28
|
+
* when any direction EXCEEDS its floor (a NEW divergence on the unified
|
|
29
|
+
* model) and PASSES (with a tighten hint) on a decrease. Per-direction
|
|
30
|
+
* gating so a fixed conflict can't mask a new phantom. A ratchet, mirroring
|
|
31
|
+
* the repo's net-new SARIF philosophy. (The both-engine-DECLINE blind spot
|
|
32
|
+
* this differential cannot see is guarded by the pinned-corpus completeness
|
|
33
|
+
* floor in `resolution-completeness-floor.test.ts`.)
|
|
34
|
+
*
|
|
35
|
+
* Engine-layer + language-agnostic: it drives `runGraph` (exact) and
|
|
36
|
+
* `runShardedGraph` (sharded) through the same shard-resolution the production
|
|
37
|
+
* `graph` command uses (`resolveShardsForCwd`), so there is ONE resolver, never
|
|
38
|
+
* a drifting copy. Cold + no-cache on both sides (a fresh oracle every run).
|
|
39
|
+
*/
|
|
40
|
+
import { diffCatalogs } from './cross-shard-resolve.js';
|
|
41
|
+
/**
|
|
42
|
+
* Owner-file classification of an edge divergence. Matches the paths the graph
|
|
43
|
+
* rules skip (so the divergence is gate-invisible): any `__tests__/` or
|
|
44
|
+
* `__fixtures__/` tree segment, or a `*.test.*` / `*.spec.*` filename. Operates
|
|
45
|
+
* on project-relative catalog `filePath`s, posix-normalized.
|
|
46
|
+
*/
|
|
47
|
+
export function isTestOrFixturePath(filePath) {
|
|
48
|
+
const p = filePath.replaceAll('\\', '/');
|
|
49
|
+
return (p.includes('/__tests__/') ||
|
|
50
|
+
p.startsWith('__tests__/') ||
|
|
51
|
+
p.includes('/__fixtures__/') ||
|
|
52
|
+
p.startsWith('__fixtures__/') ||
|
|
53
|
+
/(?:^|\/)[^/]+\.(?:test|spec)\.[A-Za-z0-9]+$/.test(p));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A RESOLVED-edge divergence is the meaningful signal: a call site where the two
|
|
57
|
+
* engines disagree on a NON-EMPTY resolved target set (one resolved it, the
|
|
58
|
+
* other didn't, or they resolved it differently). A call site that is UNRESOLVED
|
|
59
|
+
* (`to: []`) on one side and simply absent on the other contributes nothing to
|
|
60
|
+
* the resolved call graph — both engines agree there is no target — so it is
|
|
61
|
+
* NOT a resolved divergence (it is reported separately as a structural/
|
|
62
|
+
* unresolved divergence, not gated). This is what isolates the dropped/added
|
|
63
|
+
* REAL cross-package edges the guardrail exists to catch.
|
|
64
|
+
*/
|
|
65
|
+
function isResolvedDivergence(d) {
|
|
66
|
+
return d.toA !== d.toB && (d.toA.length > 0 || d.toB.length > 0);
|
|
67
|
+
}
|
|
68
|
+
/** Classify a resolved divergence by which engine(s) resolved it. */
|
|
69
|
+
export function divergenceDirection(d) {
|
|
70
|
+
if (d.toA.length === 0)
|
|
71
|
+
return 'phantom'; // exact empty, sharded resolved
|
|
72
|
+
if (d.toB.length === 0)
|
|
73
|
+
return 'decline'; // sharded empty, exact resolved
|
|
74
|
+
return 'conflict'; // both resolved, different targets
|
|
75
|
+
}
|
|
76
|
+
function functionCount(catalog) {
|
|
77
|
+
let n = 0;
|
|
78
|
+
for (const occs of Object.values(catalog.functions))
|
|
79
|
+
n += occs?.length ?? 0;
|
|
80
|
+
return n;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Run the real-repo equivalence comparison and classify the residual. Diffs as
|
|
84
|
+
* `diffCatalogs(exact, sharded)` — so `functionsOnlyInA` is exact-only and
|
|
85
|
+
* `functionsOnlyInB` is sharded-only — then partitions the edge differences by
|
|
86
|
+
* owner file (production vs test/fixture).
|
|
87
|
+
*
|
|
88
|
+
* @throws {Error} If the exact (single-program) build produces no catalog — the
|
|
89
|
+
* target repo must contain analyzable source for the comparison to be meaningful.
|
|
90
|
+
*/
|
|
91
|
+
export async function buildEquivalenceReport(input) {
|
|
92
|
+
const exact = await input.buildExact(input.cwd);
|
|
93
|
+
if (exact === null) {
|
|
94
|
+
throw new Error('Equivalence check: the exact (single-program) build produced no catalog ' +
|
|
95
|
+
'(no parseable input). The target repo must contain analyzable source.');
|
|
96
|
+
}
|
|
97
|
+
const sharded = await input.buildSharded({
|
|
98
|
+
shards: input.shards,
|
|
99
|
+
projectRoot: input.cwd,
|
|
100
|
+
cliScript: input.cliScript,
|
|
101
|
+
resolutionMode: 'exact',
|
|
102
|
+
});
|
|
103
|
+
const eq = diffCatalogs(exact, sharded);
|
|
104
|
+
const resolved = eq.edgeDifferences.filter(isResolvedDivergence);
|
|
105
|
+
const structuralDifferences = eq.edgeDifferences.filter((d) => !isResolvedDivergence(d));
|
|
106
|
+
const productionResolvedDifferences = resolved.filter((d) => !isTestOrFixturePath(d.ownerFilePath));
|
|
107
|
+
const testResolvedDifferences = resolved.filter((d) => isTestOrFixturePath(d.ownerFilePath));
|
|
108
|
+
const byDirection = (dir) => productionResolvedDifferences.filter((d) => divergenceDirection(d) === dir);
|
|
109
|
+
return {
|
|
110
|
+
functionsOnlyInExact: eq.functionsOnlyInA,
|
|
111
|
+
functionsOnlyInSharded: eq.functionsOnlyInB,
|
|
112
|
+
sccDifferences: eq.sccDifferences,
|
|
113
|
+
allEdgeDifferences: eq.edgeDifferences,
|
|
114
|
+
productionResolvedDifferences,
|
|
115
|
+
productionPhantom: byDirection('phantom'),
|
|
116
|
+
productionDecline: byDirection('decline'),
|
|
117
|
+
productionConflict: byDirection('conflict'),
|
|
118
|
+
testResolvedDifferences,
|
|
119
|
+
structuralDifferences,
|
|
120
|
+
exactFunctionCount: functionCount(exact),
|
|
121
|
+
shardedFunctionCount: functionCount(sharded),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Resolved CROSS-PACKAGE edge count in a catalog — the completeness metric for
|
|
126
|
+
* the pinned-corpus floor (ADR-0033). A `crossShard` edge with a non-empty
|
|
127
|
+
* target set is a recovered cross-package call; declined boundary calls are
|
|
128
|
+
* PRUNED from the catalog (they leave only the intra placeholder), so this count
|
|
129
|
+
* IS the resolved numerator. On a PINNED corpus (fixed call-site denominator) a
|
|
130
|
+
* non-decreasing count is equivalent to a non-decreasing resolution RATE — it
|
|
131
|
+
* catches a both-engine completeness regression (one that drops edges in BOTH
|
|
132
|
+
* engines, so the differential gate above stays silent).
|
|
133
|
+
*/
|
|
134
|
+
export function countResolvedCrossPackageEdges(catalog) {
|
|
135
|
+
let n = 0;
|
|
136
|
+
for (const occs of Object.values(catalog.functions)) {
|
|
137
|
+
for (const o of occs ?? []) {
|
|
138
|
+
for (const e of o.calls) {
|
|
139
|
+
if (e.crossShard === true && e.to.length > 0)
|
|
140
|
+
n++;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return n;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Compare a report against the committed budget and produce the gate verdict +
|
|
148
|
+
* human-readable lines. After Phase 3 convergence (ADR-0033) the gate is the
|
|
149
|
+
* DIRECTIONAL soundness invariant: any NEW divergence on the unified model fails,
|
|
150
|
+
* each direction ratcheted to its measured floor.
|
|
151
|
+
*
|
|
152
|
+
* - Any function-set breach (functionsOnly{Exact,Sharded}) ⇒ HARD FAIL: the
|
|
153
|
+
* function SET must be byte-equal post-reconciliation (a discovery/merge
|
|
154
|
+
* regression, never an edge gap).
|
|
155
|
+
* - phantom / decline / conflict production divergences each > their floor ⇒
|
|
156
|
+
* FAIL, printing the offending owner edges for the breached direction(s).
|
|
157
|
+
* Gating per-direction (not a flat total) so a fixed conflict can't mask a
|
|
158
|
+
* new phantom.
|
|
159
|
+
* - SCC divergences > budget ⇒ FAIL (a downstream consequence of the edge
|
|
160
|
+
* residual — budgeted, not hard-failed, since the real-repo residual is
|
|
161
|
+
* non-zero).
|
|
162
|
+
* - any metric < its floor ⇒ PASS, with a hint to tighten that number.
|
|
163
|
+
* - == floor ⇒ PASS.
|
|
164
|
+
*
|
|
165
|
+
* Structural (unresolved-vs-absent) divergences are reported but never gated.
|
|
166
|
+
*/
|
|
167
|
+
export function judgeEquivalence(report, budget) {
|
|
168
|
+
const lines = [];
|
|
169
|
+
const phantomCount = report.productionPhantom.length;
|
|
170
|
+
const declineCount = report.productionDecline.length;
|
|
171
|
+
const conflictCount = report.productionConflict.length;
|
|
172
|
+
const productionCount = report.productionResolvedDifferences.length;
|
|
173
|
+
const sccCount = report.sccDifferences.length;
|
|
174
|
+
const sccBudget = budget.sccDivergences;
|
|
175
|
+
const functionSetBreached = report.functionsOnlyInExact.length > 0 || report.functionsOnlyInSharded.length > 0;
|
|
176
|
+
lines.push(`Graph engine equivalence (exact ≡ sharded) on the real repo:`, ` functions: exact=${String(report.exactFunctionCount)} sharded=${String(report.shardedFunctionCount)}`, ` functionsOnlyInExact=${String(report.functionsOnlyInExact.length)} ` +
|
|
177
|
+
`functionsOnlyInSharded=${String(report.functionsOnlyInSharded.length)}`, ` production resolved-edge divergences (total=${String(productionCount)}) by direction:`, ` phantom (sharded-only): ${String(phantomCount)} (budget ${String(budget.phantomDivergences)})`, ` decline (exact-only): ${String(declineCount)} (budget ${String(budget.declineDivergences)})`, ` conflict (both differ): ${String(conflictCount)} (budget ${String(budget.conflictDivergences)})`, ` test/fixture resolved divergences: ${String(report.testResolvedDifferences.length)} (benign)`, ` scc divergences: ${String(sccCount)} (budget ${String(sccBudget)})`, ` structural (unresolved-vs-absent) divergences: ${String(report.structuralDifferences.length)} (informational)`);
|
|
178
|
+
if (functionSetBreached) {
|
|
179
|
+
lines.push(` FAIL: function-set divergence — the two engines disagree on the FUNCTION SET.`, ` This MUST be 0 (a discovery/merge regression, not an edge gap).`);
|
|
180
|
+
appendSample(lines, 'exact-only function', report.functionsOnlyInExact);
|
|
181
|
+
appendSample(lines, 'sharded-only function', report.functionsOnlyInSharded);
|
|
182
|
+
}
|
|
183
|
+
const directions = [
|
|
184
|
+
{
|
|
185
|
+
label: 'phantom (sharded-only)',
|
|
186
|
+
key: 'phantomDivergences',
|
|
187
|
+
count: phantomCount,
|
|
188
|
+
budget: budget.phantomDivergences,
|
|
189
|
+
diffs: report.productionPhantom,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
label: 'decline (exact-only)',
|
|
193
|
+
key: 'declineDivergences',
|
|
194
|
+
count: declineCount,
|
|
195
|
+
budget: budget.declineDivergences,
|
|
196
|
+
diffs: report.productionDecline,
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
label: 'conflict (both differ)',
|
|
200
|
+
key: 'conflictDivergences',
|
|
201
|
+
count: conflictCount,
|
|
202
|
+
budget: budget.conflictDivergences,
|
|
203
|
+
diffs: report.productionConflict,
|
|
204
|
+
},
|
|
205
|
+
];
|
|
206
|
+
let directionBreached = false;
|
|
207
|
+
for (const d of directions) {
|
|
208
|
+
judgeMetric(lines, {
|
|
209
|
+
label: `${d.label} divergence`,
|
|
210
|
+
key: d.key,
|
|
211
|
+
count: d.count,
|
|
212
|
+
budget: d.budget,
|
|
213
|
+
});
|
|
214
|
+
if (d.count > d.budget) {
|
|
215
|
+
directionBreached = true;
|
|
216
|
+
lines.push(` NEW ${d.label} edges (owner file:line exact=[..] sharded=[..]):`);
|
|
217
|
+
for (const diff of d.diffs) {
|
|
218
|
+
lines.push(` ${diff.ownerFilePath}:${String(diff.line)}:${String(diff.column)} ` +
|
|
219
|
+
`exact=[${diff.toA}] sharded=[${diff.toB}]`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
const sccOverBudget = sccCount > sccBudget;
|
|
224
|
+
judgeMetric(lines, {
|
|
225
|
+
label: 'SCC divergence',
|
|
226
|
+
key: 'sccDivergences',
|
|
227
|
+
count: sccCount,
|
|
228
|
+
budget: sccBudget,
|
|
229
|
+
});
|
|
230
|
+
const failed = functionSetBreached || directionBreached || sccOverBudget;
|
|
231
|
+
lines.push(failed ? ` RESULT: FAIL` : ` RESULT: PASS`);
|
|
232
|
+
return {
|
|
233
|
+
failed,
|
|
234
|
+
functionSetBreached,
|
|
235
|
+
phantomCount,
|
|
236
|
+
declineCount,
|
|
237
|
+
conflictCount,
|
|
238
|
+
productionCount,
|
|
239
|
+
sccCount,
|
|
240
|
+
sccBudget,
|
|
241
|
+
lines,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
/** Emit the PASS/FAIL/tighten line for one budgeted metric. */
|
|
245
|
+
function judgeMetric(lines, m) {
|
|
246
|
+
if (m.count > m.budget) {
|
|
247
|
+
lines.push(` FAIL: ${m.label} ${String(m.count)} EXCEEDS budget ${String(m.budget)} (+${String(m.count - m.budget)}).`);
|
|
248
|
+
}
|
|
249
|
+
else if (m.count < m.budget) {
|
|
250
|
+
lines.push(` PASS: ${m.label} ${String(m.count)} is BELOW budget ${String(m.budget)}; ` +
|
|
251
|
+
`tighten the ratchet: set ${m.key}=${String(m.count)} in the budget JSON.`);
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
lines.push(` PASS: ${m.label} matches budget (${String(m.budget)}).`);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/** Append up to 5 sample identities of a breach list (keeps output bounded). */
|
|
258
|
+
function appendSample(lines, label, ids) {
|
|
259
|
+
for (const id of ids.slice(0, 5))
|
|
260
|
+
lines.push(` ${label}: ${id}`);
|
|
261
|
+
if (ids.length > 5)
|
|
262
|
+
lines.push(` … and ${String(ids.length - 5)} more ${label}(s)`);
|
|
263
|
+
}
|
|
264
|
+
//# sourceMappingURL=equivalence-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equivalence-check.js","sourceRoot":"","sources":["../../../src/cli/orchestrate/equivalence-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AASxD;;;;;GAKG;AACH,MA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AA4B,CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAC7E,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,oBAAoB,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACzE,CAAC;AACH,CAAC;AAED,gFAAgF;AAChF,SAAS,YAAY,CAAC,KAAe,EAAE,KAAa,EAAE,GAAsB;IAC1E,KAAK,MAAM,EAAE,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,OAAO,KAAK,KAAK,EAAE,EAAE,CAAC,CAAC;IACpE,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC;AACzF,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exact-engine boundary recovery (Phase 3, Option A — "exact = the 1-shard case").
|
|
3
|
+
*
|
|
4
|
+
* The single-program (exact) catalog IS the whole/merged catalog, so the cross-
|
|
5
|
+
* package call sites its type-checker-driven inline pass captures inconsistently
|
|
6
|
+
* (it only fires where `getSymbolAtLocation` succeeds and the reference kind
|
|
7
|
+
* dispatches) are recovered by running the SAME post-merge linker the sharded
|
|
8
|
+
* engine runs — `resolveCrossBoundaryCalls` — over the syntactic boundary calls
|
|
9
|
+
* the exact build emitted. The extractor already skips sites resolved inline, so
|
|
10
|
+
* a recovered edge never double-counts. This is what converges the two engines.
|
|
11
|
+
*/
|
|
12
|
+
import type { Catalog, CrossBoundaryCall } from '../../types.js';
|
|
13
|
+
/**
|
|
14
|
+
* Link the syntactic boundary calls the exact build emitted against its own
|
|
15
|
+
* (whole-program) catalog via the shared cross-shard linker. No-op when nothing
|
|
16
|
+
* was emitted (e.g. an incremental rebuild that touched no cross-package site).
|
|
17
|
+
*/
|
|
18
|
+
export declare function recoverExactBoundaryEdges(built: {
|
|
19
|
+
readonly catalog: Catalog;
|
|
20
|
+
readonly boundaryCalls?: readonly CrossBoundaryCall[];
|
|
21
|
+
}, files: readonly string[], projectRoot: string): Catalog;
|
|
22
|
+
/**
|
|
23
|
+
* The distinct workspace package ROOTS (absolute) the source files belong to —
|
|
24
|
+
* each file's nearest ancestor dir containing a `package.json`, up to the project
|
|
25
|
+
* root. Feeds `buildPackageManifestIndexFromRoots` so the exact engine resolves a
|
|
26
|
+
* `@scope/pkg` specifier to its package group exactly as the sharded engine does
|
|
27
|
+
* (which derives the same set from its `Shard[]`). Memoized per directory.
|
|
28
|
+
*/
|
|
29
|
+
export declare function derivePackageRoots(files: readonly string[], projectRoot: string): string[];
|
|
30
|
+
/** Nearest ancestor dir of `startDir` (inclusive) containing a `package.json`,
|
|
31
|
+
* up to `projectRoot`; `null` if none. */
|
|
32
|
+
export declare function findPackageRoot(startDir: string, projectRoot: string): string | null;
|
|
33
|
+
//# sourceMappingURL=exact-boundary-recovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exact-boundary-recovery.d.ts","sourceRoot":"","sources":["../../../src/cli/orchestrate/exact-boundary-recovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEjE;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE;IACL,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACvD,EACD,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,WAAW,EAAE,MAAM,GAClB,OAAO,CAOT;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAa1F;AAED;2CAC2C;AAC3C,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQpF"}
|