fix: revalidate review context and serialize index retry

This commit is contained in:
2026-09-26 19:50:57 +08:00
parent b800481902
commit fe851c5f91
4 changed files with 35 additions and 3 deletions
+11
View File
@@ -175,6 +175,17 @@ def test_fixed_batch_membership_duplicate_queue_and_review(db, monkeypatch, sess
"comment": "人工核定", "reason": "核查纸质材料"}, "给 3 分")
action_id = prepared["pending_action"]["id"]
assert score.teacher_score is None
student = db.get(Student, first.student_id)
student.name = "身份变化"
db.commit()
with pytest.raises(HTTPException):
confirm(db, conversation, action_id)
assert score.teacher_score is None
student.name = "学生4"
db.commit()
prepared = execute(db, conversation, "prepare_review", {"score_id": score.id, "score": 3,
"comment": "人工核定", "reason": "核查纸质材料"}, "给 3 分")
action_id = prepared["pending_action"]["id"]
confirm(db, conversation, action_id)
db.refresh(score)
assert score.teacher_score == 3 and score.model_score is None and score.status == "reviewed"