Skip to content

fix(corekit): the record-skip helper trusts seekable() as the Extractor did before #2104 #2108

Closed

Description

@JarryShaw

Found while reviewing #2104. The skip helper in pcapkit/corekit/io.py (the function that skips the rest of a record, just above PeekableStream) picks seek or read by isinstance(file, SeekableReader) or not file.seekable(). On Windows a pipe reports seekable() as True while seek does nothing (CPython gh-86768), so a raw pipe reaching this helper would "skip" without moving.

Once #2104 lands, the Extractor wraps such a stream in SeekableReader before any frame reader sees it, so that path is covered. The open question is whether any other caller hands the helper a raw stream, such as an engine or protocol used directly.

To do: check every caller. Then either share #2104's _can_seek() here or document why it cannot see a raw pipe, with a test either way. This depends on #2104 merging first.

Activity

  1. added
    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 23, 2026
  2. moved this to Blocked in PyPCAPKiton Oct 23, 2026
  3. added
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 23, 2026
  4. moved this from Blocked to Pending in PyPCAPKiton Oct 23, 2026
  5. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 23, 2026
  6. moved this from Pending to WIP in PyPCAPKiton Oct 23, 2026
  7. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 24, 2026
  8. added this to the PyPCAPKit v1.5 milestone on Oct 26, 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

    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions