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 산출물은 커밋에서 제외했다.
76 lines
3.5 KiB
Markdown
76 lines
3.5 KiB
Markdown
# G6 repo benchmark 자동 version comparison 증거 — 2026-08-07
|
|
|
|
## 결론
|
|
|
|
G6 주기 프로듀서는 이제 저장소가 승인한
|
|
`apps/api/app/data/supervision_research_benchmark_g6.v1.json`의 baseline/candidate만
|
|
런타임에서 재검증하고, 완전한 synthetic measurement anchor가 있는 경우
|
|
`supervision_research_store.append_evaluation_comparison`으로 자동 기록한다.
|
|
|
|
- 새 candidate나 gold label을 런타임에서 생성하지 않는다.
|
|
- baseline/candidate의 case·competency·gold·synthetic subgroup가 동일한지 먼저 검증한다.
|
|
- model, prompt version, instrument id/version은 benchmark 값과 완전히 일치해야 한다.
|
|
- source anchor도 benchmark content hash와 observation metadata가 완전히 일치해야 한다.
|
|
- `data_classification=synthetic_educational`, `clinical_claim_allowed=false`만 허용한다.
|
|
- transcript, raw transcript, utterance text를 파일·anchor·결과 어디에서도 받지 않는다.
|
|
|
|
## 주기 실행과 장애 격리
|
|
|
|
교수자 attention/gap/manifest 코호트 트랜잭션이 끝난 뒤 별도 `ai_view=research`
|
|
트랜잭션에서 전역 repo benchmark 비교를 실행한다. anchor가 없거나 일부만 있으면
|
|
`repo_approved_synthetic_evidence_incomplete`로 안전하게 skip한다. provenance 변조,
|
|
DB 제약 또는 append 오류가 발생해도 이미 완료된 코호트 cycle은 롤백하지 않고
|
|
`version_comparison_failed=1`만 기록한다.
|
|
|
|
고정 benchmark content hash와 source cohort로 submission, batch record, drift report UUID를
|
|
결정론적으로 만든다. 동일 benchmark replay는 기존 report를 반환하며 observation,
|
|
subgroup metric을 다시 추가하지 않는다.
|
|
|
|
## 실제 dev PostgreSQL 증거
|
|
|
|
명령:
|
|
|
|
```powershell
|
|
py -3.11 -X utf8 scripts/smoke-supervision-version-comparison-producer.py
|
|
```
|
|
|
|
실제 `vignette-dev-db`에 metadata-only synthetic measurement anchor 12개를 만들고,
|
|
runtime app-role의 research RLS context로 first append와 replay를 별도 트랜잭션에서 실행했다.
|
|
fixture는 재현 가능한 `g6-repo-benchmark-v1` 코호트에 유지한다.
|
|
|
|
- benchmark semantic content SHA-256:
|
|
`9b63e9e0647714116e07545fed67f9dec278822878ac742aaa129a0fc7898f64`
|
|
- first append: batch `2`, drift report `1`, subgroup metric `2`
|
|
- first `idempotent_replay=false`
|
|
- replay `idempotent_replay=true`
|
|
- replay duplicate row 증가 `0`
|
|
- periodic producer replay: cohorts `6`, completed `6`, failed `0`, comparison failed `0`
|
|
- hydrated status: `drift_flagged`
|
|
- hydrated provenance: evaluator `v1→v2`, prompt `1.0.0→2.0.0`, instrument `1.0.0→1.1.0`
|
|
- hydrated subgroup: `synthetic-a` delta `0.0`, `synthetic-b` delta `-0.6666666666666667`
|
|
- raw transcript included `false`, clinical claim allowed `false`
|
|
|
|
기계 판독 증거는
|
|
`docs/ops/evidence/supervision-version-comparison-producer-live-2026-08-07.json`에 있다.
|
|
|
|
## 검증
|
|
|
|
```powershell
|
|
Set-Location apps/api
|
|
py -3.11 -X utf8 -m pytest `
|
|
app/test_supervision_research.py `
|
|
app/test_supervision_research_store.py `
|
|
app/test_supervision_research_producer.py `
|
|
app/test_supervision_research_version_evaluator.py -q
|
|
# 37 passed
|
|
|
|
py -3.11 -X utf8 -m pytest app/ -q
|
|
# 819 passed, 기존 Starlette PendingDeprecationWarning 1건
|
|
|
|
ruff check <변경 Python 파일>
|
|
ruff format --check <변경 Python 파일>
|
|
# All checks passed / 5 files already formatted
|
|
```
|
|
|
|
테스트는 repo gold/provenance 변조 거부, transcript key 거부, 불완전 anchor skip,
|
|
결정론 ID replay, append 오류의 cohort cycle 격리를 포함한다.
|