From be478a8c81245b5887ce5a58c7c599664f55cc11 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sat, 28 Nov 2026 08:18:35 +0100 Subject: [PATCH] Drop lint, coverage and line-cap gates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug-class-check: none — gate policy change (kuhy 2026-11-27) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WzxdWZDq7ef5JyQd7Rx3Ju --- .github/workflows/file-length.yml | 33 -------- .github/workflows/pre-commit.yml | 8 +- .pre-commit-config.yaml | 124 ------------------------------ AGENTS.md | 6 +- app/pubspec.yaml | 2 +- 5 files changed, 5 insertions(+), 168 deletions(-) delete mode 100644 .github/workflows/file-length.yml diff --git a/.github/workflows/file-length.yml b/.github/workflows/file-length.yml deleted file mode 100644 index afc1578..0000000 --- a/.github/workflows/file-length.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: file-length - -# The 250-line cap, enforced on push as well as at commit time. The local -# pre-commit hook can be skipped (a fresh clone that never ran `pre-commit -# install` has no hooks at all), so the cap needs a second gate that no one -# can forget to install. -# -# Deliberately a SEPARATE workflow from release-apk.yml: a file that grew too -# long should fail lint, not block publishing an APK. -on: - push: - branches: [main] - pull_request: - workflow_dispatch: - -jobs: - file-length: - name: file length <= 250 lines - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - # The gate and its exemption list live in the shared utils repo so every - # repo enforces the same cap. Checking it out beats vendoring a copy - # here, which is exactly how a gate and a survey start disagreeing. - - name: Check out the shared gate - uses: actions/checkout@v4 - with: - repository: kuhyx/utils - path: .utils - - - name: Enforce the cap - run: bash .utils/scripts/check_file_length.sh --all diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index a412c39..7e1f170 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -17,15 +17,9 @@ jobs: fail-fast: false matrix: include: - - group: mypy - hooks: mypy - skip: "" - - group: pylint - hooks: pylint - skip: "" - group: rest hooks: "" - skip: mypy,pylint,dependency-freshness + skip: "dependency-freshness" name: pre-commit (${{ matrix.group }}) steps: - uses: actions/checkout@v4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 87e981c..55882ac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,11 +25,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - # Shared fakes and fixtures, not test modules. Split out of conftest.py - # and test_sync.py only because those files passed the 250-line cap. - exclude: ^diet_guard/tests/_(tk_fakes(_containers|_canvas)?|gate_layout_probe|gate_focus_probe|gate_measurement|gate_keyboard_probe|gate_fixtures|sync_fakes|kuchnia_fakes|state_redirects|claude_redirects|claude_fakes|claude_worker_fakes)\.py$ - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -57,88 +52,9 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.15.2 hooks: - - id: ruff - args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes] - types_or: [python, pyi] - id: ruff-format types_or: [python, pyi] - - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.13.0 - hooks: - - id: mypy - args: - - --ignore-missing-imports - - --no-error-summary - - --disable-error-code=no-untyped-def - - --disable-error-code=no-untyped-call - - --disable-error-code=var-annotated - - --disable-error-code=no-any-unimported - - --disable-error-code=type-arg - - --disable-error-code=no-any-return - - --disable-error-code=misc - - --disable-error-code=unused-ignore - - --disable-error-code=unreachable - - --disable-error-code=assignment - - --disable-error-code=no-redef - - --disable-error-code=attr-defined - - --disable-error-code=arg-type - - --disable-error-code=union-attr - - --disable-error-code=call-overload - - --disable-error-code=return-value - - --disable-error-code=redundant-cast - - --disable-error-code=empty-body - - --disable-error-code=list-item - additional_dependencies: - - types-requests - - - repo: https://github.com/pylint-dev/pylint - rev: v3.3.2 - hooks: - - id: pylint - # pre-commit itself runs on 3.15 and `python3` resolves to it; this - # pylint's --jobs=4 pickles with dill, which crashes there - # (no `co_lnotab`). The repo targets 3.14. - language_version: python3.14 - args: - - --rcfile=pyproject.toml - - --fail-under=10 - - --jobs=4 - additional_dependencies: - - pytest - - requests - # Kept in step with pyproject.toml: pip refuses two different - # direct URLs for one distribution, so any pin that drifts from - # the manifest becomes an unresolvable hook environment rather - # than merely an old one. - - gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.16.0#subdirectory=gatelock - - crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.11.1#subdirectory=crdt-sync - - freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.3#subdirectory=freedays - - sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.5.8#subdirectory=sickdays - - kuhy-credit @ git+https://github.com/kuhyx/utils@kuhy-credit-v0.3.1#subdirectory=kuhy_credit - - rtdb-relay @ git+https://github.com/kuhyx/utils@rtdb-relay-v0.2.1#subdirectory=rtdb_relay - - claude-agent-sdk==0.2.184 - - httpx==0.28.1 - - mcp>=2,<3 - - pydantic - - defusedxml==0.7.1 - # Test suites intentionally use patterns (protected-access, magic-value - # comparisons) that don't belong in the source-code 10/10 gate. - exclude: ^(\.venv/)|(^|/)(tests/|conftest\.py) - - - repo: https://github.com/PyCQA/bandit - rev: 1.7.10 - hooks: - - id: bandit - args: - - -c - - pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(tests/|.*test.*\.py$) - - repo: local hooks: # Split into <60 s steps (run in this order); no-arg ci_mirror.sh is the CI form. @@ -166,14 +82,6 @@ repos: always_run: true require_serial: true stages: [manual] - - id: ci-mirror-flutter-analyze - name: CI mirror 4 (flutter analyze) - entry: bash scripts/ci_mirror.sh flutter-analyze - language: system - pass_filenames: false - always_run: true - require_serial: true - stages: [manual] - id: ci-mirror-flutter-test-1 name: CI mirror 5 (flutter test 1/12) entry: bash scripts/ci_mirror.sh flutter-test --shard 0/12 @@ -271,15 +179,6 @@ repos: require_serial: true stages: [manual] - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv - # Devine: the 1974 ideal-body-weight formula's author, not "define". - - --ignore-words-list=devine - - repo: local hooks: # Fails a commit that still points crdt_sync at a local path. Local @@ -300,29 +199,6 @@ repos: pass_filenames: false always_run: true require_serial: true - - id: shellcheck - name: shellcheck - entry: bash -c 'printf "%s\0" "$@" | xargs -0 -n 40 shellcheck --severity=warning' -- - language: system - types: [shell] - # A PKGBUILD is a makepkg manifest, not a standalone script: it has no - # shebang (SC2148) and its variables are read by makepkg rather than by - # the file itself (SC2034). namcap is what actually lints these. - exclude: '^packaging/aur/PKGBUILD$' - # The shared 250-line cap. Checks only the files in the commit, so an - # unrelated commit never breaks; exits 1 rather than warning. No - # baseline and no allowlist -- those are suppressions. The exemption - # list (generated/vendored/data files) lives with the checker in - # ~/src/utils/file_length/config.py so the gate and the survey cannot - # disagree. - # - # Deliberately unfiltered: no types_or and no files. The cap applies to - # Dart and prose too, and a type filter here is what would silently - # exempt the whole Flutter app and every .md. - - id: file-length - name: file length <= 250 lines - entry: scripts/check_file_length.sh - language: system # unittest.mock.patch fails OPEN: once a refactor moves a name, a patch # target that still imports redirects nothing, the test passes, and the diff --git a/AGENTS.md b/AGENTS.md index 26d8853..5f2b466 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,10 +20,10 @@ show adherence, streaks, a YTD tally and weekly/monthly averages, all derived fr - run: `python -m diet_guard gate --demo` - test: `python -m pytest -n auto -p no:sugar -q` (python, 100% branch bar from pyproject) then `cd app && flutter test --reporter=compact` - test-changed: `scripts/test_changed.sh` (maps py and app/ dart changes to their tests, no coverage) -- lint: `pre-commit run --all-files` -- coverage: `python -m pytest -n auto -p no:sugar -q` (writes coverage.lcov) +- lint: n/a: dropped (kuhy, 2026-11-27) +- coverage: n/a: dropped (kuhy, 2026-11-27) - deploy: `bash scripts/deploy.sh` (pull ~/src/diet-guard, system-Python install, desktop app; health-checked) -- coverage-gaps: `coverage-gaps coverage.lcov` +- coverage-gaps: n/a: dropped (kuhy, 2026-11-27) ## Scheduling diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 5c65fe2..b45c277 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -2,7 +2,7 @@ name: diet_guard_app description: "Companion phone app for diet_guard: log meals on the go." publish_to: 'none' -version: 1.0.194+1 +version: 1.0.195+1 environment: sdk: ^3.12.2