Repository navigation
clean tests: never hand a git call the runner's stdin (#46) - #50
Merged
Merged
Conversation
tests/clean_test.py ran its fixture git calls with the runner's stdin, so `git mktree` waited forever when that stdin was an open socket, as under an agent harness. The fixture helper now gives every git call an empty stdin unless it passes input explicitly, `git mktree` gets its input through `input=`, and the helper has a timeout. lib/clean.py's git calls already closed stdin. A new test runs the mktree fixture in a child whose stdin is one end of a socketpair under a timeout, and calls lib/clean.py's run() on `git mktree` with fd 0 pointed at the socket. Closes #46 Signed-off-by: kikashy <35789537+kikashy@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
Narrow review: devkit #49 (issue #48) and #50 (issue #46)#49 (e779849 on 250b07a): the parity example now moves its checkout out of the clone before any check runs, and an unmapped untracked path gets its own reason; no findings. #49 dispositions
#50 dispositions
What I ran
#49 merge: ready, no HIGH, no MEDIUM, no LOW. |
|
🎉 Thank you for your contribution to Judgment Pack! If you’d like another task, choose a path that interests you: |
Merged
kikashy
added a commit
that referenced
this pull request
Oct 26, 2026
Version 0.9.0 in lib/common.sh and on line 2 of the vendored scripts and the template; the release notes for v0.9.0 (#49 workflow-created paths and --changed, #50 test suites and standard input). Signed-off-by: kikashy <35789537+kikashy@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #46:
tests/clean_test.pyhung ingit mktreewhen the runner's stdin was an open socket (an agent harness); with< /dev/nullit passed.What changes
tests/clean_test.py: the fixturegithelper gives every callstdin=subprocess.DEVNULLunless it passesinput=explicitly, and a 60 s timeout;git mktreegets its (empty) input throughinput=''; the sleeping child of the process-evidence test getsstdin=subprocess.DEVNULLtoo.lib/clean.py: unchanged. Its only subprocess call,run(), already closes stdin; the new test pins that.test_git_calls_ignore_an_open_socket_on_stdin: runs the mktree fixture (Cleanup.test_bare_git_refused) in a child whose stdin is one end of asocketpair, under a 60 s timeout, and callsclean.run()ongit mktreewith fd 0 pointed at the socket.Mutants (scratch copies):
input=removed: the new test fails after 60 s (the fixture git calls waited on the open socket on stdin);stdin=subprocess.DEVNULLremoved fromclean.run(): the new test errors after 30 s (verification unavailable: git).The whole suite (
tests/run.sh) run with a socket on stdin, not/dev/null: exit 0, 439 passed, 0 failed.Public surface
none (tests only).
Checks
Sign-off
Every commit carries a Developer Certificate of Origin sign-off that matches its author.
🤖 Generated with Claude Code