{
  "tool_id": "art-687-wash-sale-window-guard",
  "note": "Golden vectors for the Wash-Sale Window Guard. The first vector is the spec's canonical preimage (HARVEST-GUARD-BUILD-SPEC): its output_payload recomputes byte-identical and execution_hash 9e5378fc2f5d5d1badfe65146ccbbbd5739782d381a26dd0d27e869b476648f2 must reproduce. The second is the opposite-verdict vector (no replacement in the 61-day window, loss allowed). All inputs are synthetic; no real portfolio data.",
  "vectors": [
    {
      "name": "spec-canonical-wash-sale-flagged",
      "policy_parameters": {
        "sale": {
          "lot_id": "SYN-A",
          "sale_date": "2026-03-10",
          "realized_loss": 1200
        },
        "replacement_purchases": [
          {
            "date": "2026-03-25",
            "account_type": "taxable"
          }
        ]
      },
      "output_payload": {
        "window_start": "2026-02-08",
        "window_end": "2026-04-09",
        "replacements_in_window": 1,
        "disallowed_loss": 1200,
        "ira_trap": false,
        "trace": "2026-03-25 is within 2026-02-08..2026-04-09 (sale 2026-03-10 ±30d) so the 1200 loss is disallowed under the declared section 1091 method",
        "overall": "WASH_SALE_FLAGGED"
      },
      "golden_hash": "9e5378fc2f5d5d1badfe65146ccbbbd5739782d381a26dd0d27e869b476648f2"
    },
    {
      "name": "window-clear-loss-allowed",
      "policy_parameters": {
        "sale": {
          "lot_id": "SYN-B",
          "sale_date": "2026-03-10",
          "realized_loss": 800.5
        },
        "replacement_purchases": [
          {
            "date": "2026-05-01",
            "account_type": "taxable"
          }
        ]
      },
      "output_payload": {
        "window_start": "2026-02-08",
        "window_end": "2026-04-09",
        "replacements_in_window": 0,
        "disallowed_loss": 0,
        "ira_trap": false,
        "trace": "no declared replacement purchase falls within 2026-02-08..2026-04-09 (sale 2026-03-10 ±30d) so the 800.5 loss is allowed under the declared section 1091 method",
        "overall": "WASH_SALE_CLEAR"
      },
      "golden_hash": "0d513ccee3ba77ea596321cca4e60f044e097abc19cce00d3c49fa95b1f6a0ca"
    },
    {
      "name": "ira-trap-tax-deferred-replacement",
      "policy_parameters": {
        "sale": {
          "lot_id": "SYN-C",
          "sale_date": "2026-03-10",
          "realized_loss": 1200
        },
        "replacement_purchases": [
          {
            "date": "2026-03-20",
            "account_type": "tax_deferred"
          },
          {
            "date": "2026-04-01",
            "account_type": "taxable"
          }
        ]
      },
      "output_payload": {
        "window_start": "2026-02-08",
        "window_end": "2026-04-09",
        "replacements_in_window": 2,
        "disallowed_loss": 1200,
        "ira_trap": true,
        "trace": "2026-03-20 is within 2026-02-08..2026-04-09 (sale 2026-03-10 ±30d) so the 1200 loss is disallowed under the declared section 1091 method",
        "overall": "WASH_SALE_FLAGGED",
        "warnings": [
          "WSG_IRA_TRAP"
        ]
      },
      "golden_hash": "32b7155d6e471ddd2d103d38ac9550ce9110dfbaf23b288f10432216b1b6781a"
    },
    {
      "name": "window-boundaries-inclusive-both-endpoints",
      "policy_parameters": {
        "sale": {
          "lot_id": "SYN-E",
          "sale_date": "2026-03-10",
          "realized_loss": 50
        },
        "replacement_purchases": [
          {
            "date": "2026-02-08",
            "account_type": "taxable"
          },
          {
            "date": "2026-04-09",
            "account_type": "taxable"
          }
        ]
      },
      "output_payload": {
        "window_start": "2026-02-08",
        "window_end": "2026-04-09",
        "replacements_in_window": 2,
        "disallowed_loss": 50,
        "ira_trap": false,
        "trace": "2026-02-08 is within 2026-02-08..2026-04-09 (sale 2026-03-10 ±30d) so the 50 loss is disallowed under the declared section 1091 method",
        "overall": "WASH_SALE_FLAGGED"
      },
      "golden_hash": "1e783b144c521664ae16bb4f0e02fd88b4383f1e20378d42ce46db96f6512200"
    },
    {
      "name": "fractional-loss-half-up-rounding",
      "policy_parameters": {
        "sale": {
          "lot_id": "SYN-F",
          "sale_date": "2026-01-15",
          "realized_loss": 1234.567
        },
        "replacement_purchases": [
          {
            "date": "2026-01-20",
            "account_type": "taxable"
          }
        ]
      },
      "output_payload": {
        "window_start": "2025-12-16",
        "window_end": "2026-02-14",
        "replacements_in_window": 1,
        "disallowed_loss": 1234.57,
        "ira_trap": false,
        "trace": "2026-01-20 is within 2025-12-16..2026-02-14 (sale 2026-01-15 ±30d) so the 1234.57 loss is disallowed under the declared section 1091 method",
        "overall": "WASH_SALE_FLAGGED"
      },
      "golden_hash": "24451672e70465d12a7d31db567aa9baca029083e30544a9852df33ce7d50144"
    }
  ],
  "human_sign_off": "PENDING"
}
