ci: A" fix-shape validation target (canonical-root respell) in the Wi… #3
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
| name: Windows existential repro | |
| # swift-pdf-OWNED, NON-centralized evidence job (deliberately NOT added to the | |
| # universal reusable — per principal direction). It compiles TWO reproducers | |
| # for the Swift 6.3.3 Windows (+Asserts) debug-info-mangler ICE (Assertion | |
| # `isActuallyCanonicalOrNull()`, AST/Type.h:421) on the | |
| # `any PDF.HTML.Style.Modifier` existential shape, on BOTH Swift 6.3.3 and | |
| # Swift 6.4, isolated from the ecosystem's 6.4-unreadiness (zero external deps): | |
| # | |
| # 1. single-file — everything in one module (minimal-hypothesis probe); | |
| # 2. cross-package — the namespace root is a TYPEALIAS from ANOTHER package | |
| # (`public typealias PDF = ISO_32000`, mirroring swift-pdf-standard). | |
| # Per swiftlang/swift#86202 (the `any HTML.View` sibling), cross-package | |
| # + namespace-typealias sugar are load-bearing ingredients; the written | |
| # existential carries TypeAliasType sugar at its root, which is the | |
| # non-canonical type the mangler chokes on. VERIFIED 2026-07-06 (run | |
| # 28776276301): STILL FIRING on 6.3.3 AND on 6.4-dev a42409e978ff428 — | |
| # the 6.4 typealias-existential debug-info fixes (45547be3f8f, | |
| # 6f60adf009c, 2934386efde) do NOT cover this shape; single-file CLEAN | |
| # on both (cross-package + alias sugar are load-bearing); | |
| # 3. respell-canonical — identical to (2) except the two downcasts are | |
| # spelled through the canonical root (`any ISO_32000.…`). CLEAN here | |
| # while (2) fires validates the surgical production fix: respell the | |
| # written existential type at the two crash-site downcasts. | |
| # | |
| # Reading the legs together (per variant): | |
| # 6.3.3 FIRING + 6.4 CLEAN → the 6.4 fix is empirically confirmed for that | |
| # shape (Option B evidence). | |
| # 6.3.3 CLEAN → that shape under-captures the trigger; the | |
| # conclusion covers ONLY that shape. | |
| # 6.3.3 FIRING + 6.4 FIRING → the bug is NOT fixed in 6.4; re-plan. | |
| # | |
| # Disposition per variant (three-way, so a rephrased diagnostic can't false-flip): | |
| # CLEAN / STILL FIRING (signature found) / INCONCLUSIVE. The job step fails | |
| # (non-zero) unless every variant is CLEAN — read the step log for the matrix. | |
| # ADVISORY (continue-on-error): evidence, not a merge gate. | |
| # WHEN TO REMOVE: when the ecosystem moves to 6.4 (~Sept 2026) and the standard | |
| # Windows leg is green. | |
| # TRACKING: swift-institute/Issues — swift-issue-noncanonical-existential-windows-debuginfo-ice. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/repro/**" | |
| - ".github/workflows/windows-existential-repro.yml" | |
| workflow_dispatch: | |
| concurrency: | |
| group: win-existential-repro-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| repro: | |
| name: Windows repro (Swift ${{ matrix.swift-version }}, debug) | |
| if: ${{ !github.event.repository.private }} | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| continue-on-error: true | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| swift-version: ["6.3.3", "6.4"] | |
| steps: | |
| - name: Harden runner (audit-mode egress logging) | |
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@v6 | |
| - name: Install Swift ${{ matrix.swift-version }} | |
| uses: SwiftyLab/setup-swift@38f54a76b70d989321de9dc7c840618c08cf56e9 # v1.14.0 | |
| with: | |
| swift-version: "${{ matrix.swift-version }}" | |
| - name: Print toolchain info | |
| run: swift --version | |
| - name: Compile repros (debug info) — three-way disposition per variant | |
| shell: pwsh | |
| run: | | |
| function Get-Disposition { | |
| param([string]$Output, [int]$Code) | |
| if ($Output -match 'isActuallyCanonicalOrNull') { return 'STILL FIRING' } | |
| if ($Code -eq 0) { return 'CLEAN' } | |
| return 'INCONCLUSIVE' | |
| } | |
| $out1 = & swiftc -Onone -g -c '.github/repro/noncanonical-existential-debuginfo.swift' -o repro.o 2>&1 | Out-String | |
| $disp1 = Get-Disposition -Output $out1 -Code $LASTEXITCODE | |
| Write-Host $out1 | |
| Write-Host "::notice title=single-file::$disp1 on Swift ${{ matrix.swift-version }}" | |
| $out2 = & swift build -c debug --package-path '.github/repro/cross-package/crash' --target CrashModule 2>&1 | Out-String | |
| $disp2 = Get-Disposition -Output $out2 -Code $LASTEXITCODE | |
| Write-Host $out2 | |
| Write-Host "::notice title=cross-package::$disp2 on Swift ${{ matrix.swift-version }}" | |
| $out3 = & swift build -c debug --package-path '.github/repro/cross-package/crash' --target RespellModule 2>&1 | Out-String | |
| $disp3 = Get-Disposition -Output $out3 -Code $LASTEXITCODE | |
| Write-Host $out3 | |
| Write-Host "::notice title=respell-canonical::$disp3 on Swift ${{ matrix.swift-version }}" | |
| Write-Host "DISPOSITION MATRIX (Swift ${{ matrix.swift-version }}): single-file=$disp1 cross-package=$disp2 respell-canonical=$disp3" | |
| if (($disp1 -eq 'CLEAN') -and ($disp2 -eq 'CLEAN') -and ($disp3 -eq 'CLEAN')) { exit 0 } | |
| if (($disp1 -eq 'INCONCLUSIVE') -or ($disp2 -eq 'INCONCLUSIVE') -or ($disp3 -eq 'INCONCLUSIVE')) { exit 1 } | |
| exit 2 |