fix: require strictly increasing renewal scores
All checks were successful
技能自动化发布 / release (push) Successful in 6s

This commit is contained in:
2026-09-14 22:42:22 +08:00
parent df5f1b7223
commit c05b765b9d
6 changed files with 34 additions and 9 deletions

View File

@@ -50,7 +50,7 @@ def suggest(perf_records: list[sqlite3.Row]) -> tuple[str, str]:
# 全部 >= 80 且逐年上升(升序排 → 严格递增)
all_high = all(s >= PERFORMANCE_RENEW_MIN for s in scores)
upward = all(scores[i] <= scores[i + 1] for i in range(len(scores) - 1))
upward = all(scores[i] < scores[i + 1] for i in range(len(scores) - 1))
if all_high and upward:
return ("renew", f"近 3 年考核均 ≥ {PERFORMANCE_RENEW_MIN} 分且逐年上升")