{
  "description": "What a network keeps from a manifest's profile (ADR-017 Amendment 2, A2.5): each case's profile, read at now, gives kept. Every field is checked alone and dropped alone; categories use vocab/categories.json at vocabulary_version. Hours are kept only with a zone the network knows and at least one good window (a window may close at 24:00); closures that ended before now in that zone are dropped. From the network.",
  "vocabulary_version": 4,
  "cases": [
    {
      "name": "the inbox's own shape, every field",
      "now": "2026-12-01T10:00:00Z",
      "profile": {
        "name": "Ana's Salon",
        "description": "Cuts, colour and styling in Alfama. Walk-ins before noon.",
        "categories": ["hair-beauty"],
        "languages": ["pt", "en"],
        "address": {
          "streetAddress": "Rua X 1",
          "addressLocality": "Lisboa",
          "postalCode": "1100-001",
          "addressCountry": "PT"
        },
        "geo": {
          "latitude": 38.711,
          "longitude": -9.13
        },
        "url": "https://ana.example",
        "contact_email": "ana@ana.example",
        "hours": {
          "timezone": "Europe/Lisbon",
          "weekly": {
            "tue": [["09:00", "13:00"], ["14:00", "19:00"]],
            "sat": [["09:00", "13:00"]]
          },
          "closures": [
            {
              "from": "2026-12-24",
              "to": "2026-12-26",
              "reason": "Christmas"
            }
          ]
        },
        "services": [
          {
            "name": "Haircut",
            "type": "booking"
          },
          {
            "name": "Gift card",
            "type": "order"
          }
        ]
      },
      "kept": {
        "name": "Ana's Salon",
        "description": "Cuts, colour and styling in Alfama. Walk-ins before noon.",
        "url": "https://ana.example",
        "categories": ["hair-beauty"],
        "tags": [],
        "languages": ["pt", "en"],
        "address": {
          "street": "Rua X 1",
          "locality": "Lisboa",
          "postal_code": "1100-001",
          "country": "PT"
        },
        "geo": {
          "lat": 38.711,
          "lng": -9.13
        },
        "hours": {
          "timezone": "Europe/Lisbon",
          "weekly": {
            "tue": [["09:00", "13:00"], ["14:00", "19:00"]],
            "sat": [["09:00", "13:00"]]
          },
          "closures": [
            {
              "from": "2026-12-24",
              "to": "2026-12-26"
            }
          ]
        },
        "services": [
          {
            "name": "Haircut",
            "type": "booking"
          },
          {
            "name": "Gift card",
            "type": "order"
          }
        ]
      }
    },
    {
      "name": "categories: a slug, label or synonym in English or Portuguese is its slug, ignoring case, accents and punctuation; anything else is a tag",
      "now": "2026-12-01T10:00:00Z",
      "profile": {
        "categories": [
          "Cabeleireiro",
          "HAIR & BEAUTY",
          "Estetica",
          "vegan",
          "  Vegan ",
          "Tatuagens",
          "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "Padaria e Pastelaria",
          "e",
          "",
          7
        ]
      },
      "kept": {
        "name": "",
        "description": "",
        "categories": ["hair-beauty", "bakery"],
        "tags": ["vegan", "tatuagens"],
        "languages": [],
        "address": {},
        "geo": null,
        "hours": null,
        "services": []
      }
    },
    {
      "name": "categories: at most 10 slugs and 10 tags, the first ones",
      "now": "2026-12-01T10:00:00Z",
      "profile": {
        "categories": [
          "restaurant",
          "cafe",
          "bakery",
          "bar",
          "grocery",
          "shop",
          "hair-beauty",
          "wellness",
          "fitness",
          "health",
          "dental",
          "t1",
          "t2",
          "t3",
          "t4",
          "t5",
          "t6",
          "t7",
          "t8",
          "t9",
          "t10",
          "t11"
        ]
      },
      "kept": {
        "name": "",
        "description": "",
        "languages": [],
        "address": {},
        "geo": null,
        "hours": null,
        "services": [],
        "categories": [
          "restaurant",
          "cafe",
          "bakery",
          "bar",
          "grocery",
          "shop",
          "hair-beauty",
          "wellness",
          "fitness",
          "health"
        ],
        "tags": ["t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "t9", "t10"]
      }
    },
    {
      "name": "hours: each bad part is dropped alone; overlapping windows merge; closures one per first day, ended ones dropped",
      "now": "2026-12-01T10:00:00Z",
      "profile": {
        "hours": {
          "timezone": "Europe/Lisbon",
          "weekly": {
            "mon": [["18:00", "09:00"], ["09:00", "12:00"]],
            "tue": [
              ["08:00", "09:00"],
              ["10:00", "11:00"],
              ["12:00", "13:00"],
              ["14:00", "15:00"],
              ["16:00", "17:00"],
              ["18:00", "19:00"],
              ["20:00", "21:00"]
            ],
            "funday": [["09:00", "17:00"]],
            "Wed": [["09:00", "17:00"]],
            "wed": [["09:00", "13:00"], ["12:00", "15:00"], ["15:00", "18:00"]],
            "thu": [["9:00", "12:00"], ["24:00", "25:00"], "09:00-12:00", ["09:00"]],
            "fri": [["08:00", "12:00"], ["08:00", "12:00"]],
            "sat": "closed"
          },
          "closures": [
            {
              "from": "2026-02-30",
              "to": "2026-03-01"
            },
            {
              "from": "2026-12-26",
              "to": "2026-12-24"
            },
            {
              "from": "2026-11-01",
              "to": "2026-11-02"
            },
            {
              "from": "2026-12-24",
              "to": "2026-12-24"
            },
            {
              "from": "2026-12-24",
              "to": "2026-12-26"
            },
            {
              "from": "2026-11-30",
              "to": "2026-12-01"
            },
            "2027-01-01"
          ]
        }
      },
      "kept": {
        "name": "",
        "description": "",
        "categories": [],
        "tags": [],
        "languages": [],
        "address": {},
        "geo": null,
        "services": [],
        "hours": {
          "timezone": "Europe/Lisbon",
          "weekly": {
            "mon": [["09:00", "12:00"]],
            "wed": [["09:00", "18:00"]],
            "fri": [["08:00", "12:00"]]
          },
          "closures": [
            {
              "from": "2026-11-30",
              "to": "2026-12-01"
            },
            {
              "from": "2026-12-24",
              "to": "2026-12-26"
            }
          ]
        }
      }
    },
    {
      "name": "hours: a closure has ended when its last day is over in the business's zone",
      "now": "2026-12-01T12:00:00Z",
      "profile": {
        "hours": {
          "timezone": "Pacific/Auckland",
          "weekly": {
            "mon": [["09:00", "17:00"]]
          },
          "closures": [
            {
              "from": "2026-12-01",
              "to": "2026-12-01"
            },
            {
              "from": "2026-12-02",
              "to": "2026-12-02"
            }
          ]
        }
      },
      "kept": {
        "name": "",
        "description": "",
        "categories": [],
        "tags": [],
        "languages": [],
        "address": {},
        "geo": null,
        "services": [],
        "hours": {
          "timezone": "Pacific/Auckland",
          "weekly": {
            "mon": [["09:00", "17:00"]]
          },
          "closures": [
            {
              "from": "2026-12-02",
              "to": "2026-12-02"
            }
          ]
        }
      }
    },
    {
      "name": "hours: without a zone the network knows, or without one good window, there are none",
      "now": "2026-12-01T10:00:00Z",
      "profile": {
        "name": "No hours",
        "hours": {
          "timezone": "Mars/Olympus_Mons",
          "weekly": {
            "mon": [["09:00", "17:00"]]
          }
        }
      },
      "kept": {
        "name": "No hours",
        "description": "",
        "categories": [],
        "tags": [],
        "languages": [],
        "address": {},
        "geo": null,
        "hours": null,
        "services": []
      }
    },
    {
      "name": "hours: a window may close at 24:00, so 00:00 to 24:00 is the whole day and open through the night is a window to 24:00 and the next day's from 00:00; nothing opens at 24:00",
      "now": "2026-12-01T10:00:00Z",
      "profile": {
        "hours": {
          "timezone": "Europe/Lisbon",
          "weekly": {
            "mon": [["00:00", "24:00"]],
            "fri": [["18:00", "24:00"], ["09:00", "13:00"]],
            "sat": [["00:00", "02:00"], ["24:00", "25:00"]],
            "sun": [["24:00", "24:00"]]
          }
        }
      },
      "kept": {
        "name": "",
        "description": "",
        "categories": [],
        "tags": [],
        "languages": [],
        "address": {},
        "geo": null,
        "services": [],
        "hours": {
          "timezone": "Europe/Lisbon",
          "weekly": {
            "mon": [["00:00", "24:00"]],
            "fri": [["09:00", "13:00"], ["18:00", "24:00"]],
            "sat": [["00:00", "02:00"]]
          },
          "closures": []
        }
      }
    },
    {
      "name": "hours: no good window",
      "now": "2026-12-01T10:00:00Z",
      "profile": {
        "hours": {
          "timezone": "Europe/Lisbon",
          "weekly": {
            "mon": [],
            "tue": [["19:00", "09:00"]]
          },
          "closures": [
            {
              "from": "2026-12-24",
              "to": "2026-12-26"
            }
          ]
        }
      },
      "kept": {
        "name": "",
        "description": "",
        "categories": [],
        "tags": [],
        "languages": [],
        "address": {},
        "geo": null,
        "hours": null,
        "services": []
      }
    },
    {
      "name": "a field of the wrong type is dropped alone",
      "now": "2026-12-01T10:00:00Z",
      "profile": {
        "name": 42,
        "description": ["x"],
        "url": "javascript:alert(1)",
        "categories": "hair",
        "languages": ["pt", 7, "EN-gb", "english", "pt", "p", "zh-hant-tw-x"],
        "address": "Rua X",
        "geo": {
          "latitude": "38.7",
          "longitude": -9.1
        },
        "hours": [],
        "services": {
          "name": "Haircut",
          "type": "booking"
        }
      },
      "kept": {
        "name": "",
        "description": "",
        "categories": [],
        "tags": [],
        "languages": ["pt", "en-gb"],
        "address": {},
        "geo": null,
        "hours": null,
        "services": []
      }
    },
    {
      "name": "text a person reads is cleaned: controls and reordering characters out, white space collapsed, cut to length",
      "now": "2026-12-01T10:00:00Z",
      "profile": {
        "name": "  Ana\u0000's \u202eSalon \n\t ",
        "url": " http://ana.example/path?q=1 ",
        "description": "ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ",
        "address": {
          "streetAddress": "Rua\tX\n1",
          "addressLocality": " Lisboa ",
          "postalCode": "1100-001 1100-001 1100-001",
          "addressCountry": "prt"
        },
        "services": [
          {
            "name": " Hair\u0007cut ",
            "type": "booking"
          },
          {
            "name": "haircut",
            "type": "booking"
          },
          {
            "name": "Haircut",
            "type": "order"
          },
          {
            "name": "Refund",
            "type": "refund"
          },
          {
            "name": "",
            "type": "booking"
          },
          {
            "name": "Colour"
          }
        ]
      },
      "kept": {
        "name": "Ana's Salon",
        "description": "ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab",
        "url": "http://ana.example/path?q=1",
        "categories": [],
        "tags": [],
        "languages": [],
        "address": {
          "street": "Rua X 1",
          "locality": "Lisboa",
          "postal_code": "1100-001 1100-001 11"
        },
        "geo": null,
        "hours": null,
        "services": [
          {
            "name": "Haircut",
            "type": "booking"
          },
          {
            "name": "Haircut",
            "type": "order"
          }
        ]
      }
    },
    {
      "name": "geo: out of range, or 0,0, is no place",
      "now": "2026-12-01T10:00:00Z",
      "profile": {
        "geo": {
          "latitude": 0,
          "longitude": 0
        },
        "address": {
          "addressCountry": "pt"
        }
      },
      "kept": {
        "name": "",
        "description": "",
        "categories": [],
        "tags": [],
        "languages": [],
        "address": {
          "country": "PT"
        },
        "geo": null,
        "hours": null,
        "services": []
      }
    },
    {
      "name": "hours: a date in year 0000 is no real date (the calendar has no year 0), and its closure is dropped alone",
      "now": "2026-12-01T10:00:00Z",
      "profile": {
        "hours": {
          "timezone": "Europe/Lisbon",
          "weekly": {
            "mon": [["09:00", "17:00"]]
          },
          "closures": [
            {
              "from": "0000-01-01",
              "to": "2027-01-31"
            },
            {
              "from": "2026-12-24",
              "to": "2026-12-26"
            },
            {
              "from": "0001-01-01",
              "to": "2026-12-02"
            }
          ]
        }
      },
      "kept": {
        "name": "",
        "description": "",
        "categories": [],
        "tags": [],
        "languages": [],
        "address": {},
        "geo": null,
        "services": [],
        "hours": {
          "timezone": "Europe/Lisbon",
          "weekly": {
            "mon": [["09:00", "17:00"]]
          },
          "closures": [
            {
              "from": "0001-01-01",
              "to": "2026-12-02"
            },
            {
              "from": "2026-12-24",
              "to": "2026-12-26"
            }
          ]
        }
      }
    },
    {
      "name": "text: every character that reorders text (Unicode's Bidi_Control) and the invisible tag characters are removed; a web address holding one is dropped",
      "now": "2026-12-01T10:00:00Z",
      "profile": {
        "name": "Ana\u200f's\u200e Salon\u061c",
        "url": "https://ana.example/\u202efdp.exe",
        "description": "Cuts\udb40\udc20\udb40\udc49\udb40\udc47\udb40\udc4e\udb40\udc4f\udb40\udc52\udb40\udc45 and colour",
        "categories": ["ve\u200fgan", "Cabele\u200fireiro"]
      },
      "kept": {
        "name": "Ana's Salon",
        "description": "Cuts and colour",
        "categories": ["hair-beauty"],
        "tags": ["vegan"],
        "languages": [],
        "address": {},
        "geo": null,
        "hours": null,
        "services": []
      }
    }
  ]
}
