ci: make the ruff lint and format steps able to fail - #598
Merged
Merged
Conversation
Removes a stray second blank line between the module docstring and the imports, which is the only file in the workspace that `ruff format --check` reports as needing reformatting. This lands ahead of the CI change so each commit is independently green. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The CI changes and required formatting correction are complete with no unresolved review issues.
Pull request overview
Updates CI so Ruff linting and formatting fail on violations instead of silently fixing files.
Changes:
- Use
ruff check --no-fixandruff format --check. - Apply the required formatting correction.
File summaries
| File | Summary |
|---|---|
packages/api/src/microsoft_teams/api/activities/install_update/__init__.py |
Removes the extra blank line flagged by Ruff. |
.github/workflows/ci.yml |
Enforces non-mutating Ruff validation. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The Format step ran `ruff format`, which rewrites files in place and exits 0. On an ephemeral runner nothing consumes the rewrite, so the step passed unconditionally. Proof that it was a no-op: `packages/api/src/microsoft_teams/api/activities/install_update/__init__.py` was unformatted on main while main was green. The Lint step had the same defect for a different reason: `fix = true` in the root pyproject `[tool.ruff]` table makes a bare `ruff check` auto-fix and exit 0, so any auto-fixable violation passed silently. Both steps now run ruff from the venv that the preceding sync step already built, rather than through astral-sh/ruff-action. The action resolved its own ruff from the `ruff>=0.11.13` floor in pyproject and installed the newest matching release, ignoring the 0.14.1 pin in uv.lock that contributors and `poe check` use. That skew is not theoretical: the action installed 0.16.8, which formats Python blocks inside Markdown and parenthesizes multi-line lambda bodies, so it reported eight files that are correctly formatted under the pinned version. Running through `uv run --frozen` makes uv.lock the single source of truth, so CI and local can no longer disagree, and matches how the PyRight and test steps in this workflow already resolve their tools. Verified both directions against a deliberately malformed file: the old commands exited 0 and rewrote it, the new ones exit 1 and leave it untouched. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Corina (corinagum)
force-pushed
the
cg/ci-format-check
branch
from
September 16, 2026 22:03
e400634 to
40a1d19
Compare
teddyam
approved these changes
Sep 16, 2026
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.
The Format step ran
ruff format, which rewrites files in place and exits 0, so it passed unconditionally. Proof it was a no-op:install_update/__init__.pywas unformatted on main while main was green. The Lint step had the same defect viafix = truein pyproject, which makes a bareruff checkauto-fix and exit 0.Changes
ci.yml: both ruff steps now runuv run --frozenfrom the venv the sync step already builds, instead ofastral-sh/ruff-action. The action resolved ruff from the>=0.11.13floor and installed 0.16.8, ignoring the 0.14.1 pin inuv.lock. That skew is real: 0.16.8 flagged 8 correctly-formatted files.uv.lockis now the single source of truth, matching how the PyRight and test steps already resolve tools.install_update/__init__.py: one stray blank line removed. The only file the pinned ruff flags, and the workflow change goes red without it.Verification
Against a deliberately malformed file the old commands exited 0 and rewrote it; the new ones exit 1 and leave it untouched. CI now reports 513 files, matching local exactly.