Recommended pattern: one client per process per backend project, created at boot with
initFireweave / Init / Fireweave.init, shared, shut down once on exit.
There is no OpenFeature provider to register, wait on, or close.
Initialize
mode is required and never inferred. Init order: validate options → construct the matching adapter → adapter init → READY. Configuration and auth failures throw (kind Configuration). Reads on the returned client never throw.
- Node
- Web
- Python
- Go
- Java
initFireweave awaits runtime.initialize(). There is no lazyReady. Observe runtime.getState() if you construct the runtime yourself.initFireweave / Init before treating values as live. On web and Swift, also check that the runtime is not STALE if a zero-ramp and a failed prefetch would look the same to you.
Why mode cannot be inferred
With inference, a missing or mistyped credential in production silently became local evaluation. Every control point served its seeded or caller default, nothing raised, and the boot log was green. The observable symptom was a feature that never ramped, indistinguishable from a rollout nobody started.
remote without credentials is a boot error. local in production is something a human typed.
Shutdown
Shutdown belongs to the runtime. It is idempotent. Default deadline: 10 s.
v1 reads are side-effect free. There is no client exposure queue to drain before close.
Web unload prefers
keepalive fetch so it can send Authorization: Bearer. sendBeacon cannot set that header and is a fallback.After shutdown
- Evaluations return defaults with
AlreadyClosed. - A shut-down runtime is terminal.
initialize()after shutdown fails withAlreadyClosed. Construct a new client.
Concurrency
Runtimes and clients are safe for concurrent evaluation on one instance. Evaluations racing shutdown either complete or observeAlreadyClosed — never a crash.
Next
Configuration and auth
Required mode, credentials,
fw_public_Troubleshooting
Defaults, STALE, AlreadyClosed

