fix defects D1-D12 batch 1, structured envelope, saf gates + ops kill-switches

This commit is contained in:
Oleksandr Kozachuk
2026-07-13 12:56:32 +02:00
parent f1578cbd99
commit 6e5abf3d2c
14 changed files with 770 additions and 214 deletions
+30 -40
View File
@@ -1,4 +1,7 @@
# Pre-commit hooks configuration for Fjerkroa Bot
#
# Formatter/linter/type-checker run from the uv-managed project env so
# hook versions == pyproject dev-dependency versions (no pin drift).
repos:
# Built-in hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -13,49 +16,36 @@ repos:
- id: check-case-conflict
- id: check-merge-conflict
- id: debug-statements
- id: requirements-txt-fixer
# Black code formatter
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
language_version: python3
args: [--line-length=140]
# isort import sorter
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [--profile=black, --line-length=140]
# Flake8 linter
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
args: [--max-line-length=140]
# Bandit security scanner - disabled due to expected pickle/random usage
# - repo: https://github.com/pycqa/bandit
# rev: 1.7.5
# hooks:
# - id: bandit
# args: [-r, fjerkroa_bot]
# exclude: tests/
# MyPy type checker
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
hooks:
- id: mypy
additional_dependencies: [types-toml, types-requests, types-setuptools]
args: [--config-file=pyproject.toml, --ignore-missing-imports]
# Local hooks using Makefile
# Project-env tools (single version source: pyproject.toml)
- repo: local
hooks:
- id: black
name: black
entry: uv run black
language: system
types: [python]
- id: isort
name: isort
entry: uv run isort
language: system
types: [python]
- id: flake8
name: flake8
entry: uv run flake8
language: system
types: [python]
- id: mypy
name: mypy
entry: uv run mypy fjerkroa_bot tests
language: system
pass_filenames: false
- id: trace
name: Spec coverage (trace)
entry: uv run python tools/trace.py
language: system
pass_filenames: false
always_run: true
- id: tests
name: Run tests
entry: make test-fast