CLAUDE.md portability baseline: zsh glob nomatch aborts and multi-line quoting hazards are missing #29
Labels
No labels
component:adapters
component:lifecycle
component:qa
component:setup
component:shared
component:worktrees
phase/accepted
phase/backlog
phase/deployed
phase/developing
phase/integrating
phase/planning
phase/qa
phase/requirements
phase/uat
priority:critical
priority:critical
priority:high
priority:high
priority:low
priority:low
priority:medium
priority:medium
type:bug
type:chore
type:docs
type:feature
type:infra
type:tech-debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jbr870/devwork-skills#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Observation
Two zsh hazards in skill-emitted glue recur across runs and are absent from the CLAUDE.md portability baseline (which covers
mapfile, reserved variables, and python/node glue, but not these):nomatchaborts. Under zsh, an unmatched glob aborts the whole compound command before redirections apply —2>/dev/nulldoes not save it:Recurrence
Hazard 1: 3 independent runs. Hazard 2: 1 run, but same root cause (glue executed by the operator's login shell) and same fix location.
Hypothesis
Amend the CLAUDE.md portability baseline with both rules: (a) always quote glob patterns meant for the tool, not the shell (
--include='*.ts'), and never rely on redirection to survivenomatch; (b) for any fence beyond a few lines or with nested quoting, write a temp.shand run it withbashexplicitly rather than pasting a compound command. Extendscripts/lint-conventions.shwhere mechanically checkable (unquoted--include=*/--exclude=*forms are grep-able).Suggested lane
meta-amend (CLAUDE.md text + lint extension).
Filed by /meta-retrospective 2026-08-13.
Current-text confirmation, one day old: the 2026-08-12 verity transcripts (skills deployed at
ae802e0, which includes the portability baseline as written) show the unquoted-glob failure still recurring — slot3 alone: 6×no matches found: --include=*.tsplusapps/api/src/matrix/*.ts,apps/web/e2e/*.spec.tsvariants; slot1/slot2/slot4/slot6 one hit each. Fourth-plus independent run, and proof the gap survives in text that postdates the original three reports. The lint-check half of the hypothesis (grep for unquoted--include=*/--exclude=*in emitted fences) should land with the amendment.Evidence added by /meta-retrospective 2026-08-13 (transcript sweep).
Outcome — amended (commit
930b561)Two rules added to the CLAUDE.md portability baseline: (1) quote every glob meant for the tool (
--include='*.ts', quoted path patterns) — under zsh an unmatched glob aborts the compound command before redirections apply; (2) beyond a few lines or one level of quoting, emit a temp.shand run it with bash explicitly (also pins the interpreter). Plus a new lint-conventions.sh check for unquoted--include=/--exclude=globs in emitted fences — verified firing on a fixture and clean on the tree.Gate: lint clean. Desk-check vs originating scenarios: slot3's 6×
--include=*.tsfailures are now both a written rule and a mechanical gate; slot1-42's(eval):20: unmatched "maps to the emit-a-script rule. The unquoted-path-glob half (apps/*/src) is rule-only (too noisy to lint safely) — acceptable residual. Closing.