{
  "status": "passed",
  "exitCode": 0,
  "passed": 22,
  "skipped": 0,
  "failures": 0,
  "errors": 0,
  "command": "SPAY4_TESTCONTAINERS_ENABLED=true SPAY4_SLOW_TESTS_ENABLED=true bash scripts/run-docker-tests.sh :spay4-bo:test --tests com.sit.spay4.SupplyCommissionReportHttpIntegrationTest --tests com.sit.spay4.supply.policy.SupplyCommissionFormulaTest --tests com.sit.spay4.CommissionReadingFlowHttpIntegrationTest --rerun --offline --console=plain",
  "sourceVersion": "5ce4f00c52fb403982a39d6efd7c84713bfbe018",
  "issue": "#614",
  "scope": [
    "commission-query"
  ],
  "coverage": [
    "normal",
    "denied",
    "failure",
    "boundary"
  ],
  "coverageNotes": {
    "normal": "Supplier 看自己鏈（含 Cardholder threshold、PT 依 commission_month）、Supplier 層納入 Supply Channel 存款（#512 Supplier-only facts，下層不變）、Superadmin 依 +08:00 分月但金額依 commission_month、Gateway 看自己與 own Cardholder、Superadmin 從 Supplier 名單依回傳 key 下鑽、每層 CSV 等於全部頁合併並寫一筆 EXPORT_SUPPLY_COMMISSION_REPORT audit、當月 inProgress 與 dataUpdatedThrough（SupplyCommissionReportHttpIntegrationTest）；PT → 結算 → hourly projection → Pt Snapshot page／detail／CSV 整條（CommissionReadingFlowHttpIntegrationTest#ptRulesSettlementsProjectionSnapshotAndAuditChainInOrder）；月累計公式 threshold／base fee／variable 一次 HALF_UP（SupplyCommissionFormulaTest）",
    "denied": "Prefix 讀 Supply report 403、Prefix Pt Snapshot 路由已移除 404（#517）、Supply actor 帶 supplierId 400、Gateway 看 SUPPLIER 層 404、跨 scope detail 404（CommissionReadingFlowHttpIntegrationTest#deniedActorsAndCrossScopeRequestsLeaveNoWrites、SupplyCommissionReportHttpIntegrationTest#prefixPtSnapshotRoutesAreGoneAndHistoricalExportAuditStaysReadable、#gatewaySeesSelfAndOwnCardholdersButNoSupplierRowAndNothingAcrossScope）；Supplier 帶外部或不存在 gatewayId 同一 404、回應不帶目標身分、不寫 export audit，WARN `supply commission report rejected: status=404 reason=OUT_OF_SCOPE actorId supplierId gatewayId`（#supplierSelectsOwnGatewayButOutOfScopeSelectorsAreNotFoundAndLogged）",
    "failure": "任一目標缺適用 PT 規則或 Currency 缺 decimal 時整份 409/40054、不回金額、export 不寫 audit，WARN `reason=CALCULATION_FAILED actorId gatewayId cause`（SupplyCommissionReportHttpIntegrationTest#anyUncalculableTargetFailsTheWholeReportWithoutAmounts）；invalid Currency metadata／無法表示的結果 fail closed（SupplyCommissionFormulaTest）；export audit 寫入失敗 500 不交付 CSV、不留 audit，request 摘要行 ERROR（route、status=500、requestId），page 不受影響、fault 移除後 export 完成（CommissionReadingFlowHttpIntegrationTest#faultsRollBackOnlyTheFailingStepAndTheFlowContinues，#614 補 log 斷言）",
    "boundary": "Cardholder volume 等於／低於 threshold、無合格訂單、HALF_UP 只套月合計（SupplyCommissionFormulaTest）；查看者時區跨月（UTC 2026-08-31T16:00 對 +07 屬 8 月、對 +08 屬 9 月）；pageSize=1 走完全頁與 CSV 逐列相等、CSV 公式跳脫（SupplyCommissionReportHttpIntegrationTest）；期間 7 個月 400／6 個月可查、結算 exact replay 只留一筆 fact（CommissionReadingFlowHttpIntegrationTest#replayStrictInputInvariantAndCalculationBoundaries）"
  },
  "classes": [
    {
      "class": "com.sit.spay4.SupplyCommissionReportHttpIntegrationTest",
      "tests": 10,
      "failures": 0,
      "errors": 0,
      "skipped": 0
    },
    {
      "class": "com.sit.spay4.supply.policy.SupplyCommissionFormulaTest",
      "tests": 8,
      "failures": 0,
      "errors": 0,
      "skipped": 0
    },
    {
      "class": "com.sit.spay4.CommissionReadingFlowHttpIntegrationTest",
      "tests": 4,
      "failures": 0,
      "errors": 0,
      "skipped": 0
    }
  ],
  "artifacts": "/var/tmp/deliver-720/rerun/g2/xml",
  "limitations": "本機 isolated MySQL focused 驗收（含 slow），非 fixed-SHA 全套回歸；批次統一回歸由 coordinator 執行。Supply Channel 分支只涵蓋 Supplier 層納入 SC 存款（#512），下層不受影響。report-gap 所列 Hourly Financial Aggregate 欄位級 lifecycle、query plan、timeout、cache 等未決點屬報表整體，不在本 feature 契約（#407 SUPPLY_COMMISSION_REPORT）內；HourlyReportReconciliationTask 未涵蓋。target 環境與部署屬 Operator，未驗證。",
  "inputs": {
    "spay4-bo/src/test/java/com/sit/spay4/SupplyCommissionReportHttpIntegrationTest.java": "b3067b41eb7f3118ab9ba9a1ffa7f107d1c40b34038cc9b94c440f8d23a4c0fe",
    "spay4-bo/src/test/java/com/sit/spay4/supply/policy/SupplyCommissionFormulaTest.java": "71f6982adf431ec3879cd973eb39fef800fb2cf71c6940d1d67f478fc9c6ed0a",
    "spay4-bo/src/test/java/com/sit/spay4/CommissionReadingFlowHttpIntegrationTest.java": "3115e2dfd349f6a7235e88f1b180e2f102d8a4ce5a455c3df5ee2003bf6e4413",
    "spay4-bo/src/main/java/com/sit/spay4/supply/controller/SupplyCommissionReportController.java": "aaa5919d08963ea5da0448c5ce6019f1f32c46c7364dde0217bba624eb94febc",
    "spay4-bo/src/main/java/com/sit/spay4/supply/service/impl/SupplyCommissionReportServiceImpl.java": "cee3efb549c58969d61222ad5e76493c5b5209c5bd6e2adc1466526389b3b650",
    "spay4-bo/src/main/java/com/sit/spay4/supply/policy/SupplyCommissionFormula.java": "d380f16b0cd8902ee52417434f1f9f82923813c67d427ecb1896635567e72a2e"
  },
  "commandNote": "#720 card 同步整合分支 ac27bb7c5 後乾淨 HEAD 976c804c8 依 G27 常設授權重跑同一 command：3 classes 22 tests 0 failures／errors，0 skipped，BUILD SUCCESSFUL；#957 新增 /orders route（controller、service impl 為本報告 inputs）後，依 G27 常設授權於 #957 卡乾淨 HEAD 2feda61f3（review 修正省略 direction 後） 以 scripts/rerun-evidence.mjs 重跑同一 command：3 classes 22 cases 0 failures／errors／skipped；依 JUnit XML 更新 sourceVersion／inputs（approved-by #957），status 與 scope 不變"
}
