{
  "sourceCommit": "07e96bed6bbc804259dc8d91e0654a84ea3f9ddd",
  "sourceVersion": "1.5.169",
  "kind": "isolated-production-code-test",
  "description": "所列固定源码提交的隔离测试实际响应；企业、订单及状态仅用于演示，不是生产客户订单。标识和链接已替换为不可调用的示例；时间、默认参数和状态字段保留测试实际输出。",
  "captureSha256": [
    "331ae747635d1532a842acda6503edb5c3e76c668222933cc19290591df99384",
    "aee0f6e0f2b91b4bc4546de4f978bf7075e0c663cb5be613cb2b196f07e8d900"
  ],
  "examples": [
    {
      "path": "/api/v1/channel/authorization-links",
      "method": "post",
      "key": "minimal",
      "summary": "最小请求的默认响应",
      "description": "仅传企业名称、税号和业务订单号；示例渠道未覆盖系统默认发票期间。2026 年创建时默认查询 2024-01-01 至创建当天，不表示所有字段都应传入。",
      "test": "tests/test_channel_authorization.py::test_authorization_links_use_native_response_without_create_compatibility",
      "value": {
        "additionalTables": [],
        "publicResultAccessDays": 7,
        "dataRetentionDays": 30,
        "publicAccessExpiresAt": null,
        "dataAccessExpiresAt": null,
        "authorization_code": "00000000-0000-4000-8000-000000000001",
        "authorization_url": "https://example.invalid/user/authorization/taxXyd?channelCode=EXAMPLE_NOT_CALLABLE&cburl=not-skip&message=EXAMPLE_NOT_CALLABLE",
        "external_order_id": "NATIVE-CREATE-001",
        "invoice_period": "CURRENT_YEAR_PLUS_2",
        "invoice_start_date": "2024-01-01",
        "invoice_end_date": "2026-10-23",
        "expires_at": "2026-10-23 01:44:20",
        "dataDeliveryMode": "STRUCTURED",
        "generateHtmlReports": false,
        "outputEncryption": "NONE"
      },
      "request": {
        "path": "/api/v1/channel/authorization-links",
        "body": {
          "external_order_id": "NATIVE-CREATE-001",
          "enterprise_name": "示例企业（隔离演示）",
          "taxpayer_id": "91440000EXAMPLE0001"
        }
      }
    },
    {
      "path": "/api/v1/channel/orders/{external_order_id}",
      "method": "get",
      "key": "processing",
      "summary": "处理中",
      "description": "",
      "test": "tests/test_portal_core_contract.py::test_portal_partial_delivery",
      "value": {
        "publicResultAccessDays": 7,
        "dataRetentionDays": 30,
        "authorizationExpiresAt": "2026-10-23 01:44:21",
        "publicAccessExpiresAt": null,
        "dataAccessExpiresAt": null,
        "external_order_id": "EXAMPLE-PARTIAL-001",
        "authorization_code": "00000000-0000-4000-8000-000000000002",
        "job_id": "00000000-0000-4000-8000-000000000003",
        "attempt_id": "00000000-0000-4000-8000-000000000004",
        "state": "PROCESS",
        "orderNo": "00000000-0000-4000-8000-000000000003",
        "originalAuthorizationCode": "00000000-0000-4000-8000-000000000002",
        "authorizationGeneration": 1,
        "attemptNo": 1,
        "stateVersion": "0000000001.0000000001.20261022171421312904",
        "processCode": "STARTING_WORKER",
        "errorCode": null,
        "reason": null,
        "recoveryAction": null,
        "retryable": null,
        "customerTitle": "准备采集",
        "customerMessage": "正在准备本次采集。",
        "customerGuidance": null,
        "revenueCheck": null,
        "dataDeliveryMode": "STRUCTURED",
        "invoice_period": "CURRENT_YEAR_PLUS_2",
        "invoice_period_label": "本年度及往前2个完整年度",
        "invoice_start_date": "2024-01-01",
        "invoice_end_date": "2026-10-23",
        "result": {},
        "qualityStatus": "PASSED",
        "qualityIssues": [],
        "collectionResult": "COMPLETED",
        "dataQuality": {},
        "collectionPresentation": null,
        "artifacts": [],
        "updated_at": "2026-10-22T17:14:21.312904"
      },
      "request": {
        "path": "/api/v1/channel/orders/EXAMPLE-PARTIAL-001"
      }
    },
    {
      "path": "/api/v1/channel/orders/{external_order_id}",
      "method": "get",
      "key": "tax_available",
      "summary": "税务已可用，发票仍在处理",
      "description": "订单 state 仍为 PROCESS；可用数据以对应产品 available 为准。",
      "test": "tests/test_portal_core_contract.py::test_portal_partial_delivery",
      "value": {
        "publicResultAccessDays": 7,
        "dataRetentionDays": 30,
        "authorizationExpiresAt": "2026-10-23 01:44:21",
        "publicAccessExpiresAt": null,
        "dataAccessExpiresAt": null,
        "external_order_id": "EXAMPLE-PARTIAL-001",
        "authorization_code": "00000000-0000-4000-8000-000000000002",
        "job_id": "00000000-0000-4000-8000-000000000003",
        "attempt_id": "00000000-0000-4000-8000-000000000004",
        "state": "PROCESS",
        "orderNo": "00000000-0000-4000-8000-000000000003",
        "originalAuthorizationCode": "00000000-0000-4000-8000-000000000002",
        "authorizationGeneration": 1,
        "attemptNo": 1,
        "stateVersion": "0000000001.0000000001.20261022171421433403",
        "processCode": "RUNNING",
        "errorCode": null,
        "reason": null,
        "recoveryAction": null,
        "retryable": null,
        "customerTitle": "正在采集税务资料",
        "customerMessage": "正在获取本次所选税务资料。",
        "customerGuidance": null,
        "revenueCheck": null,
        "dataDeliveryMode": "STRUCTURED",
        "invoice_period": "CURRENT_YEAR_PLUS_2",
        "invoice_period_label": "本年度及往前2个完整年度",
        "invoice_start_date": "2024-01-01",
        "invoice_end_date": "2026-10-23",
        "result": {},
        "qualityStatus": "PASSED",
        "qualityIssues": [],
        "collectionResult": "COMPLETED",
        "dataQuality": {},
        "collectionPresentation": null,
        "artifacts": [
          {
            "id": "00000000-0000-4000-8000-000000000005",
            "kind": "TAX_DATA",
            "filename": "tax.json",
            "size": 122,
            "sha256": "e43f5c88d38e9e2c79e4d36753def13395d05f1c3caf098e735ab2d8563089c4"
          }
        ],
        "updated_at": "2026-10-22T17:14:21.433403"
      },
      "request": {
        "path": "/api/v1/channel/orders/EXAMPLE-PARTIAL-001"
      }
    },
    {
      "path": "/api/v1/channel/orders/{external_order_id}",
      "method": "get",
      "key": "partial_failure",
      "summary": "发票失败，税务结果仍可用",
      "description": "订单 state=ERROR 不能推断所有产品均不可用；继续分别查询 TAX 和 INVOICE。",
      "test": "tests/test_portal_core_contract.py::test_portal_partial_delivery",
      "value": {
        "publicResultAccessDays": 7,
        "dataRetentionDays": 30,
        "authorizationExpiresAt": "2026-10-23 01:44:21",
        "publicAccessExpiresAt": "2026-10-30 01:14:21",
        "dataAccessExpiresAt": "2026-11-22 01:14:21",
        "external_order_id": "EXAMPLE-PARTIAL-001",
        "authorization_code": "00000000-0000-4000-8000-000000000002",
        "job_id": "00000000-0000-4000-8000-000000000003",
        "attempt_id": "00000000-0000-4000-8000-000000000004",
        "state": "ERROR",
        "orderNo": "00000000-0000-4000-8000-000000000003",
        "originalAuthorizationCode": "00000000-0000-4000-8000-000000000002",
        "authorizationGeneration": 1,
        "attemptNo": 1,
        "stateVersion": "0000000001.0000000001.20261022171421476138",
        "processCode": "JOB_FAILED",
        "errorCode": "INVOICE_COLLECTION_FAILED",
        "reason": "发票采集失败（隔离演示）",
        "recoveryAction": "SYSTEM_RETRY",
        "retryable": true,
        "customerTitle": "发票数据采集未完成",
        "customerMessage": "发票数据采集阶段出现异常。",
        "customerGuidance": "授权信息仍然有效，可稍后重新采集。",
        "revenueCheck": null,
        "dataDeliveryMode": "STRUCTURED",
        "invoice_period": "CURRENT_YEAR_PLUS_2",
        "invoice_period_label": "本年度及往前2个完整年度",
        "invoice_start_date": "2024-01-01",
        "invoice_end_date": "2026-10-23",
        "result": {},
        "qualityStatus": "PASSED",
        "qualityIssues": [],
        "collectionResult": "COMPLETED",
        "dataQuality": {},
        "collectionPresentation": null,
        "artifacts": [
          {
            "id": "00000000-0000-4000-8000-000000000005",
            "kind": "TAX_DATA",
            "filename": "tax.json",
            "size": 122,
            "sha256": "e43f5c88d38e9e2c79e4d36753def13395d05f1c3caf098e735ab2d8563089c4"
          }
        ],
        "updated_at": "2026-10-22T17:14:21.466747"
      },
      "request": {
        "path": "/api/v1/channel/orders/EXAMPLE-PARTIAL-001"
      }
    },
    {
      "path": "/api/v1/channel/orders/{external_order_id}",
      "method": "get",
      "key": "succeeded",
      "summary": "采集成功",
      "description": "",
      "test": "tests/test_html_reports.py::test_html_reports_are_additive_stable_and_revocable",
      "value": {
        "publicResultAccessDays": 7,
        "dataRetentionDays": 30,
        "authorizationExpiresAt": "2026-10-23 01:44:49",
        "publicAccessExpiresAt": "2026-10-30 01:15:02",
        "dataAccessExpiresAt": "2026-11-22 01:15:02",
        "external_order_id": "HTML-REPORT-SUCCESS-001",
        "authorization_code": "00000000-0000-4000-8000-000000000006",
        "job_id": "00000000-0000-4000-8000-000000000007",
        "attempt_id": "00000000-0000-4000-8000-000000000008",
        "state": "SUCCESS",
        "orderNo": "00000000-0000-4000-8000-000000000007",
        "originalAuthorizationCode": "00000000-0000-4000-8000-000000000006",
        "authorizationGeneration": 1,
        "attemptNo": 1,
        "stateVersion": "0000000001.0000000001.20261022171502516188",
        "processCode": "COLLECTION_COMPLETED",
        "errorCode": null,
        "reason": null,
        "recoveryAction": null,
        "retryable": null,
        "customerTitle": "数据和报告已就绪",
        "customerMessage": "本次所选数据和报告已就绪。",
        "customerGuidance": null,
        "revenueCheck": {
          "version": "vat-invoice-revenue-check.v2",
          "thresholdPercent": 40,
          "enabled": false,
          "comparisonBasis": "COLLECTED_DATA",
          "basisMessage": "核验口径：按实际采集的增值税申报收入与销项发票未税净额比较，仅比较双方共同覆盖的完整申报期间。导出总数缺失不影响本项核验。",
          "jobId": "00000000-0000-4000-8000-000000000007",
          "attemptId": "00000000-0000-4000-8000-000000000008",
          "checkedAt": "2026-10-22T17:14:50.092674Z",
          "rows": [],
          "failedPeriods": [],
          "status": "DISABLED",
          "message": "本渠道未开启收入差异校验。"
        },
        "dataDeliveryMode": "WORKER_RAW",
        "invoice_period": "CURRENT_YEAR_PLUS_2",
        "invoice_period_label": "本年度及往前2个完整年度",
        "invoice_start_date": "2024-01-01",
        "invoice_end_date": "2026-10-23",
        "result": {
          "legacy": true,
          "database": {
            "dataset_count": 2,
            "record_count": 2,
            "products": {
              "tax": {
                "datasets": 1,
                "records": 1
              },
              "invoice": {
                "datasets": 1,
                "records": 1
              }
            },
            "quality_status": "UNVERIFIED",
            "quality_issues": [
              {
                "code": "INVOICE_COUNT_UNVERIFIED",
                "severity": "UNVERIFIED",
                "product": "INVOICE",
                "blocking": false,
                "retrySuggested": false,
                "message": "发票文件及数据已正常读取，但缺少完整、可靠的发票号码，暂无法自动核对发票张数",
                "direction": "outgoing",
                "startDate": "2024-01-01",
                "periodStart": "2024-01-01",
                "endDate": "2026-10-23",
                "periodEnd": "2026-10-23",
                "filename": "invoice-html.json",
                "queryRows": 1,
                "verificationReason": "INCOMPLETE_INVOICE_IDENTITIES",
                "identityRows": 0,
                "unresolvedRows": 1,
                "ignoredTotalRows": 0
              }
            ],
            "collection_result": "COMPLETED",
            "data_quality": {
              "status": "UNVERIFIED",
              "blocking": false,
              "partial": false,
              "usable": true,
              "issueCount": 1,
              "coverage": {
                "expectedRanges": 2,
                "queriedRanges": 2,
                "availableRanges": 1,
                "emptyRanges": 1,
                "unavailableRanges": 0
              },
              "ranges": [
                {
                  "direction": "incoming",
                  "startDate": "2024-01-01",
                  "endDate": "2026-10-23",
                  "queryStatus": "SUCCEEDED",
                  "queryRows": 0,
                  "parsedRows": null,
                  "countVerification": null,
                  "queryScope": null,
                  "monthlyReconciliation": null,
                  "errorCode": null,
                  "countEvidence": null,
                  "artifactStatus": "NOT_REQUIRED",
                  "availability": "EMPTY",
                  "fileAvailable": false,
                  "collectionComplete": true,
                  "collectionProgress": null,
                  "filename": null,
                  "issues": []
                },
                {
                  "direction": "outgoing",
                  "startDate": "2024-01-01",
                  "endDate": "2026-10-23",
                  "queryStatus": "SUCCEEDED",
                  "queryRows": 1,
                  "parsedRows": null,
                  "countVerification": {
                    "verified": false,
                    "method": "UNVERIFIED",
                    "sourceSheets": [
                      "invoice_html"
                    ],
                    "identityRows": 0,
                    "unresolvedRows": 1,
                    "ignoredTotalRows": 0,
                    "reason": "INCOMPLETE_INVOICE_IDENTITIES"
                  },
                  "queryScope": null,
                  "monthlyReconciliation": null,
                  "errorCode": null,
                  "countEvidence": null,
                  "artifactStatus": "VERIFIED",
                  "availability": "AVAILABLE",
                  "fileAvailable": true,
                  "collectionComplete": true,
                  "collectionProgress": null,
                  "filename": "invoice-html.json",
                  "issues": [
                    {
                      "code": "INVOICE_COUNT_UNVERIFIED",
                      "severity": "UNVERIFIED",
                      "product": "INVOICE",
                      "blocking": false,
                      "retrySuggested": false,
                      "message": "发票文件及数据已正常读取，但缺少完整、可靠的发票号码，暂无法自动核对发票张数",
                      "direction": "outgoing",
                      "startDate": "2024-01-01",
                      "periodStart": "2024-01-01",
                      "endDate": "2026-10-23",
                      "periodEnd": "2026-10-23",
                      "filename": "invoice-html.json",
                      "queryRows": 1,
                      "verificationReason": "INCOMPLETE_INVOICE_IDENTITIES",
                      "identityRows": 0,
                      "unresolvedRows": 1,
                      "ignoredTotalRows": 0
                    }
                  ]
                }
              ],
              "issues": [
                {
                  "code": "INVOICE_COUNT_UNVERIFIED",
                  "severity": "UNVERIFIED",
                  "product": "INVOICE",
                  "blocking": false,
                  "retrySuggested": false,
                  "message": "发票文件及数据已正常读取，但缺少完整、可靠的发票号码，暂无法自动核对发票张数",
                  "direction": "outgoing",
                  "startDate": "2024-01-01",
                  "periodStart": "2024-01-01",
                  "endDate": "2026-10-23",
                  "periodEnd": "2026-10-23",
                  "filename": "invoice-html.json",
                  "queryRows": 1,
                  "verificationReason": "INCOMPLETE_INVOICE_IDENTITIES",
                  "identityRows": 0,
                  "unresolvedRows": 1,
                  "ignoredTotalRows": 0
                }
              ],
              "quarantinedArtifacts": []
            }
          }
        },
        "qualityStatus": "UNVERIFIED",
        "qualityIssues": [
          {
            "code": "INVOICE_COUNT_UNVERIFIED",
            "severity": "UNVERIFIED",
            "product": "INVOICE",
            "blocking": false,
            "retrySuggested": false,
            "message": "发票文件及数据已正常读取，但缺少完整、可靠的发票号码，暂无法自动核对发票张数",
            "direction": "outgoing",
            "startDate": "2024-01-01",
            "periodStart": "2024-01-01",
            "endDate": "2026-10-23",
            "periodEnd": "2026-10-23",
            "filename": "invoice-html.json",
            "queryRows": 1,
            "verificationReason": "INCOMPLETE_INVOICE_IDENTITIES",
            "identityRows": 0,
            "unresolvedRows": 1,
            "ignoredTotalRows": 0
          }
        ],
        "collectionResult": "COMPLETED",
        "dataQuality": {
          "status": "UNVERIFIED",
          "blocking": false,
          "partial": false,
          "usable": true,
          "issueCount": 1,
          "coverage": {
            "expectedRanges": 2,
            "queriedRanges": 2,
            "availableRanges": 1,
            "emptyRanges": 1,
            "unavailableRanges": 0
          },
          "ranges": [
            {
              "direction": "incoming",
              "startDate": "2024-01-01",
              "endDate": "2026-10-23",
              "queryStatus": "SUCCEEDED",
              "queryRows": 0,
              "parsedRows": null,
              "countVerification": null,
              "queryScope": null,
              "monthlyReconciliation": null,
              "errorCode": null,
              "countEvidence": null,
              "artifactStatus": "NOT_REQUIRED",
              "availability": "EMPTY",
              "fileAvailable": false,
              "collectionComplete": true,
              "collectionProgress": null,
              "filename": null,
              "issues": []
            },
            {
              "direction": "outgoing",
              "startDate": "2024-01-01",
              "endDate": "2026-10-23",
              "queryStatus": "SUCCEEDED",
              "queryRows": 1,
              "parsedRows": null,
              "countVerification": {
                "verified": false,
                "method": "UNVERIFIED",
                "sourceSheets": [
                  "invoice_html"
                ],
                "identityRows": 0,
                "unresolvedRows": 1,
                "ignoredTotalRows": 0,
                "reason": "INCOMPLETE_INVOICE_IDENTITIES"
              },
              "queryScope": null,
              "monthlyReconciliation": null,
              "errorCode": null,
              "countEvidence": null,
              "artifactStatus": "VERIFIED",
              "availability": "AVAILABLE",
              "fileAvailable": true,
              "collectionComplete": true,
              "collectionProgress": null,
              "filename": "invoice-html.json",
              "issues": [
                {
                  "code": "INVOICE_COUNT_UNVERIFIED",
                  "severity": "UNVERIFIED",
                  "product": "INVOICE",
                  "blocking": false,
                  "retrySuggested": false,
                  "message": "发票文件及数据已正常读取，但缺少完整、可靠的发票号码，暂无法自动核对发票张数",
                  "direction": "outgoing",
                  "startDate": "2024-01-01",
                  "periodStart": "2024-01-01",
                  "endDate": "2026-10-23",
                  "periodEnd": "2026-10-23",
                  "filename": "invoice-html.json",
                  "queryRows": 1,
                  "verificationReason": "INCOMPLETE_INVOICE_IDENTITIES",
                  "identityRows": 0,
                  "unresolvedRows": 1,
                  "ignoredTotalRows": 0
                }
              ]
            }
          ],
          "issues": [
            {
              "code": "INVOICE_COUNT_UNVERIFIED",
              "severity": "UNVERIFIED",
              "product": "INVOICE",
              "blocking": false,
              "retrySuggested": false,
              "message": "发票文件及数据已正常读取，但缺少完整、可靠的发票号码，暂无法自动核对发票张数",
              "direction": "outgoing",
              "startDate": "2024-01-01",
              "periodStart": "2024-01-01",
              "endDate": "2026-10-23",
              "periodEnd": "2026-10-23",
              "filename": "invoice-html.json",
              "queryRows": 1,
              "verificationReason": "INCOMPLETE_INVOICE_IDENTITIES",
              "identityRows": 0,
              "unresolvedRows": 1,
              "ignoredTotalRows": 0
            }
          ],
          "quarantinedArtifacts": []
        },
        "collectionPresentation": {
          "status": "COMPLETED",
          "notices": [],
          "issues": [],
          "actions": []
        },
        "htmlReports": {
          "requested": true,
          "status": "READY",
          "generatedAt": "2026-10-22T17:14:50.111425Z",
          "expiresAt": "2026-10-30 01:15:02",
          "reports": [
            {
              "reportType": "TAX_INVOICE_DETAIL",
              "label": "税务发票综合分析报告（详版）",
              "status": "READY",
              "accessUrl": "/api/v1/public/html-reports/1D4YzW3pTeiliou-yPlhDg.ounm3ChqlSg7E6TnAqCa3w",
              "expiresAt": "2026-10-30 01:15:02",
              "errorCode": null,
              "errorMessage": null,
              "downloadUrl": "/api/v1/public/html-reports/downloads/00000000-0000-4000-8000-000000000009?expires=1792690202&signature=df8bd5b41bdaf209f4c9960ab362df0e5fea462ef72d2ed92e9e3a5d1e7a2c62",
              "downloadExpiresAt": "2026-10-23 01:30:02",
              "dataExpiresAt": "2026-11-22 01:15:02"
            },
            {
              "reportType": "TAX_INVOICE_SUMMARY",
              "label": "税票概括报告（简版）",
              "status": "READY",
              "accessUrl": "/api/v1/public/html-reports/nLjlzMgDTWSGwVIFfSOFSA.Y3dB4ApjdX-bqQdGJpr9oQ",
              "expiresAt": "2026-10-30 01:15:02",
              "errorCode": null,
              "errorMessage": null,
              "downloadUrl": "/api/v1/public/html-reports/downloads/00000000-0000-4000-8000-000000000010?expires=1792690202&signature=4b4ed85559892fb9931bf8f3eff284b9e4494abbb11a6523190ad459df5e1f21",
              "downloadExpiresAt": "2026-10-23 01:30:02",
              "dataExpiresAt": "2026-11-22 01:15:02"
            }
          ]
        },
        "artifacts": [
          {
            "id": "00000000-0000-4000-8000-000000000011",
            "kind": "TAX_DATA",
            "filename": "tax-html.json",
            "size": 70,
            "sha256": "7887eb8211ad020255f4e37c92a2cdb5f0b42458103b4b28b63de37bc6814d5e",
            "downloadUrl": "/api/v1/channel/orders/HTML-REPORT-SUCCESS-001/artifacts/00000000-0000-4000-8000-000000000011/download?authorization_id=00000000-0000-4000-8000-000000000006&expires=1792690202&signature=29e62b29187c59751d2891f953c0ad5c3a70c5f286bc85f21f7120979d73eb07",
            "downloadExpiresAt": "2026-10-23 01:30:02",
            "dataExpiresAt": "2026-11-22 01:15:02"
          },
          {
            "id": "00000000-0000-4000-8000-000000000012",
            "kind": "INVOICE_DATA",
            "filename": "invoice-html.json",
            "size": 147,
            "sha256": "67d36872753669caa825345428e7c66d6d27a3a06fcd67202860aeabcae26264",
            "downloadUrl": "/api/v1/channel/orders/HTML-REPORT-SUCCESS-001/artifacts/00000000-0000-4000-8000-000000000012/download?authorization_id=00000000-0000-4000-8000-000000000006&expires=1792690202&signature=2d27c74284524b05d7e701861aaf8df7a4b1f33357ec3d9e482b488ad921b88e",
            "downloadExpiresAt": "2026-10-23 01:30:02",
            "dataExpiresAt": "2026-11-22 01:15:02"
          }
        ],
        "updated_at": "2026-10-22T17:14:50.089654"
      },
      "request": {
        "path": "/api/v1/channel/orders/HTML-REPORT-SUCCESS-001"
      }
    },
    {
      "path": "/api/v1/channel/orders/{external_order_id}/products/{product}",
      "method": "get",
      "key": "pending",
      "summary": "尚未创建采集任务",
      "description": "job_id 和 attempt_id 为 null，available=false。",
      "test": "tests/test_product_callbacks.py::test_product_query_before_job_has_explicit_null_attempt_id",
      "value": {
        "external_order_id": "PRODUCT-PENDING-001",
        "orderNo": "00000000-0000-4000-8000-000000000013",
        "originalAuthorizationCode": "00000000-0000-4000-8000-000000000013",
        "authorizationGeneration": 1,
        "attempt_id": null,
        "attemptNo": 0,
        "stateVersion": "0000000001.0000000000.20261022171421979034",
        "authorization_code": "00000000-0000-4000-8000-000000000013",
        "job_id": null,
        "product": "TAX",
        "dataDeliveryMode": "STRUCTURED",
        "state": "PENDING",
        "available": false,
        "datasets": [],
        "artifacts": []
      },
      "request": {
        "path": "/api/v1/channel/orders/PRODUCT-PENDING-001/products/TAX"
      }
    },
    {
      "path": "/api/v1/channel/orders/{external_order_id}/products/{product}",
      "method": "get",
      "key": "succeeded",
      "summary": "税务产品已可用",
      "description": "available=true 才表示该产品可读；质量结论另见 qualityStatus、qualityIssues。",
      "test": "tests/test_portal_core_contract.py::test_portal_partial_delivery",
      "value": {
        "external_order_id": "EXAMPLE-PARTIAL-001",
        "orderNo": "00000000-0000-4000-8000-000000000003",
        "originalAuthorizationCode": "00000000-0000-4000-8000-000000000002",
        "authorizationGeneration": 1,
        "attemptNo": 1,
        "stateVersion": "0000000001.0000000001.20261022171421433403",
        "authorization_code": "00000000-0000-4000-8000-000000000002",
        "job_id": "00000000-0000-4000-8000-000000000003",
        "product": "TAX",
        "dataDeliveryMode": "STRUCTURED",
        "state": "SUCCEEDED",
        "available": true,
        "attempt_id": "00000000-0000-4000-8000-000000000004",
        "dataset_count": 1,
        "record_count": 1,
        "database": {
          "dataset_count": 1,
          "record_count": 1,
          "products": {
            "tax": {
              "datasets": 1,
              "records": 1
            }
          },
          "collection_result": "COMPLETED",
          "data_quality": {
            "status": "PASSED",
            "blocking": false,
            "partial": false,
            "usable": false,
            "issueCount": 0,
            "coverage": {
              "expectedRanges": 0,
              "queriedRanges": 0,
              "availableRanges": 0,
              "emptyRanges": 0,
              "unavailableRanges": 0
            },
            "ranges": [],
            "issues": [],
            "quarantinedArtifacts": []
          },
          "quality_status": "PASSED",
          "quality_issues": []
        },
        "qualityStatus": "PASSED",
        "qualityIssues": [],
        "collectionResult": "COMPLETED",
        "dataQuality": {
          "status": "PASSED",
          "blocking": false,
          "partial": false,
          "usable": false,
          "issueCount": 0,
          "coverage": {
            "expectedRanges": 0,
            "queriedRanges": 0,
            "availableRanges": 0,
            "emptyRanges": 0,
            "unavailableRanges": 0
          },
          "ranges": [],
          "issues": [],
          "quarantinedArtifacts": []
        },
        "collectionPresentation": {
          "status": "COMPLETED",
          "notices": [],
          "issues": [],
          "actions": []
        },
        "datasets": [
          {
            "id": "00000000-0000-4000-8000-000000000014",
            "name": "taxCompanyPaymentListDtoPageResult",
            "product": "tax",
            "row_count": 1
          }
        ],
        "artifacts": [
          {
            "id": "00000000-0000-4000-8000-000000000005",
            "kind": "TAX_DATA",
            "filename": "tax.json",
            "size": 122,
            "sha256": "e43f5c88d38e9e2c79e4d36753def13395d05f1c3caf098e735ab2d8563089c4"
          }
        ],
        "error_code": null,
        "error_message": null,
        "retryable": false,
        "available_at": "2026-10-22T17:14:21.432007Z",
        "updated_at": "2026-10-22T17:14:21.432013Z"
      },
      "request": {
        "path": "/api/v1/channel/orders/EXAMPLE-PARTIAL-001/products/TAX"
      }
    },
    {
      "path": "/api/v1/channel/orders/{external_order_id}/products/{product}",
      "method": "get",
      "key": "failed",
      "summary": "发票产品失败",
      "description": "available=false；检查 error_code、error_message 和 retryable。",
      "test": "tests/test_portal_core_contract.py::test_portal_partial_delivery",
      "value": {
        "external_order_id": "EXAMPLE-PARTIAL-001",
        "orderNo": "00000000-0000-4000-8000-000000000003",
        "originalAuthorizationCode": "00000000-0000-4000-8000-000000000002",
        "authorizationGeneration": 1,
        "attemptNo": 1,
        "stateVersion": "0000000001.0000000001.20261022171421476138",
        "authorization_code": "00000000-0000-4000-8000-000000000002",
        "job_id": "00000000-0000-4000-8000-000000000003",
        "product": "INVOICE",
        "dataDeliveryMode": "STRUCTURED",
        "state": "FAILED",
        "available": false,
        "attempt_id": "00000000-0000-4000-8000-000000000004",
        "dataset_count": 0,
        "record_count": 0,
        "database": {},
        "qualityStatus": "PASSED",
        "qualityIssues": [],
        "collectionResult": "COMPLETED",
        "dataQuality": null,
        "collectionPresentation": null,
        "datasets": [],
        "artifacts": [],
        "error_code": "INVOICE_COLLECTION_FAILED",
        "error_message": "发票采集失败（隔离演示）",
        "retryable": true,
        "available_at": null,
        "updated_at": "2026-10-22T17:14:21.463948Z"
      },
      "request": {
        "path": "/api/v1/channel/orders/EXAMPLE-PARTIAL-001/products/INVOICE"
      }
    },
    {
      "path": "/api/v1/channel/orders/{external_order_id}/products/{product}",
      "method": "get",
      "key": "retained_success",
      "summary": "另一产品失败后税务仍可用",
      "description": "",
      "test": "tests/test_portal_core_contract.py::test_portal_partial_delivery",
      "value": {
        "external_order_id": "EXAMPLE-PARTIAL-001",
        "orderNo": "00000000-0000-4000-8000-000000000003",
        "originalAuthorizationCode": "00000000-0000-4000-8000-000000000002",
        "authorizationGeneration": 1,
        "attemptNo": 1,
        "stateVersion": "0000000001.0000000001.20261022171421476138",
        "authorization_code": "00000000-0000-4000-8000-000000000002",
        "job_id": "00000000-0000-4000-8000-000000000003",
        "product": "TAX",
        "dataDeliveryMode": "STRUCTURED",
        "state": "SUCCEEDED",
        "available": true,
        "attempt_id": "00000000-0000-4000-8000-000000000004",
        "dataset_count": 1,
        "record_count": 1,
        "database": {
          "dataset_count": 1,
          "record_count": 1,
          "products": {
            "tax": {
              "datasets": 1,
              "records": 1
            }
          },
          "collection_result": "COMPLETED",
          "data_quality": {
            "status": "PASSED",
            "blocking": false,
            "partial": false,
            "usable": false,
            "issueCount": 0,
            "coverage": {
              "expectedRanges": 0,
              "queriedRanges": 0,
              "availableRanges": 0,
              "emptyRanges": 0,
              "unavailableRanges": 0
            },
            "ranges": [],
            "issues": [],
            "quarantinedArtifacts": []
          },
          "quality_status": "PASSED",
          "quality_issues": []
        },
        "qualityStatus": "PASSED",
        "qualityIssues": [],
        "collectionResult": "COMPLETED",
        "dataQuality": {
          "status": "PASSED",
          "blocking": false,
          "partial": false,
          "usable": false,
          "issueCount": 0,
          "coverage": {
            "expectedRanges": 0,
            "queriedRanges": 0,
            "availableRanges": 0,
            "emptyRanges": 0,
            "unavailableRanges": 0
          },
          "ranges": [],
          "issues": [],
          "quarantinedArtifacts": []
        },
        "collectionPresentation": {
          "status": "COMPLETED",
          "notices": [],
          "issues": [],
          "actions": []
        },
        "datasets": [
          {
            "id": "00000000-0000-4000-8000-000000000014",
            "name": "taxCompanyPaymentListDtoPageResult",
            "product": "tax",
            "row_count": 1
          }
        ],
        "artifacts": [
          {
            "id": "00000000-0000-4000-8000-000000000005",
            "kind": "TAX_DATA",
            "filename": "tax.json",
            "size": 122,
            "sha256": "e43f5c88d38e9e2c79e4d36753def13395d05f1c3caf098e735ab2d8563089c4"
          }
        ],
        "error_code": null,
        "error_message": null,
        "retryable": false,
        "available_at": "2026-10-22T17:14:21.432007Z",
        "updated_at": "2026-10-22T17:14:21.432013Z"
      },
      "request": {
        "path": "/api/v1/channel/orders/EXAMPLE-PARTIAL-001/products/TAX"
      }
    }
  ]
}
