Skip to content

read_discovery.cover promotes a read when no write sent a recorded value #2820

Done

Description

@abrichr

read_discovery.cover can promote a root read as covering a save when no write sent a recorded parameter value.

Where: packages/flow/openadapt_flow/read_discovery.py

  • Lines 488–490 build sent from the writes' recorded parameter values. When no write sent one, sent is empty.
  • Line 585, if surface is None or not set(sent) <= set(surface.bound.values()), then passes trivially, because the empty set is a subset of every set.
  • So the first listing with a surface becomes the target, and the read is promoted as covering the save without holding any value that was written.

Contrast: discover() already skips this case, at around line 280: "skipped: the write sent no recorded parameter value".

Fix: In cover(), refuse when sent is empty, with the same reason discover() gives, and add a regression test. Use a raw capture whose write sends no recorded parameter. A minimized capture never reaches this point once #2819 lands, because unreadable writes are refused first.

Found while fixing #2789 (#2819).

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions