fix: adversarial review — GitLab gate, shell safety, MR prefix preservation

Three fixes from adversarial review:
1. land-and-deploy: add GitLab gate after Step 0 — prevents detection/
   execution mismatch where agent detects GitLab but all subsequent
   steps are GitHub-only
2. document-release: use heredoc for glab mr update body to avoid shell
   metacharacter mangling ($, backticks, !) in MR descriptions
3. retro: preserve original #/! prefix in PR/MR number extraction —
   GitLab !42 stays as !42, not incorrectly converted to #42

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-26 01:03:35 -06:00
parent 681d6461c1
commit 2e34410687
6 changed files with 18 additions and 6 deletions
+5 -1
View File
@@ -573,8 +573,12 @@ gh pr edit --body-file /tmp/gstack-pr-body-$$.md
```
**If GitLab:**
Read the contents of `/tmp/gstack-pr-body-$$.md` using the Read tool, then pass it to `glab mr update` using a heredoc to avoid shell metacharacter issues:
```bash
glab mr update -d "$(cat /tmp/gstack-pr-body-$$.md)"
glab mr update -d "$(cat <<'MRBODY'
<paste the file contents here>
MRBODY
)"
```
5. Clean up the tempfile:
+5 -1
View File
@@ -320,8 +320,12 @@ gh pr edit --body-file /tmp/gstack-pr-body-$$.md
```
**If GitLab:**
Read the contents of `/tmp/gstack-pr-body-$$.md` using the Read tool, then pass it to `glab mr update` using a heredoc to avoid shell metacharacter issues:
```bash
glab mr update -d "$(cat /tmp/gstack-pr-body-$$.md)"
glab mr update -d "$(cat <<'MRBODY'
<paste the file contents here>
MRBODY
)"
```
5. Clean up the tempfile: