Import episodic lint gates - #67
Conversation
Import the stricter Ruff rule set and add the PyPy-backed Pylint shim as a second lint tier after Ruff. Keep local thresholds explicit where the existing codebase would otherwise require unrelated module splits. Migrate typing-only collection annotations to `collections.abc` so the new banned typing aliases rule can run cleanly.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
SummaryThis pull request imports episodic lint gates, adding a two-tier lint workflow where Ruff runs first and, if it passes, a focused Pylint pass executes via a PyPy-backed pylint-pypy-shim. The change migrates many type-hints from typing.* to collections.abc to satisfy the new banned-typing rules and updates Makefile/tooling wiring so uv is resolved via a UV variable. Key Changes
Validation
Files of note (samples)
Notes
WalkthroughReplace typing-based annotations with collections.abc across core modules and tests; add UV autodetection and a PyPy-backed Pylint invocation in the Makefile; expand Ruff and Pylint configuration in pyproject.toml. ChangesType annotation migration and linting infrastructure
Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Makefile`:
- Around line 71-73: The lint target currently lists only ruff as a prerequisite
but invokes PYLINT via the UV tool, so add uv as an explicit prerequisite to the
lint target declaration (update the target header for lint to include uv
alongside ruff) so the Makefile will fail fast if UV is missing; modify the
"lint" target line (the one defining lint: ruff ...) to include uv.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: dbc295db-a640-4a64-aa77-109502dbc743
📒 Files selected for processing (41)
Makefilelading/cli.pylading/commands/bump.pylading/commands/bump_docs.pylading/commands/bump_toml.pylading/commands/publish.pylading/commands/publish_execution.pylading/commands/publish_plan.pylading/config.pylading/utils/process.pylading/workspace/metadata.pylading/workspace/models.pypyproject.tomltests/bdd/steps/metadata_fixtures.pytests/bdd/steps/test_bump_steps.pytests/bdd/steps/test_commands_catalogue_steps.pytests/bdd/steps/test_publish_given_steps.pytests/bdd/steps/test_publish_helpers.pytests/bdd/steps/test_publish_infrastructure.pytests/bdd/steps/test_publish_when_steps.pytests/bdd/steps/test_workspace_metadata_steps.pytests/conftest.pytests/e2e/conftest.pytests/e2e/helpers/e2e_steps_helpers.pytests/e2e/helpers/git_helpers.pytests/e2e/helpers/workspace_builder.pytests/e2e/steps/test_e2e_steps.pytests/unit/conftest.pytests/unit/publish/conftest.pytests/unit/publish/preflight_test_utils.pytests/unit/publish/test_packaging.pytests/unit/publish/test_preflight_checks.pytests/unit/publish/test_publish_execution_helpers.pytests/unit/publish/test_run_integration.pytests/unit/test_bump_command_internals.pytests/unit/test_cli.pytests/unit/test_publish_formatting.pytests/unit/test_publish_patch_strategy.pytests/unit/test_publish_planning.pytests/unit/test_publish_staging.pytests/unit/test_workspace_models_validation.py
Add `uv` as an explicit prerequisite for the lint target because the Pylint tier is executed through `uv tool run`. This makes the target fail at the tool-check stage when `uv` is unavailable.
Add developer guidance for the two-tier Ruff and PyPy-backed Pylint gate, including the Makefile variables and `pyproject.toml` policy locations.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Makefile`:
- Around line 4-5: The Makefile uses a literal "uv" in the lint prerequisite and
in the TOOLS list, which breaks the override/fallback in the UV variable; update
references to use the resolved variable $(UV) instead of the literal "uv" so
overrides like `make lint UV=/custom/uv` work correctly—specifically replace the
uv prerequisite on the lint target and the uv entry in the TOOLS variable with
$(UV), keeping existing whitespace and ordering.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/developers-guide.md`:
- Around line 42-45: The sentence describing the `lint` target (mentioning
`ruff`, `uv`, and Makefile prerequisites) is missing two commas; add a comma
before "so" in "so it fails during tool checks" and add a comma after
"invocations" in "as well as command invocations" to correctly separate the
clauses and improve readability.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: cdbb28f0-078d-4ac1-9461-b0bb674a3501
📒 Files selected for processing (1)
docs/developers-guide.md
Use the resolved `UV` variable in the lint prerequisites and tool checks so Makefile overrides apply consistently. Tidy the developer guide sentence that explains the lint prerequisites.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
Makefile (1)
5-5:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winRestore a resolvable
uvprerequisite target.Fix the dependency graph broken at Line 5. Replacing
uvwith$(UV)inTOOLS
removes theuvtarget, whilebuildandteststill requireuv, which
causes the reported CI failure: “No rule to make target 'uv'”.Patch
-TOOLS = $(MDFORMAT_ALL) ruff ty $(MDLINT) $(NIXIE) $(UV) +TOOLS = $(MDFORMAT_ALL) ruff ty $(MDLINT) $(NIXIE) uv @@ +uv: ## Verify required CLI tools + $(call ensure_tool,$(UV)) + ifneq ($(strip $(TOOLS)),) $(TOOLS): ## Verify required CLI tools $(call ensure_tool,$@) endifBased on learnings: “Future lint additions must be wired through Makefile
prerequisites as well as command invocations to ensure local failures remain
early and clear”.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Makefile` at line 5, The Makefile's TOOLS list removed the literal uv prerequisite by replacing uv with $(UV), breaking targets that still depend on a literal uv; restore a resolvable prerequisite by adding back the literal "uv" into the TOOLS assignment (or alternatively ensure the uv target is defined as $(UV): ... and update dependent targets), and make the dependencies consistent by updating the build and test targets to depend on the same symbol (either the literal uv or the variable $(UV)) so the Make dependency graph resolves correctly; specifically check and adjust the TOOLS variable, the uv/$(UV) target definition, and the build/test prerequisites (targets named build and test) to use the same identifier.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@Makefile`:
- Line 5: The Makefile's TOOLS list removed the literal uv prerequisite by
replacing uv with $(UV), breaking targets that still depend on a literal uv;
restore a resolvable prerequisite by adding back the literal "uv" into the TOOLS
assignment (or alternatively ensure the uv target is defined as $(UV): ... and
update dependent targets), and make the dependencies consistent by updating the
build and test targets to depend on the same symbol (either the literal uv or
the variable $(UV)) so the Make dependency graph resolves correctly;
specifically check and adjust the TOOLS variable, the uv/$(UV) target
definition, and the build/test prerequisites (targets named build and test) to
use the same identifier.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: f14a7a78-af61-4830-9c62-d1a66cd24e6a
📒 Files selected for processing (2)
Makefiledocs/developers-guide.md
Organize the Pylint enable list by rule family so reviewers can scan the second-tier lint policy more easily. Keep `consider-using-with` enabled in the runtime hazards group and suppress the one direct `Popen` ownership case locally where streaming relay threads require explicit lifecycle handling.
Resolve build and test target dependencies through `$(UV)` so `make` and Makefile validators do not look for a literal `uv` target. Keep command execution aligned with the same configured path.
Add developer guidance for the Makefile `UV` variable so the `command -v uv` lookup and `$HOME/.local/bin/uv` fallback are clear. Wrap existing Markdown lines that blocked the documented commit gate.
There was a problem hiding this comment.
Gates Passed
6 Quality Gates Passed
See analysis details in CodeScene
Absence of Expected Change Pattern
- lading/lading/commands/publish.py is usually changed with: lading/tests/bdd/steps/test_publish_steps.py
Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Summary
This branch imports the lint policy used by
leynos/episodicso Lading runs Ruff first and then a focused Pylint pass through the PyPy shim. It raises the project lint baseline while keeping existing large-module and test-scaffolding debt explicit instead of folding broad refactors into the tooling change.No linked issue or roadmap task was identified for this branch.
Review walkthrough
pylint-pypy-shimcommand wiring and the second lint tier after Ruff.typingbanned-api rule is satisfied without behaviour changes.Validation
make lint: passed, including Ruff and PyPy-backed Pylint.make check-fmt: passed.make typecheck: passed.make test: passed, 432 tests.git diff --check: passed.Notes
References