Skip to content

fix(ci): run the Gemma consolidation eval in bash, not PowerShell - #2769

Closed
kovtcharov-amd wants to merge 1 commit into
mainfrom
fix/eval-gemma-windows-shell
Closed

kovtcharov-amd wants to merge 1 commit into
mainfrom
fix/eval-gemma-windows-shell

Conversation

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

The Gemma consolidation eval has never gone green since it landed, and the reason was hidden until this week: the lemonade-eval pool is Windows, where the default shell is PowerShell, but every step in this workflow is bash. Step one died on source : The term 'source' is not recognized as the name of a cmdlet before installing a single dependency. Until now every run showed up as cancelled — the pool was starved and jobs aged out after 24h — so the actual defect never surfaced. With the pool freed up the runs finally execute, and they fail here instead. The practical effect is that no PR touching an LLM-affecting path has had a real eval gate behind it.

Two changes: pin the job's default shell to bash (Git Bash ships on the runner, and the sibling Windows workflows already use shell: bash), and replace the hand-rolled python -m venv + source .venv-agent-eval/bin/activate with the shared setup-venv action the other Windows evals on this pool use. That action resolves Scripts\ vs bin/ per OS and appends the right one to GITHUB_PATH, so a POSIX-only venv path cannot strand the job again.

Test plan

  • yaml.safe_load parses the workflow; agent-eval carries defaults.run.shell: bash, and the step list is unchanged apart from the venv swap
  • setup-venv confirmed cross-platform — create-venv-windows appends $VENV_PATH\Scripts, create-venv-linux appends $VENV_PATH/bin, both to GITHUB_PATH
  • Remaining steps re-read for Windows safety under Git Bash: set -euo pipefail, trap … EXIT, background &, kill -0, curl … > /dev/null all hold
  • The real gate: this workflow going green on the runner. It has no successful run to diff against, so CI here is the first proof. If it fails past the install step, that is a new failure this PR newly exposed — not a regression from it.

The lemonade-eval pool is Windows, where the default shell is PowerShell, but
every step in this workflow is bash. The first one died on
`source: The term 'source' is not recognized` before installing anything, so
the job has never gone green since it landed — the earlier runs were all
'cancelled' from runner starvation, which masked it until the pool freed up.

Pin the job's default shell to bash (Git Bash ships on the runner) and swap the
hand-rolled `python -m venv` + POSIX-only `.venv/bin/activate` for the shared
setup-venv action the other Windows evals on this pool already use — it resolves
Scripts\ vs bin/ per OS, so this class of break cannot recur.
@github-actions github-actions Bot added the devops DevOps/infrastructure changes label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Verdict: Approve

This CI-only PR fixes the Gemma-4-E4B consolidation eval workflow, which had never once gone green: the previous step hand-rolled a venv with POSIX-only paths (source .venv/bin/activate, $PWD/.venv-agent-eval/bin) on what is actually a Windows runner pool, where those paths live under Scripts\. The fix does two correct things: pins the job's default shell to bash (all steps are bash — set -euo pipefail, trap, &), and swaps the broken hand-rolled venv for the shared setup-venv composite action, which resolves the Windows-vs-POSIX bin dir and appends it to PATH for you. Nothing else changes.

The bottom line: no blocking issues. The change reuses the exact pattern the two sibling evals on this same pool already run in production, so the approach is proven, not speculative. The one thing to confirm before merge is simply that the workflow now runs green on this branch (it triggers on push since the workflow file itself is in the path filter).

Real-world evidence

N/A — CI/workflow-only change; it touches no runnable GAIA surface (CLI/API/MCP/Agent-UI), so there's no evidence bundle and none is expected. The real proof for this kind of change is the workflow going green on the branch; I couldn't observe the run status from here (shell/gh was unavailable in this environment), so the verdict rests on static review plus the fact that the two sibling evals on the same lemonade-eval pool already use this identical setup-venv action successfully.

🔍 Technical details

Correctness — verified, no issues

  • defaults.run.shell: bash at the job level (.github/workflows/test_eval_agent_gemma_consolidation.yml:148-155) does not leak into the setup-venv composite action — composite-action steps declare their own shell: (PowerShell for the Windows-specific steps, bash for POSIX), and job defaults never override those. So the action still runs its Windows path correctly under a bash default. Confirmed against .github/actions/setup-venv/action.yml.
  • On Windows the action appends $VENV_PATH\Scripts to GITHUB_PATH (action.yml:131), which every later bash step picks up via Git Bash — none of the downstream steps source-activate, they call python/gaia directly, so PATH is all they need. The old code appended $PWD/.venv-agent-eval/bin (line 48 of the pre-diff), a dir that doesn't exist on Windows — the root cause this PR removes.
  • Input contract matches: venv-name, python-version, install-package all exist on the action (action.yml:8-23). The -e .[dev,eval,ui,api] spec is passed through the same unquoted Invoke-Expression/bash path the sibling test_email_agent_eval.yml:180 uses (-e .[dev,eval,api] -e hub/agents/email/python), which is a live, green workflow — so the bracket-extras quoting is proven on this runner.
  • Dropping cache: 'pip' is not a regression — setup-venv installs via uv, which brings its own cache.

Pattern reuse (strength)

test_email_agent_eval.yml:164 and email_scorecard_refresh.yml:217 both already stand up their env with ./.github/actions/setup-venv on this exact pool. Consolidating the third eval onto the same action removes a bespoke, Windows-broken install path in favor of the established one — exactly the reuse CLAUDE.md asks for.

Scope

Single-file, single-purpose change. No drive-by edits. The in-file comments explaining the Windows/shell gotcha are consistent with this workflow's existing heavily-annotated style and earn their place (the failure mode is genuinely non-obvious).

No security, breaking-change, or fail-loudly concerns — the preflight/integrity gates that make this job fail loudly are untouched.

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

Closing this in favour of #2773, which fixes the same bug the other way round — and CI has now refuted the bash approach specifically.

shell: bash can't work on this pool. The run from this branch (job 91862943702) died in 46 seconds with bash: command not found, once per step. The lemonade-eval label resolves to exactly one runner, sjlab-stx-halo-18, and it's Windows. Git for Windows is installed there — checkout uses C:\Program Files\Git\cmd\git.exe — but bash.exe lives in Git\bin\, which isn't on that runner's PATH. So the premise in the description here ("Git Bash ships on the runner") holds for the binary but not for its discoverability, and there's no second, Linux runner behind the label to fall back to.

#2773 goes the other direction: PowerShell throughout, Python via ./.github/actions/setup-venv, plus the Lemonade install/warm-start and Claude Code CLI the eval actually needs. Its run got every setup step green and reached the evals — so that approach is empirically confirmed on the same box that rejected this one. It also pins runs-on: [self-hosted, Windows, lemonade-eval], matching test_email_agent_eval.yml and email_scorecard_refresh.yml, which carry the same guard because the bare label can otherwise match a Linux box.

Worth keeping from this PR: the setup-venv swap was the right call, and #2773 does exactly that. Thanks for digging into this one — the diagnosis that the job had never actually executed was correct and is what made the real fix findable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant