Skip to content

Indexed dispatch over comprehension-built and non-append-mutated containers has no callees #694

Description

@khatchad

Follow-up to the indexed-dispatch shape of #661 (fixed for append-built lists in ponder-lab#533).

The ponder-lab#533 fix surfaces append-accumulated contents at subscript reads by reading the synthetic __list_append_contents__ property (processListAppend's write-side dual). Containers populated any other way still starve an indexed dispatch:

  • Comprehension-built (confirmed): replacing the fixture's append loop with self.sub_layers = [Inner() for _ in range(self.num_layers)] fails Function must exist in call graph for Inner.call on the Surface append-accumulated list contents at subscript reads ponder-lab/ML#533 branch—comprehension contents flow through neither the append property nor numeric fields. This form is at least as common as append in Keras subclasses.
  • Other mutators (structural, unverified): extend, insert, and += are unmodeled entirely (processListAppend matches append only), so they starve both subscript reads and value iteration.
  • Dict-keyed dispatch (unverified): self.blocks["enc"](x) reads a constant-string member, deliberately outside the Surface append-accumulated list contents at subscript reads ponder-lab/ML#533 gate; literal/[k] =-populated dicts likely work but have no guard.

A runnable comprehension fixture (tf2_test_layer_list_compr.py, the tf2_test_layer_list.py miniature with the accumulation swapped) reproduces the first bullet; suggest landing it as a suppressed guard with a TODO referencing this issue, then generalizing content surfacing per accumulation form.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions