Drop lint, type, coverage, line-cap gates

Bug-class-check: none — gate policy change (kuhy 2026-11-27)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWZDq7ef5JyQd7Rx3Ju
This commit is contained in:
Krzysztof Rudnicki 2026-11-28 08:01:51 +01:00
parent 320be81bda
commit 2399227b4e
91 changed files with 202 additions and 1773 deletions

View File

@ -30,5 +30,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pip install -r requirements.txt && pip install --no-deps -e . run: pip install -r requirements.txt && pip install --no-deps -e .
- name: Run tests with coverage - name: Run tests
run: python -m pytest -v run: python -m pytest -v

View File

@ -27,22 +27,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: dart pub get run: dart pub get
- name: Analyze - name: Run tests
run: dart analyze --fatal-infos run: dart test
- 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

View File

@ -26,11 +26,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: flutter pub get run: flutter pub get
- name: Analyze - name: Run tests
run: flutter analyze run: flutter test
- name: Run tests with coverage
run: flutter test --coverage
- name: Enforce 100% line coverage
run: scripts/check_coverage.sh coverage/lcov.info 100

View File

@ -16,10 +16,9 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.x" python-version: "3.x"
# Only pre-commit itself. Every linting hook runs in its own isolated # Only pre-commit itself. Every hook runs in its own isolated
# env -- ruff, mypy, pylint, bandit and codespell each come from their # env -- ruff-format comes from its own repo+rev, and the local hooks
# own repo+rev, and the local hooks need nothing beyond bash and # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on
# python3 -- so installing the full requirements.txt spent 9s a run on
# packages no pre-commit-stage hook imports. Verified by running all # packages no pre-commit-stage hook imports. Verified by running all
# three configs green in a venv holding pre-commit and nothing else. # 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 # 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 # than a wrong hook, and cache still re-saves under the new
# exact key after a prefix-only hit. # exact key after a prefix-only hit.
restore-keys: pre-commit-crdt-sync-${{ env.pythonLocation }}- 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 - name: Run the hooks
run: >- run: >-
pre-commit run --config crdt-sync/.pre-commit-config.yaml pre-commit run --config crdt-sync/.pre-commit-config.yaml

View File

@ -27,5 +27,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pip install -r requirements.txt run: pip install -r requirements.txt
- name: Run tests with coverage - name: Run tests
run: python -m pytest -v run: python -m pytest -v

View File

@ -26,11 +26,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: flutter pub get run: flutter pub get
- name: Analyze - name: Run tests
run: flutter analyze run: flutter test
- name: Run tests with coverage
run: flutter test --coverage
- name: Enforce 100% line coverage
run: scripts/check_coverage.sh coverage/lcov.info 100

View File

@ -26,11 +26,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: flutter pub get run: flutter pub get
- name: Analyze - name: Run tests
run: flutter analyze run: flutter test
- name: Run tests with coverage
run: flutter test --coverage
- name: Enforce 100% line coverage
run: scripts/check_coverage.sh coverage/lcov.info 100

View File

@ -19,10 +19,9 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.x" python-version: "3.x"
# Only pre-commit itself. Every linting hook runs in its own isolated # Only pre-commit itself. Every hook runs in its own isolated
# env -- ruff, mypy, pylint, bandit and codespell each come from their # env -- ruff-format comes from its own repo+rev, and the local hooks
# own repo+rev, and the local hooks need nothing beyond bash and # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on
# python3 -- so installing the full requirements.txt spent 9s a run on
# packages no pre-commit-stage hook imports. Verified by running all # packages no pre-commit-stage hook imports. Verified by running all
# three configs green in a venv holding pre-commit and nothing else. # 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 # 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 # than a wrong hook, and cache still re-saves under the new
# exact key after a prefix-only hit. # exact key after a prefix-only hit.
restore-keys: pre-commit-earned_time-${{ env.pythonLocation }}- 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 - name: Run the hooks
run: >- run: >-
pre-commit run --config earned_time/.pre-commit-config.yaml pre-commit run --config earned_time/.pre-commit-config.yaml

View File

@ -32,5 +32,5 @@ jobs:
# No display needed: earned_time is stdlib-only policy, imported # No display needed: earned_time is stdlib-only policy, imported
# headless by the root gaming daemon. # headless by the root gaming daemon.
- name: Run tests with coverage - name: Run tests
run: python -m pytest -v run: python -m pytest -v

View File

@ -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

View File

@ -19,10 +19,9 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.x" python-version: "3.x"
# Only pre-commit itself. Every linting hook runs in its own isolated # Only pre-commit itself. Every hook runs in its own isolated
# env -- ruff, mypy, pylint, bandit and codespell each come from their # env -- ruff-format comes from its own repo+rev, and the local hooks
# own repo+rev, and the local hooks need nothing beyond bash and # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on
# python3 -- so installing the full requirements.txt spent 9s a run on
# packages no pre-commit-stage hook imports. Verified by running all # packages no pre-commit-stage hook imports. Verified by running all
# three configs green in a venv holding pre-commit and nothing else. # 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 # 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 # than a wrong hook, and cache still re-saves under the new
# exact key after a prefix-only hit. # exact key after a prefix-only hit.
restore-keys: pre-commit-focus-project-${{ env.pythonLocation }}- 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 - name: Run the hooks
run: >- run: >-
pre-commit run --config focus_project/.pre-commit-config.yaml pre-commit run --config focus_project/.pre-commit-config.yaml

View File

@ -30,5 +30,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pip install -r requirements.txt && pip install --no-deps -e . run: pip install -r requirements.txt && pip install --no-deps -e .
- name: Run tests with coverage - name: Run tests
run: python -m pytest -v run: python -m pytest -v

View File

@ -19,10 +19,9 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.x" python-version: "3.x"
# Only pre-commit itself. Every linting hook runs in its own isolated # Only pre-commit itself. Every hook runs in its own isolated
# env -- ruff, mypy, pylint, bandit and codespell each come from their # env -- ruff-format comes from its own repo+rev, and the local hooks
# own repo+rev, and the local hooks need nothing beyond bash and # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on
# python3 -- so installing the full requirements.txt spent 9s a run on
# packages no pre-commit-stage hook imports. Verified by running all # packages no pre-commit-stage hook imports. Verified by running all
# three configs green in a venv holding pre-commit and nothing else. # 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 # 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 # than a wrong hook, and cache still re-saves under the new
# exact key after a prefix-only hit. # exact key after a prefix-only hit.
restore-keys: pre-commit-freedays-${{ env.pythonLocation }}- 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 - name: Run the hooks
run: >- run: >-
pre-commit run --config freedays/.pre-commit-config.yaml pre-commit run --config freedays/.pre-commit-config.yaml

View File

@ -40,5 +40,5 @@ jobs:
# No display needed: freedays draws nothing. It is policy, a JSON file # No display needed: freedays draws nothing. It is policy, a JSON file
# and a CLI. # and a CLI.
- name: Run tests with coverage - name: Run tests
run: python -m pytest -v run: python -m pytest -v

View File

@ -18,10 +18,9 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.x" python-version: "3.x"
# Only pre-commit itself. Every linting hook runs in its own isolated # Only pre-commit itself. Every hook runs in its own isolated
# env -- ruff, mypy, pylint, bandit and codespell each come from their # env -- ruff-format comes from its own repo+rev, and the local hooks
# own repo+rev, and the local hooks need nothing beyond bash and # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on
# python3 -- so installing the full requirements.txt spent 9s a run on
# packages no pre-commit-stage hook imports. Verified by running this # packages no pre-commit-stage hook imports. Verified by running this
# package's config green in a venv holding pre-commit and nothing else. # 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 # 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 # than a wrong hook, and cache still re-saves under the new
# exact key after a prefix-only hit. # exact key after a prefix-only hit.
restore-keys: pre-commit-game-recording-${{ env.pythonLocation }}- 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 - name: Run the hooks
run: >- run: >-
pre-commit run --config game_recording/.pre-commit-config.yaml pre-commit run --config game_recording/.pre-commit-config.yaml

View File

@ -31,5 +31,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pip install -r requirements.txt run: pip install -r requirements.txt
- name: Run tests with coverage - name: Run tests
run: python -m pytest -v --cov=game_recording run: python -m pytest -v

View File

@ -18,10 +18,9 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.x" python-version: "3.x"
# Only pre-commit itself. Every linting hook runs in its own isolated # Only pre-commit itself. Every hook runs in its own isolated
# env -- ruff, mypy, pylint, bandit and codespell each come from their # env -- ruff-format comes from its own repo+rev, and the local hooks
# own repo+rev, and the local hooks need nothing beyond bash and # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on
# python3 -- so installing the full requirements.txt spent 9s a run on
# packages no pre-commit-stage hook imports. Verified by running all # packages no pre-commit-stage hook imports. Verified by running all
# three configs green in a venv holding pre-commit and nothing else. # 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 # 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 # than a wrong hook, and cache still re-saves under the new
# exact key after a prefix-only hit. # exact key after a prefix-only hit.
restore-keys: pre-commit-gatelock-${{ env.pythonLocation }}- 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 - name: Run the hooks
run: >- run: >-
pre-commit run --config gatelock/.pre-commit-config.yaml pre-commit run --config gatelock/.pre-commit-config.yaml

View File

@ -45,5 +45,5 @@ jobs:
- name: Install a virtual X display - name: Install a virtual X display
run: sudo apt-get update && sudo apt-get install -y xvfb 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 run: xvfb-run -a -s "-screen 0 1600x1200x24" python -m pytest -v

View File

@ -26,11 +26,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: flutter pub get run: flutter pub get
- name: Analyze - name: Run tests
run: flutter analyze run: flutter test
- name: Run tests with coverage
run: flutter test --coverage
- name: Enforce 100% line coverage
run: scripts/check_coverage.sh coverage/lcov.info 100

View File

@ -28,11 +28,5 @@ jobs:
sudo mv "Godot_v${GODOT_VERSION}-stable_linux.x86_64" /usr/local/bin/godot sudo mv "Godot_v${GODOT_VERSION}-stable_linux.x86_64" /usr/local/bin/godot
rm godot.zip 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) - name: GUT against the stub host (GUT is fetched at its pinned tag)
run: godot_dev_tools/test.sh run: godot_dev_tools/test.sh

View File

@ -26,11 +26,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: flutter pub get run: flutter pub get
- name: Analyze - name: Run tests
run: flutter analyze run: flutter test
- name: Run tests with coverage
run: flutter test --coverage
- name: Enforce 100% line coverage
run: scripts/check_coverage.sh coverage/lcov.info 100

View File

@ -19,10 +19,9 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.x" python-version: "3.x"
# Only pre-commit itself. Every linting hook runs in its own isolated # Only pre-commit itself. Every hook runs in its own isolated
# env -- ruff, mypy, pylint, bandit and codespell each come from their # env -- ruff-format comes from its own repo+rev, and the local hooks
# own repo+rev, and the local hooks need nothing beyond bash and # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on
# python3 -- so installing the full requirements.txt spent 9s a run on
# packages no pre-commit-stage hook imports. Verified by running all # packages no pre-commit-stage hook imports. Verified by running all
# three configs green in a venv holding pre-commit and nothing else. # 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 # 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 # than a wrong hook, and cache still re-saves under the new
# exact key after a prefix-only hit. # exact key after a prefix-only hit.
restore-keys: pre-commit-holds-${{ env.pythonLocation }}- 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 - name: Run the hooks
run: >- run: >-
pre-commit run --config holds/.pre-commit-config.yaml pre-commit run --config holds/.pre-commit-config.yaml

View File

@ -30,5 +30,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pip install -r requirements.txt && pip install --no-deps -e . run: pip install -r requirements.txt && pip install --no-deps -e .
- name: Run tests with coverage - name: Run tests
run: python -m pytest -v run: python -m pytest -v

View File

@ -26,9 +26,7 @@ jobs:
sudo apt-get update && sudo apt-get install -y xvfb python3-tk \ sudo apt-get update && sudo apt-get install -y xvfb python3-tk \
texlive-latex-base texlive-latex-recommended texlive-pictures texlive-latex-base texlive-latex-recommended texlive-pictures
pip install -r requirements-dev.txt && pip install --no-deps -e . pip install -r requirements-dev.txt && pip install --no-deps -e .
- name: Lint - name: Tests, Tk E2E and the drift check
run: ruff check . && ruff format --check .
- name: Tests, Tk E2E and the drift check, 100% branch coverage
run: xvfb-run -a -s "-screen 0 1600x1200x24" python -m pytest -q run: xvfb-run -a -s "-screen 0 1600x1200x24" python -m pytest -q
web: web:
@ -45,9 +43,8 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: { python-version: "3.15.2" } with: { python-version: "3.15.2" }
- run: pnpm install --frozen-lockfile - run: pnpm install --frozen-lockfile
- run: pnpm lint - name: Unit tests
- name: Unit tests, 100% coverage run: pnpm test
run: pnpm coverage
- name: E2E in headless Chrome (window.open stubbed) - name: E2E in headless Chrome (window.open stubbed)
working-directory: . working-directory: .
env: { CHROMIUM: google-chrome } env: { CHROMIUM: google-chrome }
@ -67,13 +64,12 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: { python-version: "3.15.2" } with: { python-version: "3.15.2" }
- run: flutter pub get - run: flutter pub get
- run: flutter analyze - name: Widget tests
- name: Widget tests, 100% line coverage run: flutter test
run: flutter test --coverage && ../../scripts/check_coverage.sh coverage/lcov.info 100
- name: Example web build + E2E in headless Chrome (window.open stubbed) - name: Example web build + E2E in headless Chrome (window.open stubbed)
env: { CHROMIUM: google-chrome } env: { CHROMIUM: google-chrome }
run: | 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 pip install -r ../../flutter_web_drive/requirements.txt
python3 ../e2e/flutter_web_e2e.py python3 ../e2e/flutter_web_e2e.py
@ -90,8 +86,6 @@ jobs:
chmod +x "Godot_v${GODOT_VERSION}-stable_linux.x86_64" chmod +x "Godot_v${GODOT_VERSION}-stable_linux.x86_64"
sudo mv "Godot_v${GODOT_VERSION}-stable_linux.x86_64" /usr/local/bin/godot sudo mv "Godot_v${GODOT_VERSION}-stable_linux.x86_64" /usr/local/bin/godot
rm godot.zip 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) - name: GUT unit tests + demo E2E (GUT fetched at its pinned tag)
env: { KUHY_CREDIT_GODOT_TIMEOUT: "50" } env: { KUHY_CREDIT_GODOT_TIMEOUT: "50" }
run: kuhy_credit/godot/test.sh run: kuhy_credit/godot/test.sh

View File

@ -19,10 +19,9 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.x" python-version: "3.x"
# Only pre-commit itself. Every linting hook runs in its own isolated # Only pre-commit itself. Every hook runs in its own isolated
# env -- ruff, mypy, pylint, bandit and codespell each come from their # env -- ruff-format comes from its own repo+rev, and the local hooks
# own repo+rev, and the local hooks need nothing beyond bash and # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on
# python3 -- so installing the full requirements.txt spent 9s a run on
# packages no pre-commit-stage hook imports. Verified by running all # packages no pre-commit-stage hook imports. Verified by running all
# three configs green in a venv holding pre-commit and nothing else. # 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 # 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 # than a wrong hook, and cache still re-saves under the new
# exact key after a prefix-only hit. # exact key after a prefix-only hit.
restore-keys: pre-commit-leetcode-coach-${{ env.pythonLocation }}- 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 - name: Run the hooks
run: >- run: >-
pre-commit run --config leetcode_coach/.pre-commit-config.yaml pre-commit run --config leetcode_coach/.pre-commit-config.yaml

View File

@ -30,5 +30,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pip install -r requirements.txt && pip install --no-deps -e . run: pip install -r requirements.txt && pip install --no-deps -e .
- name: Run tests with coverage - name: Run tests
run: python -m pytest -v run: python -m pytest -v

View File

@ -27,5 +27,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pip install -r requirements.txt run: pip install -r requirements.txt
- name: Run tests with coverage - name: Run tests
run: python -m pytest -v --cov=music_theory run: python -m pytest -v

View File

@ -19,10 +19,9 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.x" python-version: "3.x"
# Only pre-commit itself. Every linting hook runs in its own isolated # Only pre-commit itself. Every hook runs in its own isolated
# env -- ruff, mypy, pylint, bandit and codespell each come from their # env -- ruff-format comes from its own repo+rev, and the local hooks
# own repo+rev, and the local hooks need nothing beyond bash and # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on
# python3 -- so installing the full requirements.txt spent 9s a run on
# packages no pre-commit-stage hook imports. Verified by running all # packages no pre-commit-stage hook imports. Verified by running all
# three configs green in a venv holding pre-commit and nothing else. # 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 # 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 # than a wrong hook, and cache still re-saves under the new
# exact key after a prefix-only hit. # exact key after a prefix-only hit.
restore-keys: pre-commit-omniroute_offload-${{ env.pythonLocation }}- 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 - name: Run the hooks
run: >- run: >-
pre-commit run --config omniroute_offload/.pre-commit-config.yaml pre-commit run --config omniroute_offload/.pre-commit-config.yaml

View File

@ -26,11 +26,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: flutter pub get run: flutter pub get
- name: Analyze - name: Run tests
run: flutter analyze run: flutter test
- name: Run tests with coverage
run: flutter test --coverage
- name: Enforce 100% line coverage
run: scripts/check_coverage.sh coverage/lcov.info 100

View File

@ -26,11 +26,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: flutter pub get run: flutter pub get
- name: Analyze - name: Run tests
run: flutter analyze run: flutter test
- name: Run tests with coverage
run: flutter test --coverage
- name: Enforce 100% line coverage
run: scripts/check_coverage.sh coverage/lcov.info 100

View File

@ -27,58 +27,37 @@ jobs:
python-version: "3.x" python-version: "3.x"
- name: Install test dependencies - 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: | run: |
PYTHONPATH=. python -m pytest dep_freshness/tests -q \ PYTHONPATH=. python -m pytest dep_freshness/tests -q
--cov=dep_freshness --cov-branch \
--cov-report=term-missing \
--cov-fail-under=99
- name: md_naming - name: md_naming
run: PYTHONPATH=. python -m pytest md_naming/tests -q run: PYTHONPATH=. python -m pytest md_naming/tests -q
# Whole package at 100% branch: the gate is enforced in every repo and - name: file_length
# 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
run: | run: |
PYTHONPATH=. python -m pytest file_length/tests -q \ PYTHONPATH=. python -m pytest file_length/tests -q
--cov=file_length --cov-branch \
--cov-report=term-missing \
--cov-fail-under=100
- name: repo_contract — 100% branch coverage on the gate itself - name: repo_contract
run: | run: |
PYTHONPATH=. python -m pytest repo_contract/tests -q \ PYTHONPATH=. python -m pytest repo_contract/tests -q
--cov=repo_contract --cov-branch \
--cov-report=term-missing \
--cov-fail-under=100
# Every web repo's pre-commit and CI run this checker against its dist/, # 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. # 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: | run: |
PYTHONPATH=. python -m pytest agent_ready/tests -q \ PYTHONPATH=. python -m pytest agent_ready/tests -q
--cov=agent_ready --cov-branch \
--cov-report=term-missing \
--cov-fail-under=100
- name: coverage_gaps — 100% branch coverage on the lister - name: coverage_gaps
run: | run: |
PYTHONPATH=. python -m pytest coverage_gaps/tests -q \ PYTHONPATH=. python -m pytest coverage_gaps/tests -q
--cov=coverage_gaps --cov-branch \
--cov-report=term-missing \
--cov-fail-under=100
# Its tests build throwaway repos with git, which the runner has. # Its tests build throwaway repos with git, which the runner has.
- name: devstats — 100% branch coverage - name: devstats
run: | run: |
PYTHONPATH=. python -m pytest devstats/tests -q \ PYTHONPATH=. python -m pytest devstats/tests -q
--cov=devstats --cov-branch \
--cov-report=term-missing \
--cov-fail-under=100
# gate_stamp.sh is the pre-push gate in every repo. Its tests drive real # 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 # pre-commit in throwaway repos, and the hook-id helper runs under

View File

@ -19,10 +19,9 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.x" python-version: "3.x"
# Only pre-commit itself. Every linting hook runs in its own isolated # Only pre-commit itself. Every hook runs in its own isolated
# env -- ruff, mypy, pylint, bandit and codespell each come from their # env -- ruff-format comes from its own repo+rev, and the local hooks
# own repo+rev, and the local hooks need nothing beyond bash and # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on
# python3 -- so installing the full requirements.txt spent 9s a run on
# packages no pre-commit-stage hook imports. Verified by running all # packages no pre-commit-stage hook imports. Verified by running all
# three configs green in a venv holding pre-commit and nothing else. # 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 # 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 # than a wrong hook, and cache still re-saves under the new
# exact key after a prefix-only hit. # exact key after a prefix-only hit.
restore-keys: pre-commit-sickdays-${{ env.pythonLocation }}- 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 - name: Run the hooks
run: >- run: >-
pre-commit run --config sickdays/.pre-commit-config.yaml pre-commit run --config sickdays/.pre-commit-config.yaml

View File

@ -45,5 +45,5 @@ jobs:
- name: Install a virtual X display - name: Install a virtual X display
run: sudo apt-get update && sudo apt-get install -y xvfb 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 run: xvfb-run -a -s "-screen 0 1600x1200x24" python -m pytest -v

