Skip to content

chore(dev): add pre-commit config mirroring the CI gates - #1129

Merged
lfnovo merged 2 commits into
lfnovo:mainfrom
dyzur:chore/pre-commit-config
Jul 14, 2026
Merged

chore(dev): add pre-commit config mirroring the CI gates#1129
lfnovo merged 2 commits into
lfnovo:mainfrom
dyzur:chore/pre-commit-config

Conversation

@dyzur

@dyzur dyzur commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

From the repo quality assessment (CI/CD scored 53/100).

The CI half of this issue shipped in v1.12.0 (#1068, #1076). This PR covers what remains: the local pre-commit config.

Changes:

  • Add .pre-commit-config.yaml with ruff (lint + format), mypy (via language: system/uv to match CI environment), and basic hygiene hooks
  • Update development-setup.md with install/run/skip/update instructions
  • All hooks mirror the CI gates — no "passes locally, fails in CI" drift

Closes #940

Review in cubic

Create .pre-commit-config.yaml with ruff (lint + format), mypy and basic
hygiene hooks so local commits fail for the same reasons PRs would.

- Ruff lint (--fix for local convenience, no drift vs CI's ruff check .)
- Ruff format check (not yet gated in CI but zero drift — same tool)
- Mypy via language:system/uv to match CI's uv run python -m mypy .
- Hygiene: large files, merge conflicts, YAML/TOML syntax, trailing
  whitespace, EOF newlines
- Updated development-setup.md with install/run/skip/update docs

Closes #940

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@lfnovo lfnovo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean dev-tooling PR. Hooks mirror the CI gates faithfully — ruff pin matches pyproject, mypy runs through uv exactly as CI does, mypy is skippable for fast commits. Well documented. Approving.

@lfnovo
lfnovo merged commit 3ece9e9 into lfnovo:main Jul 14, 2026
12 checks passed
lfnovo added a commit that referenced this pull request Jul 14, 2026
build-regular is a required status check that ran a full (several-minute)
Docker build on every PR, including docs/config-only PRs where the image is
byte-for-byte identical (#1134, surfaced merging #1129).

Add a paths-filter 'changes' job and gate build-regular's build steps on
'push to main OR image-affecting paths changed'. The job itself always runs,
so the required check always reports — avoiding the 'path-filtered required
check never reports -> merge deadlock' trap (a workflow-level paths filter
would have caused exactly that). Docs/config PRs now report build-regular
green in seconds; PRs touching Dockerfile/deps/app/frontend build as before.
Release build (build-and-release) is untouched.

Closes #1134
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(dev): add pre-commit config mirroring the CI gates

2 participants