Skip to content

Pre-push single-flight runner crashes on Windows without SIGHUP #9724

Description

@tianmind-studio

Product impact

  • Primary loop layer: Docs-Tooling
  • Involves data loss, failed capture, or broken sync/trust

Describe the bug

The installed pre-push hook routes through .github/scripts/preflight_runner.py, which assumes POSIX signal APIs are available. On Windows, every git push fails before the underlying pre-push checks start.

To reproduce

  1. On Windows, install/use the repository Git hooks.
  2. Push any branch that invokes scripts/pre-push-singleflight.
  3. Observe AttributeError: module 'signal' has no attribute 'SIGHUP' from run_owned().

Current behavior

run_owned() builds its handler map from (signal.SIGINT, signal.SIGTERM, signal.SIGHUP) unconditionally. Windows Python does not expose SIGHUP, so the wrapper exits with code 1 and Git rejects the push. The forwarding callback also uses POSIX-only os.killpg, which would be another portability hazard if invoked.

Expected behavior

The single-flight wrapper should register only signals supported by the host and forward them with a platform-compatible process API, allowing the same pre-push checks to run on Windows.

Environment

  • Windows 11
  • Python 3.11.15
  • Git for Windows 2.50+

Additional context

Running scripts/pre-push directly succeeds; only the single-flight wrapper fails. A regression test should exercise signal selection without requiring a real signal to interrupt the test process.

Activity

  1. added a commit that references this issue on Jul 27, 2026
    de1eda4
  2. added a commit that references this issue on Jul 27, 2026
    f630fe2
  3. added a commit that references this issue on Jul 30, 2026
    d524678
  4. added a commit that references this issue on Sep 29, 2026
    d3a8075
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