View File

@ -19,10 +19,9 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.x" python-version: "3.x"
# Only pre-commit itself. Every linting hook runs in its own isolated # Only pre-commit itself. Every hook runs in its own isolated
# env -- ruff, mypy, pylint, bandit and codespell each come from their # env -- ruff-format comes from its own repo+rev, and the local hooks
# own repo+rev, and the local hooks need nothing beyond bash and # need nothing beyond bash and python3 -- so installing the full requirements.txt spent 9s a run on
# python3 -- so installing the full requirements.txt spent 9s a run on
# packages no pre-commit-stage hook imports. Verified by running all # packages no pre-commit-stage hook imports. Verified by running all
# three configs green in a venv holding pre-commit and nothing else. # 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 # 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 # than a wrong hook, and cache still re-saves under the new
# exact key after a prefix-only hit. # exact key after a prefix-only hit.
restore-keys: pre-commit-sql-drills-${{ env.pythonLocation }}- 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 - name: Run the hooks
run: >- run: >-
pre-commit run --config sql_drills/.pre-commit-config.yaml pre-commit run --config sql_drills/.pre-commit-config.yaml

View File

@ -30,5 +30,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pip install -r requirements.txt && pip install --no-deps -e . run: pip install -r requirements.txt && pip install --no-deps -e .
- name: Run tests with coverage - name: Run tests
run: python -m pytest -v run: python -m pytest -v

View File

@ -26,11 +26,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: flutter pub get run: flutter pub get
- name: Analyze - name: Run tests
run: flutter analyze run: flutter test
- name: Run tests with coverage
run: flutter test --coverage
- name: Enforce 100% line coverage
run: scripts/check_coverage.sh coverage/lcov.info 100

View File

@ -30,8 +30,5 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: Lint (the preset lints itself) - name: Fixture + factory tests
run: pnpm lint run: pnpm test
- name: Fixture + factory tests with the 100% coverage gate
run: pnpm coverage

View File

@ -27,22 +27,11 @@ jobs:
with: with:
node-version: "26.13.1" 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 - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: Lint - name: Run tests
run: pnpm lint run: pnpm test
- name: Run tests with the 100% coverage gate
run: pnpm coverage
# The tag ships a prebuilt dist/ because Vite does not transpile # The tag ships a prebuilt dist/ because Vite does not transpile
# dependencies. A committed dist/ that does not match src/ would ship # dependencies. A committed dist/ that does not match src/ would ship

View File

@ -27,22 +27,11 @@ jobs:
with: with:
node-version: "26.13.1" 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 - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: Lint - name: Run tests
run: pnpm lint run: pnpm test
- name: Run tests with the 100% coverage gate
run: pnpm coverage
# The tag ships a prebuilt dist/ because Vite does not transpile # The tag ships a prebuilt dist/ because Vite does not transpile
# dependencies. A committed dist/ that does not match src/ would ship # dependencies. A committed dist/ that does not match src/ would ship

View File

@ -1,19 +1,12 @@
# Repo-wide gate for the shared 250-line file cap (refactor_claude_todo.md). # 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,
# A file that cannot be read in one piece forces re-reads and partial edits, # no-binaries, dependency freshness, no-noqa, md-naming and repo-contract stay.
# 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.
# #
# The subprojects (gatelock/, crdt-sync/, web_ui/, design_system/, # The subprojects (gatelock/, crdt-sync/, web_ui/, design_system/,
# sync_settings_ui/) each keep their own .pre-commit-config.yaml for their own # sync_settings_ui/, ...) each keep their own .pre-commit-config.yaml. This root
# linters, and carry this same hook so committing with one of those configs is # config is what `pre-commit install` wires up, and it is the only one that
# gated too. This root config is what `pre-commit install` wires up, and it is # covers the subprojects without a config of their own (guard-lib/,
# the only one that covers the subprojects without a config of their own # crdt_sync_dart/, file_length/, ...).
# (guard-lib/, crdt_sync_dart/, file_length/, ...).
# #
# The path is repo-relative on purpose. pre-commit always runs hooks from the # 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 # git root, so this resolves the same locally and on a CI runner -- an absolute
@ -21,12 +14,6 @@
repos: repos:
- repo: local - repo: local
hooks: 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 # Three markdown namespaces (README / CLAUDE* / DOCS*); TODO*.md is banned
# (tasks live in the todo app). # (tasks live in the todo app).
# Shared gate in ~/src/utils owns the namespaces and the exemption list, so # Shared gate in ~/src/utils owns the namespaces and the exemption list, so

View File

@ -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 - 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: `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` - test-changed: `scripts/test_changed.sh`
- lint: `ruff check agent_ready coverage_gaps devstats flutter_web_drive repo_contract` - lint: n/a: dropped (kuhy, 2026-11-27)
- 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: n/a: dropped (kuhy, 2026-11-27)
- coverage-gaps: `coverage-gaps coverage.xml` - 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) - 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 ## Rules

View File

