fix(recipes): step-03 shell quoting + PR URL resolution (#4221, #4233)#4236
Closed
fix(recipes): step-03 shell quoting + PR URL resolution (#4221, #4233)#4236
Conversation
Fix two bugs in default-workflow step-03: #4221 - Shell quoting failure: - Changed heredoc from unquoted (<<EOFTASKDESC) to quoted (<<'DELIM') to prevent bash from expanding $(), backticks, or other metacharacters in template-substituted task_description content - Used unique delimiters (_AMPLIHACK_STEP03_TASK_EOF_) unlikely to collide with user task descriptions #4233 - PR URL extraction failure: - step-03b now handles PR URLs (pull/NNN) in addition to issue URLs - When a PR URL is found, resolves linked issue via gh pr view - Falls back to using PR number as reference if no linked issue exists - Last resort: scans task_description for bare #NNNN references Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Apr 5, 2026
This was referenced Apr 12, 2026
This was referenced Apr 13, 2026
Owner
Author
|
Superseded by PR #4368 (merged) which comprehensively fixed step-03b issue/PR reference extraction. |
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.
Fixes #4221 and #4233.
#4221: Shell quoting failure in step-03-create-issue
Root cause: Heredoc used unquoted delimiter (
<<EOFTASKDESC), allowing bash to expand `$()` and backticks in template-substituted content.Fix: Switch to quoted heredoc (
<<'_AMPLIHACK_STEP03_TASK_EOF_') with unique delimiter.#4233: step-03b fails on PR URL output
Root cause:
step-03b-extract-issue-numberonly matchedissues/[0-9]+URLs. When step-03 returns a PR URL (pull/[0-9]+), extraction fails.Fix:
gh pr view#NNNNreferencesDriven by Simard — this PR demonstrates Simard's ability to drive fixes on the amplihack ecosystem.