FinClaw V1 Sub-Packet: TrainingAssetCandidate 治理元数据
状态:Pending 日期:2026-05-16 Lane:Engineering Owner:Engineering Agent A + Frontend Agent D Parent Packet:v1-engineering-implementation-task-packet.md 对齐 Action Item:AL-3
1. 目标
把 v1-product-object-and-schema-design.md §11 TrainingAssetCandidate 的候选治理元数据在工程仓库落地,确保 trial 数据进入训练池前必须满足:
user_authorized == true(来自 sub-1 ProfileConsent);de_identified == true;sensitive_filtered == true(来自 sub-2 SensitiveInputHandling);personal_domain_separated == true;withdrawal_status可被用户即时翻转。
本 sub-packet 不实现训练 pipeline 本身(V1 不做完整 training loop,per execution plan §8 Out of Scope);只实现「候选治理状态」对象与撤回路径。
2. 允许读取
见 frontmatter must_read / reference_only。
3. 禁止范围
- 不实现训练 pipeline(V1 阶段 Out of Scope);
- 不让 BYOM endpoint 访问训练候选数据(model-and-provider §4 数据隔离);
- 不在「未撤回」与「已撤回」状态之间引入不可逆行为;
- 不在候选池中保存任何 sensitive_personal_financial 类原始字段(必须先 de-identification)。
4. Acceptance Criteria
| AC ID | 验收项 |
|---|---|
| AC-1 | TrainingAssetCandidate 模型字段完整:candidate_id / source_output_ref / user_authorized / de_identified / sensitive_filtered / personal_domain_separated / failure_case_type / human_review_status / withdrawal_status |
| AC-2 | 候选入池前必查 5 个 gating 字段;任一为 false → 拒入池并记录原因 |
| AC-3 | 撤回路径:DELETE /v1/training/candidates/<id> 24h 内将 withdrawal_status 翻转为 revoked 且物理删除 |
| AC-4 | UI Settings 页面可显示用户当前训练候选数 + 一键撤回 |
| AC-5 | 单测覆盖:5 个 gating 字段每个独立验证 + 撤回 + 时序验证(写入 → 24h tick → 删除) |
| AC-6 | 与 sub-1 ProfileConsent 的关联:consent_revoked → 自动级联将该用户所有 training candidates withdrawal_status 翻转为 revoked |
| AC-7 | demo path:trial owner 可演示 5 步流程(用户授权 → 输出生成 → 候选入池 → 用户撤回 → 池中清除) |
5. 回写位置
- 代码 → 工程仓库
fin-claw; - v1-governance-engineering-alignment.md §2 / §7 / §9.AL-3 状态由
missing→aligned-initial; - Hand-off anchor →
handoff-anchors/v1-eng-impl-sub-3-training-asset-candidate.yaml; - 解除依赖:cs sub-3(隐私复核)。
6. 风险与裁决项
- 风险 R-1:「24h 内删除」时序保证 → 需要 cron / scheduled task;V1 阶段建议轻量 cron + 启动时补偿,不引入完整 task queue;
- 风险 R-2:候选池数据被误读为「已进入训练集」→ UI 必须明确标注「候选 / 未训练」状态;
- 裁决项 J-1:
personal_domain_separated实现方式(独立目录 vs label-based)由项目发起人 + 未来 training pipeline 设计者共同裁决;本 sub-packet 默认采用独立目录data/training_candidates/<user_id>/。
7. 与其他 Sub-Packet 的关系
- 依赖:sub-1(ProfileConsent.training_use_allowed)、sub-2(sensitive_filtered);
- 解除:cs sub-3(GDPR 隐私复核可以引用本 sub-packet 的字段证据);
- 共享文件需协调:
server/agent/models.py(与 sub-1 / sub-2 协调)。