@ -5,7 +5,7 @@ description = "Shared app error and slow-wait ingest: RTDB and local spool repor
requires-python = ">=3.14" requires-python = ">=3.14"
dependencies = [ dependencies = [
"crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.11.1#subdirectory=crdt-sync", "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] [project.optional-dependencies]
@ -173,7 +173,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -26,7 +26,7 @@ test = [
requires-dist = [ requires-dist = [
{ name = "crdt-sync", git = "https://github.com/kuhyx/utils?subdirectory=crdt-sync&rev=crdt-sync-v0.11.1" }, { 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 = "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", marker = "extra == 'test'", specifier = "==9.2.0" },
{ name = "pytest-cov", marker = "extra == 'test'", specifier = "==7.1.0" }, { name = "pytest-cov", marker = "extra == 'test'", specifier = "==7.1.0" },
] ]
@ -400,8 +400,8 @@ wheels = [
[[package]] [[package]]
name = "kuhy-credit" name = "kuhy-credit"
version = "0.3.1" version = "0.3.2"
source = { git = "https://github.com/kuhyx/utils?subdirectory=kuhy_credit&rev=kuhy-credit-v0.3.1#2352c177232a4b4594573a3b1126697ef32851f7" } source = { git = "https://github.com/kuhyx/utils?subdirectory=kuhy_credit&rev=kuhy-credit-v0.3.2#adeb40f68e1d6c701da43e396fc46bffa3ef10c7" }
[[package]] [[package]]
name = "packaging" name = "packaging"

View File

@ -31,8 +31,6 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: debug-statements - id: debug-statements
- id: name-tests-test
args: [--pytest-test-first]
- id: check-ast - id: check-ast
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [--fix=lf]
@ -40,11 +38,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh crdt-sync entry: scripts/check_subproject_scope.sh crdt-sync
@ -67,85 +60,16 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.4 rev: v0.17.4
hooks: hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format - id: ruff-format
types_or: [python, pyi] 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 - repo: local
hooks: hooks:
- id: pytest-coverage - id: pytest
name: pytest with coverage enforcement name: pytest
entry: scripts/run_subproject_tests.sh crdt-sync entry: scripts/run_subproject_tests.sh crdt-sync
language: script language: script
types: [python] types: [python]
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
stages: [pre-push] stages: [pre-push]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- --skip=*.json,*.lock,.git,__pycache__,.venv

View File

@ -171,7 +171,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -27,11 +27,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh data_transfer_flutter 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' entry: bash -c 'cd data_transfer_flutter && dart format --set-exit-if-changed lib test'
language: system language: system
pass_filenames: false pass_filenames: false
- id: flutter-analyze - id: flutter-test
name: flutter analyze name: flutter test
entry: bash -c 'cd data_transfer_flutter && flutter analyze' entry: bash -c 'cd data_transfer_flutter && flutter test'
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'
language: system language: system
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true

View File

@ -27,11 +27,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh design_system 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' entry: bash -c 'cd design_system && dart format --set-exit-if-changed lib test'
language: system language: system
pass_filenames: false pass_filenames: false
- id: flutter-analyze - id: flutter-test
name: flutter analyze name: flutter test
entry: bash -c 'cd design_system && flutter analyze' entry: bash -c 'cd design_system && flutter test'
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'
language: system language: system
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true

View File

@ -31,10 +31,6 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: debug-statements - 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: check-ast
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [--fix=lf]
@ -42,11 +38,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh earned_time entry: scripts/check_subproject_scope.sh earned_time
@ -69,81 +60,16 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.2 rev: v0.17.2
hooks: hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format - id: ruff-format
types_or: [python, pyi] 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 - repo: local
hooks: hooks:
- id: pytest-coverage - id: pytest
name: pytest with coverage enforcement name: pytest
entry: scripts/run_subproject_tests.sh earned_time entry: scripts/run_subproject_tests.sh earned_time
language: script language: script
types: [python] types: [python]
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
stages: [pre-push] 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

View File

@ -162,7 +162,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -31,8 +31,6 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: debug-statements - id: debug-statements
- id: name-tests-test
args: [--pytest-test-first]
- id: check-ast - id: check-ast
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [--fix=lf]
@ -40,11 +38,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh feedback_inbox entry: scripts/check_subproject_scope.sh feedback_inbox
@ -67,79 +60,16 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.4 rev: v0.17.4
hooks: hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format - id: ruff-format
types_or: [python, pyi] 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 - repo: local
hooks: hooks:
- id: pytest-coverage - id: pytest
name: pytest with coverage enforcement name: pytest
entry: scripts/run_subproject_tests.sh feedback_inbox entry: scripts/run_subproject_tests.sh feedback_inbox
language: script language: script
types: [python] types: [python]
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
stages: [pre-push] stages: [pre-push]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- --skip=*.json,*.lock,.git,__pycache__,.venv

View File

@ -8,7 +8,7 @@ version = "0.1.0"
description = "Turns every game dev-feedback bundle into one todo-app task" description = "Turns every game dev-feedback bundle into one todo-app task"
requires-python = ">=3.14" requires-python = ">=3.14"
dependencies = [ 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] [project.scripts]
@ -164,7 +164,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -31,10 +31,6 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: debug-statements - 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: check-ast
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [--fix=lf]
@ -42,11 +38,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh focus_project entry: scripts/check_subproject_scope.sh focus_project
@ -69,85 +60,16 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.2 rev: v0.17.2
hooks: hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format - id: ruff-format
types_or: [python, pyi] 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 - repo: local
hooks: hooks:
- id: pytest-coverage - id: pytest
name: pytest with coverage enforcement name: pytest
entry: scripts/run_subproject_tests.sh focus_project entry: scripts/run_subproject_tests.sh focus_project
language: script language: script
types: [python] types: [python]
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
stages: [pre-push] 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

View File

@ -168,7 +168,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -31,8 +31,6 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: debug-statements - id: debug-statements
- id: name-tests-test
args: [--pytest-test-first]
- id: check-ast - id: check-ast
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [--fix=lf]
@ -40,11 +38,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh freedays entry: scripts/check_subproject_scope.sh freedays
@ -67,82 +60,16 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.2 rev: v0.17.2
hooks: hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format - id: ruff-format
types_or: [python, pyi] 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 - repo: local
hooks: hooks:
- id: pytest-coverage - id: pytest
name: pytest with coverage enforcement name: pytest
entry: scripts/run_subproject_tests.sh freedays entry: scripts/run_subproject_tests.sh freedays
language: script language: script
types: [python] types: [python]
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
stages: [pre-push] stages: [pre-push]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- --skip=*.json,*.lock,.git,__pycache__,.venv

View File

@ -164,7 +164,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -31,8 +31,6 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: debug-statements - id: debug-statements
- id: name-tests-test
args: [--pytest-test-first]
- id: check-ast - id: check-ast
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [--fix=lf]
@ -40,11 +38,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh game_recording entry: scripts/check_subproject_scope.sh game_recording
@ -67,65 +60,16 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.2 rev: v0.17.2
hooks: hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format - id: ruff-format
types_or: [python, pyi] 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 - repo: local
hooks: hooks:
- id: pytest-coverage - id: pytest
name: pytest with coverage enforcement name: pytest
entry: scripts/run_subproject_tests.sh game_recording --cov=game_recording entry: scripts/run_subproject_tests.sh game_recording
language: script language: script
types: [python] types: [python]
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
stages: [pre-push] stages: [pre-push]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- --skip=*.json,*.lock,.git,__pycache__,.venv

View File

@ -148,7 +148,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -31,8 +31,6 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: debug-statements - id: debug-statements
- id: name-tests-test
args: [--pytest-test-first]
- id: check-ast - id: check-ast
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [--fix=lf]
@ -40,11 +38,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh gatelock entry: scripts/check_subproject_scope.sh gatelock
@ -67,79 +60,16 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.2 rev: v0.17.2
hooks: hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format - id: ruff-format
types_or: [python, pyi] 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 - repo: local
hooks: hooks:
- id: pytest-coverage - id: pytest
name: pytest with coverage enforcement name: pytest
entry: scripts/run_subproject_tests.sh gatelock entry: scripts/run_subproject_tests.sh gatelock
language: script language: script
types: [python] types: [python]
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
stages: [pre-push] stages: [pre-push]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- --skip=*.json,*.lock,.git,__pycache__,.venv

View File

@ -192,7 +192,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -27,11 +27,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh google_account_token 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' entry: bash -c 'cd google_account_token && dart format --set-exit-if-changed lib test'
language: system language: system
pass_filenames: false pass_filenames: false
- id: flutter-analyze - id: flutter-test
name: flutter analyze name: flutter test
entry: bash -c 'cd google_account_token && flutter analyze' entry: bash -c 'cd google_account_token && flutter test'
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'
language: system language: system
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true

View File

@ -31,8 +31,6 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: debug-statements - id: debug-statements
- id: name-tests-test
args: [--pytest-test-first]
- id: check-ast - id: check-ast
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [--fix=lf]
@ -40,11 +38,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh holds entry: scripts/check_subproject_scope.sh holds
@ -67,82 +60,16 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.2 rev: v0.17.2
hooks: hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format - id: ruff-format
types_or: [python, pyi] 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 - repo: local
hooks: hooks:
- id: pytest-coverage - id: pytest
name: pytest with coverage enforcement name: pytest
entry: scripts/run_subproject_tests.sh holds entry: scripts/run_subproject_tests.sh holds
language: script language: script
types: [python] types: [python]
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
stages: [pre-push] stages: [pre-push]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- --skip=*.json,*.lock,.git,__pycache__,.venv

View File

@ -160,7 +160,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -60,6 +60,5 @@ branch = true
omit = ["*/tests/*"] omit = ["*/tests/*"]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
exclude_lines = ["pragma: no cover", 'if __name__ == "__main__":', "if TYPE_CHECKING:"] exclude_lines = ["pragma: no cover", 'if __name__ == "__main__":', "if TYPE_CHECKING:"]

View File

@ -5,7 +5,6 @@ export default defineConfig({
coverage: { coverage: {
include: ["src/kuhy-credit.js"], include: ["src/kuhy-credit.js"],
provider: "v8", provider: "v8",
thresholds: { branches: 100, functions: 100, lines: 100, statements: 100 },
}, },
environment: "jsdom", environment: "jsdom",
include: ["src/**/*.test.js"], include: ["src/**/*.test.js"],

View File

@ -31,11 +31,6 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: debug-statements - 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: check-ast
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [--fix=lf]
@ -43,11 +38,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh leetcode_coach entry: scripts/check_subproject_scope.sh leetcode_coach
@ -70,90 +60,16 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.2 rev: v0.17.2
hooks: hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format - id: ruff-format
types_or: [python, pyi] 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 - repo: local
hooks: hooks:
- id: pytest-coverage - id: pytest
name: pytest with coverage enforcement name: pytest
entry: scripts/run_subproject_tests.sh leetcode_coach entry: scripts/run_subproject_tests.sh leetcode_coach
language: script language: script
types: [python] types: [python]
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
stages: [pre-push] stages: [pre-push]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- --skip=*.json,*.lock,.git,__pycache__,.venv

View File

@ -238,7 +238,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -1,9 +1,8 @@
# Coverage settings for the markdown-naming gate. # Coverage settings for the markdown-naming gate.
# #
# fail_under = 100 matches the standard for shared code in this repo. The two # The two exclusions are unreachable under pytest by construction, not test
# exclusions are unreachable under pytest by construction, not test gaps: the # gaps: the `__main__` block never runs on import, and the plain-script sys.path
# `__main__` block never runs on import, and the plain-script sys.path shim # shim only fires when check.py is executed directly rather than imported.
# 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 # 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 # 2026-08-24 and is kept as the record of how 203 files were classified, not
@ -17,7 +16,6 @@ omit =
md_naming/migrate/* md_naming/migrate/*
[report] [report]
fail_under = 100
show_missing = true show_missing = true
exclude_lines = exclude_lines =
pragma: no cover pragma: no cover

View File

@ -31,8 +31,6 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: debug-statements - id: debug-statements
- id: name-tests-test
args: [--pytest-test-first]
- id: check-ast - id: check-ast
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [--fix=lf]
@ -40,11 +38,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh music_theory entry: scripts/check_subproject_scope.sh music_theory
@ -67,86 +60,16 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.2 rev: v0.17.2
hooks: hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format - id: ruff-format
types_or: [python, pyi] 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 - repo: local
hooks: hooks:
- id: pytest-coverage - id: pytest
name: pytest with coverage enforcement name: pytest
entry: scripts/run_subproject_tests.sh music_theory --cov=music_theory entry: scripts/run_subproject_tests.sh music_theory
language: script language: script
types: [python] types: [python]
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
stages: [pre-push] stages: [pre-push]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- --skip=*.json,*.lock,.git,__pycache__,.venv

View File

@ -144,7 +144,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -31,8 +31,6 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: debug-statements - id: debug-statements
- id: name-tests-test
args: [--pytest-test-first]
- id: check-ast - id: check-ast
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [--fix=lf]
@ -40,11 +38,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh omniroute_offload entry: scripts/check_subproject_scope.sh omniroute_offload
@ -67,79 +60,16 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.2 rev: v0.17.2
hooks: hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format - id: ruff-format
types_or: [python, pyi] 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 - repo: local
hooks: hooks:
- id: pytest-coverage - id: pytest
name: pytest with coverage enforcement name: pytest
entry: scripts/run_subproject_tests.sh omniroute_offload entry: scripts/run_subproject_tests.sh omniroute_offload
language: script language: script
types: [python] types: [python]
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
stages: [pre-push] stages: [pre-push]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- --skip=*.json,*.lock,.git,__pycache__,.venv

View File

@ -8,7 +8,7 @@ version = "0.1.0"
description = "Offload easy LLM work to free models behind the local OmniRoute gateway" description = "Offload easy LLM work to free models behind the local OmniRoute gateway"
requires-python = ">=3.14" requires-python = ">=3.14"
dependencies = [ 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] [project.scripts]
@ -63,7 +63,6 @@ branch = true
omit = ["*/__pycache__/*", "*/tests/*"] omit = ["*/__pycache__/*", "*/tests/*"]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
exclude_lines = ["pragma: no cover", 'if __name__ == "__main__":', "if TYPE_CHECKING:"] exclude_lines = ["pragma: no cover", 'if __name__ == "__main__":', "if TYPE_CHECKING:"]

View File

@ -27,11 +27,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh platform_location 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' entry: bash -c 'cd platform_location && dart format --set-exit-if-changed lib test'
language: system language: system
pass_filenames: false pass_filenames: false
- id: flutter-analyze - id: flutter-test
name: flutter analyze name: flutter test
entry: bash -c 'cd platform_location && flutter analyze' entry: bash -c 'cd platform_location && flutter test'
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'
language: system language: system
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true

View File

@ -6,7 +6,7 @@ import re
from dataclasses import dataclass, field from dataclasses import dataclass, field
from pathlib import Path 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 ( from repo_contract.sources import (
MAKE_TARGETS, MAKE_TARGETS,
NPM_SCRIPTS, NPM_SCRIPTS,
@ -21,15 +21,7 @@ from repo_contract.stacks import has_tests
TEST_CHANGED = "scripts/test_changed.sh" TEST_CHANGED = "scripts/test_changed.sh"
NO_TESTS = "n/a: no automated tests yet" NO_TESTS = "n/a: no automated tests yet"
NO_COVERAGE = "n/a: no coverage tooling for this stack" DROPPED = "n/a: dropped (kuhy, 2026-11-27)"
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",
}
_VERBOSE_TOKEN = re.compile(r"\s(-v+|--verbose)(?=\s|$)") _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]: def stack_defaults(repo: Path, stack: str) -> dict[str, str]:
"""Conventional commands for the stack (lowest-priority source).""" """Conventional commands for the stack (lowest-priority source)."""
cfg = read_text(repo / "pyproject.toml") + read_text(
repo / ".pre-commit-config.yaml"
)
py = _prefix(repo) py = _prefix(repo)
pm = _pm(repo) pm = _pm(repo)
ruff = "ruff check ." if py == "python3 -m" else f"{py} ruff check ."
table: dict[str, dict[str, str]] = { table: dict[str, dict[str, str]] = {
"python": { "python": {"test": f"{py} pytest -q"},
"test": f"{py} pytest -q", "flutter": {"run": "flutter run", "test": "flutter test --reporter=compact"},
"lint": ruff if "ruff" in cfg else "pre-commit run --all-files", "node": {"test": f"{pm} test --silent"},
"coverage": f"{py} pytest -q --cov --cov-branch --cov-report=xml", "go": {"test": "go test ./..."},
}, "rust": {"test": "cargo test --quiet"},
"flutter": { "gradle": {"test": "./gradlew test --quiet"},
"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",
},
"godot": _godot_defaults(repo), "godot": _godot_defaults(repo),
"shell": {"lint": "shellcheck scripts/*.sh", "coverage": NO_COVERAGE},
} }
return table.get(stack, {}) return table.get(stack, {})
def _godot_defaults(repo: Path) -> dict[str, str]: def _godot_defaults(repo: Path) -> dict[str, str]:
"""Godot commands; the test runner comes from addons/ (GUT or gdUnit4).""" """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(): if (repo / "addons/gut/gut_cmdln.gd").is_file():
out["test"] = "godot --headless -s addons/gut/gut_cmdln.gd -gexit -glog=0" out["test"] = "godot --headless -s addons/gut/gut_cmdln.gd -gexit -glog=0"
elif (repo / "addons/gdUnit4").is_dir(): 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")) doc = doc_commands(read_text(repo / "CLAUDE.md"))
ci = ci_commands(repo) ci = ci_commands(repo)
tested = has_tests(repo, stacks) tested = has_tests(repo, stacks)
for key in ("run", "lint"): cmd, src = _pick(repo, "run", stack, doc, ci)
cmd, src = _pick(repo, key, stack, doc, ci) prop.values["run"] = _fmt(cmd or _run_default(repo, stack), prop, "run", src)
prop.values[key] = _fmt( for key in ("lint", "coverage", "coverage-gaps"):
cmd or (_run_default(repo, stack) if key == "run" else None), prop, key, src prop.values[key] = DROPPED
)
if not tested and stack in {"godot", "shell", "unknown"}: 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.values[key] = NO_TESTS
prop.notes.append("no tests detected: test chain proposed as n/a") prop.notes.append("no tests detected: test chain proposed as n/a")
return _order(prop) return _order(prop)
test, src = _pick(repo, "test", stack, doc, ci) test, src = _pick(repo, "test", stack, doc, ci)
prop.values["test"] = _fmt(test, prop, "test", src) prop.values["test"] = _fmt(test, prop, "test", src)
prop.values["test-changed"] = f"`{TEST_CHANGED}`" 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"] = "`<FILL IN>`"
prop.notes.append("coverage-gaps: unknown report path, fill in")
if not tested: if not tested:
prop.notes.append("no tests detected, but the stack normally has them") prop.notes.append("no tests detected, but the stack normally has them")
return _order(prop) return _order(prop)

View File

@ -105,4 +105,4 @@ def test_write_new_claude_md(repo: Path) -> None:
write(repo, "project.godot") write(repo, "project.godot")
assert main(["--repo", str(repo), "--write"]) == 0 assert main(["--repo", str(repo), "--write"]) == 0
assert (repo / "CLAUDE.md").is_file() assert (repo / "CLAUDE.md").is_file()
assert violations(repo)[0] == ["'- lint:' still holds a placeholder: <FILL IN>"] assert violations(repo)[0] == []

View File

@ -4,7 +4,7 @@ from __future__ import annotations
from pathlib import Path 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 from .conftest import write
@ -20,10 +20,10 @@ def test_quiet() -> None:
def test_python_defaults_and_launchers(tmp_path: Path) -> None: def test_python_defaults_and_launchers(tmp_path: Path) -> None:
write(tmp_path, "pyproject.toml", "[tool.ruff]\n") 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") write(tmp_path, "uv.lock")
assert stack_defaults(tmp_path, "python")["test"] == "uv run pytest -q" 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() (tmp_path / "uv.lock").unlink()
write(tmp_path, "poetry.lock") write(tmp_path, "poetry.lock")
assert stack_defaults(tmp_path, "python")["test"].startswith("poetry run") 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, "tests/test_a.py")
write(tmp_path, "main.py") write(tmp_path, "main.py")
prop = propose(tmp_path, ["python"]) 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["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.values["test-changed"] == "`scripts/test_changed.sh`"
assert prop.lines()[0].startswith("- run:") 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"): for stack in ("flutter", "node", "go", "rust", "gradle"):
prop = propose(tmp_path, [stack]) prop = propose(tmp_path, [stack])
assert prop.values["test"].startswith("`") assert prop.values["test"].startswith("`")
assert "coverage-gaps " in prop.values["coverage-gaps"] assert prop.values["coverage-gaps"] == DROPPED
write(tmp_path, "yarn.lock") write(tmp_path, "yarn.lock")
(tmp_path / "pnpm-lock.yaml").unlink() (tmp_path / "pnpm-lock.yaml").unlink()
assert propose(tmp_path, ["node"]).values["test"].startswith("`yarn") 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: def test_priority_doc_make_helper_npm_ci(tmp_path: Path) -> None:
write(tmp_path, "tests/a.txt") write(tmp_path, "tests/a.txt")
write(tmp_path, "package.json", '{"scripts": {"test": "x", "lint": "y"}}') write(tmp_path, "package.json", '{"scripts": {"test": "x", "lint": "y"}}')
assert propose(tmp_path, ["node"]).values["lint"] == "`npm run lint`" assert propose(tmp_path, ["node"]).values["lint"] == DROPPED
write(tmp_path, "scripts/lint.sh") assert propose(tmp_path, ["node"]).values["test"] == "`npm run test`"
assert propose(tmp_path, ["node"]).values["lint"] == "`scripts/lint.sh`" write(tmp_path, "scripts/test.sh")
write(tmp_path, "Makefile", "lint:\n\tx\n") assert propose(tmp_path, ["node"]).values["test"] == "`scripts/test.sh`"
assert propose(tmp_path, ["node"]).values["lint"] == "`make lint`" write(tmp_path, "Makefile", "test:\n\tx\n")
write(tmp_path, "CLAUDE.md", "Lint with `eslint . -v`.\n") assert propose(tmp_path, ["node"]).values["test"] == "`make test`"
assert propose(tmp_path, ["node"]).values["lint"] == "`eslint .`" 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") write(tmp_path, ".github/workflows/a.yml", "- run: go test -v ./...\n")
assert propose(tmp_path, ["go"]).values["test"] == "`go test ./...`" 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") write(tmp_path, "addons/gut/gut_cmdln.gd")
prop = propose(tmp_path, ["godot"]) prop = propose(tmp_path, ["godot"])
assert "gut_cmdln" in prop.values["test"] 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/gut/gut_cmdln.gd").unlink()
(tmp_path / "addons/gdUnit4").mkdir() (tmp_path / "addons/gdUnit4").mkdir()
assert "GdUnitCmdTool" in propose(tmp_path, ["godot"]).values["test"] 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"] == "`<FILL IN>`" assert propose(tmp_path, ["godot"]).values["test"] == "`<FILL IN>`"
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") write(tmp_path, "scripts/a.sh")
prop = propose(tmp_path, ["python"]) prop = propose(tmp_path, ["python"])
assert any("no tests detected, but" in n for n in prop.notes) assert any("no tests detected, but" in n for n in prop.notes)
write(tmp_path, "tests/a.txt") write(tmp_path, "tests/a.txt")
write(tmp_path, "Makefile", "coverage:\n\tx\n") write(tmp_path, "Makefile", "coverage:\n\tx\n")
shell = propose(tmp_path, ["shell"]) shell = propose(tmp_path, ["shell"])
assert shell.values["coverage"].startswith("`make coverage") assert shell.values["coverage"] == DROPPED
assert shell.values["coverage-gaps"] == "`<FILL IN>`" assert shell.values["coverage-gaps"] == DROPPED
assert any("fill in" in n for n in shell.notes)

View File

@ -168,7 +168,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -1,70 +1,5 @@
#!/bin/bash #!/bin/bash
# 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
# Fail if lcov line coverage drops below a threshold. # arguments, prints nothing and exits 0.
#
# 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 <lcov.info> <min_percent>
# ============================================================================
set -euo pipefail
SCRIPT_NAME="$(basename "$0")"
readonly SCRIPT_NAME
usage() {
echo "Usage: $SCRIPT_NAME <lcov.info> <min_percent>"
echo " Fails when line coverage in lcov.info is below min_percent."
exit 0 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

View File

@ -1,38 +1,5 @@
#!/bin/bash #!/bin/bash
# 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
# Fail if any file exceeds the shared 250-line cap. # nothing and exits 0. The checker library (file_length/) is kept, unused.
# exit 0
# 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 <file> [<file> ...] # 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") <file>... | --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 "$@"

View File

@ -31,9 +31,6 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: debug-statements - id: debug-statements
- id: name-tests-test
args: [--pytest-test-first]
exclude: ^sickdays/sickdays/tests/_[a-z_]+\.py$
- id: check-ast - id: check-ast
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [--fix=lf]
@ -41,11 +38,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh sickdays entry: scripts/check_subproject_scope.sh sickdays
@ -68,82 +60,16 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.2 rev: v0.17.2
hooks: hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format - id: ruff-format
types_or: [python, pyi] 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 - repo: local
hooks: hooks:
- id: pytest-coverage - id: pytest
name: pytest with coverage enforcement name: pytest
entry: scripts/run_subproject_tests.sh sickdays entry: scripts/run_subproject_tests.sh sickdays
language: script language: script
types: [python] types: [python]
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
stages: [pre-push] stages: [pre-push]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- --skip=*.json,*.lock,.git,__pycache__,.venv

View File

@ -171,7 +171,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -31,9 +31,6 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: detect-private-key - id: detect-private-key
- id: debug-statements - id: debug-statements
- id: name-tests-test
args: [--pytest-test-first]
exclude: ^sql_drills/sql_drills/tests/_[a-z_]+\.py$
- id: check-ast - id: check-ast
- id: mixed-line-ending - id: mixed-line-ending
args: [--fix=lf] args: [--fix=lf]
@ -41,11 +38,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh sql_drills entry: scripts/check_subproject_scope.sh sql_drills
@ -68,79 +60,16 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.2 rev: v0.17.2
hooks: hooks:
- id: ruff
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix, --show-fixes]
types_or: [python, pyi]
- id: ruff-format - id: ruff-format
types_or: [python, pyi] 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 - repo: local
hooks: hooks:
- id: pytest-coverage - id: pytest
name: pytest with coverage enforcement name: pytest
entry: scripts/run_subproject_tests.sh sql_drills entry: scripts/run_subproject_tests.sh sql_drills
language: script language: script
types: [python] types: [python]
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
stages: [pre-push] stages: [pre-push]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- --skip=*.json,*.lock,.git,__pycache__,.venv

View File

@ -178,7 +178,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -27,11 +27,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh sync_settings_ui 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' entry: bash -c 'cd sync_settings_ui && dart format --set-exit-if-changed lib test'
language: system language: system
pass_filenames: false pass_filenames: false
- id: flutter-analyze - id: flutter-test
name: flutter analyze name: flutter test
entry: bash -c 'cd sync_settings_ui && flutter analyze' entry: bash -c 'cd sync_settings_ui && flutter test'
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'
language: system language: system
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true

View File

@ -5,7 +5,6 @@ omit =
todo_hooks/tests/* todo_hooks/tests/*
[report] [report]
fail_under = 100
show_missing = true show_missing = true
exclude_lines = exclude_lines =
pragma: no cover pragma: no cover

View File

@ -164,7 +164,6 @@ omit = [
] ]
[tool.coverage.report] [tool.coverage.report]
fail_under = 100
show_missing = true show_missing = true
skip_covered = false skip_covered = false
exclude_lines = [ exclude_lines = [

View File

@ -33,22 +33,9 @@ repos:
- repo: local - repo: local
hooks: 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 - id: ts-config-test
name: ts_config fixture + factory tests, 100% coverage name: ts_config fixture + factory tests
entry: bash -c 'cd ts_config && pnpm coverage' entry: bash -c 'cd ts_config && pnpm test'
language: system language: system
pass_filenames: false pass_filenames: false
stages: [pre-push] stages: [pre-push]

View File

@ -7,7 +7,6 @@ export default defineConfig({
provider: "v8", provider: "v8",
// The same bar as ts_core and web_ui: the package every repo's lint // 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. // 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", environment: "node",
include: ["test/**/*.test.js"], include: ["test/**/*.test.js"],

View File

@ -8,7 +8,6 @@ export default defineConfig({
provider: "v8", provider: "v8",
// Same bar as design_system and web_ui: a shared layer several repos // 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. // 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 // No jsdom: this package is framework-free. `performance.now()` exists in
// plain node, which is the only browser-ish API it touches. // plain node, which is the only browser-ish API it touches.

View File

@ -2,25 +2,8 @@
# meta/scripts/check_subproject_scope.sh -- without that literal line every # meta/scripts/check_subproject_scope.sh -- without that literal line every
# hook here silently passes instead of running. # hook here silently passes instead of running.
repos: 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 - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.2 rev: v0.17.2
hooks: hooks:
- id: ruff
files: ^vmbox/
- id: ruff-format - id: ruff-format
files: ^vmbox/ 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/

View File

@ -35,11 +35,6 @@ repos:
- repo: local - repo: local
hooks: 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 - id: subproject-scope
name: subproject scope regex still matches name: subproject scope regex still matches
entry: scripts/check_subproject_scope.sh web_ui entry: scripts/check_subproject_scope.sh web_ui
@ -49,12 +44,6 @@ repos:
always_run: true always_run: true
pass_filenames: false 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 - id: web-ui-dist-fresh
name: committed dist/ matches src/ name: committed dist/ matches src/
# The tag ships a prebuilt dist/ (Vite does not transpile deps), so a # The tag ships a prebuilt dist/ (Vite does not transpile deps), so a
@ -67,9 +56,9 @@ repos:
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true
- id: web-ui-test-coverage - id: web-ui-test
name: vitest with the 100% coverage gate name: vitest
entry: bash -c 'cd web_ui && pnpm coverage' entry: bash -c 'cd web_ui && pnpm test'
language: system language: system
pass_filenames: false pass_filenames: false
require_serial: true require_serial: true

View File

@ -10,7 +10,6 @@ export default getViteConfig({
// A shared layer that several repos depend on does not get to be the // 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`: // least-tested code in the tree. `.astro` files are outside `include`:
// the component is markup, covered by RangeSlider.astro.test.ts. // the component is markup, covered by RangeSlider.astro.test.ts.
thresholds: { branches: 100, functions: 100, lines: 100, statements: 100 },
}, },
environment: "jsdom", environment: "jsdom",
globals: true, globals: true,