Skip to content

Conversation

@prosdev
Copy link
Contributor

@prosdev prosdev commented Dec 25, 2025

Implements Issue #2: ExperienceRuntime Class

Changes

  • ExperienceRuntime class with sdk-kit integration
  • Experience registration and evaluation
  • Explainability with reasons and trace
  • Barrel exports for clean API
  • Bundler module resolution (matching sdk-kit)
  • Comprehensive test suite with 100% coverage

Tests

  • 40 tests covering all runtime functionality
  • 100% statement coverage
  • URL targeting (equals, contains, matches, empty rules)
  • Event emission and subscriptions
  • State management and cleanup
  • Pure function tests for evaluateUrlRule

Acceptance Criteria

  • Uses SDK from @lytics/sdk-kit
  • Implements init(), register(), evaluate()
  • Returns Decision with explainability
  • Emits events for observability
  • Types are exported
  • Test coverage > 80% (achieved 100%)

Closes #2

- Add ExperienceRuntime with sdk-kit integration
- Implement experience registration and evaluation
- Add explainability with reasons and trace
- Set up barrel exports for clean API
- Switch to Bundler module resolution

Closes #2
- 40 tests with 100% statement coverage
- Test all ExperienceRuntime methods
- Test URL targeting (equals, contains, matches, empty)
- Test evaluateUrlRule as pure function
- Test frequency tracking
- Test event emission and subscriptions
- Test state management and cleanup
@prosdev prosdev force-pushed the feat/experience-runtime branch from b46abda to 910ccdb Compare December 25, 2025 00:48
@prosdev prosdev merged commit 86819d7 into main Dec 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Phase 0] Task 2.1: Implement ExperienceRuntime Class

2 participants