From b98a471dac4743e62bd91e6ad44ae7a6aa44e578 Mon Sep 17 00:00:00 2001 From: autonomic-bot Date: Thu, 11 Jun 2026 05:55:43 +0000 Subject: [PATCH] =?UTF-8?q?fix(shot):=20plausible=20SECRET=5FKEY=5FBASE=20?= =?UTF-8?q?62=E2=86=9268=20chars=20=E2=80=94=20Phoenix=20cookie=20store=20?= =?UTF-8?q?requires=20>=3D64=20bytes,=20so=20EVERY=20HTML=20render=20500'd?= =?UTF-8?q?=20(the=20real=20cause=20of=20screenshot:null=20on=20all=20runs?= =?UTF-8?q?;=20/api/*=20unaffected=20which=20is=20why=20tiers=20passed).?= =?UTF-8?q?=20Default=20capture=20now=20lands=20the=20real=20registration?= =?UTF-8?q?=20page;=20verified:=20shot-fix-plausible=20run=20install=3Dpas?= =?UTF-8?q?s,=20screenshot.png=2064132B=20real=20form,=20no=20hook=20neede?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/plausible/functional/test_health_check.py | 6 ++++-- tests/plausible/recipe_meta.py | 15 ++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/plausible/functional/test_health_check.py b/tests/plausible/functional/test_health_check.py index 7de3b3e..c2db0a3 100644 --- a/tests/plausible/functional/test_health_check.py +++ b/tests/plausible/functional/test_health_check.py @@ -12,8 +12,10 @@ from harness import http as harness_http # noqa: E402 def test_plausible_root_serves(live_app): """GET /api/health → 200 (clickhouse+postgres ready). - `/` itself 500s via auth_controller under DISABLE_AUTH, so it is NOT a - reliable health probe; the dedicated /api/health endpoint is. + `/` is NOT a reliable health probe (500s during datastore init; 302s to + /register once ready — and 500'd permanently under the pre-2026-06-11 + 62-char SECRET_KEY_BASE, see recipe_meta.EXTRA_ENV); the dedicated + /api/health endpoint is. """ url = f"https://{live_app}/api/health" status, _ = harness_http.retry_http_get(url, expect_status=(200,), max_wait=60, interval=3) diff --git a/tests/plausible/recipe_meta.py b/tests/plausible/recipe_meta.py index ff77f0a..9921646 100644 --- a/tests/plausible/recipe_meta.py +++ b/tests/plausible/recipe_meta.py @@ -7,9 +7,10 @@ HEALTH_OK = (200,) # `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. 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 `/`.] +# once both datastores are ready, so it is a true readiness probe; `/` is unreliable (500s during init; +# 302s to /register once ready — and with the pre-2026-06-11 62-char SECRET_KEY_BASE every HTML render +# 500'd permanently, see EXTRA_ENV). 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 @@ -17,8 +18,12 @@ HTTP_TIMEOUT = 1200 EXTRA_ENV = { "DISABLE_AUTH": "true", "DISABLE_REGISTRATION": "true", - # 64-char stable value for CI — plausible (Phoenix) requires >= 64 chars - "SECRET_KEY_BASE": "ccciplausibletestkeybase64charsexactlyforCIephemeral4567890123", + # Stable CI value, 68 chars — Phoenix's cookie session store requires >= 64 BYTES and raises + # `ArgumentError ... at least 64 bytes` → HTTP 500 on EVERY page render (HTML routes only; + # /api/* never touches the cookie store, so health + event tests were unaffected) if it is + # shorter. The previous value was 62 chars, which is why every page (and the app screenshot) + # 500'd while the API tiers all passed (phase-shot root cause, 2026-06-11). + "SECRET_KEY_BASE": "ccciplausibletestkeybase64charsexactlyforCIephemeralrun4567890123456", } # The upgrade tier defaults its base to recipe_versions[-2]. For the 3.1.0 upgrade PR the