# Codecov Configuration
# https://docs.codecov.com/docs/codecov-yaml

coverage:
  status:
    project:
      default:
        target: auto
        threshold: 1%
    patch:
      default:
        target: 100%

# Exclude test artifacts and non-production code from coverage
ignore:
  - "**/*_test.go"
  - "**/testdata/**"
  - "**/mocks/**"
  - "**/test-data/**"
  - "tests/**"
  - "playwright/**"
  - "test-results/**"
  - "playwright-report/**"
  - "coverage/**"
  - "scripts/**"
  - "tools/**"
  - "docs/**"
  - "*.md"
  - "*.json"
  - "*.yaml"
  - "*.yml"

flags:
  backend:
    paths:
      - backend/
    carryforward: true

  frontend:
    paths:
      - frontend/
    carryforward: true

  # E2E coverage flag - tracks frontend code exercised by Playwright tests
  e2e:
    paths:
      - frontend/
    carryforward: true

component_management:
  individual_components:
    - component_id: backend
      paths:
        - backend/**
    - component_id: frontend
      paths:
        - frontend/**
    - component_id: e2e
      paths:
        - frontend/**
