# Pre-commit hooks configuration for Predix
# See https://pre-commit.com for more information

repos:
  # ── Integration Tests (MANDATORY - MUST PASS before commit) ──────
  - repo: local
    hooks:
      - id: integration-tests
        name: Run Integration Tests (60 tests)
        entry: pytest
        language: system
        args:
          - test/integration/test_all_features.py
          - -v
          - --tb=short
          - --no-cov  # Skip coverage for speed (run separately if needed)
        pass_filenames: false
        always_run: true

  # ── Security Scanning (MANDATORY) ─────────────────────────────────
  - repo: local
    hooks:
      - id: bandit-security-scan
        name: Bandit Security Scan
        entry: bandit
        language: system
        args:
          - -r
          - rdagent/
          - -c
          - .bandit.yml
          - --severity-level=medium
          - --confidence-level=medium
          - --format=txt
        pass_filenames: false
        always_run: true
