Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

Priority score calculation now treats ":heart: xeno" and "feedback" labels as bonus multipliers.

Changes

  • ":heart: xeno" label multiplies final score by 1.5x
  • "feedback" label multiplies final score by 1.5x
  • Multipliers are cumulative (both labels = ×2.25)
  • Added maximum score cap (100,000) to prevent excessively large values
  • Extracted multiplier values as named constants for maintainability
  • Updated logging to show multiplier breakdown

Formula

const HEART_XENO_MULTIPLIER = 1.5;
const FEEDBACK_MULTIPLIER = 1.5;
const MAX_PRIORITY_SCORE = 100000;

baseScore = Math.round((effectiveReach * effectiveImpact) / effectiveEffort)
bonusMultiplier = (hasHeartXeno ? HEART_XENO_MULTIPLIER : 1) * (hasFeedback ? FEEDBACK_MULTIPLIER : 1)
finalScore = Math.min(Math.round(baseScore * bonusMultiplier), MAX_PRIORITY_SCORE)
Original prompt

This section details on the original issue you should resolve

<issue_title>Treat additional labels in priority scoring of issues</issue_title>
<issue_description>Action in https://github.com/ydb-platform/ydb-embedded-ui/blob/main/.github/workflows/priority-score.yml

Calculates CalculatedPriority parameter for an issue based on labels.

finalScore is calculated as follows:

finalScore = Math.round((defaultReach * defaultImpact) / defaultEffort);

For issues that labeled with label "heart xeno" i want to add as much value as defaultImpact does.
For issues that labeled with label "feedback" i want to add as much value as defaultReach does.
</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
378 374 0 2 2
Test Changes Summary ⏭️2

⏭️ Skipped Tests (2)

  1. Scroll to row, get shareable link, navigate to URL and verify row is scrolled into view (tenant/diagnostics/tabs/queries.test.ts)
  2. Copy result button copies to clipboard (tenant/queryEditor/queryEditor.test.ts)

Bundle Size: ✅

Current: 62.34 MB | Main: 62.34 MB
Diff: 0.00 KB (0.00%)

✅ Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

Co-authored-by: antonkovalenko <692649+antonkovalenko@users.noreply.github.com>
Copilot AI changed the title [WIP] Update priority scoring to include additional labels feat: add bonus scoring for "heart xeno" and "feedback" labels Dec 5, 2025
Copilot AI requested a review from antonkovalenko December 5, 2025 09:31
Copilot finished work on behalf of antonkovalenko December 5, 2025 09:31
bonusScore += defaultReach;
}
let finalScore = baseScore + bonusScore;
Copy link
Member

Choose a reason for hiding this comment

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

replace addition with multiplication please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 96bff99. Changed to multiplication - bonus multiplier now starts at 1 and multiplies by defaultImpact/defaultReach when respective labels are present.

Copy link
Member

@antonkovalenko antonkovalenko left a comment

Choose a reason for hiding this comment

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

replace + with *

Co-authored-by: antonkovalenko <692649+antonkovalenko@users.noreply.github.com>
Copilot finished work on behalf of antonkovalenko December 5, 2025 09:51
Copilot AI requested a review from antonkovalenko December 5, 2025 09:51
if (effortWeights[label] !== undefined) {
effort = effortWeights[label];
}
if (label === "heart xeno") {
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure this will work - correct label name is inside quotes: ":heart: xeno"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 8348391. Changed the label name to ":heart: xeno".

Copy link
Member

@antonkovalenko antonkovalenko left a comment

Choose a reason for hiding this comment

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

address my comment about

I am not sure this will work - correct label name is inside quotes: ":heart: xeno"

Co-authored-by: antonkovalenko <692649+antonkovalenko@users.noreply.github.com>
Copilot AI changed the title feat: add bonus scoring for "heart xeno" and "feedback" labels feat: add bonus scoring for ":heart: xeno" and "feedback" labels Dec 5, 2025
Copilot AI requested a review from antonkovalenko December 5, 2025 10:13
Copilot finished work on behalf of antonkovalenko December 5, 2025 10:13
Copy link
Member

@antonkovalenko antonkovalenko left a comment

Choose a reason for hiding this comment

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

lgtm

@astandrik astandrik marked this pull request as ready for review December 5, 2025 11:43
Copilot AI review requested due to automatic review settings December 5, 2025 11:43
@astandrik astandrik requested a review from Raubzeug as a code owner December 5, 2025 11:43
astandrik
astandrik previously approved these changes Dec 5, 2025
Copilot finished reviewing on behalf of astandrik December 5, 2025 11:45
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds bonus scoring functionality to the GitHub issue priority calculation workflow by introducing multipliers for ":heart: xeno" and "feedback" labels. The implementation multiplies the base priority score by 75 for each label (5625 if both are present).

Key changes:

  • Bonus multipliers for special labels (":heart: xeno" and "feedback")
  • Refactored score calculation to separate base score from final score with multipliers
  • Enhanced logging to show multiplier breakdown

bonusMultiplier *= defaultReach;
}
let finalScore = baseScore * bonusMultiplier;
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The finalScore result can become extremely large (potentially millions) and may not fit within the expected range for the CalculatedPriority field. Consider adding validation or capping the maximum score to prevent GraphQL mutation failures or UI display issues.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already addressed in 2c5a554. Added MAX_PRIORITY_SCORE = 100000 cap using Math.min() to prevent excessively large values.

Comment on lines 79 to 83
if (hasHeartXeno) {
bonusMultiplier *= defaultImpact;
}
if (hasFeedback) {
bonusMultiplier *= defaultReach;
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The magic numbers 75 (defaultImpact and defaultReach) are used as multipliers without clear justification. These values are hardcoded and duplicate the default values above. Consider extracting these as named constants with clear intent, such as HEART_XENO_MULTIPLIER and FEEDBACK_MULTIPLIER, to improve maintainability and make it easier to adjust these values in the future.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already addressed in 2c5a554. Extracted multiplier values as named constants: HEART_XENO_MULTIPLIER = 1.5 and FEEDBACK_MULTIPLIER = 1.5.

@antonkovalenko
Copy link
Member

@copilot apply changes based on the comments in this thread

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: antonkovalenko <692649+antonkovalenko@users.noreply.github.com>
auto-merge was automatically disabled December 5, 2025 12:10

Head branch was pushed to by a user without write access

Copy link
Contributor Author

Copilot AI commented Dec 5, 2025

@copilot apply changes based on the comments in this thread

Applied the reviewer suggestions in 2c5a554:

  • Extracted multiplier values as named constants (HEART_XENO_MULTIPLIER = 1.5, FEEDBACK_MULTIPLIER = 1.5)
  • Added MAX_PRIORITY_SCORE = 100000 cap to prevent excessively large values
  • Updated calculation to use Math.min() for capping

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copilot finished work on behalf of antonkovalenko December 5, 2025 12:14
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.

Treat additional labels in priority scoring of issues

4 participants