Skip to content

hub_fetch_run.py Waits Unbounded for Its Child After terminate() #4494

Backlog

Description

@ptr727

Observed

catalog/snippets/hub_fetch_run.py at hub main 5c06f173 stops its uv run child in a finally with child.terminate() and then an unbounded child.wait(). Copilot and Qodo each raised this on ptr727/PlexCleaner#1299, which carries the file byte-for-byte.

Expected

CODESTYLE.md "Interrupts in Python" bounds this step: terminate(), then wait(timeout=...), and on subprocess.TimeoutExpired, kill() then wait(). The handler passes over a second Ctrl-C, so a uv run child that ignores or outlasts SIGTERM holds the hook or VS Code task forever. The scratch tree also stays held, and the recorded signal is never re-raised.

Fix

Apply the rule's bounded stop in the snippet, then re-carry it to every repository that holds it.

Activity

  1. added
    bug
    on Nov 26, 2026
  2. ptr727 commented on Nov 27, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown claim (away run 2026-11-27, round 1, group 6): branch burndown/hub-fetch-run-bounded-stop, issue #4494, the hub snippet only.

    Predicted files:

    • catalog/snippets/hub_fetch_run.py: the finally stop of the uv run child becomes terminate(), then wait(timeout=...), and on subprocess.TimeoutExpired, kill() then wait(), per CODESTYLE.md "Interrupts in Python".
    • tests/test_hub_fetch_run.py (new): a constructed child that ignores SIGTERM, proving the stop is bounded.

    Not claimed: re-carrying the snippet to the repositories that hold it, which is resync work in those repositories. #3827 (deferred) also names this file and is not worked here.

    Any other group needing one of these files waits for this branch to merge.

    Parked on #4523, a design decision raised by the local review pass. PR #4522 is open, its branch is pushed, and its worktree was left standing.

  3. ptr727 commented on Nov 27, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown state (away run 2026-11-27, round 1, group 6): parked on #4523.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions