G0~G8 성과·동맹 측정 OS 작업 일괄 고정
8월 7일까지 워킹트리에만 남아 있던 미커밋 작업을 커밋한다. 여러 사본 폴더(worktree·clone)에 흩어져 있던 중간 스냅샷을 정리하기 전에 원본을 git 이력으로 고정하는 것이 목적이다. - contracts/routes/services: measurement, outcome_trajectory, rupture_repair, deliberate_practice, calibration_transfer, supervision_research, multimodal_alliance, continuous_improvement 계열 신규 모듈과 테스트 - infra/db/init: 07~16 마이그레이션(측정 기반~calibration transfer 실행) - apps/web: 세션 리뷰 카드·관리 화면·E2E 스펙 추가 - docs/ops: G0~G8 라이브 통합·배포·롤백 증거 문서와 evidence JSON/PNG - scripts: smoke·ledger·릴리스 에이전트·NAS 프리뷰 운영 스크립트 engine.public 로그 .bak과 apps/web/test-results 산출물은 커밋에서 제외했다.
This commit is contained in:
parent
93dd8f82d7
commit
16e791e044
390 changed files with 243188 additions and 499 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { expect, test, type Page } from "@playwright/test";
|
||||
import {
|
||||
completeAlliancePreCheckpoint,
|
||||
fetchAvailablePersona,
|
||||
signInAsAdmin,
|
||||
signInAsLearner,
|
||||
|
|
@ -176,6 +177,15 @@ async function expectResponseOk(response: { ok: () => boolean; text: () => Promi
|
|||
}
|
||||
}
|
||||
|
||||
async function expectTextTurnSettled(page: Page) {
|
||||
const input = page.getByLabel("학습자 발화 입력");
|
||||
await input.fill("후속 발화 준비 확인");
|
||||
await expect(page.getByRole("button", { name: "보내기" })).toBeEnabled({
|
||||
timeout: 90_000,
|
||||
});
|
||||
await input.fill("");
|
||||
}
|
||||
|
||||
async function setupSyntheticVoiceUiProbe(page: Page, transcript: string) {
|
||||
await page.addInitScript((text) => {
|
||||
type ProbeMessage = {
|
||||
|
|
@ -596,6 +606,7 @@ test.describe("session persistence", () => {
|
|||
|
||||
await page.goto(`/learn/session/${persona.code}`);
|
||||
await page.getByRole("button", { name: "회기 시작" }).click();
|
||||
await completeAlliancePreCheckpoint(page);
|
||||
await expect(page.locator(".sx-page.sx-page--active")).toBeVisible({ timeout: 15_000 });
|
||||
await expect(page).toHaveURL(/\/learn\/session\/[0-9a-f-]+$/i);
|
||||
const sessionId = new URL(page.url()).pathname.split("/").at(-1);
|
||||
|
|
@ -622,7 +633,30 @@ test.describe("session persistence", () => {
|
|||
const clientUtterance = page.locator(".sx-utt.is-client").first();
|
||||
await expect(clientUtterance).toBeVisible();
|
||||
await expect(clientUtterance).not.toContainText("답변을 준비 중입니다.");
|
||||
await expect(input).toBeEnabled({ timeout: 90_000 });
|
||||
await expectTextTurnSettled(page);
|
||||
|
||||
await expect
|
||||
.poll(
|
||||
async () => {
|
||||
const response = await page.request.get(`/api/sessions/${sessionId}/review`);
|
||||
await expectResponseOk(response);
|
||||
const candidate = (await response.json()) as SessionReviewResponse;
|
||||
return {
|
||||
learner: candidate.turns.some(
|
||||
(turn) => turn.speaker === "learner" && turn.text === learnerText,
|
||||
),
|
||||
client: candidate.turns.some(
|
||||
(turn) => turn.speaker === "client" && turn.text.trim().length > 0,
|
||||
),
|
||||
};
|
||||
},
|
||||
{
|
||||
timeout: 15_000,
|
||||
intervals: [100, 250, 500, 1_000],
|
||||
message: "SSE done 뒤 양쪽 발화가 DB-backed review에 보여야 한다",
|
||||
},
|
||||
)
|
||||
.toEqual({ learner: true, client: true });
|
||||
|
||||
const reviewResponse = await page.request.get(`/api/sessions/${sessionId}/review`);
|
||||
await expectResponseOk(reviewResponse);
|
||||
|
|
@ -654,6 +688,7 @@ test.describe("session persistence", () => {
|
|||
|
||||
await page.goto(`/learn/session/${persona.code}`);
|
||||
await page.getByRole("button", { name: "회기 시작" }).click();
|
||||
await completeAlliancePreCheckpoint(page);
|
||||
await expect(page.locator(".sx-page.sx-page--active")).toBeVisible({ timeout: 15_000 });
|
||||
await expect(page).toHaveURL(/\/learn\/session\/[0-9a-f-]+$/i);
|
||||
const sessionId = new URL(page.url()).pathname.split("/").at(-1);
|
||||
|
|
@ -679,7 +714,7 @@ test.describe("session persistence", () => {
|
|||
const clientUtterance = page.locator(".sx-utt.is-client").first();
|
||||
await expect(clientUtterance).toBeVisible();
|
||||
await expect(clientUtterance).not.toContainText("답변을 준비 중입니다.");
|
||||
await expect(input).toBeEnabled({ timeout: 90_000 });
|
||||
await expectTextTurnSettled(page);
|
||||
|
||||
const detailResponse = await page.request.get(`/api/sessions/${sessionId}`);
|
||||
await expectResponseOk(detailResponse);
|
||||
|
|
@ -723,6 +758,7 @@ test.describe("session persistence", () => {
|
|||
|
||||
await page.goto(`/learn/session/${persona.code}`);
|
||||
await page.getByRole("button", { name: "회기 시작" }).click();
|
||||
await completeAlliancePreCheckpoint(page);
|
||||
await expect(page.locator(".sx-page.sx-page--active")).toBeVisible({ timeout: 15_000 });
|
||||
await expect(page).toHaveURL(/\/learn\/session\/[0-9a-f-]+$/i);
|
||||
const sessionId = new URL(page.url()).pathname.split("/").at(-1);
|
||||
|
|
@ -803,6 +839,7 @@ test.describe("session persistence", () => {
|
|||
|
||||
await page.goto(`/learn/session/${persona.code}`);
|
||||
await page.getByRole("button", { name: "회기 시작" }).click();
|
||||
await completeAlliancePreCheckpoint(page);
|
||||
await page.getByRole("button", { name: "코칭" }).click();
|
||||
await expect(page.locator(".sx-page.sx-page--active")).toBeVisible({ timeout: 15_000 });
|
||||
await expect(page).toHaveURL(/\/learn\/session\/[0-9a-f-]+$/i);
|
||||
|
|
@ -833,7 +870,7 @@ test.describe("session persistence", () => {
|
|||
await expect(page.locator(".sx-utt.is-client.is-thinking")).toHaveCount(0, {
|
||||
timeout: 90_000,
|
||||
});
|
||||
await expect(input).toBeEnabled({ timeout: 90_000 });
|
||||
await expectTextTurnSettled(page);
|
||||
|
||||
const coachResponse = await coachResponsePromise;
|
||||
await expectResponseOk(coachResponse);
|
||||
|
|
@ -1034,6 +1071,7 @@ test.describe("session persistence", () => {
|
|||
|
||||
await page.goto(`/learn/session/${persona.code}`);
|
||||
await page.getByRole("button", { name: "회기 시작" }).click();
|
||||
await completeAlliancePreCheckpoint(page);
|
||||
await expect(page.locator(".sx-page.sx-page--active")).toBeVisible({ timeout: 15_000 });
|
||||
await expect(page).toHaveURL(/\/learn\/session\/[0-9a-f-]+$/i);
|
||||
const sessionId = new URL(page.url()).pathname.split("/").at(-1);
|
||||
|
|
@ -1042,6 +1080,11 @@ test.describe("session persistence", () => {
|
|||
const mic = page.locator(".sx-mic");
|
||||
await expect(mic).toBeEnabled();
|
||||
await mic.click();
|
||||
const voiceConsentDialog = page.getByRole("dialog", { name: "음성 입력을 사용하기 전에" });
|
||||
await expect(voiceConsentDialog).toBeVisible();
|
||||
await voiceConsentDialog
|
||||
.getByRole("button", { name: "동의하고 마이크 켜기" })
|
||||
.click();
|
||||
await expect
|
||||
.poll(async () => (await readVoiceUiProbe(page)).getUserMediaCalls, { timeout: 10_000 })
|
||||
.toBeGreaterThan(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue