feat(cpp): Expand type_traits constraint registry#1648
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 9217 tests passed 1 test(s) skipped — expand for details
Code CoverageTests
📋 View full run · Generated by CI |
|
Claude finished @magyargergo's task in 12m 49s —— View job Adversarial Production-Readiness Review — PR #1648
Review bar for this PRISO C++ Current PR state
Branch hygiene assessmentClassification: merge-from-main commit present but harmless and merge-safe One feature commit ( Understanding of the changeThis PR expands the C++ SFINAE constraint registry from 4 predicates ( ISO C++ type-traits conformance scorecard
FindingsFinding 1 — Function parameter lookup gap [BLOCKING | Lane B]Severity: High — merge-blocking per review rules. Evidence: // Limitation: only `declaration` siblings inside the enclosing
// `compound_statement` are inspected. Function parameters live in the
// `function_declarator`'s `parameter_list` and are NOT resolved here, so
// `void run(int n) { process(n); }`
// infers `''` for `n` and the constraint filter falls through to
// `'unknown'` → ambiguity suppression → 0 CALLS edges.ISO C++ relevance: Issue #1629's motivating example is: void run(S* p, S s) { f(p); f(s); }
This is the exact false-ambiguity scenario described in the issue. GitNexus production risk: The fixture works around this by using local variables. But the issue's motivating example (function parameters) is unresolved. Users relying on Recommended fix: Extend Blocks merge: Yes — the review brief states: "If the issue's motivating pointer/class cases still fall through to false ambiguity, verdict must be Finding 2 —
|
|
@azizur100389 can you please look into this? 🙏 |
|
Addressed the review findings in Changes:
Validation:
|
Summary
is_void_v,is_enum_v,is_class_v,is_pointer_v,is_reference_v,is_const_v, andis_volatile_vargumentTypeClassessidecar so constraint filtering can use cv/ref/pointer shape without changing normalizedargumentTypesused by overload narrowingunknownrather than dropping candidatesFixes #1629
Tests
npx vitest run test/unit/scope-resolution/cpp/cpp-constraint.test.tsnpx vitest run test/integration/resolvers/cpp.test.ts -t "Tier-A type_traits predicates"npx vitest run test/integration/resolvers/cpp.test.tsREGISTRY_PRIMARY_CPP=0 npx vitest run test/integration/resolvers/cpp.test.ts -t "Tier-A type_traits predicates"(expected scope-resolver-only skips)npx tsc --noEmitgit diff --checkNote:
npx gitnexus impact ...andnpx gitnexus detect_changes ...currently exit 1 with no output in this checkout, so the change was kept scoped to the C++ constraint/type-shape path and validated with targeted plus full C++ resolver suites.