From 2399227b4effa18a2273d438dcc0752c019f94b9 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sat, 28 Nov 2026 08:01:51 +0100 Subject: [PATCH] Drop lint, type, coverage, 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/app-errors-tests.yml | 2 +- .github/workflows/crdt-sync-dart-tests.yml | 21 +---- .github/workflows/crdt-sync-flutter-tests.yml | 10 +-- .github/workflows/crdt-sync-precommit.yml | 23 +---- .github/workflows/crdt-sync-tests.yml | 2 +- .../workflows/data-transfer-flutter-tests.yml | 10 +-- .github/workflows/design-system-tests.yml | 10 +-- .github/workflows/earned-time-precommit.yml | 23 +---- .github/workflows/earned-time-tests.yml | 2 +- .github/workflows/file-length.yml | 34 ------- .github/workflows/focus-project-precommit.yml | 23 +---- .github/workflows/focus-project-tests.yml | 2 +- .github/workflows/freedays-precommit.yml | 23 +---- .github/workflows/freedays-tests.yml | 2 +- .../workflows/game-recording-precommit.yml | 23 +---- .github/workflows/game-recording-tests.yml | 4 +- .github/workflows/gatelock-precommit.yml | 23 +---- .github/workflows/gatelock-tests.yml | 2 +- .../workflows/github-device-auth-tests.yml | 10 +-- .github/workflows/godot-dev-tools-tests.yml | 6 -- .../workflows/google-account-token-tests.yml | 10 +-- .github/workflows/holds-precommit.yml | 23 +---- .github/workflows/holds-tests.yml | 2 +- .github/workflows/kuhy-credit-tests.yml | 18 ++-- .../workflows/leetcode-coach-precommit.yml | 23 +---- .github/workflows/leetcode-coach-tests.yml | 2 +- .github/workflows/music-theory-tests.yml | 4 +- .../workflows/omniroute_offload-precommit.yml | 23 +---- .github/workflows/platform-location-tests.yml | 10 +-- .github/workflows/rtdb-relay-dart-tests.yml | 10 +-- .github/workflows/shared-gates-tests.yml | 47 +++------- .github/workflows/sickdays-precommit.yml | 23 +---- .github/workflows/sickdays-tests.yml | 2 +- .github/workflows/sql-drills-precommit.yml | 23 +---- .github/workflows/sql-drills-tests.yml | 2 +- .github/workflows/sync-settings-ui-tests.yml | 10 +-- .github/workflows/ts-config-tests.yml | 7 +- .github/workflows/ts-core-tests.yml | 15 +--- .github/workflows/web-ui-tests.yml | 15 +--- .pre-commit-config.yaml | 27 ++---- CLAUDE.md | 6 +- app_errors/pyproject.toml | 3 +- app_errors/uv.lock | 6 +- crdt-sync/.pre-commit-config.yaml | 80 +---------------- crdt-sync/pyproject.toml | 1 - data_transfer_flutter/.pre-commit-config.yaml | 18 +--- design_system/.pre-commit-config.yaml | 18 +--- earned_time/.pre-commit-config.yaml | 78 +--------------- earned_time/pyproject.toml | 1 - feedback_inbox/.pre-commit-config.yaml | 74 +--------------- feedback_inbox/pyproject.toml | 3 +- focus_project/.pre-commit-config.yaml | 82 +---------------- focus_project/pyproject.toml | 1 - freedays/.pre-commit-config.yaml | 77 +--------------- freedays/pyproject.toml | 1 - game_recording/.pre-commit-config.yaml | 62 +------------ game_recording/pyproject.toml | 1 - gatelock/.pre-commit-config.yaml | 74 +--------------- gatelock/pyproject.toml | 1 - google_account_token/.pre-commit-config.yaml | 18 +--- holds/.pre-commit-config.yaml | 77 +--------------- holds/pyproject.toml | 1 - kuhy_credit/pyproject.toml | 1 - kuhy_credit/web/vitest.config.js | 1 - leetcode_coach/.pre-commit-config.yaml | 88 +------------------ leetcode_coach/pyproject.toml | 1 - md_naming/.coveragerc | 8 +- music_theory/.pre-commit-config.yaml | 83 +---------------- music_theory/pyproject.toml | 1 - omniroute_offload/.pre-commit-config.yaml | 74 +--------------- omniroute_offload/pyproject.toml | 3 +- platform_location/.pre-commit-config.yaml | 18 +--- repo_contract/infer.py | 77 +++------------- repo_contract/tests/test_bootstrap.py | 2 +- repo_contract/tests/test_infer.py | 40 +++++---- rtdb_relay/pyproject.toml | 1 - scripts/check_coverage.sh | 73 +-------------- scripts/check_file_length.sh | 41 +-------- sickdays/.pre-commit-config.yaml | 78 +--------------- sickdays/pyproject.toml | 1 - sql_drills/.pre-commit-config.yaml | 75 +--------------- sql_drills/pyproject.toml | 1 - sync_settings_ui/.pre-commit-config.yaml | 18 +--- todo_hooks/.coveragerc | 1 - todo_hooks/pyproject.toml | 1 - ts_config/.pre-commit-config.yaml | 17 +--- ts_config/vitest.config.js | 1 - ts_core/vitest.config.ts | 1 - vmbox/.pre-commit-config.yaml | 17 ---- web_ui/.pre-commit-config.yaml | 17 +--- web_ui/vitest.config.ts | 1 - 91 files changed, 202 insertions(+), 1773 deletions(-) delete mode 100644 .github/workflows/file-length.yml diff --git a/.github/workflows/app-errors-tests.yml b/.github/workflows/app-errors-tests.yml index 0a1ec46..f50878a 100644 --- a/.github/workflows/app-errors-tests.yml +++ b/.github/workflows/app-errors-tests.yml @@ -30,5 +30,5 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt && pip install --no-deps -e . - - name: Run tests with coverage + - name: Run tests run: python -m pytest -v diff --git a/.github/workflows/crdt-sync-dart-tests.yml b/.github/workflows/crdt-sync-dart-tests.yml index 4205c33..d778d46 100644 --- a/.github/workflows/crdt-sync-dart-tests.yml +++ b/.github/workflows/crdt-sync-dart-tests.yml @@ -27,22 +27,5 @@ jobs: - name: Install dependencies run: dart pub get - - name: Analyze - run: dart analyze --fatal-infos - - - name: Run tests with coverage - run: dart test --coverage=coverage - - # Unlike `flutter test --coverage`, `dart test --coverage` emits raw VM - # JSON and no lcov. Skipping this step leaves a stale lcov.info on disk - # that the gate below happily "passes" -- which is exactly how this - # package drifted to 96% while believing it was at 100%. - - name: Convert coverage to lcov - run: | - dart pub global activate coverage - dart pub global run coverage:format_coverage \ - --lcov --in=coverage/test --out=coverage/lcov.info \ - --report-on=lib --packages=.dart_tool/package_config.json - - - name: Enforce 100% line coverage - run: scripts/check_coverage.sh coverage/lcov.info 100 + - name: Run tests + run: dart test diff --git a/.github/workflows/crdt-sync-flutter-tests.yml b/.github/workflows/crdt-sync-flutter-tests.yml index b6a8f83..232db6a 100644 --- a/.github/workflows/crdt-sync-flutter-tests.yml +++ b/.github/workflows/crdt-sync-flutter-tests.yml @@ -26,11 +26,5 @@ jobs: - name: Install dependencies run: flutter pub get - - name: Analyze - run: flutter analyze - - - name: Run tests with coverage - run: flutter test --coverage - - - name: Enforce 100% line coverage - run: scripts/check_coverage.sh coverage/lcov.info 100 + - name: Run tests + run: flutter test diff --git a/.github/workflows/crdt-sync-precommit.yml b/.github/workflows/crdt-sync-precommit.yml index 50dec34..b85a71b 100644 --- a/.github/workflows/crdt-sync-precommit.yml +++ b/.github/workflows/crdt-sync-precommit.yml @@ -16,10 +16,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.x" - # Only pre-commit itself. Every linting hook runs in its own isolated - # env -- ruff, mypy, pylint, bandit and codespell each come from their - # own repo+rev, and the local hooks need nothing beyond bash and - # python3 -- so installing the full requirements.txt spent 9s a run on + # Only pre-commit itself. Every hook runs in its own isolated + # env -- ruff-format comes from its own repo+rev, and the local hooks + # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on # packages no pre-commit-stage hook imports. Verified by running all # three configs green in a venv holding pre-commit and nothing else. # The pin is read out of requirements.txt rather than repeated here, so @@ -48,22 +47,6 @@ jobs: # than a wrong hook, and cache still re-saves under the new # exact key after a prefix-only hit. restore-keys: pre-commit-crdt-sync-${{ env.pythonLocation }}- - # mypy re-analyses the stdlib and every third-party stub from scratch - # without this, which measured 10s of the hook step in CI against 0.25s - # warm locally -- a 19MB cache dir does the whole difference. Keyed on - # the config, not the sources: mypy's own cache metadata records the - # interpreter, the flag set and a hash per source file, so it re-checks - # what changed and cannot pass stale code. Deliberately NOT keyed on - # github.sha -- that re-saves 19MB x3 every commit and would evict the - # 68MB hook caches under the repo's 10GB LRU budget. A fixed key keeps - # the expensive part, the dependency analysis, which is what costs 10s. - - uses: actions/cache@v4 - with: - path: .mypy_cache - key: >- - mypy-crdt-sync-${{ env.pythonLocation }}-${{ - hashFiles('crdt-sync/.pre-commit-config.yaml') }} - restore-keys: mypy-crdt-sync-${{ env.pythonLocation }}- - name: Run the hooks run: >- pre-commit run --config crdt-sync/.pre-commit-config.yaml diff --git a/.github/workflows/crdt-sync-tests.yml b/.github/workflows/crdt-sync-tests.yml index dba9b49..f39002d 100644 --- a/.github/workflows/crdt-sync-tests.yml +++ b/.github/workflows/crdt-sync-tests.yml @@ -27,5 +27,5 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt - - name: Run tests with coverage + - name: Run tests run: python -m pytest -v diff --git a/.github/workflows/data-transfer-flutter-tests.yml b/.github/workflows/data-transfer-flutter-tests.yml index 838036f..f1ebba2 100644 --- a/.github/workflows/data-transfer-flutter-tests.yml +++ b/.github/workflows/data-transfer-flutter-tests.yml @@ -26,11 +26,5 @@ jobs: - name: Install dependencies run: flutter pub get - - name: Analyze - run: flutter analyze - - - name: Run tests with coverage - run: flutter test --coverage - - - name: Enforce 100% line coverage - run: scripts/check_coverage.sh coverage/lcov.info 100 + - name: Run tests + run: flutter test diff --git a/.github/workflows/design-system-tests.yml b/.github/workflows/design-system-tests.yml index ea96497..edbfce7 100644 --- a/.github/workflows/design-system-tests.yml +++ b/.github/workflows/design-system-tests.yml @@ -26,11 +26,5 @@ jobs: - name: Install dependencies run: flutter pub get - - name: Analyze - run: flutter analyze - - - name: Run tests with coverage - run: flutter test --coverage - - - name: Enforce 100% line coverage - run: scripts/check_coverage.sh coverage/lcov.info 100 + - name: Run tests + run: flutter test diff --git a/.github/workflows/earned-time-precommit.yml b/.github/workflows/earned-time-precommit.yml index 1c5edf2..148d217 100644 --- a/.github/workflows/earned-time-precommit.yml +++ b/.github/workflows/earned-time-precommit.yml @@ -19,10 +19,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.x" - # Only pre-commit itself. Every linting hook runs in its own isolated - # env -- ruff, mypy, pylint, bandit and codespell each come from their - # own repo+rev, and the local hooks need nothing beyond bash and - # python3 -- so installing the full requirements.txt spent 9s a run on + # Only pre-commit itself. Every hook runs in its own isolated + # env -- ruff-format comes from its own repo+rev, and the local hooks + # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on # packages no pre-commit-stage hook imports. Verified by running all # three configs green in a venv holding pre-commit and nothing else. # The pin is read out of requirements.txt rather than repeated here, so @@ -51,22 +50,6 @@ jobs: # than a wrong hook, and cache still re-saves under the new # exact key after a prefix-only hit. restore-keys: pre-commit-earned_time-${{ env.pythonLocation }}- - # mypy re-analyses the stdlib and every third-party stub from scratch - # without this, which measured 10s of the hook step in CI against 0.25s - # warm locally -- a 19MB cache dir does the whole difference. Keyed on - # the config, not the sources: mypy's own cache metadata records the - # interpreter, the flag set and a hash per source file, so it re-checks - # what changed and cannot pass stale code. Deliberately NOT keyed on - # github.sha -- that re-saves 19MB x3 every commit and would evict the - # 68MB hook caches under the repo's 10GB LRU budget. A fixed key keeps - # the expensive part, the dependency analysis, which is what costs 10s. - - uses: actions/cache@v4 - with: - path: .mypy_cache - key: >- - mypy-earned_time-${{ env.pythonLocation }}-${{ - hashFiles('earned_time/.pre-commit-config.yaml') }} - restore-keys: mypy-earned_time-${{ env.pythonLocation }}- - name: Run the hooks run: >- pre-commit run --config earned_time/.pre-commit-config.yaml diff --git a/.github/workflows/earned-time-tests.yml b/.github/workflows/earned-time-tests.yml index 008fc50..17419e9 100644 --- a/.github/workflows/earned-time-tests.yml +++ b/.github/workflows/earned-time-tests.yml @@ -32,5 +32,5 @@ jobs: # No display needed: earned_time is stdlib-only policy, imported # headless by the root gaming daemon. - - name: Run tests with coverage + - name: Run tests run: python -m pytest -v diff --git a/.github/workflows/file-length.yml b/.github/workflows/file-length.yml deleted file mode 100644 index afd5bfb..0000000 --- a/.github/workflows/file-length.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: file length - -# The 250-line cap, enforced on push as well as in pre-commit -# (refactor_claude_todo.md, "make it permanent"). -# -# Unlike the pre-commit hook, which only sees the files in a commit, this runs -# over the whole tree: the hook keeps a violation from being *introduced*, and -# this keeps one from surviving a path the hook never saw (a merge, a push -# from a machine without hooks installed, a rebase that resurrects a file). -# -# No paths filter on purpose. The cap applies to every file in the repo, so -# scoping this job to a subdirectory would be the one way to reintroduce the -# problem it exists to catch. - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - file-length: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - - name: Every file is at most 250 lines - run: bash scripts/check_file_length.sh --all diff --git a/.github/workflows/focus-project-precommit.yml b/.github/workflows/focus-project-precommit.yml index fc94610..1e10364 100644 --- a/.github/workflows/focus-project-precommit.yml +++ b/.github/workflows/focus-project-precommit.yml @@ -19,10 +19,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.x" - # Only pre-commit itself. Every linting hook runs in its own isolated - # env -- ruff, mypy, pylint, bandit and codespell each come from their - # own repo+rev, and the local hooks need nothing beyond bash and - # python3 -- so installing the full requirements.txt spent 9s a run on + # Only pre-commit itself. Every hook runs in its own isolated + # env -- ruff-format comes from its own repo+rev, and the local hooks + # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on # packages no pre-commit-stage hook imports. Verified by running all # three configs green in a venv holding pre-commit and nothing else. # The pin is read out of requirements.txt rather than repeated here, so @@ -51,22 +50,6 @@ jobs: # than a wrong hook, and cache still re-saves under the new # exact key after a prefix-only hit. restore-keys: pre-commit-focus-project-${{ env.pythonLocation }}- - # mypy re-analyses the stdlib and every third-party stub from scratch - # without this, which measured 10s of the hook step in CI against 0.25s - # warm locally -- a 19MB cache dir does the whole difference. Keyed on - # the config, not the sources: mypy's own cache metadata records the - # interpreter, the flag set and a hash per source file, so it re-checks - # what changed and cannot pass stale code. Deliberately NOT keyed on - # github.sha -- that re-saves 19MB x3 every commit and would evict the - # 68MB hook caches under the repo's 10GB LRU budget. A fixed key keeps - # the expensive part, the dependency analysis, which is what costs 10s. - - uses: actions/cache@v4 - with: - path: .mypy_cache - key: >- - mypy-focus-project-${{ env.pythonLocation }}-${{ - hashFiles('focus_project/.pre-commit-config.yaml') }} - restore-keys: mypy-focus-project-${{ env.pythonLocation }}- - name: Run the hooks run: >- pre-commit run --config focus_project/.pre-commit-config.yaml diff --git a/.github/workflows/focus-project-tests.yml b/.github/workflows/focus-project-tests.yml index 1006a9c..28546fe 100644 --- a/.github/workflows/focus-project-tests.yml +++ b/.github/workflows/focus-project-tests.yml @@ -30,5 +30,5 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt && pip install --no-deps -e . - - name: Run tests with coverage + - name: Run tests run: python -m pytest -v diff --git a/.github/workflows/freedays-precommit.yml b/.github/workflows/freedays-precommit.yml index e625e64..4ead245 100644 --- a/.github/workflows/freedays-precommit.yml +++ b/.github/workflows/freedays-precommit.yml @@ -19,10 +19,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.x" - # Only pre-commit itself. Every linting hook runs in its own isolated - # env -- ruff, mypy, pylint, bandit and codespell each come from their - # own repo+rev, and the local hooks need nothing beyond bash and - # python3 -- so installing the full requirements.txt spent 9s a run on + # Only pre-commit itself. Every hook runs in its own isolated + # env -- ruff-format comes from its own repo+rev, and the local hooks + # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on # packages no pre-commit-stage hook imports. Verified by running all # three configs green in a venv holding pre-commit and nothing else. # The pin is read out of requirements.txt rather than repeated here, so @@ -51,22 +50,6 @@ jobs: # than a wrong hook, and cache still re-saves under the new # exact key after a prefix-only hit. restore-keys: pre-commit-freedays-${{ env.pythonLocation }}- - # mypy re-analyses the stdlib and every third-party stub from scratch - # without this, which measured 10s of the hook step in CI against 0.25s - # warm locally -- a 19MB cache dir does the whole difference. Keyed on - # the config, not the sources: mypy's own cache metadata records the - # interpreter, the flag set and a hash per source file, so it re-checks - # what changed and cannot pass stale code. Deliberately NOT keyed on - # github.sha -- that re-saves 19MB x3 every commit and would evict the - # 68MB hook caches under the repo's 10GB LRU budget. A fixed key keeps - # the expensive part, the dependency analysis, which is what costs 10s. - - uses: actions/cache@v4 - with: - path: .mypy_cache - key: >- - mypy-freedays-${{ env.pythonLocation }}-${{ - hashFiles('freedays/.pre-commit-config.yaml') }} - restore-keys: mypy-freedays-${{ env.pythonLocation }}- - name: Run the hooks run: >- pre-commit run --config freedays/.pre-commit-config.yaml diff --git a/.github/workflows/freedays-tests.yml b/.github/workflows/freedays-tests.yml index 040901c..ab1459b 100644 --- a/.github/workflows/freedays-tests.yml +++ b/.github/workflows/freedays-tests.yml @@ -40,5 +40,5 @@ jobs: # No display needed: freedays draws nothing. It is policy, a JSON file # and a CLI. - - name: Run tests with coverage + - name: Run tests run: python -m pytest -v diff --git a/.github/workflows/game-recording-precommit.yml b/.github/workflows/game-recording-precommit.yml index 341e6ce..ec8c612 100644 --- a/.github/workflows/game-recording-precommit.yml +++ b/.github/workflows/game-recording-precommit.yml @@ -18,10 +18,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.x" - # Only pre-commit itself. Every linting hook runs in its own isolated - # env -- ruff, mypy, pylint, bandit and codespell each come from their - # own repo+rev, and the local hooks need nothing beyond bash and - # python3 -- so installing the full requirements.txt spent 9s a run on + # Only pre-commit itself. Every hook runs in its own isolated + # env -- ruff-format comes from its own repo+rev, and the local hooks + # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on # packages no pre-commit-stage hook imports. Verified by running this # package's config green in a venv holding pre-commit and nothing else. # The pin is read out of requirements.txt rather than repeated here, so @@ -49,22 +48,6 @@ jobs: # than a wrong hook, and cache still re-saves under the new # exact key after a prefix-only hit. restore-keys: pre-commit-game-recording-${{ env.pythonLocation }}- - # mypy re-analyses the stdlib and every third-party stub from scratch - # without this, which measured 10s of the hook step in CI against 0.25s - # warm locally -- a 19MB cache dir does the whole difference. Keyed on - # the config, not the sources: mypy's own cache metadata records the - # interpreter, the flag set and a hash per source file, so it re-checks - # what changed and cannot pass stale code. Deliberately NOT keyed on - # github.sha -- that re-saves 19MB every commit and would evict the - # 68MB hook caches under the repo's 10GB LRU budget. A fixed key keeps - # the expensive part, the dependency analysis, which is what costs 10s. - - uses: actions/cache@v4 - with: - path: .mypy_cache - key: >- - mypy-game-recording-${{ env.pythonLocation }}-${{ - hashFiles('game_recording/.pre-commit-config.yaml') }} - restore-keys: mypy-game-recording-${{ env.pythonLocation }}- - name: Run the hooks run: >- pre-commit run --config game_recording/.pre-commit-config.yaml diff --git a/.github/workflows/game-recording-tests.yml b/.github/workflows/game-recording-tests.yml index b51eb93..37a6fec 100644 --- a/.github/workflows/game-recording-tests.yml +++ b/.github/workflows/game-recording-tests.yml @@ -31,5 +31,5 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt - - name: Run tests with coverage - run: python -m pytest -v --cov=game_recording + - name: Run tests + run: python -m pytest -v diff --git a/.github/workflows/gatelock-precommit.yml b/.github/workflows/gatelock-precommit.yml index 7399763..9e95b4b 100644 --- a/.github/workflows/gatelock-precommit.yml +++ b/.github/workflows/gatelock-precommit.yml @@ -18,10 +18,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.x" - # Only pre-commit itself. Every linting hook runs in its own isolated - # env -- ruff, mypy, pylint, bandit and codespell each come from their - # own repo+rev, and the local hooks need nothing beyond bash and - # python3 -- so installing the full requirements.txt spent 9s a run on + # Only pre-commit itself. Every hook runs in its own isolated + # env -- ruff-format comes from its own repo+rev, and the local hooks + # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on # packages no pre-commit-stage hook imports. Verified by running all # three configs green in a venv holding pre-commit and nothing else. # The pin is read out of requirements.txt rather than repeated here, so @@ -50,22 +49,6 @@ jobs: # than a wrong hook, and cache still re-saves under the new # exact key after a prefix-only hit. restore-keys: pre-commit-gatelock-${{ env.pythonLocation }}- - # mypy re-analyses the stdlib and every third-party stub from scratch - # without this, which measured 10s of the hook step in CI against 0.25s - # warm locally -- a 19MB cache dir does the whole difference. Keyed on - # the config, not the sources: mypy's own cache metadata records the - # interpreter, the flag set and a hash per source file, so it re-checks - # what changed and cannot pass stale code. Deliberately NOT keyed on - # github.sha -- that re-saves 19MB x3 every commit and would evict the - # 68MB hook caches under the repo's 10GB LRU budget. A fixed key keeps - # the expensive part, the dependency analysis, which is what costs 10s. - - uses: actions/cache@v4 - with: - path: .mypy_cache - key: >- - mypy-gatelock-${{ env.pythonLocation }}-${{ - hashFiles('gatelock/.pre-commit-config.yaml') }} - restore-keys: mypy-gatelock-${{ env.pythonLocation }}- - name: Run the hooks run: >- pre-commit run --config gatelock/.pre-commit-config.yaml diff --git a/.github/workflows/gatelock-tests.yml b/.github/workflows/gatelock-tests.yml index 839c12a..fd7f270 100644 --- a/.github/workflows/gatelock-tests.yml +++ b/.github/workflows/gatelock-tests.yml @@ -45,5 +45,5 @@ jobs: - name: Install a virtual X display run: sudo apt-get update && sudo apt-get install -y xvfb - - name: Run tests with coverage + - name: Run tests run: xvfb-run -a -s "-screen 0 1600x1200x24" python -m pytest -v diff --git a/.github/workflows/github-device-auth-tests.yml b/.github/workflows/github-device-auth-tests.yml index a91fe3f..f4252a6 100644 --- a/.github/workflows/github-device-auth-tests.yml +++ b/.github/workflows/github-device-auth-tests.yml @@ -26,11 +26,5 @@ jobs: - name: Install dependencies run: flutter pub get - - name: Analyze - run: flutter analyze - - - name: Run tests with coverage - run: flutter test --coverage - - - name: Enforce 100% line coverage - run: scripts/check_coverage.sh coverage/lcov.info 100 + - name: Run tests + run: flutter test diff --git a/.github/workflows/godot-dev-tools-tests.yml b/.github/workflows/godot-dev-tools-tests.yml index 9430530..546a185 100644 --- a/.github/workflows/godot-dev-tools-tests.yml +++ b/.github/workflows/godot-dev-tools-tests.yml @@ -28,11 +28,5 @@ jobs: sudo mv "Godot_v${GODOT_VERSION}-stable_linux.x86_64" /usr/local/bin/godot rm godot.zip - - name: Install gdtoolkit (pinned) - run: pip install -r godot_dev_tools/requirements-dev.txt - - - name: Lint (gdlint, gdformat) - run: godot_dev_tools/lint.sh - - name: GUT against the stub host (GUT is fetched at its pinned tag) run: godot_dev_tools/test.sh diff --git a/.github/workflows/google-account-token-tests.yml b/.github/workflows/google-account-token-tests.yml index 3abb008..1daab9e 100644 --- a/.github/workflows/google-account-token-tests.yml +++ b/.github/workflows/google-account-token-tests.yml @@ -26,11 +26,5 @@ jobs: - name: Install dependencies run: flutter pub get - - name: Analyze - run: flutter analyze - - - name: Run tests with coverage - run: flutter test --coverage - - - name: Enforce 100% line coverage - run: scripts/check_coverage.sh coverage/lcov.info 100 + - name: Run tests + run: flutter test diff --git a/.github/workflows/holds-precommit.yml b/.github/workflows/holds-precommit.yml index 90e8eb2..c206ea2 100644 --- a/.github/workflows/holds-precommit.yml +++ b/.github/workflows/holds-precommit.yml @@ -19,10 +19,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.x" - # Only pre-commit itself. Every linting hook runs in its own isolated - # env -- ruff, mypy, pylint, bandit and codespell each come from their - # own repo+rev, and the local hooks need nothing beyond bash and - # python3 -- so installing the full requirements.txt spent 9s a run on + # Only pre-commit itself. Every hook runs in its own isolated + # env -- ruff-format comes from its own repo+rev, and the local hooks + # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on # packages no pre-commit-stage hook imports. Verified by running all # three configs green in a venv holding pre-commit and nothing else. # The pin is read out of requirements.txt rather than repeated here, so @@ -51,22 +50,6 @@ jobs: # than a wrong hook, and cache still re-saves under the new # exact key after a prefix-only hit. restore-keys: pre-commit-holds-${{ env.pythonLocation }}- - # mypy re-analyses the stdlib and every third-party stub from scratch - # without this, which measured 10s of the hook step in CI against 0.25s - # warm locally -- a 19MB cache dir does the whole difference. Keyed on - # the config, not the sources: mypy's own cache metadata records the - # interpreter, the flag set and a hash per source file, so it re-checks - # what changed and cannot pass stale code. Deliberately NOT keyed on - # github.sha -- that re-saves 19MB x3 every commit and would evict the - # 68MB hook caches under the repo's 10GB LRU budget. A fixed key keeps - # the expensive part, the dependency analysis, which is what costs 10s. - - uses: actions/cache@v4 - with: - path: .mypy_cache - key: >- - mypy-holds-${{ env.pythonLocation }}-${{ - hashFiles('holds/.pre-commit-config.yaml') }} - restore-keys: mypy-holds-${{ env.pythonLocation }}- - name: Run the hooks run: >- pre-commit run --config holds/.pre-commit-config.yaml diff --git a/.github/workflows/holds-tests.yml b/.github/workflows/holds-tests.yml index 0c4e81b..4f85964 100644 --- a/.github/workflows/holds-tests.yml +++ b/.github/workflows/holds-tests.yml @@ -30,5 +30,5 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt && pip install --no-deps -e . - - name: Run tests with coverage + - name: Run tests run: python -m pytest -v diff --git a/.github/workflows/kuhy-credit-tests.yml b/.github/workflows/kuhy-credit-tests.yml index 08808ed..cef75b5 100644 --- a/.github/workflows/kuhy-credit-tests.yml +++ b/.github/workflows/kuhy-credit-tests.yml @@ -26,9 +26,7 @@ jobs: sudo apt-get update && sudo apt-get install -y xvfb python3-tk \ texlive-latex-base texlive-latex-recommended texlive-pictures pip install -r requirements-dev.txt && pip install --no-deps -e . - - name: Lint - run: ruff check . && ruff format --check . - - name: Tests, Tk E2E and the drift check, 100% branch coverage + - name: Tests, Tk E2E and the drift check run: xvfb-run -a -s "-screen 0 1600x1200x24" python -m pytest -q web: @@ -45,9 +43,8 @@ jobs: - uses: actions/setup-python@v5 with: { python-version: "3.15.2" } - run: pnpm install --frozen-lockfile - - run: pnpm lint - - name: Unit tests, 100% coverage - run: pnpm coverage + - name: Unit tests + run: pnpm test - name: E2E in headless Chrome (window.open stubbed) working-directory: . env: { CHROMIUM: google-chrome } @@ -67,13 +64,12 @@ jobs: - uses: actions/setup-python@v5 with: { python-version: "3.15.2" } - run: flutter pub get - - run: flutter analyze - - name: Widget tests, 100% line coverage - run: flutter test --coverage && ../../scripts/check_coverage.sh coverage/lcov.info 100 + - name: Widget tests + run: flutter test - name: Example web build + E2E in headless Chrome (window.open stubbed) env: { CHROMIUM: google-chrome } run: | - (cd example && flutter pub get && flutter analyze && flutter build web --release) + (cd example && flutter pub get && flutter build web --release) pip install -r ../../flutter_web_drive/requirements.txt python3 ../e2e/flutter_web_e2e.py @@ -90,8 +86,6 @@ jobs: chmod +x "Godot_v${GODOT_VERSION}-stable_linux.x86_64" sudo mv "Godot_v${GODOT_VERSION}-stable_linux.x86_64" /usr/local/bin/godot rm godot.zip - - name: Lint (gdlint, gdformat) - run: pip install -r godot_dev_tools/requirements-dev.txt && kuhy_credit/godot/lint.sh - name: GUT unit tests + demo E2E (GUT fetched at its pinned tag) env: { KUHY_CREDIT_GODOT_TIMEOUT: "50" } run: kuhy_credit/godot/test.sh diff --git a/.github/workflows/leetcode-coach-precommit.yml b/.github/workflows/leetcode-coach-precommit.yml index 8465214..d19ebbe 100644 --- a/.github/workflows/leetcode-coach-precommit.yml +++ b/.github/workflows/leetcode-coach-precommit.yml @@ -19,10 +19,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.x" - # Only pre-commit itself. Every linting hook runs in its own isolated - # env -- ruff, mypy, pylint, bandit and codespell each come from their - # own repo+rev, and the local hooks need nothing beyond bash and - # python3 -- so installing the full requirements.txt spent 9s a run on + # Only pre-commit itself. Every hook runs in its own isolated + # env -- ruff-format comes from its own repo+rev, and the local hooks + # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on # packages no pre-commit-stage hook imports. Verified by running all # three configs green in a venv holding pre-commit and nothing else. # The pin is read out of requirements.txt rather than repeated here, so @@ -51,22 +50,6 @@ jobs: # than a wrong hook, and cache still re-saves under the new # exact key after a prefix-only hit. restore-keys: pre-commit-leetcode-coach-${{ env.pythonLocation }}- - # mypy re-analyses the stdlib and every third-party stub from scratch - # without this, which measured 10s of the hook step in CI against 0.25s - # warm locally -- a 19MB cache dir does the whole difference. Keyed on - # the config, not the sources: mypy's own cache metadata records the - # interpreter, the flag set and a hash per source file, so it re-checks - # what changed and cannot pass stale code. Deliberately NOT keyed on - # github.sha -- that re-saves 19MB x3 every commit and would evict the - # 68MB hook caches under the repo's 10GB LRU budget. A fixed key keeps - # the expensive part, the dependency analysis, which is what costs 10s. - - uses: actions/cache@v4 - with: - path: .mypy_cache - key: >- - mypy-leetcode-coach-${{ env.pythonLocation }}-${{ - hashFiles('leetcode_coach/.pre-commit-config.yaml') }} - restore-keys: mypy-leetcode-coach-${{ env.pythonLocation }}- - name: Run the hooks run: >- pre-commit run --config leetcode_coach/.pre-commit-config.yaml diff --git a/.github/workflows/leetcode-coach-tests.yml b/.github/workflows/leetcode-coach-tests.yml index afe25fe..94ade2c 100644 --- a/.github/workflows/leetcode-coach-tests.yml +++ b/.github/workflows/leetcode-coach-tests.yml @@ -30,5 +30,5 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt && pip install --no-deps -e . - - name: Run tests with coverage + - name: Run tests run: python -m pytest -v diff --git a/.github/workflows/music-theory-tests.yml b/.github/workflows/music-theory-tests.yml index 94d23e4..e6b21f1 100644 --- a/.github/workflows/music-theory-tests.yml +++ b/.github/workflows/music-theory-tests.yml @@ -27,5 +27,5 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt - - name: Run tests with coverage - run: python -m pytest -v --cov=music_theory + - name: Run tests + run: python -m pytest -v diff --git a/.github/workflows/omniroute_offload-precommit.yml b/.github/workflows/omniroute_offload-precommit.yml index 7a642a7..cbb8e5a 100644 --- a/.github/workflows/omniroute_offload-precommit.yml +++ b/.github/workflows/omniroute_offload-precommit.yml @@ -19,10 +19,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.x" - # Only pre-commit itself. Every linting hook runs in its own isolated - # env -- ruff, mypy, pylint, bandit and codespell each come from their - # own repo+rev, and the local hooks need nothing beyond bash and - # python3 -- so installing the full requirements.txt spent 9s a run on + # Only pre-commit itself. Every hook runs in its own isolated + # env -- ruff-format comes from its own repo+rev, and the local hooks + # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on # packages no pre-commit-stage hook imports. Verified by running all # three configs green in a venv holding pre-commit and nothing else. # The pin is read out of requirements.txt rather than repeated here, so @@ -51,22 +50,6 @@ jobs: # than a wrong hook, and cache still re-saves under the new # exact key after a prefix-only hit. restore-keys: pre-commit-omniroute_offload-${{ env.pythonLocation }}- - # mypy re-analyses the stdlib and every third-party stub from scratch - # without this, which measured 10s of the hook step in CI against 0.25s - # warm locally -- a 19MB cache dir does the whole difference. Keyed on - # the config, not the sources: mypy's own cache metadata records the - # interpreter, the flag set and a hash per source file, so it re-checks - # what changed and cannot pass stale code. Deliberately NOT keyed on - # github.sha -- that re-saves 19MB x3 every commit and would evict the - # 68MB hook caches under the repo's 10GB LRU budget. A fixed key keeps - # the expensive part, the dependency analysis, which is what costs 10s. - - uses: actions/cache@v4 - with: - path: .mypy_cache - key: >- - mypy-omniroute_offload-${{ env.pythonLocation }}-${{ - hashFiles('omniroute_offload/.pre-commit-config.yaml') }} - restore-keys: mypy-omniroute_offload-${{ env.pythonLocation }}- - name: Run the hooks run: >- pre-commit run --config omniroute_offload/.pre-commit-config.yaml diff --git a/.github/workflows/platform-location-tests.yml b/.github/workflows/platform-location-tests.yml index 5beab42..811e4eb 100644 --- a/.github/workflows/platform-location-tests.yml +++ b/.github/workflows/platform-location-tests.yml @@ -26,11 +26,5 @@ jobs: - name: Install dependencies run: flutter pub get - - name: Analyze - run: flutter analyze - - - name: Run tests with coverage - run: flutter test --coverage - - - name: Enforce 100% line coverage - run: scripts/check_coverage.sh coverage/lcov.info 100 + - name: Run tests + run: flutter test diff --git a/.github/workflows/rtdb-relay-dart-tests.yml b/.github/workflows/rtdb-relay-dart-tests.yml index c50c64d..9883fcd 100644 --- a/.github/workflows/rtdb-relay-dart-tests.yml +++ b/.github/workflows/rtdb-relay-dart-tests.yml @@ -26,11 +26,5 @@ jobs: - name: Install dependencies run: flutter pub get - - name: Analyze - run: flutter analyze - - - name: Run tests with coverage - run: flutter test --coverage - - - name: Enforce 100% line coverage - run: scripts/check_coverage.sh coverage/lcov.info 100 + - name: Run tests + run: flutter test diff --git a/.github/workflows/shared-gates-tests.yml b/.github/workflows/shared-gates-tests.yml index 7f3731b..94fe323 100644 --- a/.github/workflows/shared-gates-tests.yml +++ b/.github/workflows/shared-gates-tests.yml @@ -27,58 +27,37 @@ jobs: python-version: "3.x" - name: Install test dependencies - run: python -m pip install --upgrade pytest pytest-cov pyyaml packaging + run: python -m pip install --upgrade pytest pyyaml packaging - - name: dep_freshness — 100% branch coverage on the gate itself + - name: dep_freshness run: | - PYTHONPATH=. python -m pytest dep_freshness/tests -q \ - --cov=dep_freshness --cov-branch \ - --cov-report=term-missing \ - --cov-fail-under=99 + PYTHONPATH=. python -m pytest dep_freshness/tests -q - name: md_naming run: PYTHONPATH=. python -m pytest md_naming/tests -q - # Whole package at 100% branch: the gate is enforced in every repo and - # now reads a per-repo `.file-length-exempt`, whose fail-closed rule is - # exactly the kind of branch a partial suite would leave green by accident. - - name: file_length — 100% branch coverage on the gate itself + - name: file_length run: | - PYTHONPATH=. python -m pytest file_length/tests -q \ - --cov=file_length --cov-branch \ - --cov-report=term-missing \ - --cov-fail-under=100 + PYTHONPATH=. python -m pytest file_length/tests -q - - name: repo_contract — 100% branch coverage on the gate itself + - name: repo_contract run: | - PYTHONPATH=. python -m pytest repo_contract/tests -q \ - --cov=repo_contract --cov-branch \ - --cov-report=term-missing \ - --cov-fail-under=100 + PYTHONPATH=. python -m pytest repo_contract/tests -q # Every web repo's pre-commit and CI run this checker against its dist/, # so a false green here ships an un-agent-ready site fleet-wide. - - name: agent_ready — 100% branch coverage on the checker + - name: agent_ready run: | - PYTHONPATH=. python -m pytest agent_ready/tests -q \ - --cov=agent_ready --cov-branch \ - --cov-report=term-missing \ - --cov-fail-under=100 + PYTHONPATH=. python -m pytest agent_ready/tests -q - - name: coverage_gaps — 100% branch coverage on the lister + - name: coverage_gaps run: | - PYTHONPATH=. python -m pytest coverage_gaps/tests -q \ - --cov=coverage_gaps --cov-branch \ - --cov-report=term-missing \ - --cov-fail-under=100 + PYTHONPATH=. python -m pytest coverage_gaps/tests -q # Its tests build throwaway repos with git, which the runner has. - - name: devstats — 100% branch coverage + - name: devstats run: | - PYTHONPATH=. python -m pytest devstats/tests -q \ - --cov=devstats --cov-branch \ - --cov-report=term-missing \ - --cov-fail-under=100 + PYTHONPATH=. python -m pytest devstats/tests -q # gate_stamp.sh is the pre-push gate in every repo. Its tests drive real # pre-commit in throwaway repos, and the hook-id helper runs under diff --git a/.github/workflows/sickdays-precommit.yml b/.github/workflows/sickdays-precommit.yml index 0d90363..db111f5 100644 --- a/.github/workflows/sickdays-precommit.yml +++ b/.github/workflows/sickdays-precommit.yml @@ -19,10 +19,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.x" - # Only pre-commit itself. Every linting hook runs in its own isolated - # env -- ruff, mypy, pylint, bandit and codespell each come from their - # own repo+rev, and the local hooks need nothing beyond bash and - # python3 -- so installing the full requirements.txt spent 9s a run on + # Only pre-commit itself. Every hook runs in its own isolated + # env -- ruff-format comes from its own repo+rev, and the local hooks + # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on # packages no pre-commit-stage hook imports. Verified by running all # three configs green in a venv holding pre-commit and nothing else. # The pin is read out of requirements.txt rather than repeated here, so @@ -51,22 +50,6 @@ jobs: # than a wrong hook, and cache still re-saves under the new # exact key after a prefix-only hit. restore-keys: pre-commit-sickdays-${{ env.pythonLocation }}- - # mypy re-analyses the stdlib and every third-party stub from scratch - # without this, which measured 10s of the hook step in CI against 0.25s - # warm locally -- a 19MB cache dir does the whole difference. Keyed on - # the config, not the sources: mypy's own cache metadata records the - # interpreter, the flag set and a hash per source file, so it re-checks - # what changed and cannot pass stale code. Deliberately NOT keyed on - # github.sha -- that re-saves 19MB x3 every commit and would evict the - # 68MB hook caches under the repo's 10GB LRU budget. A fixed key keeps - # the expensive part, the dependency analysis, which is what costs 10s. - - uses: actions/cache@v4 - with: - path: .mypy_cache - key: >- - mypy-sickdays-${{ env.pythonLocation }}-${{ - hashFiles('sickdays/.pre-commit-config.yaml') }} - restore-keys: mypy-sickdays-${{ env.pythonLocation }}- - name: Run the hooks run: >- pre-commit run --config sickdays/.pre-commit-config.yaml diff --git a/.github/workflows/sickdays-tests.yml b/.github/workflows/sickdays-tests.yml index 914c376..47539df 100644 --- a/.github/workflows/sickdays-tests.yml +++ b/.github/workflows/sickdays-tests.yml @@ -45,5 +45,5 @@ jobs: - name: Install a virtual X display run: sudo apt-get update && sudo apt-get install -y xvfb - - name: Run tests with coverage + - name: Run tests run: xvfb-run -a -s "-screen 0 1600x1200x24" python -m pytest -v diff --git a/.github/workflows/sql-drills-precommit.yml b/.github/workflows/sql-drills-precommit.yml index 1a1f6c9..8e760e3 100644 --- a/.github/workflows/sql-drills-precommit.yml +++ b/.github/workflows/sql-drills-precommit.yml @@ -19,10 +19,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.x" - # Only pre-commit itself. Every linting hook runs in its own isolated - # env -- ruff, mypy, pylint, bandit and codespell each come from their - # own repo+rev, and the local hooks need nothing beyond bash and - # python3 -- so installing the full requirements.txt spent 9s a run on + # Only pre-commit itself. Every hook runs in its own isolated + # env -- ruff-format comes from its own repo+rev, and the local hooks + # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on # packages no pre-commit-stage hook imports. Verified by running all # three configs green in a venv holding pre-commit and nothing else. # The pin is read out of requirements.txt rather than repeated here, so @@ -51,22 +50,6 @@ jobs: # than a wrong hook, and cache still re-saves under the new # exact key after a prefix-only hit. restore-keys: pre-commit-sql-drills-${{ env.pythonLocation }}- - # mypy re-analyses the stdlib and every third-party stub from scratch - # without this, which measured 10s of the hook step in CI against 0.25s - # warm locally -- a 19MB cache dir does the whole difference. Keyed on - # the config, not the sources: mypy's own cache metadata records the - # interpreter, the flag set and a hash per source file, so it re-checks - # what changed and cannot pass stale code. Deliberately NOT keyed on - # github.sha -- that re-saves 19MB x3 every commit and would evict the - # 68MB hook caches under the repo's 10GB LRU budget. A fixed key keeps - # the expensive part, the dependency analysis, which is what costs 10s. - - uses: actions/cache@v4 - with: - path: .mypy_cache - key: >- - mypy-sql-drills-${{ env.pythonLocation }}-${{ - hashFiles('sql_drills/.pre-commit-config.yaml') }} - restore-keys: mypy-sql-drills-${{ env.pythonLocation }}- - name: Run the hooks run: >- pre-commit run --config sql_drills/.pre-commit-config.yaml diff --git a/.github/workflows/sql-drills-tests.yml b/.github/workflows/sql-drills-tests.yml index 37ef52e..bbabed5 100644 --- a/.github/workflows/sql-drills-tests.yml +++ b/.github/workflows/sql-drills-tests.yml @@ -30,5 +30,5 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt && pip install --no-deps -e . - - name: Run tests with coverage + - name: Run tests run: python -m pytest -v diff --git a/.github/workflows/sync-settings-ui-tests.yml b/.github/workflows/sync-settings-ui-tests.yml index be44f65..1875216 100644 --- a/.github/workflows/sync-settings-ui-tests.yml +++ b/.github/workflows/sync-settings-ui-tests.yml @@ -26,11 +26,5 @@ jobs: - name: Install dependencies run: flutter pub get - - name: Analyze - run: flutter analyze - - - name: Run tests with coverage - run: flutter test --coverage - - - name: Enforce 100% line coverage - run: scripts/check_coverage.sh coverage/lcov.info 100 + - name: Run tests + run: flutter test diff --git a/.github/workflows/ts-config-tests.yml b/.github/workflows/ts-config-tests.yml index a55a059..a72995a 100644 --- a/.github/workflows/ts-config-tests.yml +++ b/.github/workflows/ts-config-tests.yml @@ -30,8 +30,5 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Lint (the preset lints itself) - run: pnpm lint - - - name: Fixture + factory tests with the 100% coverage gate - run: pnpm coverage + - name: Fixture + factory tests + run: pnpm test diff --git a/.github/workflows/ts-core-tests.yml b/.github/workflows/ts-core-tests.yml index bd00613..03542b2 100644 --- a/.github/workflows/ts-core-tests.yml +++ b/.github/workflows/ts-core-tests.yml @@ -27,22 +27,11 @@ jobs: with: node-version: "26.13.1" - # The preset is a `link:../ts_config` dependency. pnpm links the - # directory but installs nothing inside it, and a flat config imports - # its plugins from the preset's own node_modules -- so without this - # step the lint dies on "Cannot find package '@eslint/js'". - - name: Install the shared lint preset's dependencies - run: pnpm install --frozen-lockfile - working-directory: ts_config - - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Lint - run: pnpm lint - - - name: Run tests with the 100% coverage gate - run: pnpm coverage + - name: Run tests + run: pnpm test # The tag ships a prebuilt dist/ because Vite does not transpile # dependencies. A committed dist/ that does not match src/ would ship diff --git a/.github/workflows/web-ui-tests.yml b/.github/workflows/web-ui-tests.yml index 19f6d0d..0bd0331 100644 --- a/.github/workflows/web-ui-tests.yml +++ b/.github/workflows/web-ui-tests.yml @@ -27,22 +27,11 @@ jobs: with: node-version: "26.13.1" - # The preset is a `link:../ts_config` dependency. pnpm links the - # directory but installs nothing inside it, and a flat config imports - # its plugins from the preset's own node_modules -- so without this - # step the lint dies on "Cannot find package '@eslint/js'". - - name: Install the shared lint preset's dependencies - run: pnpm install --frozen-lockfile - working-directory: ts_config - - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Lint - run: pnpm lint - - - name: Run tests with the 100% coverage gate - run: pnpm coverage + - name: Run tests + run: pnpm test # The tag ships a prebuilt dist/ because Vite does not transpile # dependencies. A committed dist/ that does not match src/ would ship diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 138c65e..9edfea9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,19 +1,12 @@ -# Repo-wide gate for the shared 250-line file cap (refactor_claude_todo.md). -# -# A file that cannot be read in one piece forces re-reads and partial edits, -# which is the largest avoidable cost in an LLM-assisted workflow. A refactor -# without a gate silently regrows, so this is the part that makes it stick. -# -# Checks only the files in the commit, so an unrelated commit never breaks on -# a violation it did not introduce, and it FAILS (exit 1) rather than warning. -# No baseline and no allowlist -- those are suppressions. +# Repo-wide gates. Lint, type checks, coverage thresholds and the 250-line file +# cap are dropped (kuhy, 2026-11-27); formatters, the private/personal-data scan, +# no-binaries, dependency freshness, no-noqa, md-naming and repo-contract stay. # # The subprojects (gatelock/, crdt-sync/, web_ui/, design_system/, -# sync_settings_ui/) each keep their own .pre-commit-config.yaml for their own -# linters, and carry this same hook so committing with one of those configs is -# gated too. This root config is what `pre-commit install` wires up, and it is -# the only one that covers the subprojects without a config of their own -# (guard-lib/, crdt_sync_dart/, file_length/, ...). +# sync_settings_ui/, ...) each keep their own .pre-commit-config.yaml. This root +# config is what `pre-commit install` wires up, and it is the only one that +# covers the subprojects without a config of their own (guard-lib/, +# crdt_sync_dart/, file_length/, ...). # # The path is repo-relative on purpose. pre-commit always runs hooks from the # git root, so this resolves the same locally and on a CI runner -- an absolute @@ -21,12 +14,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - # Three markdown namespaces (README / CLAUDE* / DOCS*); TODO*.md is banned # (tasks live in the todo app). # Shared gate in ~/src/utils owns the namespaces and the exemption list, so diff --git a/CLAUDE.md b/CLAUDE.md index ef2c31d..a3530ea 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,9 +17,9 @@ overwrite it with `repo_contract/templates/check_repo_contract.shim.sh`. - run: n/a: collection of gates and libraries, no single entry point - test: `PYTHONPATH=. python -m pytest -q agent_ready/tests coverage_gaps/tests dep_freshness/tests devstats/tests file_length/tests flutter_web_drive/tests home_paths/tests md_naming/tests repo_contract/tests scripts/tests unified-design-system/tests` - test-changed: `scripts/test_changed.sh` -- lint: `ruff check agent_ready coverage_gaps devstats flutter_web_drive repo_contract` -- coverage: `PYTHONPATH=. python -m pytest -q agent_ready/tests devstats/tests flutter_web_drive/tests repo_contract/tests unified-design-system/tests --cov=agent_ready --cov=devstats --cov=flutter_web_drive --cov=repo_contract --cov=conformance --cov=conformance_diff --cov-branch --cov-report=xml --cov-fail-under=100` -- coverage-gaps: `coverage-gaps coverage.xml` +- lint: n/a: dropped (kuhy, 2026-11-27) +- coverage: n/a: dropped (kuhy, 2026-11-27) +- coverage-gaps: n/a: dropped (kuhy, 2026-11-27) - deploy: `git -C ~/src/utils pull --ff-only && ~/src/utils/scripts/deploy.sh` (installs the sickdays CLI + launcher from the live checkout, then exits 1 unless every released library's version tag is on origin and matches HEAD and the live `sickdays` runs the text-free checkout; `--verify-only` for the health check alone) ## Rules diff --git a/app_errors/pyproject.toml b/app_errors/pyproject.toml index 1c5b352..47c057b 100644 --- a/app_errors/pyproject.toml +++ b/app_errors/pyproject.toml @@ -5,7 +5,7 @@ description = "Shared app error and slow-wait ingest: RTDB and local spool repor requires-python = ">=3.14" dependencies = [ "crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.11.1#subdirectory=crdt-sync", - "kuhy-credit @ git+https://github.com/kuhyx/utils@kuhy-credit-v0.3.1#subdirectory=kuhy_credit", + "kuhy-credit @ git+https://github.com/kuhyx/utils@kuhy-credit-v0.3.2#subdirectory=kuhy_credit", ] [project.optional-dependencies] @@ -173,7 +173,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/app_errors/uv.lock b/app_errors/uv.lock index 878db19..5541db1 100644 --- a/app_errors/uv.lock +++ b/app_errors/uv.lock @@ -26,7 +26,7 @@ test = [ requires-dist = [ { name = "crdt-sync", git = "https://github.com/kuhyx/utils?subdirectory=crdt-sync&rev=crdt-sync-v0.11.1" }, { name = "jsonschema", marker = "extra == 'test'", specifier = "==4.26.0" }, - { name = "kuhy-credit", git = "https://github.com/kuhyx/utils?subdirectory=kuhy_credit&rev=kuhy-credit-v0.3.1" }, + { name = "kuhy-credit", git = "https://github.com/kuhyx/utils?subdirectory=kuhy_credit&rev=kuhy-credit-v0.3.2" }, { name = "pytest", marker = "extra == 'test'", specifier = "==9.2.0" }, { name = "pytest-cov", marker = "extra == 'test'", specifier = "==7.1.0" }, ] @@ -400,8 +400,8 @@ wheels = [ [[package]] name = "kuhy-credit" -version = "0.3.1" -source = { git = "https://github.com/kuhyx/utils?subdirectory=kuhy_credit&rev=kuhy-credit-v0.3.1#2352c177232a4b4594573a3b1126697ef32851f7" } +version = "0.3.2" +source = { git = "https://github.com/kuhyx/utils?subdirectory=kuhy_credit&rev=kuhy-credit-v0.3.2#adeb40f68e1d6c701da43e396fc46bffa3ef10c7" } [[package]] name = "packaging" diff --git a/crdt-sync/.pre-commit-config.yaml b/crdt-sync/.pre-commit-config.yaml index 79a5616..da93247 100644 --- a/crdt-sync/.pre-commit-config.yaml +++ b/crdt-sync/.pre-commit-config.yaml @@ -31,8 +31,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -40,11 +38,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh crdt-sync @@ -67,85 +60,16 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.4 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: v2.4.0 - hooks: - - id: mypy - additional_dependencies: - - types-requests - 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 - - - repo: https://github.com/pylint-dev/pylint - rev: v4.1.4 - hooks: - - id: pylint - args: - - --rcfile=crdt-sync/pyproject.toml - - --fail-under=10 - # One process: with --jobs>1 pylint pickles its AST via dill, which - # dies on Python 3.15 (code objects lost co_lnotab), 2026-11-16. - - --jobs=1 - additional_dependencies: - # Kept in step with pyproject.toml, so pylint resolves the e2e imports. - - argon2-cffi==25.1.0 - - pynacl==1.6.2 - - pytest - - requests - - - repo: https://github.com/PyCQA/bandit - rev: 1.9.4 - hooks: - - id: bandit - args: - - -c - - crdt-sync/pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(crdt-sync/crdt_sync/tests/|.*test.*\.py$) - - repo: local hooks: - - id: pytest-coverage - name: pytest with coverage enforcement + - id: pytest + name: pytest entry: scripts/run_subproject_tests.sh crdt-sync language: script types: [python] pass_filenames: false require_serial: true stages: [pre-push] - - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv diff --git a/crdt-sync/pyproject.toml b/crdt-sync/pyproject.toml index 58b4bc7..2e58e30 100644 --- a/crdt-sync/pyproject.toml +++ b/crdt-sync/pyproject.toml @@ -171,7 +171,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/data_transfer_flutter/.pre-commit-config.yaml b/data_transfer_flutter/.pre-commit-config.yaml index 5a8c74f..652f0c0 100644 --- a/data_transfer_flutter/.pre-commit-config.yaml +++ b/data_transfer_flutter/.pre-commit-config.yaml @@ -27,11 +27,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh data_transfer_flutter @@ -50,16 +45,9 @@ repos: entry: bash -c 'cd data_transfer_flutter && dart format --set-exit-if-changed lib test' language: system pass_filenames: false - - id: flutter-analyze - name: flutter analyze - entry: bash -c 'cd data_transfer_flutter && flutter analyze' - language: system - pass_filenames: false - - id: flutter-test-coverage - name: flutter test --coverage with 100% line-coverage gate - entry: >- - bash -c 'cd data_transfer_flutter && flutter test --coverage && - scripts/check_coverage.sh coverage/lcov.info 100' + - id: flutter-test + name: flutter test + entry: bash -c 'cd data_transfer_flutter && flutter test' language: system pass_filenames: false require_serial: true diff --git a/design_system/.pre-commit-config.yaml b/design_system/.pre-commit-config.yaml index 970bdeb..6eb3470 100644 --- a/design_system/.pre-commit-config.yaml +++ b/design_system/.pre-commit-config.yaml @@ -27,11 +27,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh design_system @@ -45,16 +40,9 @@ repos: entry: bash -c 'cd design_system && dart format --set-exit-if-changed lib test' language: system pass_filenames: false - - id: flutter-analyze - name: flutter analyze - entry: bash -c 'cd design_system && flutter analyze' - language: system - pass_filenames: false - - id: flutter-test-coverage - name: flutter test --coverage with 100% line-coverage gate - entry: >- - bash -c 'cd design_system && flutter test --coverage && - scripts/check_coverage.sh coverage/lcov.info 100' + - id: flutter-test + name: flutter test + entry: bash -c 'cd design_system && flutter test' language: system pass_filenames: false require_serial: true diff --git a/earned_time/.pre-commit-config.yaml b/earned_time/.pre-commit-config.yaml index 3644da8..9c0b7dd 100644 --- a/earned_time/.pre-commit-config.yaml +++ b/earned_time/.pre-commit-config.yaml @@ -31,10 +31,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - # Shared test helpers (rows, fixtures) are _private modules, not tests. - exclude: ^earned_time/earned_time/tests/_[a-z_]+\.py$ - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -42,11 +38,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh earned_time @@ -69,81 +60,16 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.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 - - - repo: https://github.com/pylint-dev/pylint - rev: v4.1.4 - hooks: - - id: pylint - args: - - --rcfile=earned_time/pyproject.toml - - --fail-under=10 - # One process: with --jobs>1 pylint pickles its AST via dill, which - # dies on Python 3.15 (code objects lost co_lnotab), 2026-11-16. - - --jobs=1 - additional_dependencies: - - pytest - - - repo: https://github.com/PyCQA/bandit - rev: 1.9.4 - hooks: - - id: bandit - args: - - -c - - earned_time/pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(earned_time/earned_time/tests/|.*test.*\.py$) - - repo: local hooks: - - id: pytest-coverage - name: pytest with coverage enforcement + - id: pytest + name: pytest entry: scripts/run_subproject_tests.sh earned_time language: script types: [python] pass_filenames: false require_serial: true stages: [pre-push] - - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv - # `checkin` is a timer event name on the wire, not a typo. - - --ignore-words-list=checkin diff --git a/earned_time/pyproject.toml b/earned_time/pyproject.toml index f0fd53a..0e9806c 100644 --- a/earned_time/pyproject.toml +++ b/earned_time/pyproject.toml @@ -162,7 +162,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/feedback_inbox/.pre-commit-config.yaml b/feedback_inbox/.pre-commit-config.yaml index 70a7718..378a2dd 100644 --- a/feedback_inbox/.pre-commit-config.yaml +++ b/feedback_inbox/.pre-commit-config.yaml @@ -31,8 +31,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -40,11 +38,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh feedback_inbox @@ -67,79 +60,16 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.4 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 - - - repo: https://github.com/pylint-dev/pylint - rev: v4.1.4 - hooks: - - id: pylint - args: - - --rcfile=feedback_inbox/pyproject.toml - - --fail-under=10 - # One process: with --jobs>1 pylint pickles its AST via dill, which - # dies on Python 3.15 (code objects lost co_lnotab), 2026-11-16. - - --jobs=1 - additional_dependencies: - - pytest - - - repo: https://github.com/PyCQA/bandit - rev: 1.9.4 - hooks: - - id: bandit - args: - - -c - - feedback_inbox/pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(feedback_inbox/feedback_inbox/tests/|.*test.*\.py$) - - repo: local hooks: - - id: pytest-coverage - name: pytest with coverage enforcement + - id: pytest + name: pytest entry: scripts/run_subproject_tests.sh feedback_inbox language: script types: [python] pass_filenames: false require_serial: true stages: [pre-push] - - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv diff --git a/feedback_inbox/pyproject.toml b/feedback_inbox/pyproject.toml index accf14d..4c78738 100644 --- a/feedback_inbox/pyproject.toml +++ b/feedback_inbox/pyproject.toml @@ -8,7 +8,7 @@ version = "0.1.0" description = "Turns every game dev-feedback bundle into one todo-app task" requires-python = ">=3.14" dependencies = [ - "kuhy-credit @ git+https://github.com/kuhyx/utils@kuhy-credit-v0.3.1#subdirectory=kuhy_credit", + "kuhy-credit @ git+https://github.com/kuhyx/utils@kuhy-credit-v0.3.2#subdirectory=kuhy_credit", ] [project.scripts] @@ -164,7 +164,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/focus_project/.pre-commit-config.yaml b/focus_project/.pre-commit-config.yaml index c1c0547..781c7b9 100644 --- a/focus_project/.pre-commit-config.yaml +++ b/focus_project/.pre-commit-config.yaml @@ -31,10 +31,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - # Shared test helpers (rows, fixtures) are _private modules, not tests. - exclude: ^focus_project/focus_project/tests/_[a-z_]+\.py$ - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -42,11 +38,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh focus_project @@ -69,85 +60,16 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.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 - - - repo: https://github.com/pylint-dev/pylint - rev: v4.1.4 - hooks: - - id: pylint - args: - - --rcfile=focus_project/pyproject.toml - - --fail-under=10 - # One process: with --jobs>1 pylint pickles its AST via dill, which - # dies on Python 3.15 (code objects lost co_lnotab), 2026-11-16. - - --jobs=1 - additional_dependencies: - - pytest - # Kept in step with pyproject.toml, so pylint resolves the crdt_sync - # imports instead of scoring every one of them as import-error. - - crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.11.1#subdirectory=crdt-sync - - earned-time @ git+https://github.com/kuhyx/utils@earned-time-v0.24.0#subdirectory=earned_time - - - repo: https://github.com/PyCQA/bandit - rev: 1.9.4 - hooks: - - id: bandit - args: - - -c - - focus_project/pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(focus_project/focus_project/tests/|.*test.*\.py$) - - repo: local hooks: - - id: pytest-coverage - name: pytest with coverage enforcement + - id: pytest + name: pytest entry: scripts/run_subproject_tests.sh focus_project language: script types: [python] pass_filenames: false require_serial: true stages: [pre-push] - - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv - # `checkin` is a timer event name on the wire, not a typo. - - --ignore-words-list=checkin diff --git a/focus_project/pyproject.toml b/focus_project/pyproject.toml index c3abe36..ffacff2 100644 --- a/focus_project/pyproject.toml +++ b/focus_project/pyproject.toml @@ -168,7 +168,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/freedays/.pre-commit-config.yaml b/freedays/.pre-commit-config.yaml index bcecbb4..41e5bff 100644 --- a/freedays/.pre-commit-config.yaml +++ b/freedays/.pre-commit-config.yaml @@ -31,8 +31,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -40,11 +38,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh freedays @@ -67,82 +60,16 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.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 - - - repo: https://github.com/pylint-dev/pylint - rev: v4.1.4 - hooks: - - id: pylint - args: - - --rcfile=freedays/pyproject.toml - - --fail-under=10 - # One process: with --jobs>1 pylint pickles its AST via dill, which - # dies on Python 3.15 (code objects lost co_lnotab), 2026-11-16. - - --jobs=1 - additional_dependencies: - - pytest - # Kept in step with pyproject.toml, so pylint resolves the crdt_sync - # imports instead of scoring every one of them as import-error. - - crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.11.1#subdirectory=crdt-sync - - - repo: https://github.com/PyCQA/bandit - rev: 1.9.4 - hooks: - - id: bandit - args: - - -c - - freedays/pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(freedays/freedays/tests/|.*test.*\.py$) - - repo: local hooks: - - id: pytest-coverage - name: pytest with coverage enforcement + - id: pytest + name: pytest entry: scripts/run_subproject_tests.sh freedays language: script types: [python] pass_filenames: false require_serial: true stages: [pre-push] - - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv diff --git a/freedays/pyproject.toml b/freedays/pyproject.toml index 2f51fd3..1781430 100644 --- a/freedays/pyproject.toml +++ b/freedays/pyproject.toml @@ -164,7 +164,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/game_recording/.pre-commit-config.yaml b/game_recording/.pre-commit-config.yaml index de260cb..b9b9830 100644 --- a/game_recording/.pre-commit-config.yaml +++ b/game_recording/.pre-commit-config.yaml @@ -31,8 +31,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -40,11 +38,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh game_recording @@ -67,65 +60,16 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.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 - # Strict mode from the package's own pyproject, which pre-commit would - # not find from the git root. - args: - - --config-file=game_recording/pyproject.toml - - --no-error-summary - # The tests import pytest: without it every fixture type is Any. - additional_dependencies: - - pytest==9.2.0 - - - repo: https://github.com/pylint-dev/pylint - rev: v4.1.4 - hooks: - - id: pylint - args: - - --rcfile=game_recording/pyproject.toml - - --fail-under=10 - # One process: with --jobs>1 pylint pickles its AST via dill, which - # dies on Python 3.15 (code objects lost co_lnotab), 2026-11-16. - - --jobs=1 - additional_dependencies: - - pytest - - - repo: https://github.com/PyCQA/bandit - rev: 1.9.4 - hooks: - - id: bandit - args: - - -c - - game_recording/pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(game_recording/game_recording/tests/|.*test.*\.py$) - - repo: local hooks: - - id: pytest-coverage - name: pytest with coverage enforcement - entry: scripts/run_subproject_tests.sh game_recording --cov=game_recording + - id: pytest + name: pytest + entry: scripts/run_subproject_tests.sh game_recording language: script types: [python] pass_filenames: false require_serial: true stages: [pre-push] - - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv diff --git a/game_recording/pyproject.toml b/game_recording/pyproject.toml index d27e391..c734e3e 100644 --- a/game_recording/pyproject.toml +++ b/game_recording/pyproject.toml @@ -148,7 +148,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/gatelock/.pre-commit-config.yaml b/gatelock/.pre-commit-config.yaml index 28378e6..9212edd 100644 --- a/gatelock/.pre-commit-config.yaml +++ b/gatelock/.pre-commit-config.yaml @@ -31,8 +31,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -40,11 +38,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh gatelock @@ -67,79 +60,16 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.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 - - - repo: https://github.com/pylint-dev/pylint - rev: v4.1.4 - hooks: - - id: pylint - args: - - --rcfile=gatelock/pyproject.toml - - --fail-under=10 - # One process: with --jobs>1 pylint pickles its AST via dill, which - # dies on Python 3.15 (code objects lost co_lnotab), 2026-11-16. - - --jobs=1 - additional_dependencies: - - pytest - - - repo: https://github.com/PyCQA/bandit - rev: 1.9.4 - hooks: - - id: bandit - args: - - -c - - gatelock/pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(gatelock/gatelock/tests/|.*test.*\.py$) - - repo: local hooks: - - id: pytest-coverage - name: pytest with coverage enforcement + - id: pytest + name: pytest entry: scripts/run_subproject_tests.sh gatelock language: script types: [python] pass_filenames: false require_serial: true stages: [pre-push] - - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv diff --git a/gatelock/pyproject.toml b/gatelock/pyproject.toml index 2d286e6..ded45c6 100644 --- a/gatelock/pyproject.toml +++ b/gatelock/pyproject.toml @@ -192,7 +192,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/google_account_token/.pre-commit-config.yaml b/google_account_token/.pre-commit-config.yaml index 0c5d19b..a2e5331 100644 --- a/google_account_token/.pre-commit-config.yaml +++ b/google_account_token/.pre-commit-config.yaml @@ -27,11 +27,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh google_account_token @@ -45,16 +40,9 @@ repos: entry: bash -c 'cd google_account_token && dart format --set-exit-if-changed lib test' language: system pass_filenames: false - - id: flutter-analyze - name: flutter analyze - entry: bash -c 'cd google_account_token && flutter analyze' - language: system - pass_filenames: false - - id: flutter-test-coverage - name: flutter test --coverage with 100% line-coverage gate - entry: >- - bash -c 'cd google_account_token && flutter test --coverage && - scripts/check_coverage.sh coverage/lcov.info 100' + - id: flutter-test + name: flutter test + entry: bash -c 'cd google_account_token && flutter test' language: system pass_filenames: false require_serial: true diff --git a/holds/.pre-commit-config.yaml b/holds/.pre-commit-config.yaml index 74b7a31..f55b8e0 100644 --- a/holds/.pre-commit-config.yaml +++ b/holds/.pre-commit-config.yaml @@ -31,8 +31,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -40,11 +38,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh holds @@ -67,82 +60,16 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.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 - - - repo: https://github.com/pylint-dev/pylint - rev: v4.1.4 - hooks: - - id: pylint - args: - - --rcfile=holds/pyproject.toml - - --fail-under=10 - # One process: with --jobs>1 pylint pickles its AST via dill, which - # dies on Python 3.15 (code objects lost co_lnotab), 2026-11-16. - - --jobs=1 - additional_dependencies: - - pytest - # Kept in step with pyproject.toml, so pylint resolves the crdt_sync - # imports instead of scoring every one of them as import-error. - - crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.11.1#subdirectory=crdt-sync - - - repo: https://github.com/PyCQA/bandit - rev: 1.9.4 - hooks: - - id: bandit - args: - - -c - - holds/pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(holds/holds/tests/|.*test.*\.py$) - - repo: local hooks: - - id: pytest-coverage - name: pytest with coverage enforcement + - id: pytest + name: pytest entry: scripts/run_subproject_tests.sh holds language: script types: [python] pass_filenames: false require_serial: true stages: [pre-push] - - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv diff --git a/holds/pyproject.toml b/holds/pyproject.toml index 415ff3d..94180d2 100644 --- a/holds/pyproject.toml +++ b/holds/pyproject.toml @@ -160,7 +160,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/kuhy_credit/pyproject.toml b/kuhy_credit/pyproject.toml index ef2aa48..4b1404a 100644 --- a/kuhy_credit/pyproject.toml +++ b/kuhy_credit/pyproject.toml @@ -60,6 +60,5 @@ branch = true omit = ["*/tests/*"] [tool.coverage.report] -fail_under = 100 show_missing = true exclude_lines = ["pragma: no cover", 'if __name__ == "__main__":', "if TYPE_CHECKING:"] diff --git a/kuhy_credit/web/vitest.config.js b/kuhy_credit/web/vitest.config.js index 0ead6f1..121b598 100644 --- a/kuhy_credit/web/vitest.config.js +++ b/kuhy_credit/web/vitest.config.js @@ -5,7 +5,6 @@ export default defineConfig({ coverage: { include: ["src/kuhy-credit.js"], provider: "v8", - thresholds: { branches: 100, functions: 100, lines: 100, statements: 100 }, }, environment: "jsdom", include: ["src/**/*.test.js"], diff --git a/leetcode_coach/.pre-commit-config.yaml b/leetcode_coach/.pre-commit-config.yaml index 8f0d072..1f8f356 100644 --- a/leetcode_coach/.pre-commit-config.yaml +++ b/leetcode_coach/.pre-commit-config.yaml @@ -31,11 +31,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - # Shared, non-test helpers (fixtures, fakes) imported by the real test - # modules: deliberately not collected, hence the leading underscore. - exclude: ^leetcode_coach/leetcode_coach/tests/_[a-z][a-z_]*\.py$ - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -43,11 +38,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh leetcode_coach @@ -70,90 +60,16 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.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 - # Isolated env: the requests stubs must be declared here too. - additional_dependencies: - - types-requests - 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 - - - repo: https://github.com/pylint-dev/pylint - rev: v4.1.4 - hooks: - - id: pylint - args: - - --rcfile=leetcode_coach/pyproject.toml - - --fail-under=10 - # --jobs=1: pylint's parallel mode pickles its state with dill, - # which crashes on Python 3.15 (no code.co_lnotab). - - --jobs=1 - - leetcode_coach/leetcode_coach - # Whole package, never the staged subset: a score over an arbitrary - # handful of files is an arbitrary number. Kept in step with - # requirements.txt. - pass_filenames: false - additional_dependencies: - - pytest - - requests - - genanki - - crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.11.0#subdirectory=crdt-sync - - - repo: https://github.com/PyCQA/bandit - rev: 1.9.4 - hooks: - - id: bandit - args: - - -c - - leetcode_coach/pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(leetcode_coach/leetcode_coach/tests/|.*test.*\.py$) - - repo: local hooks: - - id: pytest-coverage - name: pytest with coverage enforcement + - id: pytest + name: pytest entry: scripts/run_subproject_tests.sh leetcode_coach language: script types: [python] pass_filenames: false require_serial: true stages: [pre-push] - - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv diff --git a/leetcode_coach/pyproject.toml b/leetcode_coach/pyproject.toml index c04bd9a..4756e33 100644 --- a/leetcode_coach/pyproject.toml +++ b/leetcode_coach/pyproject.toml @@ -238,7 +238,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/md_naming/.coveragerc b/md_naming/.coveragerc index ef1ded1..f0e5341 100644 --- a/md_naming/.coveragerc +++ b/md_naming/.coveragerc @@ -1,9 +1,8 @@ # Coverage settings for the markdown-naming gate. # -# fail_under = 100 matches the standard for shared code in this repo. The two -# exclusions are unreachable under pytest by construction, not test gaps: the -# `__main__` block never runs on import, and the plain-script sys.path shim -# only fires when check.py is executed directly rather than imported. +# The two exclusions are unreachable under pytest by construction, not test +# gaps: the `__main__` block never runs on import, and the plain-script sys.path +# shim only fires when check.py is executed directly rather than imported. # # md_naming/migrate/ is omitted: it is a one-shot script that ran on # 2026-08-24 and is kept as the record of how 203 files were classified, not @@ -17,7 +16,6 @@ omit = md_naming/migrate/* [report] -fail_under = 100 show_missing = true exclude_lines = pragma: no cover diff --git a/music_theory/.pre-commit-config.yaml b/music_theory/.pre-commit-config.yaml index 0821c0a..301df91 100644 --- a/music_theory/.pre-commit-config.yaml +++ b/music_theory/.pre-commit-config.yaml @@ -31,8 +31,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -40,11 +38,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh music_theory @@ -67,86 +60,16 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.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 - additional_dependencies: - # Without numpy the NDArray alias is an unresolved variable and - # every signature using it fails valid-type. - - numpy==2.5.4 - 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 - - - repo: https://github.com/pylint-dev/pylint - rev: v4.1.4 - hooks: - - id: pylint - args: - - --rcfile=music_theory/pyproject.toml - - --fail-under=10 - # One process: with --jobs>1 pylint pickles its AST via dill, which - # dies on Python 3.15 (code objects lost co_lnotab), 2026-11-16. - - --jobs=1 - additional_dependencies: - - pytest - # numpy is a real runtime dependency; without it every module is an - # import-error and the score collapses below the gate. - - numpy==2.5.4 - - - repo: https://github.com/PyCQA/bandit - rev: 1.9.4 - hooks: - - id: bandit - args: - - -c - - music_theory/pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(music_theory/music_theory/tests/|.*test.*\.py$) - - repo: local hooks: - - id: pytest-coverage - name: pytest with coverage enforcement - entry: scripts/run_subproject_tests.sh music_theory --cov=music_theory + - id: pytest + name: pytest + entry: scripts/run_subproject_tests.sh music_theory language: script types: [python] pass_filenames: false require_serial: true stages: [pre-push] - - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv diff --git a/music_theory/pyproject.toml b/music_theory/pyproject.toml index 312dfb0..8304f2b 100644 --- a/music_theory/pyproject.toml +++ b/music_theory/pyproject.toml @@ -144,7 +144,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/omniroute_offload/.pre-commit-config.yaml b/omniroute_offload/.pre-commit-config.yaml index af38a9e..aefcb1a 100644 --- a/omniroute_offload/.pre-commit-config.yaml +++ b/omniroute_offload/.pre-commit-config.yaml @@ -31,8 +31,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -40,11 +38,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh omniroute_offload @@ -67,79 +60,16 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.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 - - - repo: https://github.com/pylint-dev/pylint - rev: v4.1.4 - hooks: - - id: pylint - args: - - --rcfile=omniroute_offload/pyproject.toml - - --fail-under=10 - # One process: with --jobs>1 pylint pickles its AST via dill, which - # dies on Python 3.15 (code objects lost co_lnotab), 2026-11-16. - - --jobs=1 - additional_dependencies: - - pytest - - - repo: https://github.com/PyCQA/bandit - rev: 1.9.4 - hooks: - - id: bandit - args: - - -c - - omniroute_offload/pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(omniroute_offload/omniroute_offload/tests/|.*test.*\.py$) - - repo: local hooks: - - id: pytest-coverage - name: pytest with coverage enforcement + - id: pytest + name: pytest entry: scripts/run_subproject_tests.sh omniroute_offload language: script types: [python] pass_filenames: false require_serial: true stages: [pre-push] - - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv diff --git a/omniroute_offload/pyproject.toml b/omniroute_offload/pyproject.toml index b254a8d..94ed4eb 100644 --- a/omniroute_offload/pyproject.toml +++ b/omniroute_offload/pyproject.toml @@ -8,7 +8,7 @@ version = "0.1.0" description = "Offload easy LLM work to free models behind the local OmniRoute gateway" requires-python = ">=3.14" dependencies = [ - "kuhy-credit @ git+https://github.com/kuhyx/utils@kuhy-credit-v0.3.1#subdirectory=kuhy_credit", + "kuhy-credit @ git+https://github.com/kuhyx/utils@kuhy-credit-v0.3.2#subdirectory=kuhy_credit", ] [project.scripts] @@ -63,7 +63,6 @@ branch = true omit = ["*/__pycache__/*", "*/tests/*"] [tool.coverage.report] -fail_under = 100 show_missing = true exclude_lines = ["pragma: no cover", 'if __name__ == "__main__":', "if TYPE_CHECKING:"] diff --git a/platform_location/.pre-commit-config.yaml b/platform_location/.pre-commit-config.yaml index 15a3f2c..e2e8b3c 100644 --- a/platform_location/.pre-commit-config.yaml +++ b/platform_location/.pre-commit-config.yaml @@ -27,11 +27,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh platform_location @@ -45,16 +40,9 @@ repos: entry: bash -c 'cd platform_location && dart format --set-exit-if-changed lib test' language: system pass_filenames: false - - id: flutter-analyze - name: flutter analyze - entry: bash -c 'cd platform_location && flutter analyze' - language: system - pass_filenames: false - - id: flutter-test-coverage - name: flutter test --coverage with 100% line-coverage gate - entry: >- - bash -c 'cd platform_location && flutter test --coverage && - scripts/check_coverage.sh coverage/lcov.info 100' + - id: flutter-test + name: flutter test + entry: bash -c 'cd platform_location && flutter test' language: system pass_filenames: false require_serial: true diff --git a/repo_contract/infer.py b/repo_contract/infer.py index cccbec9..4353287 100644 --- a/repo_contract/infer.py +++ b/repo_contract/infer.py @@ -6,7 +6,7 @@ import re from dataclasses import dataclass, field from pathlib import Path -from repo_contract.contract import KEYS, LISTER, is_verbose +from repo_contract.contract import KEYS, is_verbose from repo_contract.sources import ( MAKE_TARGETS, NPM_SCRIPTS, @@ -21,15 +21,7 @@ from repo_contract.stacks import has_tests TEST_CHANGED = "scripts/test_changed.sh" NO_TESTS = "n/a: no automated tests yet" -NO_COVERAGE = "n/a: no coverage tooling for this stack" -REPORTS = { - "python": "coverage.xml", - "flutter": "coverage/lcov.info", - "node": "coverage/lcov.info", - "go": "coverage.out", - "rust": "lcov.info", - "gradle": "build/reports/jacoco/test/jacocoTestReport.xml", -} +DROPPED = "n/a: dropped (kuhy, 2026-11-27)" _VERBOSE_TOKEN = re.compile(r"\s(-v+|--verbose)(?=\s|$)") @@ -80,53 +72,23 @@ def _pm(repo: Path) -> str: def stack_defaults(repo: Path, stack: str) -> dict[str, str]: """Conventional commands for the stack (lowest-priority source).""" - cfg = read_text(repo / "pyproject.toml") + read_text( - repo / ".pre-commit-config.yaml" - ) py = _prefix(repo) pm = _pm(repo) - ruff = "ruff check ." if py == "python3 -m" else f"{py} ruff check ." table: dict[str, dict[str, str]] = { - "python": { - "test": f"{py} pytest -q", - "lint": ruff if "ruff" in cfg else "pre-commit run --all-files", - "coverage": f"{py} pytest -q --cov --cov-branch --cov-report=xml", - }, - "flutter": { - "run": "flutter run", - "test": "flutter test --reporter=compact", - "lint": "flutter analyze", - "coverage": "flutter test --reporter=compact --coverage", - }, - "node": { - "test": f"{pm} test --silent", - "lint": f"{pm} run lint", - "coverage": f"{pm} test --silent --coverage", - }, - "go": { - "test": "go test ./...", - "lint": "go vet ./...", - "coverage": "go test -coverprofile=coverage.out ./...", - }, - "rust": { - "test": "cargo test --quiet", - "lint": "cargo clippy --quiet", - "coverage": "cargo llvm-cov --lcov --output-path lcov.info", - }, - "gradle": { - "test": "./gradlew test --quiet", - "lint": "./gradlew lint --quiet", - "coverage": "./gradlew jacocoTestReport --quiet", - }, + "python": {"test": f"{py} pytest -q"}, + "flutter": {"run": "flutter run", "test": "flutter test --reporter=compact"}, + "node": {"test": f"{pm} test --silent"}, + "go": {"test": "go test ./..."}, + "rust": {"test": "cargo test --quiet"}, + "gradle": {"test": "./gradlew test --quiet"}, "godot": _godot_defaults(repo), - "shell": {"lint": "shellcheck scripts/*.sh", "coverage": NO_COVERAGE}, } return table.get(stack, {}) def _godot_defaults(repo: Path) -> dict[str, str]: """Godot commands; the test runner comes from addons/ (GUT or gdUnit4).""" - out = {"run": "godot --path .", "coverage": NO_COVERAGE} + out = {"run": "godot --path ."} if (repo / "addons/gut/gut_cmdln.gd").is_file(): out["test"] = "godot --headless -s addons/gut/gut_cmdln.gd -gexit -glog=0" elif (repo / "addons/gdUnit4").is_dir(): @@ -195,29 +157,18 @@ def propose(repo: Path, stacks: list[str]) -> Proposal: doc = doc_commands(read_text(repo / "CLAUDE.md")) ci = ci_commands(repo) tested = has_tests(repo, stacks) - for key in ("run", "lint"): - cmd, src = _pick(repo, key, stack, doc, ci) - prop.values[key] = _fmt( - cmd or (_run_default(repo, stack) if key == "run" else None), prop, key, src - ) + cmd, src = _pick(repo, "run", stack, doc, ci) + prop.values["run"] = _fmt(cmd or _run_default(repo, stack), prop, "run", src) + for key in ("lint", "coverage", "coverage-gaps"): + prop.values[key] = DROPPED if not tested and stack in {"godot", "shell", "unknown"}: - for key in ("test", "test-changed", "coverage", "coverage-gaps"): + for key in ("test", "test-changed"): prop.values[key] = NO_TESTS prop.notes.append("no tests detected: test chain proposed as n/a") return _order(prop) test, src = _pick(repo, "test", stack, doc, ci) prop.values["test"] = _fmt(test, prop, "test", src) prop.values["test-changed"] = f"`{TEST_CHANGED}`" - cov, src = _pick(repo, "coverage", stack, doc, ci) - prop.values["coverage"] = _fmt(cov, prop, "coverage", src) - report = REPORTS.get(stack) - if prop.values["coverage"].startswith("n/a"): - prop.values["coverage-gaps"] = NO_COVERAGE - elif report: - prop.values["coverage-gaps"] = f"`{LISTER} {report}`" - else: - prop.values["coverage-gaps"] = "``" - prop.notes.append("coverage-gaps: unknown report path, fill in") if not tested: prop.notes.append("no tests detected, but the stack normally has them") return _order(prop) diff --git a/repo_contract/tests/test_bootstrap.py b/repo_contract/tests/test_bootstrap.py index d9f1fa0..74766d5 100644 --- a/repo_contract/tests/test_bootstrap.py +++ b/repo_contract/tests/test_bootstrap.py @@ -105,4 +105,4 @@ def test_write_new_claude_md(repo: Path) -> None: write(repo, "project.godot") assert main(["--repo", str(repo), "--write"]) == 0 assert (repo / "CLAUDE.md").is_file() - assert violations(repo)[0] == ["'- lint:' still holds a placeholder: "] + assert violations(repo)[0] == [] diff --git a/repo_contract/tests/test_infer.py b/repo_contract/tests/test_infer.py index d391e2d..b3fb8b2 100644 --- a/repo_contract/tests/test_infer.py +++ b/repo_contract/tests/test_infer.py @@ -4,7 +4,7 @@ from __future__ import annotations from pathlib import Path -from repo_contract.infer import propose, quiet, stack_defaults +from repo_contract.infer import DROPPED, propose, quiet, stack_defaults from .conftest import write @@ -20,10 +20,10 @@ def test_quiet() -> None: def test_python_defaults_and_launchers(tmp_path: Path) -> None: write(tmp_path, "pyproject.toml", "[tool.ruff]\n") - assert stack_defaults(tmp_path, "python")["lint"] == "ruff check ." + assert stack_defaults(tmp_path, "python")["test"] == "python3 -m pytest -q" + assert "lint" not in stack_defaults(tmp_path, "python") write(tmp_path, "uv.lock") assert stack_defaults(tmp_path, "python")["test"] == "uv run pytest -q" - assert stack_defaults(tmp_path, "python")["lint"] == "uv run ruff check ." (tmp_path / "uv.lock").unlink() write(tmp_path, "poetry.lock") assert stack_defaults(tmp_path, "python")["test"].startswith("poetry run") @@ -34,9 +34,10 @@ def test_python_no_ruff_and_run_default(tmp_path: Path) -> None: write(tmp_path, "tests/test_a.py") write(tmp_path, "main.py") prop = propose(tmp_path, ["python"]) - assert prop.values["lint"] == "`pre-commit run --all-files`" + assert prop.values["lint"] == DROPPED assert prop.values["run"] == "`python3 main.py`" - assert prop.values["coverage-gaps"] == "`coverage-gaps coverage.xml`" + assert prop.values["coverage"] == DROPPED + assert prop.values["coverage-gaps"] == DROPPED assert prop.values["test-changed"] == "`scripts/test_changed.sh`" assert prop.lines()[0].startswith("- run:") @@ -65,7 +66,7 @@ def test_stack_defaults_each(tmp_path: Path) -> None: for stack in ("flutter", "node", "go", "rust", "gradle"): prop = propose(tmp_path, [stack]) assert prop.values["test"].startswith("`") - assert "coverage-gaps " in prop.values["coverage-gaps"] + assert prop.values["coverage-gaps"] == DROPPED write(tmp_path, "yarn.lock") (tmp_path / "pnpm-lock.yaml").unlink() assert propose(tmp_path, ["node"]).values["test"].startswith("`yarn") @@ -76,13 +77,17 @@ def test_stack_defaults_each(tmp_path: Path) -> None: def test_priority_doc_make_helper_npm_ci(tmp_path: Path) -> None: write(tmp_path, "tests/a.txt") write(tmp_path, "package.json", '{"scripts": {"test": "x", "lint": "y"}}') - assert propose(tmp_path, ["node"]).values["lint"] == "`npm run lint`" - write(tmp_path, "scripts/lint.sh") - assert propose(tmp_path, ["node"]).values["lint"] == "`scripts/lint.sh`" - write(tmp_path, "Makefile", "lint:\n\tx\n") - assert propose(tmp_path, ["node"]).values["lint"] == "`make lint`" - write(tmp_path, "CLAUDE.md", "Lint with `eslint . -v`.\n") - assert propose(tmp_path, ["node"]).values["lint"] == "`eslint .`" + assert propose(tmp_path, ["node"]).values["lint"] == DROPPED + assert propose(tmp_path, ["node"]).values["test"] == "`npm run test`" + write(tmp_path, "scripts/test.sh") + assert propose(tmp_path, ["node"]).values["test"] == "`scripts/test.sh`" + write(tmp_path, "Makefile", "test:\n\tx\n") + assert propose(tmp_path, ["node"]).values["test"] == "`make test`" + write(tmp_path, "CLAUDE.md", "Test with `vitest run -v`.\n") + assert propose(tmp_path, ["node"]).values["test"] == "`vitest run`" + (tmp_path / "CLAUDE.md").unlink() + (tmp_path / "Makefile").unlink() + (tmp_path / "scripts/test.sh").unlink() write(tmp_path, ".github/workflows/a.yml", "- run: go test -v ./...\n") assert propose(tmp_path, ["go"]).values["test"] == "`go test ./...`" @@ -101,7 +106,7 @@ def test_godot_with_runner(tmp_path: Path) -> None: write(tmp_path, "addons/gut/gut_cmdln.gd") prop = propose(tmp_path, ["godot"]) assert "gut_cmdln" in prop.values["test"] - assert prop.values["coverage-gaps"].startswith("n/a") + assert prop.values["coverage-gaps"] == DROPPED (tmp_path / "addons/gut/gut_cmdln.gd").unlink() (tmp_path / "addons/gdUnit4").mkdir() assert "GdUnitCmdTool" in propose(tmp_path, ["godot"]).values["test"] @@ -109,13 +114,12 @@ def test_godot_with_runner(tmp_path: Path) -> None: assert propose(tmp_path, ["godot"]).values["test"] == "``" -def test_unknown_report_and_untested_note(tmp_path: Path) -> None: +def test_untested_note_and_dropped_coverage(tmp_path: Path) -> None: write(tmp_path, "scripts/a.sh") prop = propose(tmp_path, ["python"]) assert any("no tests detected, but" in n for n in prop.notes) write(tmp_path, "tests/a.txt") write(tmp_path, "Makefile", "coverage:\n\tx\n") shell = propose(tmp_path, ["shell"]) - assert shell.values["coverage"].startswith("`make coverage") - assert shell.values["coverage-gaps"] == "``" - assert any("fill in" in n for n in shell.notes) + assert shell.values["coverage"] == DROPPED + assert shell.values["coverage-gaps"] == DROPPED diff --git a/rtdb_relay/pyproject.toml b/rtdb_relay/pyproject.toml index 59ddf38..49bb2dd 100644 --- a/rtdb_relay/pyproject.toml +++ b/rtdb_relay/pyproject.toml @@ -168,7 +168,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/scripts/check_coverage.sh b/scripts/check_coverage.sh index 7555b42..a37f00b 100755 --- a/scripts/check_coverage.sh +++ b/scripts/check_coverage.sh @@ -1,70 +1,5 @@ #!/bin/bash - -# ============================================================================ -# Fail if lcov line coverage drops below a threshold. -# -# THE shared coverage gate for every package in this repo. Three byte-identical -# copies of this file used to live under design_system/, github_device_auth/ -# and sync_settings_ui/scripts/ -- each claiming in its own header to exist for -# one particular package. Those are now thin delegates to this file, for the -# same reason check_file_length.sh is shared: a per-package copy is how one -# package's idea of "covered" drifts from every other package's. -# -# Note for pure-Dart packages: `dart test --coverage` writes raw VM JSON, NOT -# lcov. Run coverage:format_coverage before this gate, or it will happily pass -# against a stale lcov.info from a previous run. crdt_sync_dart really did sit -# at 96% for three weeks that way while believing it was at 100%. -# -# Usage: check_coverage.sh -# ============================================================================ - -set -euo pipefail - -SCRIPT_NAME="$(basename "$0")" -readonly SCRIPT_NAME - -usage() { - echo "Usage: $SCRIPT_NAME " - echo " Fails when line coverage in lcov.info is below min_percent." - exit 0 -} - -if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then - usage -fi - -if [[ $# -ne 2 ]]; then - usage -fi - -lcov_file="$1" -min_percent="$2" - -if [[ ! -f "$lcov_file" ]]; then - echo "Error: $lcov_file not found. Run 'flutter test --coverage' first." >&2 - exit 1 -fi - -# Sum LH (lines hit) and LF (lines found) across every SF (source file) -# block rather than trusting a single top-level total -- lcov.info has no -# such total line, only per-file LH/LF pairs. -read -r hit found <<< "$(awk ' - /^LH:/ { hit += substr($0, 4) } - /^LF:/ { found += substr($0, 4) } - END { print hit, found } -' "$lcov_file")" - -if [[ "$found" -eq 0 ]]; then - echo "Error: $lcov_file reports zero coverable lines." >&2 - exit 1 -fi - -percent=$(awk -v h="$hit" -v f="$found" 'BEGIN { printf "%.2f", (h / f) * 100 }') -meets_threshold=$(awk -v p="$percent" -v m="$min_percent" 'BEGIN { print (p + 0 >= m + 0) ? 1 : 0 }') - -echo "Line coverage: $hit/$found ($percent%), threshold: $min_percent%" - -if [[ "$meets_threshold" -ne 1 ]]; then - echo "Error: coverage $percent% is below the required $min_percent%." >&2 - exit 1 -fi +# Coverage thresholds are dropped (kuhy, 2026-11-27). This file stays so the +# thin delegates under design_system/ and friends keep working; it accepts any +# arguments, prints nothing and exits 0. +exit 0 diff --git a/scripts/check_file_length.sh b/scripts/check_file_length.sh index d678687..58ff5ad 100755 --- a/scripts/check_file_length.sh +++ b/scripts/check_file_length.sh @@ -1,38 +1,5 @@ #!/bin/bash - -# ============================================================================ -# Fail if any file exceeds the shared 250-line cap. -# -# A file that cannot be read in one piece forces re-reads and partial edits, -# which is the largest avoidable cost in an LLM-assisted workflow. The cap -# applies to code AND prose; generated files, markup and data are exempt. -# -# The real check lives in Python (file_length/check.py) so that the gate and -# the survey share one exemption list -- see rules/shell.instructions.md on -# never embedding another language's logic inline. -# -# Usage: -# scripts/check_file_length.sh [ ...] # pre-commit passes these -# scripts/check_file_length.sh --all # whole tree, from cwd -# ============================================================================ - -set -euo pipefail - -readonly UTILS_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -readonly CHECKER="$UTILS_ROOT/file_length/check.py" - -main() { - if [[ $# -eq 0 ]]; then - echo "Usage: $(basename "$0") ... | --all" >&2 - exit 1 - fi - if [[ ! -f "$CHECKER" ]]; then - echo "Error: checker not found at $CHECKER" >&2 - exit 1 - fi - - PYTHONPATH="$UTILS_ROOT${PYTHONPATH:+:$PYTHONPATH}" \ - python3 "$CHECKER" "$@" -} - -main "$@" +# The 250-line file cap is dropped (kuhy, 2026-11-27). This file stays so the +# shims in ~40 repos that exec it keep working; it accepts any arguments, prints +# nothing and exits 0. The checker library (file_length/) is kept, unused. +exit 0 diff --git a/sickdays/.pre-commit-config.yaml b/sickdays/.pre-commit-config.yaml index f276bb3..5a8f927 100644 --- a/sickdays/.pre-commit-config.yaml +++ b/sickdays/.pre-commit-config.yaml @@ -31,9 +31,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - exclude: ^sickdays/sickdays/tests/_[a-z_]+\.py$ - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -41,11 +38,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh sickdays @@ -68,82 +60,16 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.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 - - - repo: https://github.com/pylint-dev/pylint - rev: v4.1.4 - hooks: - - id: pylint - args: - - --rcfile=sickdays/pyproject.toml - - --fail-under=10 - # One process: with --jobs>1 pylint pickles its AST via dill, which - # dies on Python 3.15 (code objects lost co_lnotab), 2026-11-16. - - --jobs=1 - additional_dependencies: - - pytest - # Kept in step with pyproject.toml, so pylint resolves the crdt_sync - # imports instead of scoring every one of them as import-error. - - crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.11.1#subdirectory=crdt-sync - - - repo: https://github.com/PyCQA/bandit - rev: 1.9.4 - hooks: - - id: bandit - args: - - -c - - sickdays/pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(sickdays/sickdays/tests/|.*test.*\.py$) - - repo: local hooks: - - id: pytest-coverage - name: pytest with coverage enforcement + - id: pytest + name: pytest entry: scripts/run_subproject_tests.sh sickdays language: script types: [python] pass_filenames: false require_serial: true stages: [pre-push] - - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv diff --git a/sickdays/pyproject.toml b/sickdays/pyproject.toml index 72d2dee..b126084 100644 --- a/sickdays/pyproject.toml +++ b/sickdays/pyproject.toml @@ -171,7 +171,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/sql_drills/.pre-commit-config.yaml b/sql_drills/.pre-commit-config.yaml index 3b35595..2830e09 100644 --- a/sql_drills/.pre-commit-config.yaml +++ b/sql_drills/.pre-commit-config.yaml @@ -31,9 +31,6 @@ repos: - id: check-merge-conflict - id: detect-private-key - id: debug-statements - - id: name-tests-test - args: [--pytest-test-first] - exclude: ^sql_drills/sql_drills/tests/_[a-z_]+\.py$ - id: check-ast - id: mixed-line-ending args: [--fix=lf] @@ -41,11 +38,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh sql_drills @@ -68,79 +60,16 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.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 - - - repo: https://github.com/pylint-dev/pylint - rev: v4.1.4 - hooks: - - id: pylint - args: - - --rcfile=sql_drills/pyproject.toml - - --fail-under=10 - # One process: with --jobs>1 pylint pickles its AST via dill, which - # dies on Python 3.15 (code objects lost co_lnotab), 2026-11-16. - - --jobs=1 - additional_dependencies: - - pytest - - - repo: https://github.com/PyCQA/bandit - rev: 1.9.4 - hooks: - - id: bandit - args: - - -c - - sql_drills/pyproject.toml - - --severity-level=high - - --confidence-level=medium - - --skip=B113 - additional_dependencies: ["bandit[toml]"] - exclude: ^(sql_drills/sql_drills/tests/|.*test.*\.py$) - - repo: local hooks: - - id: pytest-coverage - name: pytest with coverage enforcement + - id: pytest + name: pytest entry: scripts/run_subproject_tests.sh sql_drills language: script types: [python] pass_filenames: false require_serial: true stages: [pre-push] - - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - args: - - --skip=*.json,*.lock,.git,__pycache__,.venv diff --git a/sql_drills/pyproject.toml b/sql_drills/pyproject.toml index a195f64..9e94cdc 100644 --- a/sql_drills/pyproject.toml +++ b/sql_drills/pyproject.toml @@ -178,7 +178,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/sync_settings_ui/.pre-commit-config.yaml b/sync_settings_ui/.pre-commit-config.yaml index 6282af1..d8ab17b 100644 --- a/sync_settings_ui/.pre-commit-config.yaml +++ b/sync_settings_ui/.pre-commit-config.yaml @@ -27,11 +27,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh sync_settings_ui @@ -50,16 +45,9 @@ repos: entry: bash -c 'cd sync_settings_ui && dart format --set-exit-if-changed lib test' language: system pass_filenames: false - - id: flutter-analyze - name: flutter analyze - entry: bash -c 'cd sync_settings_ui && flutter analyze' - language: system - pass_filenames: false - - id: flutter-test-coverage - name: flutter test --coverage with 100% line-coverage gate - entry: >- - bash -c 'cd sync_settings_ui && flutter test --coverage && - scripts/check_coverage.sh coverage/lcov.info 100' + - id: flutter-test + name: flutter test + entry: bash -c 'cd sync_settings_ui && flutter test' language: system pass_filenames: false require_serial: true diff --git a/todo_hooks/.coveragerc b/todo_hooks/.coveragerc index 2e7a90e..e6cdbea 100644 --- a/todo_hooks/.coveragerc +++ b/todo_hooks/.coveragerc @@ -5,7 +5,6 @@ omit = todo_hooks/tests/* [report] -fail_under = 100 show_missing = true exclude_lines = pragma: no cover diff --git a/todo_hooks/pyproject.toml b/todo_hooks/pyproject.toml index af067de..2d85445 100644 --- a/todo_hooks/pyproject.toml +++ b/todo_hooks/pyproject.toml @@ -164,7 +164,6 @@ omit = [ ] [tool.coverage.report] -fail_under = 100 show_missing = true skip_covered = false exclude_lines = [ diff --git a/ts_config/.pre-commit-config.yaml b/ts_config/.pre-commit-config.yaml index 892ad28..08d6e51 100644 --- a/ts_config/.pre-commit-config.yaml +++ b/ts_config/.pre-commit-config.yaml @@ -33,22 +33,9 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - - - id: ts-config-lint - name: ts_config eslint (the preset lints itself) - entry: bash -c 'cd ts_config && pnpm lint' - language: system - pass_filenames: false - files: ^ts_config/.*\.(js|mjs|json)$ - - id: ts-config-test - name: ts_config fixture + factory tests, 100% coverage - entry: bash -c 'cd ts_config && pnpm coverage' + name: ts_config fixture + factory tests + entry: bash -c 'cd ts_config && pnpm test' language: system pass_filenames: false stages: [pre-push] diff --git a/ts_config/vitest.config.js b/ts_config/vitest.config.js index fcc7d55..3de5811 100644 --- a/ts_config/vitest.config.js +++ b/ts_config/vitest.config.js @@ -7,7 +7,6 @@ export default defineConfig({ provider: "v8", // The same bar as ts_core and web_ui: the package every repo's lint // runs through does not get to be the least-tested code in the tree. - thresholds: { branches: 100, functions: 100, lines: 100, statements: 100 }, }, environment: "node", include: ["test/**/*.test.js"], diff --git a/ts_core/vitest.config.ts b/ts_core/vitest.config.ts index 0b3a882..a144892 100644 --- a/ts_core/vitest.config.ts +++ b/ts_core/vitest.config.ts @@ -8,7 +8,6 @@ export default defineConfig({ provider: "v8", // Same bar as design_system and web_ui: a shared layer several repos // depend on does not get to be the least-tested code in the tree. - thresholds: { branches: 100, functions: 100, lines: 100, statements: 100 }, }, // No jsdom: this package is framework-free. `performance.now()` exists in // plain node, which is the only browser-ish API it touches. diff --git a/vmbox/.pre-commit-config.yaml b/vmbox/.pre-commit-config.yaml index 469183e..884b8ce 100644 --- a/vmbox/.pre-commit-config.yaml +++ b/vmbox/.pre-commit-config.yaml @@ -2,25 +2,8 @@ # meta/scripts/check_subproject_scope.sh -- without that literal line every # hook here silently passes instead of running. repos: - - repo: https://github.com/koalaman/shellcheck-precommit - rev: v0.10.0 - hooks: - - id: shellcheck - files: ^vmbox/ - args: [--severity=warning, --external-sources] - - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.17.2 hooks: - - id: ruff - files: ^vmbox/ - id: ruff-format files: ^vmbox/ - - - repo: local - hooks: - - id: file-length-cap - name: enforce 250-line cap - entry: bash -c 'for f in "$@"; do n=$(wc -l < "$f"); if [ "$n" -gt 250 ]; then echo "$f has $n lines, over the 250-line cap"; exit 1; fi; done' -- - language: system - files: ^vmbox/ diff --git a/web_ui/.pre-commit-config.yaml b/web_ui/.pre-commit-config.yaml index 76867f9..d5fe099 100644 --- a/web_ui/.pre-commit-config.yaml +++ b/web_ui/.pre-commit-config.yaml @@ -35,11 +35,6 @@ repos: - repo: local hooks: - - id: file-length-cap - name: file length <= 250 lines - entry: bash scripts/check_file_length.sh - language: system - pass_filenames: true - id: subproject-scope name: subproject scope regex still matches entry: scripts/check_subproject_scope.sh web_ui @@ -49,12 +44,6 @@ repos: always_run: true pass_filenames: false - - id: web-ui-lint - name: tsc --noEmit && eslint - entry: bash -c 'cd web_ui && pnpm lint' - language: system - pass_filenames: false - - id: web-ui-dist-fresh name: committed dist/ matches src/ # The tag ships a prebuilt dist/ (Vite does not transpile deps), so a @@ -67,9 +56,9 @@ repos: pass_filenames: false require_serial: true - - id: web-ui-test-coverage - name: vitest with the 100% coverage gate - entry: bash -c 'cd web_ui && pnpm coverage' + - id: web-ui-test + name: vitest + entry: bash -c 'cd web_ui && pnpm test' language: system pass_filenames: false require_serial: true diff --git a/web_ui/vitest.config.ts b/web_ui/vitest.config.ts index 5614fa2..5df2f20 100644 --- a/web_ui/vitest.config.ts +++ b/web_ui/vitest.config.ts @@ -10,7 +10,6 @@ export default getViteConfig({ // A shared layer that several repos depend on does not get to be the // least-tested code in the tree. `.astro` files are outside `include`: // the component is markup, covered by RangeSlider.astro.test.ts. - thresholds: { branches: 100, functions: 100, lines: 100, statements: 100 }, }, environment: "jsdom", globals: true,