Sync dotnet code with upstream Python changes (bb9afeb8..bfd42c1e)#8
Merged
sharpninja merged 3 commits intomainfrom Mar 5, 2026
Merged
Conversation
…RowTransformers, per-workflow stats, Entity/Relationship data model updates Co-authored-by: sharpninja <16146732+sharpninja@users.noreply.github.com>
…l coalescing in RowTransformers Co-authored-by: sharpninja <16146732+sharpninja@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Sync dotnet code with python changes since last commit
Sync dotnet code with upstream Python changes (bb9afeb8..bfd42c1e)
Mar 5, 2026
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.
Description
Ports Python-side changes from upstream microsoft/graphrag (commits
64c55522throughbb9afeb8) into the dotnet codebase.Related Issues
Tracks upstream commits:
bfd42c1e(phantom entity filtering),bf1034a7/97045b55(row transformers),47fae953(per-workflow stats),ba9169a2(finalize graph schema).Proposed Changes
GraphUtils.FilterOrphanRelationships— Mirrors Python'sfilter_orphan_relationships(). Drops relationships whose source/target references a non-existent entity title, preventing broken graph edges from LLM hallucinations.RowTransformers(new) — C# port ofrow_transformers.py. Static helpers for row-level type coercion during streaming table reads:SafeInt,SafeFloat,CoerceList, plus per-model transform methods (TransformEntityRow,TransformRelationshipRow, etc.).PipelineRunner.DumpStatsAsync— Writesstats.jsonto output storage after each workflow completes, matching Python's_dump_stats_json()behavior for monitoring/observability.Entity.Frequency/Entity.Degree— New properties matching Python'sNODE_FREQUENCYandNODE_DEGREEschema columns used byfinalize_entities.Relationship.CombinedDegree— New property matching Python'sEDGE_DEGREEschema column used byfinalize_relationships.FromDictionaryupdates — BothEntityandRelationshipdeserialization now handles the new fields.Checklist
Additional Notes
316 tests pass (280 existing + 36 new). Zero build warnings, zero CodeQL alerts. Workflow stub implementations remain unchanged — these changes add the data model and utility infrastructure that the workflow implementations will consume once ported.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.