prefix install: ./setup --status reports "1 of 114 broken" and exits 1, though the doc's own prefixed path resolves

Aperta Adatta ai principianti
#4,164 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
77/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
bash, typescript
Ambito
cli, testing

Direzione di ricerca

Inizia in setup, alla funzione _status_install_checks(), e controlla come il suo ramo ../* risolve i link alle sezioni nelle installazioni con prefisso. Riproduci il problema con ./setup --status dopo un’installazione di Claude con prefisso, quindi confronta il risultato con l’installazione senza prefisso. Il lavoro è concluso quando tutti i 114 link vengono risolti e --status termina con codice di uscita 0 per entrambi i layout.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What happened

On a prefix install (--prefix, skills land as gstack-review, gstack-qa, …), ./setup --status reports a broken section link for the Claude host and exits 1 — but nothing is actually broken. Every prefix install fails this self-check permanently.

$ ./setup --status; echo "exit=$?"
Install checks:
  opencode global: router is a real file; section links: 75 checked, all resolve
  cursor global: router is a real file; section links: 75 checked, all resolve
  agy global: router is a real file; section links: 75 checked, all resolve
  gemini global: router is a real file; section links: 75 checked, all resolve
  codex global: router is a real file; section links: 74 checked, all resolve
  claude global: router is a real file; section links: 1 of 114 broken (first: gstack-review/SKILL.md names ../qa/sections/exploratory.md). Fix: cd ~/.claude/skills/gstack && ./setup --host claude
gstack: an install has broken section links (see Install checks above); exit 1
exit=1

Re-running the suggested ./setup --host claude reproduces it byte for byte, so the "Fix:" hint cannot clear it.

Steps to reproduce

  1. git clone --single-branch --depth 1 https://github.com/garrytan/gstack ~/gstack && cd ~/gstack && ./setup --host claude --prefix --global (any prefix install does it; the Claude host is the only one that ships the relative pointers)
  2. ./setup --status; echo $? → 1 of 114 broken, exit 1
  3. Drop --prefix (./setup --host claude --no-prefix --global) → 114 checked, all resolve, exit 0

Why it is a false positive

The installed gstack-review/SKILL.md states both layouts itself, one line apart:

- If the caller directory is `review`, Read `../qa/sections/exploratory.md` in full.
- If the caller directory is prefixed `gstack-review`, use `../gstack-qa/sections/exploratory.md` instead and read it in full.

_status_install_checks() (in setup) walks every Read `<path>/sections/<f>.md` pointer and resolves ../* literally:

          ../*) path="$dir/$tok" ;;

On a prefix install $dir is …/gstack-review, so ../qa/sections/exploratory.md points at …/qa/sections/…, which does not exist — while the very next line of the same doc tells the agent to use ../gstack-qa/sections/…, which does. The checker counts the first pointer as broken before ever reading the second.

Expected

./setup --status reports 114 checked, all resolve and exits 0 on a prefix install, because every pointer the doc offers resolves in the layout the doc itself describes.

Suggested fix

Either is enough, and neither touches installed content:

  1. Resolve the prefixed sibling in the ../*) arm — if $dir/$tok is unreadable, retry with the first path segment prefixed (../qa/… → ../gstack-qa/…) when that file exists.
  2. Rewrite body pointers in prefix mode next to the existing name: patch (bin/gstack-patch-names), so the installed doc carries only the path that exists in that layout.

Impact

--status is the readiness gate used in docs/hosts.md and quoted by the bug template; on a prefix install it returns a hard failure (exit 1) that no re-run clears, so any script or human gating on it learns to ignore it. Skill behavior is unaffected — the doc's second line is what actually gets used.

Readiness report

ok              install root    ~/.claude/skills/gstack: opencode/cursor/agy/gemini/codex/claude global current (1.98.0.0)
ok              bun             1.4.2 at ~/.bun/bin/bun (floor 1.3.3, tested 1.4.2)
ok              windows bash    C:/Program Files/Git/bin/bash.exe (chosen by git --exec-path)
ok              browse bundle   browse/dist built
ok              binaries        find-browse, design, pdf, gstack-global-discover launch (4 of 4)
13 ok, 2 warn, 1 not configured, 0 fail

Environment

  • Host: Claude Code 2.1.319 (the only host whose render carries the relative pointers), 6 global installs registered
  • OS: Windows 11, Git for Windows bash, Bun 1.4.2
  • gstack: 1.98.0.0 (9740bfd); setup is byte-identical to main at 6042f6ad48774504f918ab1391908c1ccdb11fe0, where _status_install_checks has the same ../*) path="$dir/$tok" line
Lingua principale
TypeScript
Stelle
139k
Fork
20.6k
Merge medio
10h 12m
PR unite (30g)
655

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di garrytan/gstack

Tutte le issue di garrytan/gstack

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.