Skip to content

Resolve prefixed sibling section links in setup --status - #4190

Closed
ElNeMeR70 wants to merge 1 commit into
garrytan:mainfrom
ElNeMeR70:fix/setup-status-prefix-relative-section-links
Closed

ElNeMeR70 wants to merge 1 commit into
garrytan:mainfrom
ElNeMeR70:fix/setup-status-prefix-relative-section-links

Conversation

@ElNeMeR70

Copy link
Copy Markdown
Contributor

Running ./setup --status on a --prefix install reported 1 of 114 section links broken and exited 1 because gstack-review/SKILL.md documents both ../qa/sections/exploratory.md and ../gstack-qa/sections/exploratory.md while _status_install_checks resolved ../ pointers literally without checking the gstack-* prefixed sibling directory. Falling back to ../gstack-<rest> when an installed skill directory is prefixed lets ./setup --status resolve the documented prefixed sibling and exit 0.

Summary

  • In _status_install_checks() (setup), when ${dir##*/} is prefixed (gstack-*) and $dir/$tok is not readable for a ../* pointer, check $dir/../gstack-${tok#../} before counting the pointer as broken.
  • Mirror the prefixed sibling fallback in brokenSectionPointers and add a conformance test in test/host-conformance.test.ts covering ./setup --host claude --prefix followed by ./setup --status.

Fixes #4164

On a `--prefix` install where skills land as `gstack-review` and `gstack-qa`,
`_status_install_checks` in `setup` resolved `../*` pointers literally against
`$dir`, failing on `../qa/sections/exploratory.md` in `gstack-review/SKILL.md`
even though the next line documents `../gstack-qa/sections/exploratory.md`.
Fall back to `$dir/../gstack-${tok#../}` when `${dir##*/}` is `gstack-*`.

Fixes garrytan#4164
@trunk-io

trunk-io Bot commented Nov 9, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@capy-ai

capy-ai Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Thanks @ElNeMeR70, this is the fix for #4164, which we'd already confirmed. We're picking it up: a crew lane will rewrite it on current main and credit you as co-author, and we'll close this PR when that lands.

@capy-ai

capy-ai Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Thank you for this. We're picking up the idea. A maintainer agent working through a batch of fixes (our tracking thread GSTA-801) will first reproduce the problem on current main. If it reproduces, the agent rebuilds the fix on main with you credited as co-author, because we don't merge outside branches directly, and we'll close this PR with a link when it lands. If it no longer reproduces, we'll close this and say what changed.

@capy-ai

capy-ai Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Thank you. Your one-line fallback and test were rebuilt on current main and landed in #4682, with you credited as co-author. Closing this in favour of that PR.

@capy-ai capy-ai Bot closed this Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant