{
  "task": "HRMS_FEISHU_READONLY_SNAPSHOT_REFRESH_DRY_RUN_PREP_PACK_Z4",
  "generated_at": "2026-06-03T16:21:12+08:00",
  "pre_apply_checklist": [
    {
      "item": "确认三张 snapshot 表存在",
      "required": true
    },
    {
      "item": "确认三张 snapshot 表 row_count 可接受，当前预期为 0",
      "required": true
    },
    {
      "item": "确认主数据 6 张表不在 dry-run 写入范围",
      "required": true
    },
    {
      "item": "确认 token provider/cache/scope/app permission metadata ready",
      "required": true
    },
    {
      "item": "确认 refresh service 与 directory client ready",
      "required": true
    },
    {
      "item": "确认 public output 只输出 counts/status/run_id/metadata",
      "required": true
    },
    {
      "item": "确认不会调用飞书写接口",
      "required": true
    },
    {
      "item": "确认不会导入员工、不会创建 permission_subject",
      "required": true
    },
    {
      "item": "确认失败时停在 refresh failed/rework gate",
      "required": true
    }
  ],
  "post_apply_acceptance": [
    {
      "item": "生成一个 dry-run run_id",
      "expected": "exists"
    },
    {
      "item": "snapshot run row_count",
      "expected": "> 0 only in refresh apply pack"
    },
    {
      "item": "user/department snapshot rows",
      "expected": "counts only in public output"
    },
    {
      "item": "public 页面/JSON 不含真实姓名、手机号、邮箱、open_id、union_id、user_id",
      "expected": "passed"
    },
    {
      "item": "主数据 6 张表仍不写入",
      "expected": "row_count unchanged"
    },
    {
      "item": "不创建 permission_subject / employee_role_assignment",
      "expected": "passed"
    },
    {
      "item": "不反写飞书",
      "expected": "passed"
    }
  ],
  "failure_stop_conditions": [
    "token unavailable or expired without safe refresh metadata",
    "required scope missing",
    "app permission revoked",
    "refresh service attempts to output raw sensitive identifiers publicly",
    "refresh service attempts to write master data tables",
    "Feishu API error requires raw payload debug output",
    "snapshot table contract mismatch",
    "any DB write outside the three snapshot tables"
  ],
  "approval_statement_template": "批准执行 HRMS_FEISHU_READONLY_SNAPSHOT_REFRESH_DRY_RUN_APPLY_PACK_Z5：仅执行飞书只读 snapshot refresh dry-run，可写三张 snapshot 表的最小只读镜像/metadata，禁止写主数据、导入员工、创建 permission_subject、创建 REAL_TRIAL assignment、输出真实员工敏感字段或反写飞书。"
}
