From d75a8b65adf9889f9f64649ea234ae8950c32f24 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Tue, 1 Sep 2026 01:09:54 -0400 Subject: [PATCH] fix: restore sublibrary metadata before downgrade QA Co-Authored-By: Chris Rackauckas Co-Authored-By: Codex Agent-Harness: Codex CLI 0.151.0 Agent-Model: gpt-5.6-sol Agent-Session: 01a059b1-5fa2-76a2-937a-33502aa35de5 --- .github/workflows/sublibrary-downgrade.yml | 15 +++++++++++++++ test/runtests.jl | 20 ++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/.github/workflows/sublibrary-downgrade.yml b/.github/workflows/sublibrary-downgrade.yml index 5c5174c..ea92b6f 100644 --- a/.github/workflows/sublibrary-downgrade.yml +++ b/.github/workflows/sublibrary-downgrade.yml @@ -167,6 +167,14 @@ jobs: [ -n "${{ inputs.skip }}" ] && effective="$effective,${{ inputs.skip }}" echo "Effective downgrade skip: $effective" echo "EFFECTIVE_SKIP=$effective" >> "$GITHUB_ENV" + - name: "Save project metadata for QA" + if: "${{ inputs.group-env-value == 'QA' }}" + shell: bash + run: | + save_dir="$RUNNER_TEMP/sciml-downgrade-original-projects" + project_file="${{ matrix.project }}/Project.toml" + mkdir -p "$save_dir" + cp --parents "$project_file" "$save_dir" - uses: julia-actions/julia-downgrade-compat@v2 with: projects: ${{ matrix.project }} @@ -180,6 +188,13 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 with: project: ${{ matrix.project }} + - name: "Restore project metadata before QA" + if: "${{ inputs.group-env-value == 'QA' }}" + shell: bash + run: | + save_dir="$RUNNER_TEMP/sciml-downgrade-original-projects" + project_file="${{ matrix.project }}/Project.toml" + cp "$save_dir/$project_file" "$project_file" - uses: julia-actions/julia-runtest@v1 with: project: ${{ matrix.project }} diff --git a/test/runtests.jl b/test/runtests.jl index 1a5bc3e..131854a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -629,3 +629,23 @@ end subs = wf("sublibrary-project-tests.yml") @test count("auto-precompile: \${{ inputs.auto-precompile }}", subs) == 4 end + +@testset "sublibrary downgrade restores project metadata for QA" begin + txt = read( + joinpath(@__DIR__, "..", ".github", "workflows", "sublibrary-downgrade.yml"), + String, + ) + save_at = findfirst("Save project metadata for QA", txt) + downgrade_at = findfirst("julia-actions/julia-downgrade-compat@v2", txt) + build_at = findfirst("julia-actions/julia-buildpkg@v1", txt) + restore_at = findfirst("Restore project metadata before QA", txt) + test_at = findfirst("julia-actions/julia-runtest@v1", txt) + positions = (save_at, downgrade_at, build_at, restore_at, test_at) + + @test all(!isnothing, positions) + if all(!isnothing, positions) + @test first(save_at) < first(downgrade_at) < first(build_at) < first(restore_at) < + first(test_at) + end + @test count("if: \"\${{ inputs.group-env-value == 'QA' }}\"", txt) == 2 +end