Repository navigation
harden(devex): converge backend Python formatting automatically - #12448
Merged
Git-on-my-level merged 1 commit intoAug 31, 2026
Merged
Git-on-my-level merged 1 commit into
Git-on-my-level merged 1 commit into
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Make backend Python formatting converge automatically through one pinned wrapper used by pre-commit, pre-push, and CI. PR #11454 reached its final CI run with two Python files that local checks had allowed through; the exact failure is visible in Repo Checks run 32996234890.
The wrapper uses an already-installed Black 26.5.1 when available and otherwise resolves that exact version through cached
uvx. This does not add a status check, approval, checklist, or deploy step; it replaces three disagreeing formatter paths in the existing workflow.Product invariants affected
none
How it was verified
bash scripts/test-backend-python-format.sh— exact, stale, and missing formatter paths passed.bash scripts/test-pre-commit-pinned-toolchains.sh— existing hook toolchain contracts passed.bash scripts/test-pre-push-backend-test-cap.sh— existing bounded pre-push behavior passed.python3 .github/scripts/test_run_checks.py— 47 manifest contract tests passed.python3 .github/scripts/check_agents_md_lean.py— all nine agent guides stayed within budget.actionlint -shellcheck '' .github/workflows/repo-checks.yml— workflow syntax passed.OMI_PR_BODY_FILE=/tmp/omi-backend-formatter-pr-body.md make preflight— all 110 repository checks passed after rebasing onto currentorigin/main.PRE_PUSH_SKIP_DESKTOP_SWIFT=1after SwiftPM's FluidAudio cache lacked commit19600a485baa4998812e4654b70d2bab8f2c9949; this PR changes no desktop source.Tests
scripts/test-backend-python-format.shis the regression test: it proves all three callers delegate to the shared pin, exact local Black avoids a download, stale Black self-corrects throughuvx, and a machine missing both gets the canonical uv install path.Failure class (fixes)
Failure-Class: none
New guards (only when adding a check or ratchet)
The guard would have caught PR #11454 / run 32996234890 before its late CI formatting failure. It is a shared primitive rather than a parallel policy check: the contract test protects the single formatter executable that every existing local and CI caller now invokes.