Skip to content

Session Handoff [auto-2028]: Bound the Guard's Stdin Descriptor Before int() (#2028) #2030

Closed

Description

@ptr727

Next steps

  1. Fix A Zero-Padded Stdin Descriptor Crashes the Guard's int() Call #2028 in host-setup/agent-safety/claude/gh-write-guard.py _redirects_stdin: the int(fd) call on a redirect's descriptor prefix is guarded only by tok.isdecimal(), so a digit string over Python's 4300-digit conversion limit raises ValueError and the hook exits non-blocking. Strip leading zeros and compare the remainder (or bound the length) before any int() call, so a zero-padded descriptor still reads as descriptor 0. Done looks like: a self-test row with a zero-padded stdin descriptor over 4300 digits on a while read loop is denied exactly as the bare 0< form is, and the row fails with the fix reverted.
  2. Drive the pull request to develop per drive-pr, its body carrying Closes on promotion: #2028, then close this lane out.

External blockers

None known.

Internal dependencies

The parked lane auto-1634 (branch feature/auto-1634, blocked) applies the same zero-strip idea to the timeout signal number in this file. Do not build on that branch or merge its work here. Base on develop and keep this change to the descriptor site, so either lane can land first and the other rebases over a small, separate hunk.

State

No branch, worktree, or pull request yet. Work on feature/auto-2028 in a worktree of its own, based on develop.

Parked decisions

None.

What the last round did

Nothing yet. This lane was opened by the unattended-handoff picker.

What not to repeat

Nothing yet.

New learnings

None yet.

Activity

  1. added
    handoffA link in the session handoff chain, one open issue per track
    on Sep 29, 2026
  2. ptr727 commented on Sep 29, 2026

    @ptr727
    OwnerAuthor

    Parked on decision #2034.

    Done. The fix for #2028 is on feature/auto-2028, pushed at 3e285f38, in #2033 to develop with Closes on promotion: #2028. The descriptor-0 test in _redirects_stdin is now any(unicodedata.decimal(c) for c in fd), which gives int()'s verdict for every isdecimal() string without converting it. Two self-test rows pin a 4400-zero descriptor (deny on /dev/zero, allow on a file). Reverting the fix fails them. Two local-strict-review passes ran and the second is recorded. The first pass found two introduced findings, both fixed, and one pre-existing defect, filed as #2032.

    Review state. Checks 10/10, unresolved=0, suppressed=0. Two Copilot rounds on the head: round 1 found nothing, and round 2's one thread was declined with evidence and resolved. CodeRabbit, prompted, found nothing actionable. pr_review.py status exits 45, COVERAGE_IS_UNSTATED, because the ccr-overview-v2 format states no coverage line. Round 1's file table names the only changed file.

    Worktree. Left standing at /home/pieter/repos/worktrees/ProjectTemplate-auto-2028, clean, on feature/auto-2028.

    What remains. Answer #2034. On option 1, re-run pr_review.py status 2033 to confirm the head is still 3e285f38 with nothing new, then merge #2033 to develop per drive-pr step 4 and close this lane out. On option 2, re-request Copilot and dispose of whatever it raises. On option 3, the maintainer drives it.

  3. added
    blockedBlocked on another issue: one in another repository, or a decision issue here for a parked handoff
    on Sep 29, 2026
  4. ptr727 commented on Sep 29, 2026

    @ptr727
    OwnerAuthor

    Lane closed out. Decision #2034 answered (merge as is), and #2033 was squash-merged to develop as dd4ca98. #2028 closes on the next promotion. No successor.

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

    blockedBlocked on another issue: one in another repository, or a decision issue here for a parked handoffhandoffA link in the session handoff chain, one open issue per track

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions