codecov:
  max_report_age: off
  require_ci_to_pass: true

bundle_analysis:
  status: warning
  warning_threshold: 1%

comment:
  require_bundle_changes: bundle_increase
  bundle_change_threshold: 50Kb
  require_changes: 'coverage_drop OR uncovered_patch'

coverage:
  status:
    patch: false
    project:
      default:
        threshold: 0.5

github_checks:
  annotations: false

flags:
  backend-unit:
    carryforward: true
  backend-integration:
    carryforward: true
  backend-integration-postgres:
    carryforward: true
  nodes-unit:
    carryforward: true
  frontend:
    carryforward: true
  frontend-e2e:
    carryforward: true
  python:
    carryforward: true

component_management:
  default_rules:
    statuses:
      - type: project
        target: auto
        branches:
          - '!master'
  individual_components:
    - component_id: backend_packages
      name: Backend
      paths:
        - packages/cli/**
        - packages/core/**
        - packages/workflow/**
        - packages/extensions/**
        - packages/@n8n/api-types/**
        - packages/@n8n/backend-common/**
        - packages/@n8n/backend-test-utils/**
        - packages/@n8n/cli/**
        - packages/@n8n/client-oauth2/**
        - packages/@n8n/config/**
        - packages/@n8n/constants/**
        - packages/@n8n/crdt/**
        - packages/@n8n/db/**
        - packages/@n8n/decorators/**
        - packages/@n8n/di/**
        - packages/@n8n/engine/**
        - packages/@n8n/errors/**
        - packages/@n8n/expression-runtime/**
        - packages/@n8n/extension-sdk/**
        - packages/@n8n/imap/**
        - packages/@n8n/local-gateway/**
        - packages/@n8n/permissions/**
        - packages/@n8n/scan-community-package/**
        - packages/@n8n/syslog-client/**
        - packages/@n8n/task-runner/**
        - packages/@n8n/task-runner-python/**
        - packages/@n8n/tournament/**
        - packages/@n8n/workflow-sdk/**
    - component_id: frontend_packages
      name: Frontend
      paths:
        - packages/frontend/**
        - packages/@n8n/codemirror-lang/**
        - packages/@n8n/codemirror-lang-html/**
        - packages/@n8n/codemirror-lang-sql/**
    - component_id: nodes_packages
      name: Nodes
      paths:
        - packages/node-dev/**
        - packages/nodes-base/**
        - packages/@n8n/json-schema-to-zod/**
      statuses:
        - type: project
          target: auto
          threshold: 0% # Enforce: Coverage must not decrease
    - component_id: ai_packages
      name: AI
      paths:
        - packages/@n8n/agents/**
        - packages/@n8n/ai-node-sdk/**
        - packages/@n8n/ai-utilities/**
        - packages/@n8n/ai-workflow-builder.ee/**
        - packages/@n8n/chat-hub/**
        - packages/@n8n/computer-use/**
        - packages/@n8n/instance-ai/**
        - packages/@n8n/mcp-browser/**
        - packages/@n8n/mcp-browser-extension/**
        - packages/@n8n/nodes-langchain/**
    - component_id: utils_packages
      name: Utils
      paths:
        - packages/@n8n/create-node/**
        - packages/@n8n/node-cli/**
        - packages/@n8n/utils/**

ignore:
  # Test source
  - (?s:.*/[^\/]*\.spec\.ts.*)\Z
  - (?s:.*/[^\/]*\.test\.ts.*)\Z
  - (?s:.*/[^\/]*e2e[^\/]*\.ts.*)\Z
  - (?s:.*/test_[^\/]*\.py.*)\Z
  - (?s:.*/__tests__/.*)\Z
  - (?s:.*/__mocks__/.*)\Z
  # Non-product source
  - (?s:.*/[^\/]*\.stories\.(ts|vue).*)\Z
  - (?s:.*\.d\.ts.*)\Z
  - (?s:.*/[^\/]*\.config\.(ts|js|mjs).*)\Z
  - (?s:.*/migrations/(postgresdb|sqlite|mysqldb)/.*\.ts.*)\Z
  - (?s:.*/scripts/.*)\Z
  # Test/build infrastructure packages
  - (?s:.*/packages/testing/.*)\Z
  - (?s:.*/packages/@n8n/(benchmark|eslint-config|eslint-plugin-community-nodes|stylelint-config|typescript-config|vitest-config)/.*)\Z
