Skip to content

Conversation

@jjroelofs
Copy link
Contributor

Summary

Updates AI Sorting plugin to use the consolidated Thompson Sampling API from the RL module after the getThompsonScoresWithWindow() method removal.

Changes Made

  • ✅ Updated AISorting::query() to call getThompsonScores() instead of getThompsonScoresWithWindow()
  • ✅ Passes optional $time_window_seconds parameter to maintain same functionality
  • ✅ Maintains backward compatibility and existing behavior
  • ✅ Cleaner API integration with RL module

Code Changes

// Before
$scores = $this->experimentManager->getThompsonScoresWithWindow(
  $experiment_uuid,
  $time_window_seconds
);

// After
$scores = $this->experimentManager->getThompsonScores(
  $experiment_uuid,
  $time_window_seconds
);

Dependencies

This change depends on dxpr/rl#6 being merged first, which consolidates the Thompson Sampling API.

Test Plan

  • Verify AI Sorting plugin still works with time windows
  • Confirm non-time-windowed sorting still functions
  • Check that all existing functionality is preserved
  • Validate coding standards compliance

Files Changed

  • src/Plugin/views/sort/AISorting.php - Updated API call

Closes #8

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Update AI Sorting plugin to use getThompsonScores() with optional
time window parameter instead of the removed getThompsonScoresWithWindow()
method for cleaner API integration.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jjroelofs jjroelofs merged commit 06e48e0 into 1.x Aug 11, 2025
0 of 2 checks 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.

Update to use consolidated Thompson Sampling API

2 participants