mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-01 06:24:41 +01:00
fix(review-army): keep the state-machine detector's output only on exit 0 (W3-5 confirm round)
A failing gstack-state-matrix detect prints SCOPE_STATE_MACHINE=false before exiting non-zero. The scope block now captures its output and sources it only when the detector succeeds; otherwise it discards the output, sets SCOPE_STATE_MACHINE=unknown (dispatching the State Machines specialist) and leaves the detector's stderr visible. Free tests cover false-output/non-zero, empty-output/non-zero and a late failure after printing true. The stack comment is shortened so gstack-review stays 4 chars under its pin; the five host pins are lowered to match. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
c777750457
commit
f16dce25f0
5 files changed
+18
-12
No files matched your search
@@ -24,10 +24,10 @@ function generateSpecialistSelection(ctx: TemplateContext): string {
|
||||
### Detect stack and scope
|
||||
|
||||
\`\`\`bash
|
||||
source <(${ctx.paths.binDir}/gstack-state-matrix detect --base <base> || echo SCOPE_STATE_MACHINE=unknown)
|
||||
_SM=$(${ctx.paths.binDir}/gstack-state-matrix detect --base <base>) || _SM=SCOPE_STATE_MACHINE=unknown; source <(echo "$_SM")
|
||||
source <(${ctx.paths.binDir}/gstack-diff-scope <base> 2>/dev/null) || true
|
||||
set | grep '^SCOPE_'
|
||||
# Detect stack for specialist context
|
||||
# Detect stack
|
||||
STACK=""
|
||||
[ -f Gemfile ] && STACK="\${STACK}ruby "
|
||||
[ -f package.json ] && STACK="\${STACK}node "
|
||||
|
||||
Reference in new issue
Block a user