Repository navigation
fix(pipeline): drop transient BlameIndex before serialization - #323
Merged
Merged
Conversation
The per-file BlameIndex is an in-memory-only signal consumed by the health biomarkers (function_hotspot / code_age_volatility); its own docstring notes it must never round-trip through the DB or artifacts. It was being attached to the git-metadata dicts that escape the pipeline in PipelineResult.git_metadata_list, so any JSON serialization of git metadata raised "Object of type BlameIndex is not JSON serializable", aborting the whole artifact build. Strip it once the health phase has consumed it, in both the full pipeline (orchestrator) and the incremental `update` path, via a shared drop_transient_git_signals() helper. DB persistence already filtered it out by column, so this is behaviour-preserving for OSS DB users and fixes JSON artifact writers (e.g. the hosted backend's git_metadata.json).
swati510
approved these changes
May 30, 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.
Problem
Indexing FULL-tier repos with real git history crashed with
Object of type BlameIndex is not JSON serializable. The per-fileBlameIndexis an in-memory-only signal (consumed by thefunction_hotspot/code_age_volatilitybiomarkers) but it was being attached to the git-metadata dicts that escape the pipeline inPipelineResult.git_metadata_list. Any JSON serialization of git metadata then raised — aborting the whole artifact build so the repo ended up with no graph/decisions/docs.Fix
Strip the transient signal once the health phase has consumed it, in both the full pipeline (
orchestrator) and the incrementalupdatepath, via a shareddrop_transient_git_signals()helper.blame_indexout by column, so this is behaviour-preserving for OSS DB users.git_metadata_list.Tests
tests/unit/pipeline/test_drop_transient_git_signals.py— verifies the key is dropped, other fields are preserved, the result is JSON-serializable, the sharedgit_meta_mapview is cleaned, and the op is idempotent. Full health/pipeline suites pass (264 tests).