Repository navigation
v1.91.271.0 fix(evals): run train-bisect steps under bash; lint sh-run workflow steps for bash-isms - #3509
Merged
Conversation
…teps for bash-isms (GSTA-125) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
MERGE_CONDITION: sha=53c40b0a3e5029af2982034e6269adf1795b46d0 next: NEW_VERSION=1.91.271.0; commit and push only the stamp diff above (FILES), with no edit of your own: the train's verify accepts the CHANGELOG only as the base's plus this PR's entry re-headed; merge with the expected head 53c40b0 and recompute on a stale queue. GSTACK_RESULT: skill=restamp status=complete run=/workspace/gstack/.gstack/tmp/restamp-journal.json Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The new
test/workflow-shell-lint.test.tsis red on main (d9b0d60): thetrain-bisectjob's "Verify the prefix checkout" step runs undershand uses${PREFIX_SHA:0:12}. Withdefaults.run.shell: bashon the job it is green.Before/after as text: The new workflow-shell lint is red on main (train-bisect's prefix step runs under sh with ${PREFIX_SHA:0:12}) and green with defaults.run.shell: bash
Why
Every
train-bisectjob inevals.ymlhas died at its first run step. A container job'srunsteps default tosh -e {0}(the runner log showsshell: sh -e {0}for that step and/usr/bin/bash -e {0}for the bare-runnerroutejob in the same run), and the CI image'sshis dash, so${PREFIX_SHA:0:12}is a "Bad substitution" (exit 2) before any case runs. Run 40456150409 (gate.bisect-b3d085bb87ee-d9b0d60082cc, dispatched from GSTA-96's red train) failed all three prefixes at that step; the checkout itself was right (HEAD = PREFIX_SHA). The bisect is the train's way of attributing a red gate to one PR, so without it a red train can only rebuild or drop PRs by hand. GSTA-125 for GStack Minder.Approvals
No approvals recorded for branch fix/train-bisect-shell. Standing approvals cited: CREW rule 5 (gates and bisects pre-approved; this PR dispatched nothing paid) and rule 22 (/ship before READY, this run).
Summary
.github/workflows/evals.yml,train-bisect:defaults.run.shell: bashon the job, with a comment naming the failed run. Every run step of the job now executes underbash --noprofile --norc -e -o pipefail {0}. The one step that pipes (the Codex login) already ran under its ownshell: bashwithset -euo pipefail, which is left in place as in the siblingeval-slicesandeval-rerunjobs; the other steps run single commands.test/workflow-shell-lint.test.ts(new, free, offline): parses every workflow under.github/workflows/and every composite action under.github/actions/, computes each run step's effective shell (stepshell→ jobdefaults.run.shell→ workflowdefaults.run.shell→ GitHub's default:shin a container job,pwshon Windows,bashotherwise), and fails on a bash-only construct in a step whose effective shell issh:${x:0:n}(named, positional and@/*parameters),${x//…}/${x^^}/${x,,}/${x@…},${!x},[[, arrays and${x[@]},declare -a/mapfile/readarray,set -o pipefail,PIPESTATUS,<<<,<(…),$'…',source,function. Comment lines are ignored. Positive controls for each construct, negative controls for the POSIX forms (${x:-d},${1:-x},${x#p},$(…),$((…))). A fourth test pinstrain-bisectto bash by name. 317 run steps scanned, 23 sh-defaulted (the four container workflows), 8 pwsh.[Unreleased]entry; the restamp at merge heads it.Other sh-run steps with bash-isms
None. The lint's sh set is the 23 run steps of the container jobs in
evals.yml(eval-slices,eval-rerun,train-bisect),evals-periodic.yml(schema-canary,eval-slices,gate-census),evals-marathon.yml(eval-slices) andeval-sweep.yml(sweep); every one but thetrain-bisectprefix step is POSIX (bun run build,echo … >> "$GITHUB_ENV",mkdir/cp, the slice runners). The composite actions all declareshell: bash. Windows jobs default to pwsh and are outside this lint.History
train-bisectjob shipped in 1.91.162.0 (2026-10-19, GSTA-49 T1b: "bisects run one executor per prefix"). The repository's git history was flattened on 2026-10-25 (d73b547 is the root commit), sogit log -S 'Verify the prefix checkout'only reaches that commit; the CHANGELOG dates it.gh run list -w evals.yml --limit 1000filtered ongate.bisectreturns exactly two runs, both 2026-10-27: run 40456150409 (failure: train-bisect (1)(2)(3) each failed at "Verify the prefix checkout") and run 40456458218 (cancelled while its three prefixes were still setting up). The job had never executed before that day.Test plan
bun test test/workflow-shell-lint.test.ts: 4 pass (2 fail on main, as pictured)bun run typecheckandbun run typecheck:test: clean, no new diagnosticsbun teston the 10 workflow tests: 121 passdocker run … rhysd/actionlint:1.7.11: cleangstack-pregate --remote(Ubicloud): 9314 tests, 0 failed, $0.05🤖 Generated with Claude Code
Gate integrity
No threshold, trial count, case kind, budget or reservation changed;
scripts/lib/shard-engine.tsand the bisect's spend path are untouched.Test Coverage
All new code paths have test coverage: the YAML change is pinned by the fourth test (
train-bisectsteps resolve to bash), and the detector and the effective-shell resolver each have a positive and a negative control per construct and per precedence level. Red on main (2 fail), green here (4 pass).test/workflow-shell-lint.test.tsand 9 sibling workflow tests).bun run test:quicklane on this 2-core Capy machine ran 10604 tests with 15 environment failures (Playwright Chromium not installed, CSO native core not built,.agents/skillsnot generated), none touching this diff; afterplaywright install chromiumthe 16 browser files reran 234 pass / 0 fail. The remote gate and CI are the lanes of record.Pre-Landing Review
Pass 1 (full diff, 199 lines): 5 specialists dispatched (testing, maintainability, security, performance, simplification), all NO FINDINGS; core checklist found 2 INFORMATIONAL items, both auto-fixed in 53c40b0 (the CHANGELOG said no train-bisect step pipes; the substring-expansion pattern missed
${@:2}and${1:0:2}, shown by QA probe P5). Pass 2 (range 60fb50c..53c40b0, 10 lines): NO FINDINGS. Red Team not activated (under 200 lines, no CRITICAL).REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=0 fixed=2 scope=frozen
Gate edits: none detected (2 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Adversarial review: native Claude pass (claude-sonnet-5-5 subagent) completed with one INVESTIGATE item (below, noted) and "Recommendation: Ship as-is"; outside voice GPT-6.1 (openai/gpt-6.1-sol subagent) completed with NO FINDINGS and "Recommendation: Ship as-is". Codex CLI is not installed on this machine, so the GPT subagent is the outside coverage; both reviewed the test file in summary mode.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
test/workflow-shell-lint.test.ts:28Detector does not list some rarer dash failures:==inside [ ],&>,|&, brace expansion {a,b},echo -e(the native adversarial pass;${x/a/b},${x^^},${x,,}it also named are already caught)Exploratory QA
Surface: the CI step script and the static lint (no server, API or browser). Probes, all on this machine (
~/.capy/work/gsta125/qa):dash -e(the container default): exit 2,Bad substitution,$GITHUB_OUTPUTleft empty. P4b the same script underbash --noprofile --norc -e -o pipefail: exit 0,short=60fb50c19c66written. Reproduces the CI failure and the fix..githubplus the test: 4 pass. P2bdefaults.run.shellremoved fromtrain-bisect: 2 fail namingtrain-bisect / "Verify the prefix checkout": substring expansion. P2c a[[injected intoeval-slices' POSIX seed step: 1 fail naming that step. P2d a POSIX${RECEIPTS:-…}injected into the same step: 4 pass (no false positive).${@:2}and${1:0:2}undetected before the pass-1 fix, detected after;${1:-x}stays clean.No fixes beyond the two review items; nothing blocked or not run.
Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
bun run eval:selectreportsevals.ymlas a full-gate input, so the train gate (not this PR) carries the paid coverage; the bisect job only runs under amode == 'bisect'route, so the first real proof is the next red train's bisect.Greptile Review
No Greptile comments.
Scope Drift
Scope Check: CLEAN (the Captain's scope: evals.yml train-bisect, one test, its CHANGELOG entry; nothing else touched).
Plan Completion
The task's four "done" items: (1)
defaults.run.shell: bashontrain-bisect, other jobs and workflows checked, none needed a fix; (2) the free lint test; (3) typecheck, the new test, the sibling workflow tests and actionlint pass, history and bisect-run census above; (4) /ship run, this body carries its receipt, READY follows. No deferrals.Verification Results
Obligations: typecheck PASS, typecheck:test PASS (819 known, none new), new test PASS, sibling workflow tests PASS (121), actionlint PASS, remote gate PASS (9314/0), CI PASS at 53c40b0, pregate verify ok (remote gate receipt plus macOS and Windows obligations cleared with the CI runs). Local test:quick lane: environment failures as described, not counted as PASS.
TODOS
No TODO items completed in this PR.
Documentation
Status: current. Documentation audit made no edits and found no blockers.
Scope: base d9b0d60 to head 53c40b0 on fix/train-bisect-shell, 3 committed files (.github/workflows/evals.yml, CHANGELOG.md, test/workflow-shell-lint.test.ts), no staged, unstaged or untracked content. I inventoried 127 candidate docs (including docs/ and nested design/eval docs) and scanned them for references to the train-bisect job, workflow shell defaults and workflow lint. Only CONTRIBUTING.md and docs/PROJECT_STRUCTURE.md were read for the passages that mention workflow lint or the workflows directory. Banned-terms check: none.
Documentation health:
Coverage debt: no new public surface. The new lint test has no explanation or how-to coverage (optional follow-up in TESTING_INTERNALS). No diagram drift.