fix: correct phase label slug generation for phases 9+#101
Merged
snipcodeit merged 2 commits intomainfrom Mar 1, 2026
Merged
Conversation
added 2 commits
March 1, 2026 13:18
…oject.md
- Replace || fallback with explicit if [ -z ] guard (head -c 40 exits 0 on empty)
- Replace ${VAR,,} bash-only lowercasing with POSIX tr '[:upper:]' '[:lower:]'
- Add tr -cd 'a-z0-9-' to strip non-slug characters from fallback path
…s/mgw/project.md
- Apply identical fix as commands/project.md (files are mirrors)
- Replace || fallback with explicit if [ -z ] guard
- Replace ${VAR,,} bash-only syntax with POSIX tr '[:upper:]' '[:lower:]'
- Add tr -cd 'a-z0-9-' to strip non-slug characters from fallback path
Owner
Author
Detailed Testing ProcedurePrerequisites
Steps to Reproduce the Bug (before fix)
Steps to Verify the Fix
Root Cause VerificationThe two root causes can be verified independently: Fix 1 — `head -c 40` exit code issue: # This always exits 0, so || fallback never fires:
echo "" | head -c 40; echo $? # outputs: 0
# Fix: use explicit if [ -z "$PHASE_SLUG" ] guard insteadFix 2 — ZSH `${VAR,,}` incompatibility: # In ZSH, bash-only lowercase expansion fails:
VAR="Hello World"
echo ${VAR,,} # ZSH: bad substitution error
# Fix: use tr '[:upper:]' '[:lower:]' which is POSIX-compatible
echo "$VAR" | tr '[:upper:]' '[:lower:]' # works in bash and ZSHExpected ResultAll phase labels (including phases 9+) should have complete, correctly-formatted slugs matching their phase names. |
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 #100
Changes
Test Plan