fix(shot): plausible SECRET_KEY_BASE 62→68 chars — Phoenix cookie store requires >=64 bytes, so EVERY HTML render 500'd (the real cause of screenshot:null on all runs; /api/* unaffected which is why tiers passed). Default capture now lands the real registration page; verified: shot-fix-plausible run install=pass, screenshot.png 64132B real form, no hook needed
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
autonomic-bot
2026-06-11 05:55:43 +00:00
parent ce50f641cc
commit b98a471dac
2 changed files with 14 additions and 7 deletions

View File

@ -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)

View File

@ -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