Skip to content

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

Closed

Description

@squid-protocol

What

On a fresh scan, call_resolver._ancestry() reads each class's parents from cls["inheritance"]. The state rehydrator restores classes from class_data, which stores them as inheritance_parents (a JSON string), and never sets inheritance. After a delta scan, every class has no ancestry, so a call to an inherited method (this.m() / self.m() landing on a parent class) no longer resolves through the class step. It falls to file/import/receiver, or nothing.

Evidence

Found by the new tests/tools/explain_call.py (#3776), which re-runs the resolver on a master DB's rehydrated inputs and checks the result against the DB's own fcall_data rows. On zod (colinhacks/zod@2bf7b0630d53), packages/zod/src/v3/types.ts:_parse@3824 (in ZodFunction extends ZodType):

callee fresh scan (recorded) rehydrated re-run
_processInputParams class → types.ts:191 (ZodType's method) file → types.ts:191

The target happens to be the same here, but the step differs, and elsewhere the target will too. Rehydrated class_data rows look like {'name': 'ZodFunction', 'inheritance_parents': '["ZodType"]', …}, with no inheritance key.

Fix

In state_rehydrator.py, restore inheritance for every class as the parsed list of inheritance_parents, the shape a fresh scan hands the resolver. Add a test to tests/tools_recorders/test_fcall_data.py: an inherited self.method() resolves class fresh and after rehydration. explain_call.py carries a local workaround that cites this issue; remove it with the fix.

Activity

  1. added
    bug
    core-engine
    on Sep 26, 2026
  2. added
    scope:infra
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcore-enginescope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions