주기 회기 검증 격리 보강
This commit is contained in:
parent
9a7dd98cb6
commit
4cd354881f
10 changed files with 181 additions and 69 deletions
|
|
@ -623,6 +623,8 @@ test.describe("session review", () => {
|
|||
...response.turns[0],
|
||||
text: "저는 [NAME]이고 [ORG]에서 상담받고 있어요.",
|
||||
};
|
||||
response.summary =
|
||||
"평가 AI는 [NAME]가 [ORG]에서 보인 조심스러운 반응을 분석했습니다.";
|
||||
if (!response.caseWorksheet) {
|
||||
throw new Error("filled review fixture must include a worksheet");
|
||||
}
|
||||
|
|
@ -653,6 +655,12 @@ test.describe("session review", () => {
|
|||
"저는 익명 내담자이고 소속 기관에서 상담받고 있어요.",
|
||||
);
|
||||
await expect(transcript).not.toContainText("[NAME]");
|
||||
const summary = page.locator(".sr-summary");
|
||||
await expect(summary).toContainText(
|
||||
"평가 AI는 익명 내담자가 소속 기관에서 보인 조심스러운 반응을 분석했습니다.",
|
||||
);
|
||||
await expect(summary).not.toContainText("[NAME]");
|
||||
await expect(summary).not.toContainText("[ORG]");
|
||||
await openReviewTab(page, "워크시트");
|
||||
await expect(page.locator(".sr-ws-evidence").filter({ hasText: "[NAME]" })).toBeVisible();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@ function replacePlaceholderWithNaturalParticle(
|
|||
label: string,
|
||||
) {
|
||||
const batchim = hasHangulBatchim(label);
|
||||
let next = text;
|
||||
// `이고`를 단일 조사 `이`보다 먼저 처리하지 않으면
|
||||
// `[NAME]이고`가 `익명 내담자가고`로 깨진다.
|
||||
let next = text.split(`${placeholder}이고`).join(`${label}이고`);
|
||||
for (const [variants, particle] of [
|
||||
[["으로", "로"], batchim ? "으로" : "로"],
|
||||
[["은", "는"], batchim ? "은" : "는"],
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ export function displayReviewSummary(summary: string) {
|
|||
) {
|
||||
return "저장된 축어록은 확인했지만 deep-loop 평가 AI 산출물을 표시하지 못했습니다. AI 평가 재시도가 필요합니다.";
|
||||
}
|
||||
return summary;
|
||||
return displayPiiSafeText(summary);
|
||||
}
|
||||
|
||||
export function displayEvaluationRetryError(message: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue