Configuration Guide

KeyValue
StatusActive
OwnerQA Automation
Updated2026-03-26
ScopeEnvironment variables, site config, runtime behavior, and operational settings

This page explains how the repo is configured today. It focuses on the knobs people actually use in practice: site targeting, Slack and observability credentials, browser behavior, thresholds, and the configuration files that shape per-site behavior.

Configuration Layers

LayerWhere It LivesWhat It Controls
Environment variables.env, CI variables, shell overridescredentials, run targeting, feature toggles
Site configsrc/config/domains, selectors, content rules, thresholds
Playwright configplaywright.config.tsprojects, retries, workers, expect behavior
Data filesdata/incident history, recovery state, fix data
CI config.gitlab-ci.ymlschedules, manual jobs, suite orchestration

Most Important Environment Variables

Local Run And Targeting

VariableTypical Use
SITErun a single site or narrow the target set
CIenables CI-specific retries and worker behavior
DEBUG or Playwright debug flagslocal investigation work

Slack

VariablePurpose
SLACK_WEBHOOK_URLbasic webhook delivery
SLACK_BOT_TOKENricher bot posting, thread replies, uploads
SLACK_CHANNELprimary alerts channel
SLACK_REPORTS_CHANNELweekly and monthly report channel
SLACK_ALERTSenables CI alert posting paths

Grafana And OpenSearch

VariablePurpose
GRAFANA_URLdashboard and API base
GRAFANA_SERVICE_ACCOUNT_TOKENGrafana and OpenSearch proxy access
OPENSEARCH_URLOpenSearch proxy or direct endpoint, depending on task
OPENSEARCH_DIRECT_URLdirect OpenSearch write path for flows that should not go through Grafana proxy

AI And Investigation Workflows

VariablePurpose
ANTHROPIC_API_KEYAI-assisted workflows when needed
GITLAB_TOKENMR and GitLab automation paths
CI_PROJECT_IDGitLab integration and CI scripting

Grafana Visual Monitor

VariablePurpose
GRAFANA_MONITOR_USERviewer login for browser-based dashboard checks
GRAFANA_MONITOR_PASSWORDpaired password for visual monitor

Site Configuration

The core site behavior lives in src/config/site-selectors.ts and related config files. That is where per-site differences belong.

Config AreaWhat It Usually Contains
site identitysite name, base URL, host rules
consent modelCPEX or Didomi behavior
selectorsheader, nav, article, footer, premium and other surface selectors
content registry supportmodule coverage and seed URLs
mobile seed pathsstable starting points for mobile tiers
thresholdsperformance or timing expectations where needed
Consent TypeSites
CPEXBlesk, Auto, iSport, Opinio
DidomiE15, Reflex

This matters because consent handling is one of the most common reasons for false failures if a site configuration is wrong.

Playwright Runtime Configuration

The main runtime behavior is controlled in playwright.config.ts.

Setting AreaCurrent Intent
retriesmore forgiving in CI than local runs
workersconservative for live-site stability
projectsseparate desktop, mobile, visual, and other suite contexts
screenshot and trace policyoptimized for useful failure evidence without artifact bloat
expect screenshot settingsglobal defaults, with suite-level overrides where needed

Visual Baseline Configuration

Visual tests need special mention because they are baseline-driven and platform-specific.

TopicCurrent Reality
baseline locationtests/visual.spec.ts-snapshots/
CI baseline typeLinux screenshots
local baseline typeoften Darwin on macOS
update pathexplicit visual baseline update workflow
riskmissing baselines create configuration failures, not real regressions

Important Data Files

FilePurpose
data/fixes.jsonfix memory and healer outputs
data/failure-incidents.jsonknown incident registry
data/failure-history.jsonconfirmed recoveries and historical cause signals
data/slack-threads.jsonSlack thread tracking for recovery workflows
data/broken-links-history.jsonURL monitor history
data/content-test-history.jsoncontent regression history

Operational Credentials Model

There are two OpenSearch access patterns in practice:

Access PathWhy It Exists
Grafana datasource proxyconvenient for most human and dashboard-facing workflows
direct OpenSearch URLneeded for some write paths and admin tasks

The docs and scripts in this repo already distinguish between shared writer access and higher-privilege admin access. Keep that split intact.

Common Configuration Tasks

TaskWhere To Change It
add or update site selectorssrc/config/
tune mobile or performance thresholdssite config and relevant suite helpers
change Slack channelsenvironment variables and CI variables
change screenshot or trace behaviorplaywright.config.ts
add incident memorydata/failure-incidents.json and related services
change schedules.gitlab-ci.yml
AreaTypical Adjustment
single-site debuggingset SITE
noisy Slack testinguse a test channel or disable SLACK_ALERTS locally
Grafana validationset Grafana token and URL before dashboard scripts
OpenSearch retention workuse the correct admin-capable path, not the shared writer path
visual baseline workbe explicit about Linux versus Darwin snapshots

Configuration Advice

  • keep site-specific behavior in config, not scattered through tests
  • prefer stable semantic selectors before brittle style selectors
  • document unusual exceptions where they belong
  • treat CI variables as part of the product, not as hidden magic
  • when a workflow depends on historical data, make the data file and owner obvious
NeedGo To
suite purpose and schedulesTest Types
commands and scriptsCLI Reference
Slack, Grafana, OpenSearch, GitLabIntegrations
new sites and new suite wiringExtending the System