vignette/docs/phase3/dataset-export-manifest.md
Yun Chan 4e6b0045e3 관리자 워크스페이스 접근 확장과 소유자 결정 7건 확정 반영
- 관리자(role=admin)가 학습자·교수자·관리자 워크스페이스를 모두 접근하도록
  can_access_role/require_role와 프론트 auth 헬퍼·Sidebar 내비를 정리하고
  admin 워크스페이스 내비 E2E를 추가.
- 소유자 결정 7건 전건 확정(2026-06-30)을 SSOT 대시보드·백로그에 반영하고
  결정 필요 7→0으로 동기화. SSOT drift 게이트 기대 카운트도 갱신.
- 확정된 H1 평가설계(κ≥0.70·ICC≥0.75·환각률≤0.03·t-검정 α=0.05·무작위 배정)를
  approved-export κ 게이트(checker·dataset_export·recursive export)와
  KPI 측정계획·export manifest 문서에 반영.

검증: npm run typecheck, npm run check:api-types, 백엔드 pytest 290 passed,
admin 내비 E2E 1 passed, 레이아웃 시각게이트 9/9, session-layout 4 passed,
SSOT drift 게이트 PASS.
2026-06-30 10:57:46 +09:00

195 lines
5.6 KiB
Markdown

# Phase 3 Anonymized Dataset Export Manifest
## Purpose
Define the manifest and JSONL expectations for the first recursive-learning dataset
artifact. The export is allowed only after consent scope, withdrawal state, PII masking,
and reviewer agreement are documented.
Primary evidence file: `03-export/export_manifest.json`
## Export Gate
The export may be marked `approved_for_recursive_learning_seed` only when:
- Source participants are active or otherwise allowed by consent scope at export time.
- Withdrawn participants are excluded according to the approved withdrawal policy.
- Direct identifiers and raw identity mapping are absent from exported files.
- Free text is masked or transformed according to the manifest.
- PII scan is pass, or every finding has a reviewer disposition.
- IAA gates pass for gold exports: kappa >=0.70 and ICC >=0.75. (owner-confirmed 2026-06-30)
- Legal/data-steward review is complete.
If any gate is missing, set `export_status` to `technical_dry_run` or `blocked`, not
`approved_for_recursive_learning_seed`.
## Manifest Shape
```json
{
"export_id": "phase3-rl-seed-YYYYMMDD-001",
"dataset_name": "vignette_phase3_recursive_learning_seed",
"export_status": "technical_dry_run",
"created_at": "2026-06-26T00:00:00Z",
"purpose": "recursive-learning seed dataset for education simulator improvement",
"source_window": {
"started_at": "2026-00-00T00:00:00Z",
"ended_at": "2026-00-00T00:00:00Z"
},
"source_tables": [
"app.sessions",
"app.turns",
"app.feedback_scores",
"ds.annotation",
"audit.persona_drift_log"
],
"selection_criteria": {
"cohort_id": "phase3",
"min_completed_sessions": 2,
"include_withdrawn": false,
"excluded_safety_scope": ["self_harm_scenario_primary"]
},
"consent_scope": {
"consent_version": "",
"allowed_uses": ["education_quality_review", "recursive_learning_seed"],
"withdrawal_cutoff_applied_at": "",
"participants_included": 0,
"participants_excluded": 0
},
"anonymization": {
"participant_key": "pseudonymous export key; no identity map included",
"text_transform": "masked_text_only",
"direct_identifier_policy": "blocked",
"salt_or_identity_map_location": "not in export"
},
"pii_scan": {
"tool": "",
"version": "",
"ran_at": "",
"status": "pending",
"findings": []
},
"agreement": {
"kappa": null,
"icc": null,
"gold_status": "not_gold"
},
"files": [
{
"path": "03-export/anonymized_dataset.jsonl",
"rows": 0,
"sha256": "",
"schema": "phase3_dataset_item_v1"
}
],
"approvals": {
"data_steward": "",
"legal_or_privacy_reviewer": "",
"technical_operator": "",
"approved_at": ""
},
"known_limitations": []
}
```
## JSONL Record Shape
Each JSONL line must be one dataset item:
```json
{
"schema": "phase3_dataset_item_v1",
"item_id": "export-local-id",
"participant_key": "PX-0001",
"session_key": "SX-0001",
"turn_key": "TX-0001",
"persona_id": "P1",
"stage": "rapport",
"speaker": "counselor",
"text_masked": "masked or transformed utterance text",
"techniques": [],
"client_states": [],
"feedback_scores": [],
"supervisor_comments": [],
"source_refs": {
"session_started_at": "2026-00-00T00:00:00Z",
"export_manifest_id": "phase3-rl-seed-YYYYMMDD-001"
},
"privacy": {
"direct_identifiers_removed": true,
"pii_scan_status": "pass",
"consent_scope": "recursive_learning_seed"
}
}
```
Blocked fields:
- name
- email
- phone
- student_id
- national_id
- address
- date_of_birth
- raw_audio_path
- raw_voice
- raw_source_case
- identity_map
- API keys, tokens, cookies, or credentials
## Operator Commands
Generate the export through the read-only dry-run exporter unless the data steward has
approved writing `ds.*` rows. The default output is `technical_dry_run`; do not use
`approved_for_recursive_learning_seed` unless consent, withdrawal, PII, legal/privacy,
and IAA gates are all complete.
Read-only dry-run export:
```powershell
$dbUrl = (Get-Content apps\api\.env -Encoding UTF8 | Where-Object { $_ -match '^DATABASE_URL=' } | Select-Object -First 1) -replace '^DATABASE_URL=', ''
python scripts\export-recursive-dataset.py --database-url $dbUrl --output-root $root --limit 1000
```
Optional dataset table write for reviewer/gold workflow:
```powershell
python scripts\export-recursive-dataset.py --database-url $dbUrl --output-root $root --write-dataset
```
Approved export is blocked unless all gates are present:
```powershell
python scripts\export-recursive-dataset.py --database-url $dbUrl --output-root $root --export-status approved_for_recursive_learning_seed --allow-approved
```
Validate artifact presence and headers:
```powershell
python scripts\check-phase3-artifacts.py --check --evidence-root $root
```
Write a validation report:
```powershell
python scripts\check-phase3-artifacts.py --check --evidence-root $root --output "$root\phase3_artifact_check.json"
```
Compute a file hash for the manifest:
```powershell
Get-FileHash "$root\03-export\anonymized_dataset.jsonl" -Algorithm SHA256
```
## Export Review Checklist
- [ ] Manifest `export_status` matches the actual approval state.
- [ ] Files listed in `files[]` exist and have row counts and SHA256 hashes.
- [ ] `participants_included` plus `participants_excluded` matches the consent roster
decision log.
- [ ] `include_withdrawn` is false unless legal review explicitly approved otherwise.
- [ ] Text fields use masked/transformed text only.
- [ ] PII scan report is attached or referenced.
- [ ] Agreement metrics match `02-measures/kpi_report.json`.
- [ ] Export limitations state whether the file is gold data or a dry-run seed.