-
Notifications
You must be signed in to change notification settings - Fork 0
docs(ci): document mypy as hard gate; clarify CI gate policy #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -154,6 +154,10 @@ This project takes **AI-assisted code review seriously** as part of the standard | |||||
|
|
||||||
| **One feature = one branch = one PR.** Don't bundle unrelated changes — that defeats the review value. If you discover an unrelated bug while working on a feature, file a separate issue and a separate PR. | ||||||
|
|
||||||
| **Wait for the AI reviewers, even on small PRs.** Gemini and Copilot post within ~1-2 minutes. Merging a small "trivial" PR with `--admin` before they've commented forfeits the review value and makes follow-up comments awkward to address. If a PR is *truly* time-critical (security fix, broken main), call it out explicitly in the PR description and own that you're skipping the review window — and address any post-merge comments in a follow-up PR. | ||||||
|
|
||||||
| **Side-effects must be in the PR description.** If a PR primarily fixes A but also changes B, list both in the description. Reviewers shouldn't have to discover changes by reading the diff line by line. | ||||||
|
|
||||||
| ## Adding a new printer model (plugin) | ||||||
|
|
||||||
| Want to add support for a new Brother model (or even a non-Brother printer)? Excellent. | ||||||
|
|
@@ -169,16 +173,24 @@ We try to verify each plugin against real hardware before merging when feasible. | |||||
|
|
||||||
| ## Local CI checks | ||||||
|
|
||||||
| Before opening a PR: | ||||||
| Before opening a PR, run from `backend/`: | ||||||
|
|
||||||
| ```bash | ||||||
| ruff check . # linting | ||||||
| ruff format --check . # formatting | ||||||
| mypy app/ # type checking | ||||||
| pytest # tests | ||||||
| ruff check . # linting (blocking in CI) | ||||||
| ruff format --check . # formatting (blocking in CI) | ||||||
| mypy app/ # type checking (blocking in CI — strict mode) | ||||||
| pytest # tests (blocking in CI) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To align the local check with the CI 'hard gate' for coverage (80% floor), the command should include the coverage flag. Running
Suggested change
References
|
||||||
| ``` | ||||||
|
|
||||||
| The CI workflow runs the same. PRs that fail any check won't be reviewed until green. | ||||||
| The CI workflow runs the same. **All four are hard gates** — no warn-only: | ||||||
|
|
||||||
| - `ruff check` and `ruff format --check` reject style/lint issues | ||||||
| - `mypy` runs in strict mode (configured in `pyproject.toml` `[tool.mypy] strict = true`); type-check failures fail the build | ||||||
| - `pytest` requires all tests pass; coverage floor is 80% (configured in `pyproject.toml`) | ||||||
|
Comment on lines
+185
to
+189
|
||||||
|
|
||||||
| If you want to bypass a gate locally during exploration, use `mypy --no-strict-optional` etc., but the merged code must pass strict checks. | ||||||
|
|
||||||
| PRs that fail any check won't be reviewed until green. | ||||||
|
|
||||||
| ## Releases | ||||||
|
|
||||||
|
|
||||||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description mentions changes to
ci.yml(renaming the mypy step and adding a rationale comment), but these changes are not present in the current diff. Given the new rule added in this line regarding documenting side-effects, please ensure theci.ymlmodifications are included in the PR to maintain consistency.