fix: restore stage-based Alpha check classification

This commit is contained in:
yuxuanhui
2026-09-12 22:34:14 +08:00
parent 45eb4c3a17
commit c18960946b
13 changed files with 253 additions and 25 deletions
+8 -2
View File
@@ -1,6 +1,12 @@
"""Classify platform evidence without discarding unknown checks or inferring eligibility."""
def check_result(check):
"""Normalize known upstream result casing without rewriting the raw evidence."""
value = check.get("result") if isinstance(check, dict) else None
return value.upper() if isinstance(value, str) else None
def is_submission_limit(check):
"""Recognize only the confirmed account-limit check; unknown names remain Alpha checks."""
return isinstance(check, dict) and check.get("name") == "REGULAR_SUBMISSION"
@@ -16,8 +22,8 @@ def split_checks(checks):
def submission_limits(checks):
"""Summarize the observed limit, never the account's current allowance or reset time."""
_, limits = split_checks(checks)
status = "blocked" if any(c.get("result") == "FAIL" for c in limits) else (
"not_blocked" if limits and all(c.get("result") == "PASS" for c in limits) else "unknown"
status = "blocked" if any(check_result(c) == "FAIL" for c in limits) else (
"not_blocked" if limits and all(check_result(c) == "PASS" for c in limits) else "unknown"
)
return {"status": status, "checks": limits,
"meaning": "仅反映缓存观测时的提交限制,不代表当前额度或正式提交资格"}