Skip to content

Spec compliance roadmap: bring ruby-sdk up to latest OpenFeature specification #220

@josecolella

Description

@josecolella

Summary

A gap analysis of the OpenFeature Ruby SDK (v0.5.1) against the latest OpenFeature specification reveals several areas where the SDK does not yet fully comply. This issue serves as the coordination point for bringing the ruby-sdk to full spec compliance, organized into three phases by priority.


Phase 1 — Stable / MUST Requirements ✅ COMPLETE

All MUST-level requirements from stable sections of the spec are now addressed.

Phase 2 — Hardening / SHOULD + InMemoryProvider

These are SHOULD-level requirements or enhancements to built-in providers that improve SDK robustness.

Phase 3 — Experimental Features


Progress

Phase Done Remaining
Phase 1 (MUST) 7/7
Phase 2 (SHOULD) 2/5 Logging, OTel, Multi-Provider
Phase 3 (Experimental) 1/2 Transaction Context

Merged PRs


Remaining Work

Phase 2

Phase 3


Already Compliant

Area Spec Sections
API Initialization 1.1 — singleton, provider mutation, domains, hooks, metadata, client creation
Client flag evaluation 1.2, 1.3 — 6 types × 2 suffixes, dynamic-context paradigm
Detailed evaluation 1.4 — EvaluationDetails with value, variant, reason, error_code, error_message, flag_metadata (with defaulting + immutability)
Provider duck type 2.1–2.5 — init, shutdown, metadata, NoOpProvider, InMemoryProvider
Evaluation Context 3.1, 3.2 — targeting_key, custom fields, 3-level merging
Hooks lifecycle 4.1–4.5 — before/after/error/finally, ordering, context mutation, hints, hook_data
Events 5.1–5.3 — 4 event types, 5 provider states, API+client handlers, handler removal, event details
Tracking 6.1–6.2 — Client#track, context merging, TrackingEventDetails, no-op for non-tracking providers
Shutdown 1.6 — API-level shutdown propagation to all providers
Provider Status 1.7 — Client provider_status accessor, NOT_READY/FATAL short-circuit
Error codes 8 defined
Reasons 9 defined

Key Files

File Purpose
lib/open_feature/sdk/api.rb API singleton — shutdown, provider registration
lib/open_feature/sdk/client.rb Client — evaluation, hooks, provider status, tracking
lib/open_feature/sdk/configuration.rb Provider lifecycle, events
lib/open_feature/sdk/hooks/hook_executor.rb Hook execution engine
lib/open_feature/sdk/hooks/hook_context.rb Hook context with hook_data support
lib/open_feature/sdk/tracking_event_details.rb Tracking event details (value + custom fields)
lib/open_feature/sdk/provider/in_memory_provider.rb Built-in test provider with context callbacks + events
lib/open_feature/sdk/provider/event_emitter.rb Provider event support
lib/open_feature/sdk/provider_state_registry.rb Provider state + event details tracking
spec/specification/ Spec-mapped compliance tests

🤖 Jose's AI agent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions