v0.0.40 — RLS bind-param hotfix, per-card auto-refresh dropdown
Released: 2026-05-04
Two-commit patch release on top of v0.0.39.
Fixes
Org-isolation RLS bind-param fix (v0.0.39 prod blocker)
If you turned on the v0.0.38 org-isolation scaffolding in production on v0.0.39, every authed request returned a 500. v0.0.40 is the fix — upgrade is required for any deployment that enabled the RLS opt-in.
What broke: v0.0.39 used Postgres SET LOCAL app.current_org_ids = :v to scope the per-request org context. Postgres' parser rejects driver-side bind parameters on SET LOCAL (it sees $1 and errors with syntax error at or near "$1"). The failing statement poisoned the asyncpg connection (InFailedSqlTransaction) and the next query on that connection 500'd — which, with connection pooling, meant a fast cascade across the fleet.
What landed in v0.0.40: all three call sites switched to the function form SELECT set_config('app.current_org_ids', :v, true). Identical semantics — the third argument (is_local) makes the setting transaction-scoped — and the function form happily accepts bind parameters. Static test pinned: the codebase now forbids both SET LOCAL ... = : and SET LOCAL ... = $ shapes alongside the existing plain-SET ban.
If you saw the 500-cascade symptom on v0.0.39 and want to confirm what hit you, look for asyncpg.exceptions.PostgresSyntaxError: syntax error at or near "$1" in the backend logs around the time org-isolation was enabled.
Features
Per-card auto-refresh dropdown
The runtime path for live-refreshing cards already shipped in v0.0.38 (card_config.refresh_interval_seconds, setInterval wiring, Live badge). v0.0.40 exposes the operator-facing knob: an Auto-refresh dropdown in the Edit Card sidebar with Off / 10s / 30s / 1m / 5m / 10m / 30m choices.
Empty = off (matches how the setInterval wiring + LiveBadge already gated on > 0). When you pick a non-zero interval, a small green pulsing hint appears next to the dropdown showing the Live badge will activate. No backend change — card_config.refresh_interval_seconds round-trip was already pinned by an integration test.
Upgrade notes
- No schema migration. No new tables, no enum changes, no new
.envkeys. - Self-Hosted upgrade is the standard
setup-customer.sh --upgradeflow — same as v0.0.39 except for the RLS hotfix landing. - Cloud / Enterprise tiers unchanged from v0.0.39. Phase 4 (billing, suspension actions, DNS-01 wildcard cert renewal) is still the next milestone.
- If you enabled org-isolation in production on v0.0.39 and rolled back to v0.0.38 because of the 500 cascade — v0.0.40 is safe to re-enable. Confirm by hitting
/api/healthand a couple of authed endpoints after upgrade.