Repository navigation
Delta scans keep inherited-method call links (#3786) - #4237
Merged
Merged
Conversation
…heritance` (#3786) The call resolver reads a class's parents from cls["inheritance"] (a list), the shape the detector produces. record_keeper persists it as class_data.inheritance_parents (JSON) and the rehydrator restored only that column, so after a delta scan every class had no ancestry and inherited self.m() calls fell from the `class` step to `import`/`file`/`receiver`. The rehydrator now folds the column into `inheritance` (canonical key) and drops the raw column key. Removes the explain_call.py workaround. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013sNMtAg6s9dyyjNgnjRHi8
Contributor
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Joe Esquibel <[email protected]>
This was referenced Oct 3, 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.
Closes #3786
Root cause
call_resolver._ancestry()reads parents fromcls["inheritance"](a list; whatdetector.pyemits and what every resolver test uses).record_keeperpersists it asclass_data.inheritance_parents(JSON text).StateRehydratorcopied the column under its DB name and never setinheritance, so after a delta scan every unchanged class had no ancestry and inheritedself.m()calls dropped from theclassstep toimport/file/receiver.Key chosen
inheritanceis canonical: it is the in-memory contract (detector producer, resolver consumer, recorder read, all tests).inheritance_parentsstays only as the DB column name. Rehydrated classes now carryinheritance(list), and the raw column key is dropped so the two shapes cannot diverge. Full scan and delta scan hand the resolver the same shape.Sites changed
gitgalaxy/core/state_rehydrator.py: parseinheritance_parentsintocl["inheritance"](malformed or non-list becomes[]).tests/tools/explain_call.py: removed the Delta scans lose inherited-method call links: the rehydrator restoresinheritance_parentsbut the resolver readsinheritance#3786 workaround (and the now-unusedjsonimport).tests/dead_key_audit.py: allowlistinheritance_parents(the walker cannot see the generic column-copy write).Test
tests/core_engine/test_delta_inheritance_3786.py: real git repo (base.pyBase.load, child.pyChild(Base).run -> self.load(), other.py), full scan, then a commit touching only other.py and an--incrementaldelta scan. Asserts theloadcall row (stepclass, target base.py:load) is identical in both. Failed on main (delta gave stepimport), passes now.Results
pr_gates.pyfull: everything green except the dead-key audit test caused by this change, fixed via the allowlist;--fastre-run on the final tree: 5/5 pass. Suite otherwise 13960 passed.Sibling fields
Rehydrated classes still lack
_start_line/_end_line(detector-internal, no DB column, resolver readsstart_linewhich a fresh scan does not set either), so not the same bug.method_countandstate_entanglementare restored. Not changed.Other open PRs
No golden movement, so #4058-fix, #4231, #4109, #4213 and the #4108 pin bump need no re-bless for this.
🤖 Generated with Claude Code
https://claude.ai/code/session_013sNMtAg6s9dyyjNgnjRHi8