{
  "id": "synthetic-plan-01",
  "testedAt": "2026-11-04",
  "scope": "One real model call through the local production recognition pipeline; not an iOS publishing, notification or 3D end-to-end test. No customer property or personal data.",
  "aiSourceCommit": "3061b63dbc58041cd916df565aa21458aac3e436",
  "provider": "qwen",
  "model": "qwen3.8-max",
  "reasoningEffort": "xhigh",
  "generationProfile": "standard",
  "repairEnabled": false,
  "modelCalls": 1,
  "durationMs": 95552,
  "source": {
    "kind": "Original synthetic fixture",
    "generator": "scripts/generate-ai-floor-plan-case.mjs",
    "mimeType": "image/png",
    "width": 1200,
    "height": 760,
    "sha256": "0c37efc1ea05ec47ca349b09ae10548021721a016eb403e7bcc9931c6a7ccbd6",
    "webpPreview": "/media/guides/home-viewing/ai-floor-plan-input.webp",
    "note": "The preview is a compressed derivative. The API received the generated PNG. Dimensions are wall-centre-line distances, not measured usable floor area."
  },
  "prompt": {
    "purpose": "Production floor-plan image extraction, structured pixel evidence and local geometry validation; no evaluation answer supplied",
    "sha256": "1dbe0ba74e3e9c0f1c649f30ae2fbdee108e1c316c11132a618c43065cb64979",
    "sourcePath": "ai_service/floor_plan/extraction.py",
    "schemaSha256": "d46257176a07c08a5b8523e4c9919b37b8a5f675dc22b1fc16f9cec4173ccb6a"
  },
  "expected": {
    "bedrooms": 2,
    "bathrooms": 1,
    "closedRegions": 4,
    "openKitchenAndLivingShareRegion": true,
    "doors": 4,
    "windows": 3,
    "entranceDoors": 1,
    "outerCentreLineMeters": [
      8.4,
      4.8
    ],
    "bathroomDoorWidthMeters": 0.8,
    "heightAndLoadBearingStatus": "not supplied",
    "orientationNote": "North arrow is drawing context; this workflow does not generate or change App orientation."
  },
  "observed": {
    "status": "succeeded",
    "recognitionStatus": "draft",
    "importable": true,
    "requiresReview": true,
    "doors": 4,
    "windows": 3,
    "entranceDoors": 1,
    "boundRoomLabels": 4,
    "outerCentreLineMeters": [
      8.4,
      4.78
    ],
    "bathroomDoorWidthMeters": 0.75,
    "warning": "Circulation evidence could not be confirmed. Draft retained for review.",
    "heightMeters": 3.5,
    "heightSource": "software default assumption; not measured",
    "review": "Manual count, labelled topology, exterior extent and bathroom opening checked against the original fixture. Not every boundary, item or geometry tolerance was validated."
  },
  "usage": {
    "prompt_tokens": 6710,
    "total_tokens": 11629,
    "completion_tokens": 4919,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "image_tokens": 1926,
      "text_tokens": 4784
    },
    "completion_tokens_details": {
      "reasoning_tokens": 3902,
      "text_tokens": 1016
    }
  },
  "billingAmountVerified": false,
  "rawModelOutput": {
    "inputType": "floor_plan",
    "inputEvidence": "单层住宅线画平面图：可见闭合外墙带、内隔墙、门弧符号与双线窗符号，房间标注Bedroom A、Bedroom B、Bathroom、Living / dining、Open kitchen及ENTRY入口，另有8.40 m与4.80 m尺寸线，结构完整可测读。",
    "rejectionReason": null,
    "plan": {
      "name": "单层住宅平面",
      "bbox": {
        "left": 177,
        "top": 149,
        "right": 1023,
        "bottom": 633
      },
      "walls": [
        {
          "id": "w_top",
          "start": {
            "x": 180,
            "y": 152
          },
          "end": {
            "x": 1020,
            "y": 152
          },
          "thicknessPixels": 7
        },
        {
          "id": "w_bottom",
          "start": {
            "x": 180,
            "y": 630
          },
          "end": {
            "x": 1020,
            "y": 630
          },
          "thicknessPixels": 7
        },
        {
          "id": "w_left",
          "start": {
            "x": 180,
            "y": 152
          },
          "end": {
            "x": 180,
            "y": 630
          },
          "thicknessPixels": 7
        },
        {
          "id": "w_right",
          "start": {
            "x": 1020,
            "y": 152
          },
          "end": {
            "x": 1020,
            "y": 630
          },
          "thicknessPixels": 7
        },
        {
          "id": "w_mid",
          "start": {
            "x": 180,
            "y": 390
          },
          "end": {
            "x": 1020,
            "y": 390
          },
          "thicknessPixels": 7
        },
        {
          "id": "w_v1",
          "start": {
            "x": 480,
            "y": 152
          },
          "end": {
            "x": 480,
            "y": 390
          },
          "thicknessPixels": 7
        },
        {
          "id": "w_v2",
          "start": {
            "x": 780,
            "y": 152
          },
          "end": {
            "x": 780,
            "y": 390
          },
          "thicknessPixels": 7
        }
      ],
      "openings": [
        {
          "id": "op_win_a",
          "kind": "window",
          "label": "Bedroom A窗",
          "wallId": "w_top",
          "offsetPixels": 60,
          "widthPixels": 140,
          "entranceDoor": false
        },
        {
          "id": "op_win_b",
          "kind": "window",
          "label": "Bedroom B窗",
          "wallId": "w_top",
          "offsetPixels": 360,
          "widthPixels": 140,
          "entranceDoor": false
        },
        {
          "id": "op_win_left",
          "kind": "window",
          "label": "客厅西窗",
          "wallId": "w_left",
          "offsetPixels": 308,
          "widthPixels": 110,
          "entranceDoor": false
        },
        {
          "id": "op_door_entry",
          "kind": "door",
          "label": "入户门",
          "wallId": "w_bottom",
          "offsetPixels": 380,
          "widthPixels": 90,
          "entranceDoor": true
        },
        {
          "id": "op_door_a",
          "kind": "door",
          "label": "Bedroom A门",
          "wallId": "w_mid",
          "offsetPixels": 192,
          "widthPixels": 78,
          "entranceDoor": false
        },
        {
          "id": "op_door_b",
          "kind": "door",
          "label": "Bedroom B门",
          "wallId": "w_mid",
          "offsetPixels": 472,
          "widthPixels": 78,
          "entranceDoor": false
        },
        {
          "id": "op_door_bath",
          "kind": "door",
          "label": "Bathroom门",
          "wallId": "w_mid",
          "offsetPixels": 685,
          "widthPixels": 75,
          "entranceDoor": false
        }
      ],
      "dimensions": [
        {
          "originalText": "8.40 m",
          "start": {
            "x": 180,
            "y": 110
          },
          "end": {
            "x": 1020,
            "y": 110
          },
          "lengthMeters": 8.4
        },
        {
          "originalText": "4.80 m",
          "start": {
            "x": 130,
            "y": 150
          },
          "end": {
            "x": 130,
            "y": 630
          },
          "lengthMeters": 4.8
        }
      ],
      "rooms": [
        {
          "name": "Bedroom A",
          "position": {
            "x": 330,
            "y": 256
          }
        },
        {
          "name": "Bedroom B",
          "position": {
            "x": 630,
            "y": 256
          }
        },
        {
          "name": "Bathroom",
          "position": {
            "x": 900,
            "y": 256
          }
        },
        {
          "name": "Living / dining",
          "position": {
            "x": 510,
            "y": 488
          }
        },
        {
          "name": "Open kitchen",
          "position": {
            "x": 900,
            "y": 488
          }
        }
      ],
      "furniture": [],
      "circulationPaths": [
        {
          "name": "入口主走道",
          "points": [
            {
              "x": 605,
              "y": 655
            },
            {
              "x": 605,
              "y": 560
            },
            {
              "x": 510,
              "y": 490
            }
          ]
        }
      ],
      "floorBoundaries": [
        {
          "id": "floor_main",
          "boundary": [
            {
              "x": 180,
              "y": 152
            },
            {
              "x": 1020,
              "y": 152
            },
            {
              "x": 1020,
              "y": 630
            },
            {
              "x": 180,
              "y": 630
            }
          ],
          "holes": null
        }
      ]
    }
  },
  "generatedPlan": {
    "schemaVersion": 1,
    "unit": "m",
    "name": "单层住宅平面（待校正草稿）",
    "source": "import",
    "walls": [
      {
        "id": "split-wall-1-1",
        "ax": 0.0,
        "az": 0.0,
        "bx": 3.0,
        "bz": 0.0,
        "height": 3.5,
        "thickness": 0.07,
        "elevation": 0
      },
      {
        "id": "split-wall-1-2",
        "ax": 3.0,
        "az": 0.0,
        "bx": 6.0,
        "bz": 0.0,
        "height": 3.5,
        "thickness": 0.07,
        "elevation": 0
      },
      {
        "id": "split-wall-1-3",
        "ax": 6.0,
        "az": 0.0,
        "bx": 8.4,
        "bz": 0.0,
        "height": 3.5,
        "thickness": 0.07,
        "elevation": 0
      },
      {
        "id": "w_bottom",
        "ax": 0.0,
        "az": 4.78,
        "bx": 8.4,
        "bz": 4.78,
        "height": 3.5,
        "thickness": 0.07,
        "elevation": 0
      },
      {
        "id": "split-wall-3-1",
        "ax": 0.0,
        "az": 0.0,
        "bx": 0.0,
        "bz": 2.38,
        "height": 3.5,
        "thickness": 0.07,
        "elevation": 0
      },
      {
        "id": "split-wall-3-2",
        "ax": 0.0,
        "az": 2.38,
        "bx": 0.0,
        "bz": 4.78,
        "height": 3.5,
        "thickness": 0.07,
        "elevation": 0
      },
      {
        "id": "split-wall-4-1",
        "ax": 8.4,
        "az": 0.0,
        "bx": 8.4,
        "bz": 2.38,
        "height": 3.5,
        "thickness": 0.07,
        "elevation": 0
      },
      {
        "id": "split-wall-4-2",
        "ax": 8.4,
        "az": 2.38,
        "bx": 8.4,
        "bz": 4.78,
        "height": 3.5,
        "thickness": 0.07,
        "elevation": 0
      },
      {
        "id": "split-wall-5-1",
        "ax": 0.0,
        "az": 2.38,
        "bx": 3.0,
        "bz": 2.38,
        "height": 3.5,
        "thickness": 0.07,
        "elevation": 0
      },
      {
        "id": "split-wall-5-2",
        "ax": 3.0,
        "az": 2.38,
        "bx": 6.0,
        "bz": 2.38,
        "height": 3.5,
        "thickness": 0.07,
        "elevation": 0
      },
      {
        "id": "split-wall-5-3",
        "ax": 6.0,
        "az": 2.38,
        "bx": 8.4,
        "bz": 2.38,
        "height": 3.5,
        "thickness": 0.07,
        "elevation": 0
      },
      {
        "id": "w_v1",
        "ax": 3.0,
        "az": 0.0,
        "bx": 3.0,
        "bz": 2.38,
        "height": 3.5,
        "thickness": 0.07,
        "elevation": 0
      },
      {
        "id": "w_v2",
        "ax": 6.0,
        "az": 0.0,
        "bx": 6.0,
        "bz": 2.38,
        "height": 3.5,
        "thickness": 0.07,
        "elevation": 0
      }
    ],
    "items": [
      {
        "id": "op_win_a",
        "kind": "window",
        "label": "Bedroom A窗",
        "x": 1.3,
        "z": 0.0,
        "wallId": "split-wall-1-1",
        "offset": 0.6,
        "width": 1.4,
        "depth": 0.07,
        "height": 1.4,
        "elevation": 0.9,
        "rotation": 0,
        "furnitureType": null,
        "entranceDoor": false
      },
      {
        "id": "op_win_b",
        "kind": "window",
        "label": "Bedroom B窗",
        "x": 4.3,
        "z": 0.0,
        "wallId": "split-wall-1-2",
        "offset": 0.6,
        "width": 1.4,
        "depth": 0.07,
        "height": 1.4,
        "elevation": 0.9,
        "rotation": 0,
        "furnitureType": null,
        "entranceDoor": false
      },
      {
        "id": "op_win_left",
        "kind": "window",
        "label": "客厅西窗",
        "x": 0.0,
        "z": 3.63,
        "wallId": "split-wall-3-2",
        "offset": 0.7,
        "width": 1.1,
        "depth": 0.07,
        "height": 1.4,
        "elevation": 0.9,
        "rotation": 0,
        "furnitureType": null,
        "entranceDoor": false
      },
      {
        "id": "op_door_entry",
        "kind": "door",
        "label": "入户门",
        "x": 4.25,
        "z": 4.78,
        "wallId": "w_bottom",
        "offset": 3.8,
        "width": 0.9,
        "depth": 0.07,
        "height": 2.1,
        "elevation": 0,
        "rotation": 0,
        "furnitureType": null,
        "entranceDoor": true
      },
      {
        "id": "op_door_a",
        "kind": "door",
        "label": "Bedroom A门",
        "x": 2.31,
        "z": 2.38,
        "wallId": "split-wall-5-1",
        "offset": 1.92,
        "width": 0.78,
        "depth": 0.07,
        "height": 2.1,
        "elevation": 0,
        "rotation": 0,
        "furnitureType": null,
        "entranceDoor": false
      },
      {
        "id": "op_door_b",
        "kind": "door",
        "label": "Bedroom B门",
        "x": 5.11,
        "z": 2.38,
        "wallId": "split-wall-5-2",
        "offset": 1.72,
        "width": 0.78,
        "depth": 0.07,
        "height": 2.1,
        "elevation": 0,
        "rotation": 0,
        "furnitureType": null,
        "entranceDoor": false
      },
      {
        "id": "op_door_bath",
        "kind": "door",
        "label": "Bathroom门",
        "x": 7.225,
        "z": 2.38,
        "wallId": "split-wall-5-3",
        "offset": 0.85,
        "width": 0.75,
        "depth": 0.07,
        "height": 2.1,
        "elevation": 0,
        "rotation": 0,
        "furnitureType": null,
        "entranceDoor": false
      }
    ],
    "roomNotes": {
      "[\"split-wall-1-1\",\"split-wall-3-1\",\"split-wall-5-1\",\"w_v1\"]": "Bedroom A",
      "[\"split-wall-1-2\",\"split-wall-5-2\",\"w_v1\",\"w_v2\"]": "Bedroom B",
      "[\"split-wall-1-3\",\"split-wall-4-1\",\"split-wall-5-3\",\"w_v2\"]": "Bathroom",
      "[\"split-wall-3-2\",\"split-wall-4-2\",\"split-wall-5-1\",\"split-wall-5-2\",\"split-wall-5-3\",\"w_bottom\"]": "Living / dining / Open kitchen"
    },
    "recognition": {
      "status": "draft",
      "scaleSource": "dimension",
      "scaleEvidence": "8.40 m / 840.00px；4.80 m / 480.00px",
      "assumptions": [
        "墙高默认 3.5 m，墙体基底标高默认 0；图片未提供竖向尺寸，3D 高度需要人工核对。",
        "门及通道默认高 2.1 m；窗默认高 1.4 m、离地 0.9 m，竖向尺寸需要人工核对。"
      ],
      "warnings": [
        "已生成可编辑的待校正户型草稿，墙线、门窗或连接关系可能有偏差。请在 2D 编辑器中核对并调整。",
        "部分标注通路缺少清晰、连续的原图证据，尚不能确认通行关系，请对照原图核对。"
      ],
      "rooms": [
        {
          "name": "Bedroom A",
          "x": 1.5,
          "z": 1.04
        },
        {
          "name": "Bedroom B",
          "x": 4.5,
          "z": 1.04
        },
        {
          "name": "Bathroom",
          "x": 7.2,
          "z": 1.04
        },
        {
          "name": "Living / dining",
          "x": 3.3,
          "z": 3.36
        },
        {
          "name": "Open kitchen",
          "x": 7.2,
          "z": 3.36
        }
      ],
      "requiresReview": true,
      "inputType": "floor_plan",
      "inputEvidence": "单层住宅线画平面图：可见闭合外墙带、内隔墙、门弧符号与双线窗符号，房间标注Bedroom A、Bedroom B、Bathroom、Living / dining、Open kitchen及ENTRY入口，另有8.40 m与4.80 m尺寸线，结构完整可测读。"
    },
    "floorBoundaries": [
      {
        "id": "floor_main",
        "boundary": [
          {
            "x": 0.0,
            "z": 0.0
          },
          {
            "x": 8.4,
            "z": 0.0
          },
          {
            "x": 8.4,
            "z": 4.78
          },
          {
            "x": 0.0,
            "z": 4.78
          }
        ],
        "holes": []
      }
    ]
  },
  "limits": [
    "Single clear synthetic drawing and one run; not an accuracy rate or model ranking.",
    "No building inspection, structural assessment, daylight compliance or investment conclusion.",
    "An importable result can still have geometric errors; the software returned a draft.",
    "The API call used local credentials without modifying production data or sending callbacks."
  ]
}
