feat(flags): the registry and a fail-closed Unleash client

Unleash holds flag state; it does not hold the list of flags. REGISTRY
is that list, because the SDK evaluates an unknown flag to False and
without a registry that is an undeclared False — indistinguishable from
a typo in a flag name.

Fail-closed throughout, and never raises: an unset UNLEASH_URL, an
unreachable server, a client that throws, an undeclared name — all
False. A flag layer that can 500 a request path or stop the API booting
is worse than one that is switched off.

Every flag defaults to False, with no per-flag override, because a flag
that defaults on is a kill switch and this is deliberately not one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015mWQnpye9F299NVRCCSRvj
This commit is contained in:
TudorandClaude Opus 5 committed 2026-08-23 10:52:55 +01:00
1 parent 01ccbb8e82
commit 7424cef7c6
4 files changed
+196 -1

No files matched your search

+1 -1
View File
@@ -12,4 +12,4 @@ slowapi==0.1.9
secure==0.3.0
typesense==0.21.0
numpy==1.26.4
UnleashClient==6.0.1