Skip to content

Delta scans keep inherited-method call links (#3786) - #4237

Merged
squid-protocol merged 2 commits into
mainfrom
fix/3786-delta-inheritance
Oct 3, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
fix/3786-delta-inheritance

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #3786

Root cause

call_resolver._ancestry() reads parents from cls["inheritance"] (a list; what detector.py emits and what every resolver test uses). record_keeper persists it as class_data.inheritance_parents (JSON text). StateRehydrator copied the column under its DB name and never set inheritance, so after a delta scan every unchanged class had no ancestry and inherited self.m() calls dropped from the class step to import/file/receiver.

Key chosen

inheritance is canonical: it is the in-memory contract (detector producer, resolver consumer, recorder read, all tests). inheritance_parents stays only as the DB column name. Rehydrated classes now carry inheritance (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

Test

tests/core_engine/test_delta_inheritance_3786.py: real git repo (base.py Base.load, child.py Child(Base).run -> self.load(), other.py), full scan, then a commit touching only other.py and an --incremental delta scan. Asserts the load call row (step class, target base.py:load) is identical in both. Failed on main (delta gave step import), passes now.

Results

  • Golden masters: no drift on both legs (galaxy_venv full, galaxy_zero_venv zero-dep), engine path verified as this worktree.
  • Call-graph resolution baselines: untouched (full-scan path unchanged).
  • pr_gates.py full: everything green except the dead-key audit test caused by this change, fixed via the allowlist; --fast re-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 reads start_line which a fresh scan does not set either), so not the same bug. method_count and state_entanglement are 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

…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
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Joe Esquibel <[email protected]>
@squid-protocol
squid-protocol merged commit 416fb64 into main Oct 3, 2026
32 checks passed
@squid-protocol
squid-protocol deleted the fix/3786-delta-inheritance branch October 3, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delta scans lose inherited-method call links: the rehydrator restores inheritance_parents but the resolver reads inheritance

2 participants