fix(verify): bound hung verify commands when timeout coreutil is absent #118
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_shrimp!118
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/verify-command-timeout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#44
What
Bounds hung verify commands even when the
timeoutcoreutil is unavailable, and makes the timeout configurable.Why
run_shellpreviously relied on thetimeoutcoreutil; if it was absent it fell back to runningsh -c <cmd>with no bound — a hung build could wedge a verification run indefinitely.Changes
run_shell_bounded): whentimeoutis missing, spawn the shell in its own process group, drain stdout/stderr on dedicated threads (so a chatty command can't deadlock on a full pipe), andSIGKILLthe whole group on expiry so child build processes die too.HERO_SHRIMP_VERIFY_TIMEOUT_SECS: a positive integer overrides the 300s default; zero/non-numeric/unset keep the default so a misconfiguration can never remove the bound.pidfile.rstests (separate commit).Tests
resolve_timeout_secs_reads_env_and_falls_back_on_bad_values— env parsing + fallbacks.in_process_fallback_bounds_a_hung_command— a 30s sleep is killed at ~1s, reports non-zero, notes the timeout in stderr.🤖 Generated with Claude Code