fix(orchestrate): launch-session.sh fail-fast input validation + zsh word-splitting docs (#123) - #125
Merged
Merged
Conversation
…ting a tmux session Adds three fail-fast guards for issue #123's caller-bug shapes, all firing before any tmux call: a session name outside [A-Za-z0-9_-]+ (a zsh word-splitting bug can hand this a space-containing name), a worktree argument that is not a git work-tree root (a shared parent directory or a non-root subdirectory), and an LO_STATUS_DIR/LO_TASK_ID pair with exactly one set (set-but-empty counts as unset — the incident's exact shape). tests/launch-session.bats: adds a real git-worktree fixture, rewrites existing worktree-arg invocations to use it, and adds normal/error/boundary coverage per guard. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011PK2GZqRmjjctDv4A9X7vp
… calls Issue #123 part B. Documents the root cause behind the incident (zsh does not word-split unquoted parameters, unlike bash) and the exit-2 fail-fast contract t1 shipped, so coordinators write per-task explicit launch-session.sh calls instead of bash-style splitting loops. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKHgksH77r9sWW9cFHvhDY
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
Fixes #123 —
launch-session.shsilently launched broken workers when a zshcoordinator's word-splitting bug handed it malformed arguments. Scope A+B from
the issue (the optional launch-many wrapper C was excluded).
launch-session.sh, allexiting 2 with a clear stderr message BEFORE any tmux session is created:
LO_RUN_IDsuffix) must be non-empty and match[A-Za-z0-9_-]+.worktrees/shared parent and repo subdirs; physical-path comparison so macOS symlinked tmpdirs don't false-reject)LO_STATUS_DIR/LO_TASK_IDmust be set together — exactly one set (including set-but-empty, the incident shape) is rejected instead of silently skipping status pre-seedTests
tests/launch-session.bats: 36 tests (8 new guard cases incl. the three incident shapes; existing invocations moved onto agit initwork-tree fixture; theLO_STATUS_DIR-alone boundary test updated to the new exit-2 contract).scripts.batsSKILL.md content guards included..worktreesparent dir, andLO_TASK_ID=""all exit 2 with no tmux session created.🤖 Generated with Claude Code
https://claude.ai/code/session_01MQHKDLpk2drNwP147ZASKv