{
  "task": "HRMS_FEISHU_READONLY_TOKEN_CACHE_REFRESH_APPLY_PACK_Z5C_RETRY",
  "generated_at": "2026-06-03T17:24:51+08:00",
  "pre_apply_checks": {
    "token_type_still_tenant_access_token": true,
    "z5d_parser_file_exists": true,
    "token_refresh_path_uses_reworked_parser": true,
    "provider_runtime_reload_required": false,
    "token_auth_endpoint_only": true,
    "no_directory_user_department_api": true,
    "no_snapshot_refresh": true,
    "snapshot_tables_zero": true,
    "master_data_tables_zero": true,
    "refresh_dry_run_endpoint_gap_unhandled": true,
    "precheck_blocks": []
  },
  "token_refresh_execution_summary_metadata_only": {
    "executed": true,
    "status": "invalid_response",
    "method": "backend.services.feishu_tenant_token_service.call_tenant_token_endpoint",
    "metadata_only": true,
    "systemd_env_keys_loaded": [
      "FEISHU_APP_ID",
      "FEISHU_APP_SECRET",
      "FEISHU_TENANT_TOKEN_ENDPOINT",
      "HRMS_DATABASE_URL",
      "HRMS_ENABLE_FEISHU_JSAPI"
    ],
    "env_key_presence": {
      "FEISHU_APP_ID": true,
      "FEISHU_APP_SECRET": true,
      "FEISHU_TENANT_TOKEN_ENDPOINT": true,
      "HRMS_ENABLE_FEISHU_JSAPI": true,
      "HRMS_DATABASE_URL": true
    },
    "parser_runtime_ready": true,
    "result_metadata": {
      "ok": false,
      "status": "invalid_response",
      "error_code": "FEISHU_TENANT_TOKEN_NON_ZERO_CODE",
      "response_keys": [
        "code",
        "data",
        "msg"
      ],
      "response_shape": "nested_code_data_msg",
      "expire_field_detected": "",
      "token_plaintext_returned": false,
      "tenant_token_cache": {
        "cache_id_present": false,
        "write_status": null,
        "token_plaintext_returned": null,
        "token_source": null,
        "token_status": null,
        "expires_at": null
      }
    },
    "ok": false
  },
  "post_apply_checks": {
    "provider_readiness": false,
    "token_cache_metadata_readiness": false,
    "required_scope_readiness": true,
    "app_install_permission_readiness": true,
    "readiness_endpoint_ok": true,
    "contract_endpoint_ok": true,
    "snapshot_tables_still_zero": true,
    "master_data_tables_still_zero": true,
    "refresh_dry_run_endpoint_gap_still_exists": true
  }
}
