feat(cpp): Add structured resolver suppression outcomes#1785
Conversation
|
@azizur100389 is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
CI Report✅ All checks passed Pipeline Status
Test Results
✅ All 9667 tests passed 1 test(s) skipped — expand for details
Code CoverageTests
📋 View full run · Generated by CI |
|
Claude finished @magyargergo's task in 8m 32s —— View job PR #1785 — Production-Readiness ReviewReviewer: Combined production-readiness / ISO C++ static analysis / C++ compiler-engineering / GitNexus maintainer persona Review bar for this PRThe highest priority is graph correctness (false negatives preferred over false positives). Diagnostic observability is valuable only if additive, stable, and truthful. A diagnostic that says "suppressed" for a call site that later gets an edge from a downstream pass is worse than no diagnostic at all — it would actively mislead consumers. Problem being solvedIssue #1638 requests that the C++ resolver's intentional suppression decisions ( Current PR state
Merge status and mergeabilityCurrent CI: in progress. Cannot confirm pass/fail for this run at review time. Prior run Windows CI gate failure appears pre-existing/environmental. Final merge verdict depends on this run completing cleanly. Repository history considered
Branch hygiene assessmentClean. Commit Understanding of the changeThe PR introduces:
FindingsFinding 1 —
|
|
@azizur100389 can you please resolve the merge conflicts? 🙏 |
…to codex/cpp-resolution-outcome
|
Addressed the review findings and resolved the main-branch conflicts. Changes:
Validation:
|
There was a problem hiding this comment.
Pull request overview
Adds an additive “resolution outcome” diagnostics stream to the registry-primary scope-resolution pipeline (focused on C++), so callers can observe why certain CALLS edges were deliberately suppressed without changing existing edge-emission semantics.
Changes:
- Introduces
ResolutionOutcome/ResolutionSuppressionReasontypes and threads an outcomes stream through scope-resolution → pipeline output. - Records structured suppression outcomes for key C++ suppression cases (inline-namespace ambiguity, overload/conversion ambiguity, ADL suppression).
- Adds C++ integration assertions that outcomes are observable while preserving existing “zero edges on suppression” behavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| gitnexus/test/integration/resolvers/helpers.ts | Adds a helper to read resolutionOutcomes from PipelineResult. |
| gitnexus/test/integration/resolvers/cpp.test.ts | Adds assertions for structured suppression reasons in C++ fixtures. |
| gitnexus/src/types/pipeline.ts | Extends PipelineResult with optional resolutionOutcomes. |
| gitnexus/src/core/ingestion/scope-resolution/resolution-outcome.ts | Defines ResolutionOutcome and related types. |
| gitnexus/src/core/ingestion/scope-resolution/pipeline/run.ts | Collects and threads outcome recording through scope-resolution passes. |
| gitnexus/src/core/ingestion/scope-resolution/pipeline/phase.ts | Aggregates outcomes into the scope-resolution phase output. |
| gitnexus/src/core/ingestion/scope-resolution/passes/receiver-bound-calls.ts | Records suppression outcomes for receiver-bound ambiguities (incl. inline-ns and overload ambiguity). |
| gitnexus/src/core/ingestion/scope-resolution/passes/free-call-fallback.ts | Records suppression outcomes for free-call fallback ambiguities and ADL suppression. |
| gitnexus/src/core/ingestion/pipeline.ts | Exposes scope-resolution outcomes on the final PipelineResult. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const { | ||
| callables: ordinary, | ||
| nonCallableFound, | ||
| blockScopeDeclFound, | ||
| } = findCallableBindingsAndAdlBlocker(site.inScope, site.name, scopes); | ||
| const adlSuppressed = nonCallableFound || blockScopeDeclFound; | ||
| const adl = adlSuppressed | ||
| ? undefined | ||
| : options.resolveAdlCandidates( | ||
| { | ||
| name: site.name, | ||
| arity: site.arity, | ||
| argumentTypes: site.argumentTypes, | ||
| atRange: { startLine: site.atRange.startLine, startCol: site.atRange.startCol }, | ||
| }, | ||
| parsed, | ||
| scopes, | ||
| parsedFiles, | ||
| ); | ||
|
|
||
| const siteKey = `${parsed.filePath}:${site.atRange.startLine}:${site.atRange.startCol}`; | ||
| const key = siteKey(parsed.filePath, site); | ||
| if (adlSuppressed && ordinary.length === 0) { | ||
| recordSuppressedOutcome(options.recordResolutionOutcome, { | ||
| phase: 'free-call-fallback', | ||
| filePath: parsed.filePath, | ||
| name: site.name, | ||
| range: site.atRange, | ||
| reason: 'adl-non-callable-block', | ||
| candidates: ordinary, | ||
| }); |
| if (isOverloadAmbiguousAfterNormalization(candidates, arity)) { | ||
| return 'overload-ambiguous-normalization'; | ||
| } | ||
| if (ctx.conversionRankFn !== undefined && ctx.argumentTypes !== undefined) { |
| * deliberately suppress edge emission. Empty/undefined means no diagnostic | ||
| * stream was requested or produced; graph edge semantics are unchanged. | ||
| */ | ||
| resolutionOutcomes?: readonly ResolutionOutcome[]; |
|
Addressed the latest review comments. Changes:
Validation:
|
Fixes #1638
Summary
Tests
Local full-suite note