개선관리 요구사항과 Google 로그인을 완료
This commit is contained in:
parent
cc0a15b7c6
commit
2a39636163
112 changed files with 10166 additions and 527 deletions
|
|
@ -84,7 +84,8 @@ class EvaluationPersistenceMappingTest(unittest.IsolatedAsyncioTestCase):
|
|||
case_id="eval-mask-case",
|
||||
card=card,
|
||||
state=state,
|
||||
learner_text="오늘 상담에서 집중해 보겠습니다.",
|
||||
learner_text="윤찬 상담자가 서연 씨의 이야기에 집중해 보겠습니다.",
|
||||
learner_identity="윤찬",
|
||||
)
|
||||
|
||||
messages = evaluator.build_fast_messages(
|
||||
|
|
@ -96,6 +97,10 @@ class EvaluationPersistenceMappingTest(unittest.IsolatedAsyncioTestCase):
|
|||
self.assertNotIn("김서연", blob)
|
||||
self.assertNotIn("한신대학교", blob)
|
||||
self.assertNotIn("상담심리학과", blob)
|
||||
self.assertNotIn("윤찬", blob)
|
||||
self.assertNotIn("서연 씨", blob)
|
||||
self.assertIn("[COUNSELOR]", blob)
|
||||
self.assertIn("[CLIENT]", blob)
|
||||
self.assertIn("[NAME]", blob)
|
||||
self.assertIn("[ORG]", blob)
|
||||
|
||||
|
|
@ -314,6 +319,31 @@ class EvaluationPersistenceMappingTest(unittest.IsolatedAsyncioTestCase):
|
|||
for masked in ("[NAME]", "[ORG]", "[PHONE]"):
|
||||
self.assertIn(masked, blob)
|
||||
|
||||
def test_session_evaluation_write_role_tokenizes_known_identities(self) -> None:
|
||||
result = evaluator.SessionEvaluation(
|
||||
session_id="session-role-privacy",
|
||||
stage="정리",
|
||||
scope="session_end",
|
||||
turns_evaluated=2,
|
||||
strengths=["윤찬 상담자가 서연의 마음을 반영했다."],
|
||||
improvements=["서연 씨의 반응을 윤찬이 한 번 더 기다린다."],
|
||||
supervisor_rationale="윤찬과 서연의 상호작용을 확인했다.",
|
||||
)
|
||||
|
||||
write = session_persistence.SessionEvaluationWrite.from_result(
|
||||
session_id="session-role-privacy",
|
||||
learner_id="learner-role-privacy",
|
||||
result=result,
|
||||
counselor_identity="윤찬",
|
||||
client_identity="서연(가명) · 고2 · 우울/자살사고",
|
||||
)
|
||||
blob = json.dumps(write.payload, ensure_ascii=False)
|
||||
|
||||
self.assertNotIn("윤찬", blob)
|
||||
self.assertNotIn("서연", blob)
|
||||
self.assertIn("[COUNSELOR]", blob)
|
||||
self.assertIn("[CLIENT]", blob)
|
||||
|
||||
def test_session_evaluation_write_from_error_preserves_fallback_shape(self) -> None:
|
||||
write = session_persistence.SessionEvaluationWrite.from_error(
|
||||
session_id="session-1",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue