MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _adjust_tier

Function _adjust_tier

uncommon_route/feedback.py:279–286  ·  view source on GitHub ↗
(current: str, signal: FeedbackSignal)

Source from the content-addressed store, hash-verified

277
278
279def _adjust_tier(current: str, signal: FeedbackSignal) -> str:
280 normalized = _normalize_tier(current)
281 idx = TIER_ORDER.index(normalized) if normalized in TIER_ORDER else 1
282 if signal == "weak":
283 return TIER_ORDER[min(idx + 1, len(TIER_ORDER) - 1)]
284 if signal == "strong":
285 return TIER_ORDER[max(idx - 1, 0)]
286 return normalized

Callers 6

test_weak_moves_upMethod · 0.90
test_ok_keeps_sameMethod · 0.90
submitMethod · 0.85

Calls 1

_normalize_tierFunction · 0.85

Tested by 5

test_weak_moves_upMethod · 0.72
test_ok_keeps_sameMethod · 0.72