gstack/test
Garry Tan 8a4afd868b
fix: zsh glob compatibility in skill preamble (v0.11.7.0) (#386)
* fix(preamble): make .pending-* glob pattern zsh-compatible (fixes #313)

**Problem:**
When running gstack skills in zsh, users see this error:
  (eval):22: no matches found: /Users/.../.gstack/analytics/.pending-*

**Root Cause:**
The Preamble code in gen-skill-docs.ts (line 167) contains:
  for _PF in ~/.gstack/analytics/.pending-*; do ...

In zsh, glob patterns that don't match any files cause an error:
  'no matches found: pattern'

In bash, the loop simply iterates zero times. This breaks all gstack
skills for zsh users (common on macOS).

**Solution:**
Check if any .pending-* files exist BEFORE attempting the for loop:
  [ -n "$(ls ~/.gstack/analytics/.pending-* 2>/dev/null)" ] && for ...

This approach:
-  Works in both bash and zsh
-  Silently skips the loop when no pending files exist (normal case)
-  Executes the loop when pending files are present
-  Uses ls with error suppression (2>/dev/null) for portability

**Testing:**
-  No pending files: loop skipped, no error
-  Pending files exist: loop runs normally
-  Compatible with bash and zsh
-  TypeScript syntax check passes

**Impact:**
Fixes all gstack skills for zsh users (macOS default shell).

Fixes #313

* test: add zsh glob safety test + regenerate SKILL.md files

Adds a test verifying the .pending-* glob in preamble is guarded by
an ls check (zsh-compatible). Regenerates all SKILL.md files to
propagate the fix from the previous commit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: regenerate SKILL.md files after merge with main

New skills from main (benchmark, autoplan, canary, cso, land-and-deploy,
setup-deploy) now include the zsh-compatible .pending-* glob guard.

* fix: use find instead of ls for zsh glob safety

Codex adversarial review caught that $(ls .pending-* 2>/dev/null) still
triggers zsh NOMATCH error because the shell expands the glob before ls
runs. Using find avoids shell glob expansion entirely.

* chore: bump version and changelog (v0.11.7.0)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update codex agent skill descriptions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Hiten Shah <hnshah@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 07:36:58 -07:00
..
fixtures feat: test coverage catalog — shared audit across plan/ship/review (v0.10.1.0) (#259) 2026-03-22 11:28:16 -07:00
helpers fix: add codex skill metadata for gstack skills (#339) 2026-03-23 07:32:08 -07:00
analytics.test.ts feat: safety hook skills + skill usage telemetry (v0.7.1) (#189) 2026-03-18 23:57:59 -05:00
codex-e2e.test.ts feat: /land-and-deploy, /canary, /benchmark + perf review (v0.7.0) (#183) 2026-03-21 14:31:36 -07:00
gemini-e2e.test.ts feat: Gemini CLI E2E tests (v0.9.2.0) (#252) 2026-03-20 08:30:09 -07:00
gen-skill-docs.test.ts fix: zsh glob compatibility in skill preamble (v0.11.7.0) (#386) 2026-03-23 07:36:58 -07:00
global-discover.test.ts feat: /retro global — cross-project AI coding retrospective (v0.10.2.0) (#316) 2026-03-22 13:52:47 -07:00
hook-scripts.test.ts feat: safety hook skills + skill usage telemetry (v0.7.1) (#189) 2026-03-18 23:57:59 -05:00
skill-e2e-browse.test.ts feat: /land-and-deploy, /canary, /benchmark + perf review (v0.7.0) (#183) 2026-03-21 14:31:36 -07:00
skill-e2e-cso.test.ts feat: /cso v2 — infrastructure-first security audit (v0.11.6.0) (#384) 2026-03-23 06:57:22 -07:00
skill-e2e-deploy.test.ts feat: /land-and-deploy, /canary, /benchmark + perf review (v0.7.0) (#183) 2026-03-21 14:31:36 -07:00
skill-e2e-design.test.ts feat: /land-and-deploy, /canary, /benchmark + perf review (v0.7.0) (#183) 2026-03-21 14:31:36 -07:00
skill-e2e-plan.test.ts feat: /land-and-deploy, /canary, /benchmark + perf review (v0.7.0) (#183) 2026-03-21 14:31:36 -07:00
skill-e2e-qa-bugs.test.ts feat: /land-and-deploy, /canary, /benchmark + perf review (v0.7.0) (#183) 2026-03-21 14:31:36 -07:00
skill-e2e-qa-workflow.test.ts feat: /land-and-deploy, /canary, /benchmark + perf review (v0.7.0) (#183) 2026-03-21 14:31:36 -07:00
skill-e2e-review.test.ts feat: /land-and-deploy, /canary, /benchmark + perf review (v0.7.0) (#183) 2026-03-21 14:31:36 -07:00
skill-e2e-workflow.test.ts feat: /land-and-deploy, /canary, /benchmark + perf review (v0.7.0) (#183) 2026-03-21 14:31:36 -07:00
skill-e2e.test.ts feat: test coverage catalog — shared audit across plan/ship/review (v0.10.1.0) (#259) 2026-03-22 11:28:16 -07:00
skill-llm-eval.test.ts feat: /land-and-deploy, /canary, /benchmark + perf review (v0.7.0) (#183) 2026-03-21 14:31:36 -07:00
skill-parser.test.ts feat: SKILL.md template system, 3-tier testing, DX tools (v0.3.3) (#41) 2026-03-13 21:08:12 -07:00
skill-routing-e2e.test.ts feat: /land-and-deploy, /canary, /benchmark + perf review (v0.7.0) (#183) 2026-03-21 14:31:36 -07:00
skill-validation.test.ts fix: let /review satisfy ship readiness gate (#387) 2026-03-23 07:28:45 -07:00
telemetry.test.ts feat: opt-in usage telemetry + community intelligence platform (v0.8.6) (#210) 2026-03-19 17:21:05 -07:00
touchfiles.test.ts feat: /autoplan — auto-review pipeline (v0.10.0.0) (#327) 2026-03-22 10:21:52 -07:00