Skip to content

pv extract walks outside its input dir (parent of <dir>): 9.9 s release / 56 s debug vs 0.00 s #5780

Closed as not planned

Description

@noahgift

Owner: flow (aprender-flow). Asked by aprender-57. Root defect behind #5779.

pv extract <dir> reads the filesystem OUTSIDE <dir>: it walks the parent of its input (strace: 2.2 M statx, 689 k getdents64, 350 k openat for a 3-file fixture; the paths were sibling directories under /tmp).

Evidence (same 3-file fixture, host, load ~8):

  • parent = /tmp (19,631 entries, 60 G): 9.9 s old release pv, 56 s debug pv
  • parent = an empty dir: 0.00 s
  • an EMPTY input dir costs the same 9.9 s, so the cost is independent of the input.

Expected: extract reads only <dir> plus the paths its contracts name (entity.ref), and its time does not depend on what sits beside <dir>.
Candidate sites (not located, not measured): crates/aprender-contracts/src/ontology/extract/ apr_model.rs:171 (contract_dir.parent() as root), code.rs, binary.rs.
Falsifier: pv extract on a fixture dir under a parent holding 20 k entries runs in <1 s.
Test-side mitigation: branch work/5779 (nests the fixture); it does not fix pv.

Activity

  1. added this to the 0.73.0 milestone on Oct 20, 2026
  2. noahgift commented on Oct 22, 2026

    @noahgift
    MemberAuthor

    tracked in #2870

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions