fix(ingestion): accumulate heritage records unconditionally in worker path#1955
Closed
hugogu wants to merge 2 commits into
Closed
fix(ingestion): accumulate heritage records unconditionally in worker path#1955hugogu wants to merge 2 commits into
hugogu wants to merge 2 commits into
Conversation
…e parents resolveHeritageId was falling back to generateId(label, name) when ctx.resolve() found no candidates, producing IDs like "Class:ClassName". Actual node IDs use the format "Class:filePath:ClassName", so every EXTENDS/IMPLEMENTS edge whose parent class lived in the same file was silently dropped by lbug's referential-integrity check. Fix: when no explicit fallbackKey is provided (parent class lookups), substitute filePath + ':' + name so the generated ID matches the node ID format and same-file inheritance edges survive import. Child class lookups (which always supply an explicit fallbackKey) are unaffected. The ambiguous-global branch that deliberately refuses to pick is also left unchanged. Adds a regression test that asserts the targetId is file-qualified for an unresolved same-file parent class. Co-authored-by: Claude <noreply@anthropic.com> AI-model: claude-sonnet-4-6
… path shouldAccumulate() was incorrectly skipping EXTENDS/IMPLEMENTS heritage records for all registry-primary languages (C#, TypeScript, Python, Go, etc.) in the worker-pool chunk loop. This caused ALL class inheritance and interface implementation edges to be silently dropped in production runs where the worker pool is engaged (repos with ≥15 files). The filter was designed for CALL and IMPORT records that are handled by the scope-resolution DAG for registry-primary languages. EXTENDS/IMPLEMENTS are processed exclusively by processHeritageFromExtracted — the registry- primary flag is irrelevant to heritage edge emission. Sequential-mode runs (small test fixtures, --workers 0) were unaffected because they call processHeritage() directly, bypassing shouldAccumulate. This made the bug invisible in all unit/integration tests. Fix: push heritage items unconditionally, without shouldAccumulate. Adds a worker vs sequential parity test for EXTENDS edges (abhigyanpatwari#1951). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@hugogu is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
CI Report✅ All checks passed Pipeline Status
Test Results
✅ All 10496 tests passed 9 test(s) skipped — expand for details
Code CoverageTests
📋 View full run · Generated by CI |
Collaborator
|
Superseded by #1956 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
shouldAccumulate() was incorrectly skipping EXTENDS/IMPLEMENTS heritage
records for all registry-primary languages (C#, TypeScript, Python, Go,
etc.) in the worker-pool chunk loop. This caused ALL class inheritance
and interface implementation edges to be silently dropped in production
runs where the worker pool is engaged (repos with ≥15 files).
The filter was designed for CALL and IMPORT records that are handled by
the scope-resolution DAG for registry-primary languages. EXTENDS/IMPLEMENTS
are processed exclusively by processHeritageFromExtracted — the registry-
primary flag is irrelevant to heritage edge emission.
After the fix, it shows orange lines (Extends)
Motivation / context
Close #1951
Areas touched
gitnexus/(CLI / core / MCP server)gitnexus-web/(Vite / React UI).github/(workflows, actions)eval/or other toolingAGENTS.md,CLAUDE.md,.cursor/,llms.txt, etc.)Scope & constraints
In scope
Explicitly out of scope / not done here
Implementation notes
Testing & verification
cd gitnexus && npm testcd gitnexus && npm run test:integration(if core/indexing/MCP paths changed)cd gitnexus && npx tsc --noEmitcd gitnexus-web && npm test(if web changed)cd gitnexus-web && npx tsc -b --noEmit(if web changed)gitnexus-web/e2e/)Risk & rollout
Checklist
AGENTS.md/ overlays changed: headers, scope block, and changelog updated per project conventions