Skip to content

Decide How to Close the int() Crash in the Signal-0 Timeout Check (#1634) #1985

Closed

Description

@ptr727

Question

The fix for #1634 (handoff #1983, branch feature/auto-1634, no pull request yet) used its two rounds of local review edits and a third strict review pass still found an introduced defect. Per local-strict-review, editing stopped here. Should the lane apply the fix below and continue to a pull request?

The open finding

_is_timeout_signal_zero in host-setup/agent-safety/claude/gh-write-guard.py calls int() on any all-digit -s value. Python 3.11 and later raise ValueError for a digit string longer than 4300 digits, so a timeout -s <5000 zeros> 900 ... prefix crashes the hook with exit 1, a non-blocking hook error, and the command runs with no check at all, a cross-owner gh api write included. The code before this branch skipped the -s value without converting it, so the crash is new with this change.

Options

  1. Recommended: fix and continue. Strip leading zeros and refuse a digit string longer than an int's range (ten digits) before int(), treating an over-long value as the zero it masks to when it is all zeros and as no signal otherwise, add a self-test case with a digit string over 4300 digits, run one more strict pass, then open the pull request to develop. The parked work keeps everything it has and gains one small change.
  2. Drop the number masking. Read only 0+, EXIT and the SIG forms as signal 0 and never call int(). This removes the crash with less code, and -s 128 or -s 256 go back to being read as a bound, a leak the README would then have to declare.
  3. Abandon the lane. Delete feature/auto-1634 and leave timeout -s 0 Reads as a Bound and Delivers None #1634 open for an attended session.

Blocks

Activity

  1. added
    decision
    on Sep 28, 2026
  2. ptr727 commented on Sep 28, 2026

    @ptr727
    OwnerAuthor

    Answered by the maintainer in an attended session: option 1, fix and continue. Strip leading zeros and refuse a digit string over ten digits before int(), add a self-test row with a digit string over 4300 digits, run one more strict pass, then open the pull request to develop. Work continues under handoff #1983.

  3. removed
    decision
    on Sep 28, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions