Repository navigation
Description
What
.github/actions/run-swift-format/action.yaml still carries three multi-line
run: steps, so ci-lint precheck reports three GEN-005 approved exceptions
for that path (the block at ci.toml:330-335, reason "Upstream OBS
build/packaging scripts … tracked in #962"). #962 is closed and the Python-port
sweep has moved through the composite actions since (compatibility-validator,
services-validator, flatpak-manifest-validator, qt-xml-validator,
generate-docs, check-changes); this action is the same shape and is still
shell.
Findings on origin/master (ci-lint precheck, pin a1917ce7…, header
5 violation(s), 414 approved exception(s), 10 needs_review):
runs.steps[0]— the Windows runner guard (if: runner.os == 'Windows', bash)runs.steps[2]— the Linuxbrew update/brew install zshstepruns.steps[3]— theRun swift-format 🔥step:shell: zsh --no-rcs --errexit --pipefail,
the zsh${(s:,:)CHANGED_FILES//[\[\]\'\"]/}split, and the call to
build-aux/run-swift-format --fail-<condition> --check <files>
runs.steps[1] is a uses: step (./.github/actions/check-changes) and is not
a finding.
Fix
One Python module with one subcommand per step, each step a single
uv run call, mirroring the merged compatibility-validator port (#2692):
- a pinned
astral-sh/setup-uvstep at the top of the action (the caller,
check-format.yaml'sswift-formatjob onmacos-26, installs nothing
first), withsave-cache:and the CACHE-013cache-suffixexpression; ci/run_swift_format.py guard --notice …(still selected by the action's own
if: runner.os == 'Windows', exit 2);ci/run_swift_format.py install-depsfor the Linux brew/zsh step;ci/run_swift_format.py format --fail-condition <c>, reading the same
CHANGED_FILESenv var, splitting it the way the zsh line did, and returning
build-aux/run-swift-format's status;ci/test_run_swift_format.pyas the offline pin (module by path, stubbrew
and stub formatter recording argv), and theci.tomlGEN-005 block for this
path deleted. Thebuild-aux/run-swift-formatexception is a separate path
and stays.
Why it is safe to change
The swift-format job runs only when a .swift file changed
(ci/swift_changes.py), and the module keeps the step's exact formatter argv,
so a port that is wrong shows as a red Format 🔍 / swift-format job on the
first PR that touches Swift. The RED is the offline test (module absent, block
present); the GREEN is the module plus the action/ci.toml edits, with
ci-lint precheck going from 414 to 411 approved exceptions and no other count
moving.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Oct 28, 2026
Claiming: investigation — the three GEN-005 findings are already enumerated above, so this is the port itself.
Plan (one PR, from
origin/master):ci/test_run_swift_format.py(module absent,ci.tomlblock present).ci/run_swift_format.py(guard/install-deps/format), the action's three steps as singleuv runcalls plus a pinnedSet Up uv, and the GEN-005[[exceptions]]block for this path deleted.ci-lint precheck414 -> 411 approved exceptions, no other count moving;uv run ci/local_gate.py --only self-test;ruff check.Expected first PR: within the hour.
zackees commentedon Oct 28, 2026
/ready
Scope is settled (three enumerated findings, one module, one test), so this is Ready rather than an open investigation.
ci(#962): run swift-format from Python, not three shell steps (#2792)
zackees commentedon Oct 28, 2026
Part done: PR #2793 (draft, one PR, both commits).
4f9186cdc:ci/test_run_swift_format.py->Ran 11 tests ... FAILED (failures=3, errors=7).4f5b00c10:ci/run_swift_format.py(guard/install-deps/format), the action's three steps as singleuv runcalls plus a pinnedSet Up uvwith the CACHE-013cache-suffix, and the GEN-005 block for this path deleted.ci-lint precheck(pina1917ce7…):origin/master5 violation(s), 416 approved exception(s), 10 needs_review-> branch5 violation(s), 413 approved exception(s), 10 needs_review; the three findings for.github/actions/run-swift-format/action.yamlare gone and no other rule moved.uv run ci/local_gate.py --only self-test->== self-test: ok;ruff checkclean.ci/test_build_aux_formatters.py's live-script pin now follows the call site into the module (build-aux/run-swift-formatkeeps its own GEN-005 block; it is a different path).ci(obs-rust#962): run swift-format from Python, not three shell steps (…