feat(2): Q4.7 plausible — §4.3 event-tracking functional tests + PARITY.md; /api/health readiness probe
- functional/test_event_tracking.py: 2 recipe-specific tests (P3) — register site → POST /api/event (browser UA) → read back from clickhouse events_v2. test_pageview_event_roundtrip asserts stored name/pathname/hostname; test_custom_event_roundtrip asserts a custom-named goal lands under that name. - test_health_check.py: probe /api/health (200, asserts clickhouse+postgres+sites_cache ready) — fixes the broken/unterminated docstring from the prior WIP edit; / is unreliable (500 init / 302 ready). - recipe_meta.py: HEALTH_PATH=/api/health, HEALTH_OK=(200,); comment corrected. - PARITY.md: P2 vacuous (no recipe-maintainer corpus); documents P3/P4 coverage. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -1,12 +1,15 @@
|
||||
# Per-recipe harness config for plausible (Phase 2 Q4.7 — analytics platform).
|
||||
# Requires SECRET_KEY_BASE (64+ char), DISABLE_AUTH, DISABLE_REGISTRATION env vars to deploy.
|
||||
# We use a fixed CI value for SECRET_KEY_BASE — safe for ephemeral per-run deploys.
|
||||
HEALTH_PATH = "/"
|
||||
HEALTH_OK = (200, 302)
|
||||
HEALTH_PATH = "/api/health"
|
||||
HEALTH_OK = (200,)
|
||||
# plausible's app starts before its clickhouse events DB is ready (the recipe's `app` depends_on lists
|
||||
# `events_db` but the service is named `plausible_events_db`, so swarm applies no ordering) and returns
|
||||
# 500 until clickhouse + DB migrations finish — several minutes on a cold deploy. Give a wide HTTP
|
||||
# window so the health poll waits out that init (it serves 302 once ready). [v1 failed at HTTP_TIMEOUT=600.]
|
||||
# 500 until clickhouse + DB migrations finish — several minutes on a cold deploy. The dedicated
|
||||
# /api/health endpoint returns 200 with {"clickhouse":"ok","postgres":"ok","sites_cache":"ok"} only
|
||||
# once both datastores are ready, so it is a true readiness probe; `/` is unreliable (500s during init,
|
||||
# 302s once ready, so it cannot distinguish "not ready" from "ready"). Give a wide HTTP window so the
|
||||
# health poll waits out that init. [v1 failed at HTTP_TIMEOUT=600 polling `/`.]
|
||||
DEPLOY_TIMEOUT = 1200
|
||||
HTTP_TIMEOUT = 1200
|
||||
|
||||
|
||||
Reference in New Issue
Block a user