Skip to content

Conversation

@cabana8471-arch
Copy link
Contributor

@cabana8471-arch cabana8471-arch commented Jan 25, 2026

Summary

  • Fixed inconsistent priority calculation between MCP server and REST API when skipping features
  • Changed REST API skip endpoint from max_priority + 1000 to max_priority + 1

Problem

When skipping a feature via UI, priority would jump to very high numbers (e.g., 1003→2003→3003...). After 10 skips, priorities could reach 10,000+. New features would then inherit these inflated numbers.

Root Cause

Location Code Result
mcp_server/feature_mcp.py:345 max_priority + 1 ✓ Correct
server/routers/features.py:556 max_priority + 1000 ✗ Bug

Fix

Changed line 556 in server/routers/features.py from + 1000 to + 1.

Testing

  1. Create project with 5 features
  2. Skip feature Which license is this published under #3 via UI button
  3. Verify: priority should be 6, not 1005
  4. Create new feature
  5. Verify: priority should be 7, not 1006

Fixes #65

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved feature prioritization handling for queue management consistency.

✏️ Tip: You can customize this high-level summary in your review settings.

…nzyl#65)

The REST API skip endpoint was using max_priority + 1000, while the
MCP server used max_priority + 1. This caused priority inflation where
values could reach 10,000+ after multiple skips.

Changed to use + 1 for consistency with mcp_server/feature_mcp.py:345.

Fixes: leonvanzyl#65

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 25, 2026

Warning

Rate limit exceeded

@cabana8471-arch has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 5 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

A bug fix that modifies the skip_feature behavior to calculate priority using max_priority + 1 instead of max_priority + 1000, preventing skipped features from receiving unexpectedly high priority numbers that disrupted subsequent feature numbering.

Changes

Cohort / File(s) Summary
Priority Calculation Fix
server/routers/features.py
Adjusted skip_feature priority calculation from max_priority + 1000 to max_priority + 1 to prevent inflated integer assignments that interfered with new feature numbering sequences

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A skip once broke our numbers high,
With 1532 reaching the sky!
Now max + 1 keeps order true,
Features queue as they should do! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: fixing inconsistent priority increments when skipping features.
Linked Issues check ✅ Passed The PR directly addresses issue #65 by changing skip_feature behavior to use max_priority + 1 instead of max_priority + 1000, fixing the inconsistent priority calculation.
Out of Scope Changes check ✅ Passed All changes are within scope: only server/routers/features.py was modified to fix the priority increment issue, with no unrelated alterations.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@server/routers/features.py`:
- Around line 554-556: The priority assignment here uses a different conditional
structure than other functions; change the calculation of feature.priority
(currently using max_priority and addition) to the same conditional-first
pattern used in create_feature and create_features_bulk by setting
feature.priority to (max_priority.priority + 1) if max_priority else 1 so it
matches the MCP server pattern and the rest of this file; locate the
max_priority variable and the assignment to feature.priority in this block
(referencing the Feature model and the surrounding priority logic) and update it
accordingly.

Address CodeRabbit feedback - use consistent conditional pattern:
`(max_priority.priority + 1) if max_priority else 1`

This matches the pattern used in create_feature and create_features_bulk.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

Bug: when "skip (move to end) you get hight int which mess up new features number

1 participant