ci: add mechanical formatting autofix workflow#1937
Open
purusang wants to merge 1 commit into
Open
Conversation
f6f9f2c to
e672c49
Compare
Contributor
|
Commit: 966f069 SP1 Execution Results
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #1937 +/- ##
==========================================
- Coverage 84.42% 84.38% -0.04%
==========================================
Files 637 637
Lines 76805 76805
==========================================
- Hits 64840 64813 -27
- Misses 11965 11992 +27
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
storopoli
requested changes
Jun 8, 2026
Member
storopoli
left a comment
There was a problem hiding this comment.
NACK.
2 things:
- this adds a
contents: writein permissions which is VERY VERY BAD for security purposes. - this also breaks the planned git commit signing requirement that we intend to roll before mainnet (see here).
A suggestion would be to add a contrib/git-hooks directory with a bunch of pre-commit hooks that would make impossible to do a commit that is not cargo fmted. Pair that up with a just recipe to install/uninstall the git hooks and voilà.
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.
Description
Adds a pull request workflow that applies deterministic mechanical formatting fixes and pushes them back to same-repository PR branches. The workflow currently runs Rust, TOML, and functional-test Python formatters:
cargo fmt --alltaplo fmtuv run ruff formatinfunctional-testsThe existing lint workflows remain responsible for checking the resulting commit.
Type of Change
Notes to Reviewers
The workflow is limited to PR branches from this repository, so it does not try to push to fork PRs. It requests
contents: writebecause the built-inGITHUB_TOKENneeds that permission to push formatter commits.Is this PR addressing any specification, design doc or external reference document?
If yes, please add relevant links:
Checklist
Validation:
actionlint .github/workflows/autofix-formatting.ymlAI assistance notice: This PR was prepared with AI assistance.
Related Issues