vignette/docs/ops/outcome-os-g4-g5-production-caller-evidence-2026-08-07.md
Yun Chan 16e791e044 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 산출물은 커밋에서 제외했다.
2026-08-08 01:30:53 +09:00

69 lines
4 KiB
Markdown

# G4/G5 production session-learning caller 실 DB 증거 — 2026-08-07
## 판정
회기말 ready 평가가 실제 G4 처방과 G5 잠금 후 독립 관찰로 이어지는 production caller 경계를
PostgreSQL에서 검증했다. G4/G5 결과 테이블을 fixture가 직접 쓰지 않고
`session_learning_producer.produce_session_learning_artifacts`와 prediction lock route가 호출하는
`produce_locked_prediction_history`만 사용했다.
검증 fixture는 합성 교육 데이터다. 외부 모델을 호출하지 않았고 실제 수련생의 역량 숙달, 전이,
임상 효과를 주장하지 않는다.
## 재현 명령
```powershell
py -3.11 -X utf8 scripts\smoke-session-learning-producer.py `
--out docs\ops\evidence\session-learning-producer-live-2026-08-07.json
```
고유한 `dev:e2e` 학습자·교수자와 append-only 원장 행은 재현 가능한 개발 증거로 남긴다. 로그인,
물리 마이크, 외부 provider, 배포는 사용하지 않는다.
## 실제 실행 경계
1. 실제 P1 회기를 만들고 counselor/client 발화를 `session_persistence.append_turn`으로 저장해 durable turn
UUID 두 개를 확보했다.
2. counselor 턴의 fast 평가에는 `reflection` intent deviation을, 회기말 평가에는 같은 competency의
`status=ready`, `scope=session_end` deep 판정을 production persistence로 저장했다.
3. prediction lock 전 `produce_session_learning_artifacts`를 직접 호출했다. G4는 prescription/card를
생성했고 G5는 `locked_prediction_missing`으로 차단됐으며 observation은 0건이었다.
4. production prediction revision/lock route를 호출했다. lock route의
`produce_locked_prediction_history` callback이 잠긴 competency와 ready 평가를 결합해 failed 독립 관찰과
audit model-run을 생성했다.
5. caller를 다시 호출했다. G4는 같은 deterministic submission/card를 `idempotent_replay=true`로 반환했고,
G5는 이미 관찰된 history를 다시 소비하지 않아 모든 행 수가 그대로였다.
## PostgreSQL 결과
- source: 종료 회기 1개, durable turn 2개, ready session evaluation 1개, intent-deviation supervisor comment 1개.
- G4: submission/card/prescription/snapshot/curriculum decision 각 1개. card와 prescription은 두 durable turn
UUID를 모두 참조한다.
- G4 graph: 모든 competency band가 `unassessed`, attempt 합계 0, episode/attempt 0이다. 생성 처방은
`scenario_novelty=familiar`이며 unseen transfer를 주장하지 않는다.
- G5: prediction history/revision/lock/failed observation 각 1개. 잠금 전 observation 0, 잠금 뒤 1이다.
- G5 observation: `status=failed`, `source_kind=model_inferred`,
`perspective=independent_observer`; 두 durable turn UUID와 counterevidence를 보존한다.
- model-run: 1개이며 counselor turn UUID, session UUID, evaluator role,
`session-learning-producer-v1`, input evidence hash에 연결된다. metadata의 `auto_mastery`
`auto_transfer`는 모두 false다.
- 자동 승격 금지: mastered episode, transfer-verified snapshot, passed observation, transfer trial/assessment,
drift report, calibration assessment/suite는 모두 0건이다.
- learner/teacher read projection은 G4 처방 1개·episode 0개, G5 history 1개·failed observation 1개로
일치했고 `clinical_claim_allowed=false`를 유지했다.
실행 UUID와 row-count 증거는
[`evidence/session-learning-producer-live-2026-08-07.json`](./evidence/session-learning-producer-live-2026-08-07.json)에
보존한다. 축어록 본문과 원시 평가 문장은 결과 JSON에 포함하지 않는다.
## 회귀
- G4/G5 caller·core·store focused: **100 passed**.
- 전체 API: **855 passed**.
- Ruff, `py_compile`, 실제 PostgreSQL smoke, dashboard SSOT checker 통과.
## 증거 범위
이 smoke는 ready 평가·durable turn·prediction lock에서 G4/G5 production caller와 원장/read projection까지의
연결을 증명한다. 외부 evaluator provider의 판단 품질, 실제 수련생 효과, mastery, unseen transfer, 공개 배포를
증명하지 않는다.