Skip to content

Bugfix/remove reward metric key#2767

Closed
danoswaltCL wants to merge 9 commits into
release/6.2from
bugfix/remove-reward-metric-key
Closed

Bugfix/remove reward metric key#2767
danoswaltCL wants to merge 9 commits into
release/6.2from
bugfix/remove-reward-metric-key

Conversation

@danoswaltCL

@danoswaltCL danoswaltCL commented Dec 2, 2025

Copy link
Copy Markdown
Collaborator

#2741

  • Removes Reward Metric views from UI
  • Removes unique name constraints on Mooclet Experiments
  • Removes /log based reward system and all tie-ins to upgrade metrics systems
  • Removes the automatic metric query creation
  • Adds a /reward endpoint to client controller, which will lookup experiment info and do a more direct call to mooclet
  • Adds a sendReward() endpoint to TS client lib
  • Updates quicktest to add rewards and some more readable errors

This comment was marked as outdated.

@danoswaltCL danoswaltCL changed the base branch from dev to release/6.2 December 2, 2025 20:29
@danoswaltCL danoswaltCL requested a review from Copilot December 2, 2025 20:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 37 out of 39 changed files in this pull request and generated 9 comments.

Files not reviewed (2)
  • clientlibs/js/package-lock.json: Language not supported
  • types/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


const result = await service.sendReward(mockUser, request, mockLogger as any);

expect(result.message).toBe('Reward sent to mooclet successfuly.');

Copilot AI Dec 2, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in test assertion: "successfuly" should be "successfully".

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Comment thread backend/packages/Upgrade/test/unit/services/MoocletRewardsService.test.ts Outdated
Comment thread backend/packages/Upgrade/test/unit/services/MoocletRewardsService.test.ts Outdated
Comment thread backend/packages/Upgrade/src/api/services/MoocletRewardsService.ts
Comment on lines +244 to +250
const whereClauseParams = {
enrolling: 'enrolling',
assign: 'assign',
context,
site,
target,
};

Copilot AI Dec 2, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whereClauseParams object includes an assign: 'assign' parameter that is not used in the SQL query. This parameter appears in the params but is not referenced in the whereExperimentsClause string. This should be removed to avoid confusion.

Remove the unused parameter:

const whereClauseParams = {
  enrolling: 'enrolling',
  context,
  site,
  target,
};

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Comment thread backend/packages/Upgrade/test/unit/services/MoocletRewardsService.test.ts Outdated
Comment thread backend/packages/Upgrade/src/api/services/MoocletRewardsService.ts Outdated
Comment on lines +237 to +248
async function doSendRewardByExperimentId(client: UpgradeClient) {
try {
const response = await client.sendReward({
rewardValue,
experimentId,
});
console.log('\n[Send Reward by ExperimentId response]:', JSON.stringify(response));
} catch (error) {
logAxiosError('Send Reward by ExperimentId', error);
}
}

This comment was marked as off-topic.

Copilot AI commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

@danoswaltCL I've opened a new pull request, #2768, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

@danoswaltCL I've opened a new pull request, #2769, to work on those changes. Once the pull request is ready, I'll request review from you.

@danoswaltCL danoswaltCL force-pushed the bugfix/remove-reward-metric-key branch from f58b02e to 1b44e0d Compare December 2, 2025 21:06
@danoswaltCL danoswaltCL closed this Dec 2, 2025
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.

3 participants