{
  "task": "HRMS_FEISHU_READONLY_SNAPSHOT_REFRESH_DRY_RUN_APPLY_PACK_Z5",
  "generated_at": "2026-06-03T16:33:11+08:00",
  "status": "blocked_before_snapshot_refresh",
  "current_gate_at_start": "FEISHU_READONLY_SNAPSHOT_REFRESH_DRY_RUN_APPLY_GATE",
  "backup_or_restore_point": {
    "backup_executed": false,
    "reason": "No DB write was executed because pre-apply hard checks failed before refresh.",
    "existing_schema_apply_backup_reference": "/var/www/talent-review/outputs/backups/hrms_feishu_readonly_snapshot_schema_apply_z3_20260603_161158"
  },
  "pre_apply_snapshot_row_count": {
    "feishu_readonly_snapshot_runs": 0,
    "feishu_user_snapshots": 0,
    "feishu_department_snapshots": 0
  },
  "pre_apply_master_data_row_count": {
    "departments": 0,
    "positions": 0,
    "employees": 0,
    "permission_subjects": 0,
    "employee_role_assignments": 0,
    "feishu_user_mappings": 0
  },
  "readonly_service_endpoint_summary": {
    "readiness": {
      "url": "https://hrms.yuechongjia.com/api/feishu-readonly-snapshot/readiness",
      "status": 200,
      "ok": true,
      "content_type": "application/json",
      "json_ok": true,
      "provider_installed": true,
      "token_cache_status": "token_cache_expired",
      "token_metadata_status": "token_cache_expired",
      "provider_usable": false,
      "readonly_scope_declared": true,
      "write_scope_detected": false,
      "expires_at": "2026-05-12T15:49:49.701271+08:00",
      "ttl_seconds": -1903402,
      "snapshot_schema_ready": true,
      "next_gate": "FEISHU_READONLY_TOKEN_CACHE_REMEDIATION_PREVIEW_GATE"
    },
    "contract": {
      "url": "https://hrms.yuechongjia.com/api/feishu-readonly-snapshot/contract",
      "status": 200,
      "ok": true,
      "content_type": "application/json",
      "json_ok": true,
      "provider_installed": true,
      "token_cache_status": "token_cache_expired",
      "token_metadata_status": "token_cache_expired",
      "provider_usable": false,
      "readonly_scope_declared": true,
      "write_scope_detected": false,
      "expires_at": "2026-05-12T15:49:49.701271+08:00",
      "ttl_seconds": -1903403,
      "snapshot_schema_ready": true,
      "next_gate": "FEISHU_READONLY_TOKEN_CACHE_REMEDIATION_PREVIEW_GATE"
    },
    "refresh_dry_run": {
      "url": "https://hrms.yuechongjia.com/api/feishu-readonly-snapshot/refresh-dry-run",
      "status": 404,
      "ok": false,
      "error": "HTTPError"
    }
  },
  "source_run_id": null,
  "snapshot_run_id": null,
  "department_count": 0,
  "user_count": 0,
  "post_apply_snapshot_row_count": {
    "feishu_readonly_snapshot_runs": 0,
    "feishu_user_snapshots": 0,
    "feishu_department_snapshots": 0
  },
  "post_apply_master_data_row_count": {
    "departments": 0,
    "positions": 0,
    "employees": 0,
    "permission_subjects": 0,
    "employee_role_assignments": 0,
    "feishu_user_mappings": 0
  },
  "privacy_validation": {
    "privacy_validation": "passed",
    "public_outputs_counts_only": true,
    "token_secret_leak_check": "passed",
    "real_name_mobile_email_open_id_union_id_user_id_public_output": false,
    "stdout_stderr_sensitive_payload_output": false,
    "note": "Because precheck blocked refresh, no Feishu employee or department payload was retrieved."
  },
  "token_secret_leak_check": "passed",
  "redline_checks": {
    "feishu_readonly_api_called_for_live_data": false,
    "snapshot_rows_written": false,
    "master_data_tables_written": false,
    "employee_imported": false,
    "staging_entered": false,
    "permission_subject_created": false,
    "employee_role_assignment_created": false,
    "real_trial_assignment_created": false,
    "formal_algorithm_executed": false,
    "business_effective_result_generated": false,
    "people_action_executed": false,
    "feishu_writeback_executed": false,
    "active_permission_rule_modified": false,
    "schema_migration_executed": false,
    "alter_drop_truncate_executed": false,
    "token_or_secret_output": false,
    "service_restarted": false
  },
  "next_gate": "FEISHU_READONLY_TOKEN_OR_PERMISSION_GATE",
  "next_task": "HRMS_FEISHU_READONLY_TOKEN_PERMISSION_CHECK_PACK_Z1_RETRY",
  "url_validation": [
    {
      "url": "https://hrms.yuechongjia.com/hrms-feishu-readonly-snapshot-refresh-dry-run-apply.html",
      "status": 200,
      "ok": true
    },
    {
      "url": "https://hrms.yuechongjia.com/outputs/hrms_feishu_readonly_snapshot_refresh_dry_run_apply_summary_v1.json",
      "status": 200,
      "ok": true
    },
    {
      "url": "https://hrms.yuechongjia.com/outputs/hrms_feishu_readonly_snapshot_refresh_dry_run_validation_v1.json",
      "status": 200,
      "ok": true
    },
    {
      "url": "https://hrms.yuechongjia.com/outputs/hrms_feishu_readonly_snapshot_refresh_dry_run_counts_v1.json",
      "status": 200,
      "ok": true
    },
    {
      "url": "https://hrms.yuechongjia.com/outputs/hrms_feishu_readonly_snapshot_refresh_dry_run_privacy_validation_v1.json",
      "status": 200,
      "ok": true
    },
    {
      "url": "https://hrms.yuechongjia.com/outputs/hrms_feishu_readonly_snapshot_refresh_dry_run_row_count_after_apply_v1.json",
      "status": 200,
      "ok": true
    },
    {
      "url": "https://hrms.yuechongjia.com/outputs/hrms_feishu_readonly_snapshot_refresh_dry_run_next_gate_v1.json",
      "status": 200,
      "ok": true
    }
  ]
}
