Repository navigation
ci(#962): run the bouf patch action steps from Python (GEN-005) - #2806
Conversation
|
PR CI is green on Left as a draft deliberately: the action only runs on |
GREEN: `ci/windows_patches.py` carries the seven shell steps as subcommands (`download`, `setup-bouf`, `install-nsis`, `install-tools`, `download-previous`, `prepare-notes`, `run-bouf`), each action step is one `uv run --no-project --script` call, and the action opens with a pinned `Set Up uv` step. The `ci.toml` GEN-005 exception for the action is deleted. PowerShell's `Expand-Archive`, `Get-FileHash` and `Write-Output` pipelines are `zipfile`, `hashlib.sha256` and `Path.write_text`; the `Invoke-External` failure rule is the child's exit status.
78f3418 to
040bae6
Compare
|
Rebased onto Re-verified on the rebased tip: The delta is still exactly the twelve PR CI on Handed off to the coordinator: marked ready and enabled auto-merge. The one acceptance criterion that stays open is real Windows execution ( |
What
.github/actions/windows-patches/action.yamlis nine multi-line PowerShellrun:blocks (twelve GEN-005 approved exceptions once theshell: pwshkeys are counted). Each step is now one call intoci/windows_patches.py, which opens with a pinnedSet Up uvstep.Fixes #2804.
RED
e81b45a09—ci/test_windows_patches.pyonly (330 lines). Onorigin/masterit fails: the module does not exist, the action is still PowerShell, and theci.tomlGEN-005 block for the path is present.GREEN
040bae652—ci/windows_patches.py, the action rewritten, and theci.tomlexception deleted.Download Release ArtifactInvoke-External gh release download …,gh attestation verify,Expand-Archivedownload— the two child processes pluszipfileSetup boufgh release download, twoGet-FileHashcomparisons, twoExpand-Archivesetup-bouf—hashlib.sha256againstBOUF_HASH/BOUF_NSIS_HASH,zipfileintobin/andnsis/Install NSISwinget install …install-nsis— same argvInstall rclone and pandocchoco install …install-tools— same argvDownload Previous Buildsrclone -q copy …download-previous— same argv,RCLONE_*still comes from the step'senv:Prepare Release Notesgit tag -l --format=calls,Set-Location repoprepare-notes— same three calls,cwd=repo, same#rule and blank lineRun boufbouf.exe+ 10 argument pairsrun-bouf— same argument listThe
Invoke-External"throw on non-zero" rule is the child's exit status; a hash mismatch prints::error::<zip> hash does not match.and exits 1.Ensure-Locationis gone because the module createsbouf/itself. TheUpload Outputspath stays${{ github.workspace }}/output, where bouf writes.Evidence
ci-lint precheck(pina1917ce7…), measured on a cleanorigin/masterand on this branch:The delta is exactly the twelve
windows-patches/action.yamllines (grep -c 'APPROVED EXCEPTION .github/actions/windows-patches/action.yaml': 12 -> 0). No other rule moves: CACHE-013 stays at 12, so the newSet Up uvstep adds no finding.Local gates:
The test drives every subcommand against stubs on
PATH(gh,rclone,winget,choco,git, and abouf.exestub), so the argv, the hash-mismatch failure and the exit-status propagation are asserted on Linux. Both callers (publish.yaml,dispatch.yaml) check the repository out before the action, so${{ github.workspace }}/ci/windows_patches.pyresolves.Not verified
No Windows lane runs from a PR path, and this action only runs on
release/workflow_dispatchforobsproject— so the module's real Windows execution (winget/choco/rclone present,bouf.exeruns) is unproven here. The three.ps1helpers keep their own path-scoped exceptions; this PR removes only theaction.yamlblock.