Phase 01 · v1.0 · Shipped 2026-05-19

Config validation gate.

Per-domain config fails fast on cross-domain URL bugs before any measurement run. A copy-paste host mistake (e.g. autorevue section pointing at auto.cz) surfaces as a clear config error instead of later masquerading as "tracking broken".

Milestonev1.0 ScopeBIF-05 ModeCLI validator, all-technical
Phase boundary

Validate config shape; not a config-authoring UI.

The check is invocable as a documented script (npm run config:check) using only tsc-typed code with no new ESLint dependency. Validation of existing config shape only — NOT a config authoring UI and NOT schema redesign.

Decisions

Domain-match semantics & invocation.

Reference domain

Registrable domain (eTLD+1) of homepage URL.

The top JSON key is NOT the host (abcwww.abicko.cz). Domain identity derived from URLs via the built-in URL API (audit flagged deprecated url-parse — do not add it here).

Fields checked: homepage, nextpage, gallery, part, player. selectors excluded (CSS/XPath, not URLs).

Strictness: same eTLD+1; tolerate subdomain differences (www., bare, m.). Different eTLD+1 is the error this phase catches. Missing field → silent skip. Non-parseable → reported.

Invocation

Standalone npm run config:check + prestart gate.

Validates every file in data/ and data/config-per-domain/ by default; accepts an optional single-file path argument. Wired to prestart so production runs fail fast.

Success criteria

Behavior verified by test fixtures.

  1. Running config-check on a config whose section URL host doesn't match the section's domain exits non-zero with a message naming the offending section, key, and bad host.
  2. Running config-check on all 13 current valid configs passes with no error.
  3. Check is invocable as npm run config:check and uses only tsc-typed code with no new ESLint dependency.
Files

What shipped.

newscripts/config-check.tsCLI validator
modpackage.jsonconfig:check script + prestart wiring
newtests/config-check.test.js
← BackPlans overview Next →Phase 2 · Missing-row visibility