profile.v1.json (90099B)
1 { 2 "contract_version": "1.0.0", 3 "suite": "food_availability_profile", 4 "vectors": [ 5 { 6 "id": "food_authored_unit_g_001", 7 "kind": "food_availability.build_authored_draft.valid", 8 "input": { 9 "details": { 10 "content": { 11 "value": "Microgreens available from a Victoria-area farm." 12 }, 13 "identifier": "microgreens", 14 "title": "Microgreens", 15 "summary": "Local microgreens", 16 "published_at": 1700000000, 17 "location": "Central Saanich, BC", 18 "price": { 19 "amount": "120", 20 "currency": "CAD", 21 "unit": "g" 22 }, 23 "quantity": { 24 "amount": "250", 25 "unit": "g" 26 }, 27 "status": "active", 28 "images": [] 29 }, 30 "created_at": 1700000060 31 }, 32 "expected": { 33 "wire_parts": { 34 "kind": 30402, 35 "content": "Microgreens available from a Victoria-area farm.", 36 "tags": [ 37 [ 38 "d", 39 "microgreens" 40 ], 41 [ 42 "title", 43 "Microgreens" 44 ], 45 [ 46 "summary", 47 "Local microgreens" 48 ], 49 [ 50 "published_at", 51 "1700000000" 52 ], 53 [ 54 "location", 55 "Central Saanich, BC" 56 ], 57 [ 58 "price", 59 "120", 60 "CAD" 61 ], 62 [ 63 "radroots:price_unit", 64 "g" 65 ], 66 [ 67 "radroots:quantity", 68 "250", 69 "g" 70 ], 71 [ 72 "status", 73 "active" 74 ] 75 ] 76 } 77 } 78 }, 79 { 80 "id": "food_authored_unit_kg_002", 81 "kind": "food_availability.build_authored_draft.valid", 82 "input": { 83 "details": { 84 "content": { 85 "value": "Yukon Gold Potatoes available from a Victoria-area farm." 86 }, 87 "identifier": "yukon-gold-potatoes", 88 "title": "Yukon Gold Potatoes", 89 "summary": "Local yukon gold potatoes", 90 "published_at": 1700000000, 91 "location": "Central Saanich, BC", 92 "price": { 93 "amount": "5.5", 94 "currency": "CAD", 95 "unit": "kg" 96 }, 97 "quantity": { 98 "amount": "18", 99 "unit": "kg" 100 }, 101 "status": "active", 102 "images": [] 103 }, 104 "created_at": 1700000060 105 }, 106 "expected": { 107 "wire_parts": { 108 "kind": 30402, 109 "content": "Yukon Gold Potatoes available from a Victoria-area farm.", 110 "tags": [ 111 [ 112 "d", 113 "yukon-gold-potatoes" 114 ], 115 [ 116 "title", 117 "Yukon Gold Potatoes" 118 ], 119 [ 120 "summary", 121 "Local yukon gold potatoes" 122 ], 123 [ 124 "published_at", 125 "1700000000" 126 ], 127 [ 128 "location", 129 "Central Saanich, BC" 130 ], 131 [ 132 "price", 133 "5.5", 134 "CAD" 135 ], 136 [ 137 "radroots:price_unit", 138 "kg" 139 ], 140 [ 141 "radroots:quantity", 142 "18", 143 "kg" 144 ], 145 [ 146 "status", 147 "active" 148 ] 149 ] 150 } 151 } 152 }, 153 { 154 "id": "food_authored_unit_lb_003", 155 "kind": "food_availability.build_authored_draft.valid", 156 "input": { 157 "details": { 158 "content": { 159 "value": "Nantes Carrots available from a Victoria-area farm." 160 }, 161 "identifier": "nantes-carrots", 162 "title": "Nantes Carrots", 163 "summary": "Local nantes carrots", 164 "published_at": 1700000000, 165 "location": "Central Saanich, BC", 166 "price": { 167 "amount": "3.5", 168 "currency": "CAD", 169 "unit": "lb" 170 }, 171 "quantity": { 172 "amount": "24", 173 "unit": "lb" 174 }, 175 "status": "active", 176 "images": [] 177 }, 178 "created_at": 1700000060 179 }, 180 "expected": { 181 "wire_parts": { 182 "kind": 30402, 183 "content": "Nantes Carrots available from a Victoria-area farm.", 184 "tags": [ 185 [ 186 "d", 187 "nantes-carrots" 188 ], 189 [ 190 "title", 191 "Nantes Carrots" 192 ], 193 [ 194 "summary", 195 "Local nantes carrots" 196 ], 197 [ 198 "published_at", 199 "1700000000" 200 ], 201 [ 202 "location", 203 "Central Saanich, BC" 204 ], 205 [ 206 "price", 207 "3.5", 208 "CAD" 209 ], 210 [ 211 "radroots:price_unit", 212 "lb" 213 ], 214 [ 215 "radroots:quantity", 216 "24", 217 "lb" 218 ], 219 [ 220 "status", 221 "active" 222 ] 223 ] 224 } 225 } 226 }, 227 { 228 "id": "food_authored_unit_oz_004", 229 "kind": "food_availability.build_authored_draft.valid", 230 "input": { 231 "details": { 232 "content": { 233 "value": "Fresh Basil available from a Victoria-area farm." 234 }, 235 "identifier": "fresh-basil", 236 "title": "Fresh Basil", 237 "summary": "Local fresh basil", 238 "published_at": 1700000000, 239 "location": "Central Saanich, BC", 240 "price": { 241 "amount": "2.25", 242 "currency": "CAD", 243 "unit": "oz" 244 }, 245 "quantity": { 246 "amount": "16", 247 "unit": "oz" 248 }, 249 "status": "active", 250 "images": [] 251 }, 252 "created_at": 1700000060 253 }, 254 "expected": { 255 "wire_parts": { 256 "kind": 30402, 257 "content": "Fresh Basil available from a Victoria-area farm.", 258 "tags": [ 259 [ 260 "d", 261 "fresh-basil" 262 ], 263 [ 264 "title", 265 "Fresh Basil" 266 ], 267 [ 268 "summary", 269 "Local fresh basil" 270 ], 271 [ 272 "published_at", 273 "1700000000" 274 ], 275 [ 276 "location", 277 "Central Saanich, BC" 278 ], 279 [ 280 "price", 281 "2.25", 282 "CAD" 283 ], 284 [ 285 "radroots:price_unit", 286 "oz" 287 ], 288 [ 289 "radroots:quantity", 290 "16", 291 "oz" 292 ], 293 [ 294 "status", 295 "active" 296 ] 297 ] 298 } 299 } 300 }, 301 { 302 "id": "food_authored_unit_each_005", 303 "kind": "food_availability.build_authored_draft.valid", 304 "input": { 305 "details": { 306 "content": { 307 "value": "Delicata Squash available from a Victoria-area farm." 308 }, 309 "identifier": "delicata-squash", 310 "title": "Delicata Squash", 311 "summary": "Local delicata squash", 312 "published_at": 1700000000, 313 "location": "Central Saanich, BC", 314 "price": { 315 "amount": "4", 316 "currency": "CAD", 317 "unit": "each" 318 }, 319 "quantity": { 320 "amount": "12", 321 "unit": "each" 322 }, 323 "status": "active", 324 "images": [] 325 }, 326 "created_at": 1700000060 327 }, 328 "expected": { 329 "wire_parts": { 330 "kind": 30402, 331 "content": "Delicata Squash available from a Victoria-area farm.", 332 "tags": [ 333 [ 334 "d", 335 "delicata-squash" 336 ], 337 [ 338 "title", 339 "Delicata Squash" 340 ], 341 [ 342 "summary", 343 "Local delicata squash" 344 ], 345 [ 346 "published_at", 347 "1700000000" 348 ], 349 [ 350 "location", 351 "Central Saanich, BC" 352 ], 353 [ 354 "price", 355 "4", 356 "CAD" 357 ], 358 [ 359 "radroots:price_unit", 360 "each" 361 ], 362 [ 363 "radroots:quantity", 364 "12", 365 "each" 366 ], 367 [ 368 "status", 369 "active" 370 ] 371 ] 372 } 373 } 374 }, 375 { 376 "id": "food_authored_unit_dozen_006", 377 "kind": "food_availability.build_authored_draft.valid", 378 "input": { 379 "details": { 380 "content": { 381 "value": "Pasture Eggs available from a Victoria-area farm." 382 }, 383 "identifier": "pasture-eggs", 384 "title": "Pasture Eggs", 385 "summary": "Local pasture eggs", 386 "published_at": 1700000000, 387 "location": "Central Saanich, BC", 388 "price": { 389 "amount": "8", 390 "currency": "CAD", 391 "unit": "dozen" 392 }, 393 "quantity": { 394 "amount": "6", 395 "unit": "dozen" 396 }, 397 "status": "sold", 398 "images": [] 399 }, 400 "created_at": 1700000060 401 }, 402 "expected": { 403 "wire_parts": { 404 "kind": 30402, 405 "content": "Pasture Eggs available from a Victoria-area farm.", 406 "tags": [ 407 [ 408 "d", 409 "pasture-eggs" 410 ], 411 [ 412 "title", 413 "Pasture Eggs" 414 ], 415 [ 416 "summary", 417 "Local pasture eggs" 418 ], 419 [ 420 "published_at", 421 "1700000000" 422 ], 423 [ 424 "location", 425 "Central Saanich, BC" 426 ], 427 [ 428 "price", 429 "8", 430 "CAD" 431 ], 432 [ 433 "radroots:price_unit", 434 "dozen" 435 ], 436 [ 437 "radroots:quantity", 438 "6", 439 "dozen" 440 ], 441 [ 442 "status", 443 "sold" 444 ] 445 ] 446 } 447 } 448 }, 449 { 450 "id": "food_authored_unit_bunch_007", 451 "kind": "food_availability.build_authored_draft.valid", 452 "input": { 453 "details": { 454 "content": { 455 "value": "Lacinato Kale available from a Victoria-area farm." 456 }, 457 "identifier": "lacinato-kale", 458 "title": "Lacinato Kale", 459 "summary": "Local lacinato kale", 460 "published_at": 1700000000, 461 "location": "Central Saanich, BC", 462 "price": { 463 "amount": "4.5", 464 "currency": "CAD", 465 "unit": "bunch" 466 }, 467 "quantity": { 468 "amount": "10", 469 "unit": "bunch" 470 }, 471 "status": "active", 472 "images": [ 473 { 474 "bytes_utf8": "radroots-food-image-one", 475 "url": "https://blossom.victoria.example/85ccc876a2fe359a2f8dd491bbc6c1f5674af8f0e94d11b556a069f8176e303d.webp", 476 "media_type": "image/webp", 477 "uploaded_at": 1700000000, 478 "dimensions": "1200x800" 479 }, 480 { 481 "bytes_utf8": "radroots-food-image-two", 482 "url": "https://blossom.victoria.example/e3d093fc5e999bd2eb6eb476d24fd421accb134efa8dc750bd87d22a7e49fb22.webp", 483 "media_type": "image/webp", 484 "uploaded_at": 1700000000, 485 "dimensions": "800x800" 486 } 487 ] 488 }, 489 "created_at": 1700000060 490 }, 491 "expected": { 492 "wire_parts": { 493 "kind": 30402, 494 "content": "Lacinato Kale available from a Victoria-area farm.", 495 "tags": [ 496 [ 497 "d", 498 "lacinato-kale" 499 ], 500 [ 501 "title", 502 "Lacinato Kale" 503 ], 504 [ 505 "summary", 506 "Local lacinato kale" 507 ], 508 [ 509 "published_at", 510 "1700000000" 511 ], 512 [ 513 "location", 514 "Central Saanich, BC" 515 ], 516 [ 517 "price", 518 "4.5", 519 "CAD" 520 ], 521 [ 522 "radroots:price_unit", 523 "bunch" 524 ], 525 [ 526 "radroots:quantity", 527 "10", 528 "bunch" 529 ], 530 [ 531 "status", 532 "active" 533 ], 534 [ 535 "image", 536 "https://blossom.victoria.example/85ccc876a2fe359a2f8dd491bbc6c1f5674af8f0e94d11b556a069f8176e303d.webp", 537 "1200x800" 538 ], 539 [ 540 "image", 541 "https://blossom.victoria.example/e3d093fc5e999bd2eb6eb476d24fd421accb134efa8dc750bd87d22a7e49fb22.webp", 542 "800x800" 543 ] 544 ] 545 } 546 } 547 }, 548 { 549 "id": "food_authored_unit_punnet_008", 550 "kind": "food_availability.build_authored_draft.valid", 551 "input": { 552 "details": { 553 "content": { 554 "value": "June Strawberries available from a Victoria-area farm." 555 }, 556 "identifier": "june-strawberries", 557 "title": "June Strawberries", 558 "summary": "Local june strawberries", 559 "published_at": 1700000000, 560 "location": "Central Saanich, BC", 561 "price": { 562 "amount": "7", 563 "currency": "CAD", 564 "unit": "punnet" 565 }, 566 "quantity": { 567 "amount": "20", 568 "unit": "punnet" 569 }, 570 "status": "active", 571 "images": [] 572 }, 573 "created_at": 1700000060 574 }, 575 "expected": { 576 "wire_parts": { 577 "kind": 30402, 578 "content": "June Strawberries available from a Victoria-area farm.", 579 "tags": [ 580 [ 581 "d", 582 "june-strawberries" 583 ], 584 [ 585 "title", 586 "June Strawberries" 587 ], 588 [ 589 "summary", 590 "Local june strawberries" 591 ], 592 [ 593 "published_at", 594 "1700000000" 595 ], 596 [ 597 "location", 598 "Central Saanich, BC" 599 ], 600 [ 601 "price", 602 "7", 603 "CAD" 604 ], 605 [ 606 "radroots:price_unit", 607 "punnet" 608 ], 609 [ 610 "radroots:quantity", 611 "20", 612 "punnet" 613 ], 614 [ 615 "status", 616 "active" 617 ] 618 ] 619 } 620 } 621 }, 622 { 623 "id": "food_authored_unit_bag_009", 624 "kind": "food_availability.build_authored_draft.valid", 625 "input": { 626 "details": { 627 "content": { 628 "value": "Gravenstein Apples available from a Victoria-area farm." 629 }, 630 "identifier": "gravenstein-apples", 631 "title": "Gravenstein Apples", 632 "summary": "Local gravenstein apples", 633 "published_at": 1700000000, 634 "location": "Central Saanich, BC", 635 "price": { 636 "amount": "9", 637 "currency": "CAD", 638 "unit": "bag" 639 }, 640 "quantity": null, 641 "status": "active", 642 "images": [] 643 }, 644 "created_at": 1700000060 645 }, 646 "expected": { 647 "wire_parts": { 648 "kind": 30402, 649 "content": "Gravenstein Apples available from a Victoria-area farm.", 650 "tags": [ 651 [ 652 "d", 653 "gravenstein-apples" 654 ], 655 [ 656 "title", 657 "Gravenstein Apples" 658 ], 659 [ 660 "summary", 661 "Local gravenstein apples" 662 ], 663 [ 664 "published_at", 665 "1700000000" 666 ], 667 [ 668 "location", 669 "Central Saanich, BC" 670 ], 671 [ 672 "price", 673 "9", 674 "CAD" 675 ], 676 [ 677 "radroots:price_unit", 678 "bag" 679 ], 680 [ 681 "status", 682 "active" 683 ] 684 ] 685 } 686 } 687 }, 688 { 689 "id": "food_authored_unit_basket_010", 690 "kind": "food_availability.build_authored_draft.valid", 691 "input": { 692 "details": { 693 "content": { 694 "value": "Cherry Tomatoes available from a Victoria-area farm." 695 }, 696 "identifier": "cherry-tomatoes", 697 "title": "Cherry Tomatoes", 698 "summary": "Local cherry tomatoes", 699 "published_at": 1700000000, 700 "location": "Central Saanich, BC", 701 "price": { 702 "amount": "12", 703 "currency": "CAD", 704 "unit": "basket" 705 }, 706 "quantity": { 707 "amount": "8", 708 "unit": "basket" 709 }, 710 "status": "active", 711 "images": [] 712 }, 713 "created_at": 1700000060 714 }, 715 "expected": { 716 "wire_parts": { 717 "kind": 30402, 718 "content": "Cherry Tomatoes available from a Victoria-area farm.", 719 "tags": [ 720 [ 721 "d", 722 "cherry-tomatoes" 723 ], 724 [ 725 "title", 726 "Cherry Tomatoes" 727 ], 728 [ 729 "summary", 730 "Local cherry tomatoes" 731 ], 732 [ 733 "published_at", 734 "1700000000" 735 ], 736 [ 737 "location", 738 "Central Saanich, BC" 739 ], 740 [ 741 "price", 742 "12", 743 "CAD" 744 ], 745 [ 746 "radroots:price_unit", 747 "basket" 748 ], 749 [ 750 "radroots:quantity", 751 "8", 752 "basket" 753 ], 754 [ 755 "status", 756 "active" 757 ] 758 ] 759 } 760 } 761 }, 762 { 763 "id": "food_authored_wire_budget_ascii_max_011", 764 "kind": "food_availability.build_authored_draft.valid", 765 "input": { 766 "details": { 767 "content": { 768 "repeat": "x", 769 "count": 131072 770 }, 771 "identifier": "wire-budget-pass", 772 "title": "Wire Budget Pass", 773 "summary": "Maximum ASCII content", 774 "published_at": 1700000000, 775 "location": "Central Saanich, BC", 776 "price": { 777 "amount": "1", 778 "currency": "CAD", 779 "unit": "each" 780 }, 781 "quantity": null, 782 "status": "active", 783 "images": [] 784 }, 785 "created_at": 1700000060 786 }, 787 "expected": { 788 "wire_parts": { 789 "kind": 30402, 790 "content_length": 131072, 791 "tags": [ 792 [ 793 "d", 794 "wire-budget-pass" 795 ], 796 [ 797 "title", 798 "Wire Budget Pass" 799 ], 800 [ 801 "summary", 802 "Maximum ASCII content" 803 ], 804 [ 805 "published_at", 806 "1700000000" 807 ], 808 [ 809 "location", 810 "Central Saanich, BC" 811 ], 812 [ 813 "price", 814 "1", 815 "CAD" 816 ], 817 [ 818 "radroots:price_unit", 819 "each" 820 ], 821 [ 822 "status", 823 "active" 824 ] 825 ] 826 } 827 } 828 }, 829 { 830 "id": "food_authored_wire_budget_escaped_overflow_012", 831 "kind": "food_availability.build_authored_draft.invalid", 832 "input": { 833 "details": { 834 "content": { 835 "repeat": "\u0000", 836 "count": 65536 837 }, 838 "identifier": "wire-budget-overflow", 839 "title": "Wire Budget Overflow", 840 "summary": "Escaped JSON expansion", 841 "published_at": 1700000000, 842 "location": "Central Saanich, BC", 843 "price": { 844 "amount": "1", 845 "currency": "CAD", 846 "unit": "each" 847 }, 848 "quantity": null, 849 "status": "active", 850 "images": [] 851 }, 852 "created_at": 1700000060 853 }, 854 "expected": { 855 "error": { 856 "code": "food_event_wire_too_large", 857 "message": "FoodAvailability canonical signed event would be 393796 bytes; max is 262144", 858 "max": 262144, 859 "actual": 393796 860 } 861 } 862 }, 863 { 864 "id": "food_authored_future_published_at_013", 865 "kind": "food_availability.build_authored_draft.invalid", 866 "input": { 867 "details": { 868 "content": { 869 "value": "Future publication" 870 }, 871 "identifier": "future-publication", 872 "title": "Future Publication", 873 "summary": "Invalid publication time", 874 "published_at": 1700000000, 875 "location": "Central Saanich, BC", 876 "price": { 877 "amount": "1", 878 "currency": "CAD", 879 "unit": "each" 880 }, 881 "quantity": null, 882 "status": "active", 883 "images": [] 884 }, 885 "created_at": 1699999999 886 }, 887 "expected": { 888 "error": { 889 "code": "food_published_at_future", 890 "message": "FoodAvailability published_at 1700000000 exceeds created_at 1699999999", 891 "published_at": 1700000000, 892 "created_at": 1699999999 893 } 894 } 895 }, 896 { 897 "id": "food_admission_normalizes_decimal_currency_014", 898 "kind": "food_availability.project_verified_event.valid", 899 "input": { 900 "event": { 901 "id": "20adf6026a55207a21111ac0617c212a2abb8fd15e39f3042991d85da287c74f", 902 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 903 "created_at": 1700000060, 904 "kind": 30402, 905 "tags": [ 906 [ 907 "d", 908 "nantes-carrots" 909 ], 910 [ 911 "title", 912 "Nantes Carrots" 913 ], 914 [ 915 "summary", 916 "Fresh bunches" 917 ], 918 [ 919 "published_at", 920 "1700000000" 921 ], 922 [ 923 "location", 924 "Central Saanich, BC" 925 ], 926 [ 927 "price", 928 "0003.5000", 929 "cad" 930 ], 931 [ 932 "radroots:price_unit", 933 "lb" 934 ], 935 [ 936 "radroots:quantity", 937 "0010.00", 938 "lb" 939 ], 940 [ 941 "status", 942 "active" 943 ] 944 ], 945 "content": "Carrots available this week.", 946 "sig": "94b1b19946890a42cff0b6c08c55f855291c18a7bf89ebc2f0e92af5fa486da207d1c80edd1c166367e63c573a3cfade38f10514cc4cd3b64d67f1ee42540077" 947 } 948 }, 949 "expected": { 950 "outcome": "focused", 951 "event_id": "20adf6026a55207a21111ac0617c212a2abb8fd15e39f3042991d85da287c74f", 952 "projection": { 953 "content": "Carrots available this week.", 954 "identifier": "nantes-carrots", 955 "title": "Nantes Carrots", 956 "summary": "Fresh bunches", 957 "published_at": 1700000000, 958 "location": "Central Saanich, BC", 959 "price": { 960 "amount": "3.5", 961 "currency": "CAD", 962 "unit": "lb" 963 }, 964 "quantity": { 965 "amount": "10", 966 "unit": "lb" 967 }, 968 "status": "active", 969 "images": [], 970 "diagnostics": [] 971 } 972 } 973 }, 974 { 975 "id": "food_admission_optional_standard_tags_015", 976 "kind": "food_availability.verify_and_admit_event.valid", 977 "input": { 978 "event": { 979 "id": "794251d2341134908ee28526447cb8a54bdd608917166fd3678f65e578fbb8c7", 980 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 981 "created_at": 1700000060, 982 "kind": 30402, 983 "tags": [ 984 [ 985 "d", 986 "nantes-carrots" 987 ], 988 [ 989 "title", 990 "Nantes Carrots" 991 ], 992 [ 993 "summary", 994 "Fresh bunches" 995 ], 996 [ 997 "published_at", 998 "1700000000" 999 ], 1000 [ 1001 "location", 1002 "Central Saanich, BC" 1003 ], 1004 [ 1005 "price", 1006 "3", 1007 "CAD" 1008 ], 1009 [ 1010 "radroots:price_unit", 1011 "lb" 1012 ], 1013 [ 1014 "status", 1015 "active" 1016 ], 1017 [ 1018 "t", 1019 "vegetables" 1020 ], 1021 [ 1022 "g", 1023 "c28hr" 1024 ] 1025 ], 1026 "content": "Carrots available this week.", 1027 "sig": "b9d0da50b69689fdd71adc0d698b3e2d04e53c94ec31e23496b4d2fdb96bc1719c5d626881f407682f287f2a5d2bc57159f70a8cd3d1aaae96bd1394c5b1ea0a" 1028 } 1029 }, 1030 "expected": { 1031 "outcome": "admitted", 1032 "event_id": "794251d2341134908ee28526447cb8a54bdd608917166fd3678f65e578fbb8c7", 1033 "projection": { 1034 "content": "Carrots available this week.", 1035 "identifier": "nantes-carrots", 1036 "title": "Nantes Carrots", 1037 "summary": "Fresh bunches", 1038 "published_at": 1700000000, 1039 "location": "Central Saanich, BC", 1040 "price": { 1041 "amount": "3", 1042 "currency": "CAD", 1043 "unit": "lb" 1044 }, 1045 "quantity": null, 1046 "status": "active", 1047 "images": [], 1048 "diagnostics": [] 1049 } 1050 } 1051 }, 1052 { 1053 "id": "food_admission_excludes_operational_before_validation_016", 1054 "kind": "food_availability.project_verified_event.valid", 1055 "input": { 1056 "event": { 1057 "id": "c9e41f7d91b036e21fdce11ab88a5eda6cc19c93875f160f7632b1a844a59d40", 1058 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1059 "created_at": 1700000060, 1060 "kind": 30402, 1061 "tags": [ 1062 [ 1063 "radroots:bin" 1064 ], 1065 [ 1066 "delivery" 1067 ] 1068 ], 1069 "content": "Carrots available this week.", 1070 "sig": "1fc38e6183061bb64f2337941b96a6cc75067b85aa46b4780bd395f62961b54569872c51090bec9f97185add686e3e6e11a1aa0c593d63266c433a614f2d90af" 1071 } 1072 }, 1073 "expected": { 1074 "outcome": "excluded", 1075 "event_id": "c9e41f7d91b036e21fdce11ab88a5eda6cc19c93875f160f7632b1a844a59d40", 1076 "partition": "operational_listing" 1077 } 1078 }, 1079 { 1080 "id": "food_admission_excludes_generic_nip99_017", 1081 "kind": "food_availability.project_verified_event.valid", 1082 "input": { 1083 "event": { 1084 "id": "0d65719b6e73a64f55d95c38ba46e25e222a893d4ec0cdfe83747b1269118d3d", 1085 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1086 "created_at": 1700000060, 1087 "kind": 30402, 1088 "tags": [ 1089 [ 1090 "d", 1091 "generic-offer" 1092 ], 1093 [ 1094 "title", 1095 "Generic Offer" 1096 ] 1097 ], 1098 "content": "Carrots available this week.", 1099 "sig": "e533df401a4c6ddfd7dcfd2b3525e9fb8938748dcdc9492aa617ec50d966554511853704929b88b7fe791f3a36659f341b20245182574dd5e5353fa80f57d441" 1100 } 1101 }, 1102 "expected": { 1103 "outcome": "excluded", 1104 "event_id": "0d65719b6e73a64f55d95c38ba46e25e222a893d4ec0cdfe83747b1269118d3d", 1105 "partition": "generic_nip99" 1106 } 1107 }, 1108 { 1109 "id": "food_admission_rejects_ambiguous_markers_018", 1110 "kind": "food_availability.project_verified_event.invalid", 1111 "input": { 1112 "event": { 1113 "id": "1e40dd34180c85871cc1a7369290876e004d56890ebca9a619f4c1f61e46d866", 1114 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1115 "created_at": 1700000060, 1116 "kind": 30402, 1117 "tags": [ 1118 [ 1119 "radroots:price_unit" 1120 ], 1121 [ 1122 "radroots:price" 1123 ] 1124 ], 1125 "content": "Carrots available this week.", 1126 "sig": "1da60ee3d831adae2aeb61df60c2e14f7168b696cf50a9362f326119d5c4d5a03dd8d6da1c9b10a29c3dd4ffbbfbe76404d758ee149bb56b13e2fe14eece385f" 1127 } 1128 }, 1129 "expected": { 1130 "error": { 1131 "code": "food_profile_ambiguous", 1132 "message": "classified listing mixes focused and operational markers" 1133 } 1134 } 1135 }, 1136 { 1137 "id": "food_admission_rejects_wrong_kind_019", 1138 "kind": "food_availability.project_verified_event.invalid", 1139 "input": { 1140 "event": { 1141 "id": "2cdc1807110058f1732d68e5de00b0f1cb3dd9e067aa36af835a3823f522a6d2", 1142 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1143 "created_at": 1700000060, 1144 "kind": 1, 1145 "tags": [ 1146 [ 1147 "d", 1148 "nantes-carrots" 1149 ], 1150 [ 1151 "title", 1152 "Nantes Carrots" 1153 ], 1154 [ 1155 "summary", 1156 "Fresh bunches" 1157 ], 1158 [ 1159 "published_at", 1160 "1700000000" 1161 ], 1162 [ 1163 "location", 1164 "Central Saanich, BC" 1165 ], 1166 [ 1167 "price", 1168 "3", 1169 "CAD" 1170 ], 1171 [ 1172 "radroots:price_unit", 1173 "lb" 1174 ], 1175 [ 1176 "status", 1177 "active" 1178 ] 1179 ], 1180 "content": "Carrots available this week.", 1181 "sig": "957d64ffbe2f7dd94c785aa2111e6b0e6e3d6220bd2a756ff75aeb44dc1663d08a23345ad4a1729c0d6aaf1cf35f8f22021262f9131a15364e303d774eb2b2f6" 1182 } 1183 }, 1184 "expected": { 1185 "error": { 1186 "code": "invalid_kind", 1187 "message": "FoodAvailability event kind must be 30402, got 1" 1188 } 1189 } 1190 }, 1191 { 1192 "id": "food_admission_rejects_core_tag_shape_020", 1193 "kind": "food_availability.project_verified_event.invalid", 1194 "input": { 1195 "event": { 1196 "id": "c9902f6f65bbd890fc5b89119aeae481ae66359ed1c5f8b763a72cb11e89a75c", 1197 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1198 "created_at": 1700000060, 1199 "kind": 30402, 1200 "tags": [ 1201 [ 1202 "radroots:price_unit" 1203 ] 1204 ], 1205 "content": "Carrots available this week.", 1206 "sig": "0d2fe687930c908410b667b025dbf2630790a06b957473aabfeecd93467b8ec4e9ec52dee83807c68c06bfab12efe89e4b039c751bd07d6618a4b2e7fc339f83" 1207 } 1208 }, 1209 "expected": { 1210 "error": { 1211 "code": "food_tag_invalid", 1212 "message": "FoodAvailability core tag shape is invalid" 1213 } 1214 } 1215 }, 1216 { 1217 "id": "food_admission_rejects_prohibited_delivery_021", 1218 "kind": "food_availability.project_verified_event.invalid", 1219 "input": { 1220 "event": { 1221 "id": "da2bee62ff0c998eaebe8e881c1e1388b2e5f8922d8973fce908fc21d24f7868", 1222 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1223 "created_at": 1700000060, 1224 "kind": 30402, 1225 "tags": [ 1226 [ 1227 "d", 1228 "nantes-carrots" 1229 ], 1230 [ 1231 "title", 1232 "Nantes Carrots" 1233 ], 1234 [ 1235 "summary", 1236 "Fresh bunches" 1237 ], 1238 [ 1239 "published_at", 1240 "1700000000" 1241 ], 1242 [ 1243 "location", 1244 "Central Saanich, BC" 1245 ], 1246 [ 1247 "price", 1248 "3", 1249 "CAD" 1250 ], 1251 [ 1252 "radroots:price_unit", 1253 "lb" 1254 ], 1255 [ 1256 "status", 1257 "active" 1258 ], 1259 [ 1260 "delivery", 1261 "tomorrow" 1262 ] 1263 ], 1264 "content": "Carrots available this week.", 1265 "sig": "73534923e2a0cb6f37dfeaf1947c32da2cea110f48d642366b18eaed501c9b4227eb11c86bc83433fc0f03054d89260e860d3fb055c3c3a8ef70238f77dac2d5" 1266 } 1267 }, 1268 "expected": { 1269 "error": { 1270 "code": "prohibited_capability", 1271 "message": "FoodAvailability tag `delivery` is a prohibited capability" 1272 } 1273 } 1274 }, 1275 { 1276 "id": "food_admission_rejects_price_frequency_022", 1277 "kind": "food_availability.project_verified_event.invalid", 1278 "input": { 1279 "event": { 1280 "id": "d376ad9ac9446dcca0285ab284d72662a8fba02a71f5f7501ba40299fdbc5041", 1281 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1282 "created_at": 1700000060, 1283 "kind": 30402, 1284 "tags": [ 1285 [ 1286 "d", 1287 "nantes-carrots" 1288 ], 1289 [ 1290 "title", 1291 "Nantes Carrots" 1292 ], 1293 [ 1294 "summary", 1295 "Fresh bunches" 1296 ], 1297 [ 1298 "published_at", 1299 "1700000000" 1300 ], 1301 [ 1302 "location", 1303 "Central Saanich, BC" 1304 ], 1305 [ 1306 "price", 1307 "3", 1308 "CAD", 1309 "week" 1310 ], 1311 [ 1312 "radroots:price_unit", 1313 "lb" 1314 ], 1315 [ 1316 "status", 1317 "active" 1318 ] 1319 ], 1320 "content": "Carrots available this week.", 1321 "sig": "d5dd7a9864e78c374b7213b0460fdb142c4fd54dba4b7795781bc348095438852b3535ff64d8eb692baf1c572ee5c254e759b93293d27e0885e7ef0bb53af35b" 1322 } 1323 }, 1324 "expected": { 1325 "error": { 1326 "code": "price_frequency_forbidden", 1327 "message": "FoodAvailability price frequency is forbidden" 1328 } 1329 } 1330 }, 1331 { 1332 "id": "food_admission_requires_price_unit_023", 1333 "kind": "food_availability.project_verified_event.invalid", 1334 "input": { 1335 "event": { 1336 "id": "6317ed3da993b973aed902dd6c1e3b12f2bc70523a91de034f735e10b89b7255", 1337 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1338 "created_at": 1700000060, 1339 "kind": 30402, 1340 "tags": [ 1341 [ 1342 "d", 1343 "nantes-carrots" 1344 ], 1345 [ 1346 "title", 1347 "Nantes Carrots" 1348 ], 1349 [ 1350 "summary", 1351 "Fresh bunches" 1352 ], 1353 [ 1354 "published_at", 1355 "1700000000" 1356 ], 1357 [ 1358 "location", 1359 "Central Saanich, BC" 1360 ], 1361 [ 1362 "price", 1363 "3", 1364 "CAD" 1365 ], 1366 [ 1367 "radroots:quantity", 1368 "10", 1369 "lb" 1370 ], 1371 [ 1372 "status", 1373 "active" 1374 ] 1375 ], 1376 "content": "Carrots available this week.", 1377 "sig": "a318aaae549bb91eaf7a1c5c042972c7e70fa26282a705df8d0414557aa2a41bca87ad88d7f1fef7c2edba05ce9562db46be90028aa5f40d66b82af0fd837c4e" 1378 } 1379 }, 1380 "expected": { 1381 "error": { 1382 "code": "price_unit_missing", 1383 "message": "FoodAvailability price unit is missing" 1384 } 1385 } 1386 }, 1387 { 1388 "id": "food_admission_bounds_raw_decimal_digits_024", 1389 "kind": "food_availability.project_verified_event.invalid", 1390 "input": { 1391 "event": { 1392 "id": "dd884aeb7c7cd3f8e7b29c6992fdc44e6f9d8ebf0cd964708acd1bc334b1d238", 1393 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1394 "created_at": 1700000060, 1395 "kind": 30402, 1396 "tags": [ 1397 [ 1398 "d", 1399 "nantes-carrots" 1400 ], 1401 [ 1402 "title", 1403 "Nantes Carrots" 1404 ], 1405 [ 1406 "summary", 1407 "Fresh bunches" 1408 ], 1409 [ 1410 "published_at", 1411 "1700000000" 1412 ], 1413 [ 1414 "location", 1415 "Central Saanich, BC" 1416 ], 1417 [ 1418 "price", 1419 "00000000000000000000000000003", 1420 "CAD" 1421 ], 1422 [ 1423 "radroots:price_unit", 1424 "lb" 1425 ], 1426 [ 1427 "status", 1428 "active" 1429 ] 1430 ], 1431 "content": "Carrots available this week.", 1432 "sig": "eae8efa71b884818173ba4a5c41615be10e111cb221117feccd43fc69281517480188644e08921d608c03d7fbbcdc1875796de8d2013a85d23cf537c0fa28cda" 1433 } 1434 }, 1435 "expected": { 1436 "error": { 1437 "code": "price_invalid", 1438 "message": "FoodAvailability price must be a canonical unsigned decimal with at most 28 digits" 1439 } 1440 } 1441 }, 1442 { 1443 "id": "food_admission_rejects_malformed_price_unit_025", 1444 "kind": "food_availability.project_verified_event.invalid", 1445 "input": { 1446 "event": { 1447 "id": "9ae38292772927c1e92e65505e280f8e93e997d90bb4528fffff2f1fa350e10d", 1448 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1449 "created_at": 1700000060, 1450 "kind": 30402, 1451 "tags": [ 1452 [ 1453 "d", 1454 "nantes-carrots" 1455 ], 1456 [ 1457 "title", 1458 "Nantes Carrots" 1459 ], 1460 [ 1461 "summary", 1462 "Fresh bunches" 1463 ], 1464 [ 1465 "published_at", 1466 "1700000000" 1467 ], 1468 [ 1469 "location", 1470 "Central Saanich, BC" 1471 ], 1472 [ 1473 "price", 1474 "3", 1475 "CAD" 1476 ], 1477 [ 1478 "radroots:price_unit" 1479 ], 1480 [ 1481 "status", 1482 "active" 1483 ] 1484 ], 1485 "content": "Carrots available this week.", 1486 "sig": "e276e8dfd4cc4e5b11b9981fd20ca165a9537180b2919e20cdbd43652d0806c4e3f17cc4966e4b35aa86eb82a3bc9fcb07ecb44a49cee27e24aec64d0bcaa457" 1487 } 1488 }, 1489 "expected": { 1490 "error": { 1491 "code": "price_unit_invalid", 1492 "message": "FoodAvailability price unit is not governed" 1493 } 1494 } 1495 }, 1496 { 1497 "id": "food_admission_rejects_quantity_unit_mismatch_026", 1498 "kind": "food_availability.project_verified_event.invalid", 1499 "input": { 1500 "event": { 1501 "id": "7c861cdfd2275445c756bd8d136d340df3e1133a7c480d9e2c91df06cef58d44", 1502 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1503 "created_at": 1700000060, 1504 "kind": 30402, 1505 "tags": [ 1506 [ 1507 "d", 1508 "nantes-carrots" 1509 ], 1510 [ 1511 "title", 1512 "Nantes Carrots" 1513 ], 1514 [ 1515 "summary", 1516 "Fresh bunches" 1517 ], 1518 [ 1519 "published_at", 1520 "1700000000" 1521 ], 1522 [ 1523 "location", 1524 "Central Saanich, BC" 1525 ], 1526 [ 1527 "price", 1528 "3", 1529 "CAD" 1530 ], 1531 [ 1532 "radroots:price_unit", 1533 "lb" 1534 ], 1535 [ 1536 "radroots:quantity", 1537 "10", 1538 "kg" 1539 ], 1540 [ 1541 "status", 1542 "active" 1543 ] 1544 ], 1545 "content": "Carrots available this week.", 1546 "sig": "7f7524cc5170a6076fed95a6f53e6d597c94c6a3373f56a062740f915258f93bc2ff1116776479736804023ca8059d0e13b790f60a98429cca318262256bbec1" 1547 } 1548 }, 1549 "expected": { 1550 "error": { 1551 "code": "quantity_invalid", 1552 "message": "FoodAvailability quantity must be canonical and use the price unit" 1553 } 1554 } 1555 }, 1556 { 1557 "id": "food_admission_rejects_status_027", 1558 "kind": "food_availability.project_verified_event.invalid", 1559 "input": { 1560 "event": { 1561 "id": "22e22dba9ea96a763a296633438a2b7a18b0358324677519cc16636d280518b5", 1562 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1563 "created_at": 1700000060, 1564 "kind": 30402, 1565 "tags": [ 1566 [ 1567 "d", 1568 "nantes-carrots" 1569 ], 1570 [ 1571 "title", 1572 "Nantes Carrots" 1573 ], 1574 [ 1575 "summary", 1576 "Fresh bunches" 1577 ], 1578 [ 1579 "published_at", 1580 "1700000000" 1581 ], 1582 [ 1583 "location", 1584 "Central Saanich, BC" 1585 ], 1586 [ 1587 "price", 1588 "3", 1589 "CAD" 1590 ], 1591 [ 1592 "radroots:price_unit", 1593 "lb" 1594 ], 1595 [ 1596 "status", 1597 "paused" 1598 ] 1599 ], 1600 "content": "Carrots available this week.", 1601 "sig": "5728cd88796dc4beed1d293db77a9e5a9297bb9e3d7d56b9ee108f3c6d3ad2fd5468b359d1fba09a4eeca7539d678d2e373c8bd151969e19feaceb9aebaca917" 1602 } 1603 }, 1604 "expected": { 1605 "error": { 1606 "code": "food_status_invalid", 1607 "message": "FoodAvailability status must be active or sold" 1608 } 1609 } 1610 }, 1611 { 1612 "id": "food_admission_rejects_future_published_at_028", 1613 "kind": "food_availability.project_verified_event.invalid", 1614 "input": { 1615 "event": { 1616 "id": "6f21223ebac44a2888abe98e4aefcc7368f1150fa8eac379b964f33657ec2f0b", 1617 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1618 "created_at": 1700000060, 1619 "kind": 30402, 1620 "tags": [ 1621 [ 1622 "d", 1623 "nantes-carrots" 1624 ], 1625 [ 1626 "title", 1627 "Nantes Carrots" 1628 ], 1629 [ 1630 "summary", 1631 "Fresh bunches" 1632 ], 1633 [ 1634 "published_at", 1635 "1700000061" 1636 ], 1637 [ 1638 "location", 1639 "Central Saanich, BC" 1640 ], 1641 [ 1642 "price", 1643 "3", 1644 "CAD" 1645 ], 1646 [ 1647 "radroots:price_unit", 1648 "lb" 1649 ], 1650 [ 1651 "status", 1652 "active" 1653 ] 1654 ], 1655 "content": "Carrots available this week.", 1656 "sig": "71256286f982d6daa7e2253f4b5f33c7f65aaa02a36182401629f0bc771cf613ad17544be1d820cfba1484c83251c17f87769fa44ee35b12ceee4327cec455db" 1657 } 1658 }, 1659 "expected": { 1660 "error": { 1661 "code": "food_published_at_future", 1662 "message": "FoodAvailability published_at 1700000061 exceeds created_at 1700000060" 1663 } 1664 } 1665 }, 1666 { 1667 "id": "food_admission_preserves_ordered_image_diagnostics_029", 1668 "kind": "food_availability.project_verified_event.valid", 1669 "input": { 1670 "event": { 1671 "id": "96b4a10932919010172a00667ccebb8684a89e7cc3c4c51202d2870fd8b5acfe", 1672 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1673 "created_at": 1700000060, 1674 "kind": 30402, 1675 "tags": [ 1676 [ 1677 "d", 1678 "nantes-carrots" 1679 ], 1680 [ 1681 "title", 1682 "Nantes Carrots" 1683 ], 1684 [ 1685 "summary", 1686 "Fresh bunches" 1687 ], 1688 [ 1689 "published_at", 1690 "1700000000" 1691 ], 1692 [ 1693 "location", 1694 "Central Saanich, BC" 1695 ], 1696 [ 1697 "price", 1698 "3", 1699 "CAD" 1700 ], 1701 [ 1702 "radroots:price_unit", 1703 "lb" 1704 ], 1705 [ 1706 "status", 1707 "active" 1708 ], 1709 [ 1710 "image", 1711 "https://media.example/2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824.webp" 1712 ], 1713 [ 1714 "image", 1715 "https://media.example/2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824.webp", 1716 "0x600", 1717 "extra" 1718 ], 1719 [ 1720 "image", 1721 "not-a-url", 1722 "800x600" 1723 ] 1724 ], 1725 "content": "Carrots available this week.", 1726 "sig": "1d5eb699944bc1eba93c85071ad1d94878f1c767015391e200b45f1a2066558675a382ede737fb15307a944598687843618c067accf6608f53daad377683c2c9" 1727 } 1728 }, 1729 "expected": { 1730 "outcome": "focused", 1731 "event_id": "96b4a10932919010172a00667ccebb8684a89e7cc3c4c51202d2870fd8b5acfe", 1732 "projection": { 1733 "content": "Carrots available this week.", 1734 "identifier": "nantes-carrots", 1735 "title": "Nantes Carrots", 1736 "summary": "Fresh bunches", 1737 "published_at": 1700000000, 1738 "location": "Central Saanich, BC", 1739 "price": { 1740 "amount": "3", 1741 "currency": "CAD", 1742 "unit": "lb" 1743 }, 1744 "quantity": null, 1745 "status": "active", 1746 "images": [ 1747 { 1748 "raw_tag": [ 1749 "image", 1750 "https://media.example/2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824.webp" 1751 ], 1752 "url": "https://media.example/2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824.webp", 1753 "dimensions": null, 1754 "diagnostics": [ 1755 "food_image_shape_invalid", 1756 "food_image_dimensions_missing" 1757 ], 1758 "qualifies": false 1759 }, 1760 { 1761 "raw_tag": [ 1762 "image", 1763 "https://media.example/2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824.webp", 1764 "0x600", 1765 "extra" 1766 ], 1767 "url": "https://media.example/2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824.webp", 1768 "dimensions": null, 1769 "diagnostics": [ 1770 "food_image_shape_invalid", 1771 "food_image_dimensions_invalid", 1772 "food_image_duplicate_url", 1773 "food_image_duplicate_digest" 1774 ], 1775 "qualifies": false 1776 }, 1777 { 1778 "raw_tag": [ 1779 "image", 1780 "not-a-url", 1781 "800x600" 1782 ], 1783 "url": null, 1784 "dimensions": { 1785 "width": 800, 1786 "height": 600 1787 }, 1788 "diagnostics": [ 1789 "food_image_url_invalid" 1790 ], 1791 "qualifies": false 1792 } 1793 ], 1794 "diagnostics": [ 1795 "food_image_shape_invalid", 1796 "food_image_dimensions_missing", 1797 "food_image_shape_invalid", 1798 "food_image_dimensions_invalid", 1799 "food_image_duplicate_url", 1800 "food_image_duplicate_digest", 1801 "food_image_url_invalid" 1802 ] 1803 } 1804 } 1805 }, 1806 { 1807 "id": "food_admission_bounds_image_projection_030", 1808 "kind": "food_availability.project_verified_event.valid", 1809 "input": { 1810 "event": { 1811 "id": "ac3b37c0368816b8d707e0e2e194c39291ea47fa7bb22dd998fa526b03609280", 1812 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 1813 "created_at": 1700000060, 1814 "kind": 30402, 1815 "tags": [ 1816 [ 1817 "d", 1818 "nantes-carrots" 1819 ], 1820 [ 1821 "title", 1822 "Nantes Carrots" 1823 ], 1824 [ 1825 "summary", 1826 "Fresh bunches" 1827 ], 1828 [ 1829 "published_at", 1830 "1700000000" 1831 ], 1832 [ 1833 "location", 1834 "Central Saanich, BC" 1835 ], 1836 [ 1837 "price", 1838 "3", 1839 "CAD" 1840 ], 1841 [ 1842 "radroots:price_unit", 1843 "lb" 1844 ], 1845 [ 1846 "status", 1847 "active" 1848 ], 1849 [ 1850 "image", 1851 "https://media.example/0000000000000000000000000000000000000000000000000000000000000000.webp", 1852 "800x600" 1853 ], 1854 [ 1855 "image", 1856 "https://media.example/0000000000000000000000000000000000000000000000000000000000000001.webp", 1857 "800x600" 1858 ], 1859 [ 1860 "image", 1861 "https://media.example/0000000000000000000000000000000000000000000000000000000000000002.webp", 1862 "800x600" 1863 ], 1864 [ 1865 "image", 1866 "https://media.example/0000000000000000000000000000000000000000000000000000000000000003.webp", 1867 "800x600" 1868 ], 1869 [ 1870 "image", 1871 "https://media.example/0000000000000000000000000000000000000000000000000000000000000004.webp", 1872 "800x600" 1873 ], 1874 [ 1875 "image", 1876 "https://media.example/0000000000000000000000000000000000000000000000000000000000000005.webp", 1877 "800x600" 1878 ], 1879 [ 1880 "image", 1881 "https://media.example/0000000000000000000000000000000000000000000000000000000000000006.webp", 1882 "800x600" 1883 ], 1884 [ 1885 "image", 1886 "https://media.example/0000000000000000000000000000000000000000000000000000000000000007.webp", 1887 "800x600" 1888 ], 1889 [ 1890 "image", 1891 "https://media.example/0000000000000000000000000000000000000000000000000000000000000008.webp", 1892 "800x600" 1893 ], 1894 [ 1895 "image", 1896 "https://media.example/0000000000000000000000000000000000000000000000000000000000000009.webp", 1897 "800x600" 1898 ], 1899 [ 1900 "image", 1901 "https://media.example/000000000000000000000000000000000000000000000000000000000000000a.webp", 1902 "800x600" 1903 ], 1904 [ 1905 "image", 1906 "https://media.example/000000000000000000000000000000000000000000000000000000000000000b.webp", 1907 "800x600" 1908 ], 1909 [ 1910 "image", 1911 "https://media.example/000000000000000000000000000000000000000000000000000000000000000c.webp", 1912 "800x600" 1913 ], 1914 [ 1915 "image", 1916 "https://media.example/000000000000000000000000000000000000000000000000000000000000000d.webp", 1917 "800x600" 1918 ], 1919 [ 1920 "image", 1921 "https://media.example/000000000000000000000000000000000000000000000000000000000000000e.webp", 1922 "800x600" 1923 ], 1924 [ 1925 "image", 1926 "https://media.example/000000000000000000000000000000000000000000000000000000000000000f.webp", 1927 "800x600" 1928 ], 1929 [ 1930 "image", 1931 "https://media.example/0000000000000000000000000000000000000000000000000000000000000010.webp", 1932 "800x600" 1933 ], 1934 [ 1935 "image", 1936 "https://media.example/0000000000000000000000000000000000000000000000000000000000000011.webp", 1937 "800x600" 1938 ], 1939 [ 1940 "image", 1941 "https://media.example/0000000000000000000000000000000000000000000000000000000000000012.webp", 1942 "800x600" 1943 ], 1944 [ 1945 "image", 1946 "https://media.example/0000000000000000000000000000000000000000000000000000000000000013.webp", 1947 "800x600" 1948 ], 1949 [ 1950 "image", 1951 "https://media.example/0000000000000000000000000000000000000000000000000000000000000014.webp", 1952 "800x600" 1953 ], 1954 [ 1955 "image", 1956 "https://media.example/0000000000000000000000000000000000000000000000000000000000000015.webp", 1957 "800x600" 1958 ], 1959 [ 1960 "image", 1961 "https://media.example/0000000000000000000000000000000000000000000000000000000000000016.webp", 1962 "800x600" 1963 ], 1964 [ 1965 "image", 1966 "https://media.example/0000000000000000000000000000000000000000000000000000000000000017.webp", 1967 "800x600" 1968 ], 1969 [ 1970 "image", 1971 "https://media.example/0000000000000000000000000000000000000000000000000000000000000018.webp", 1972 "800x600" 1973 ], 1974 [ 1975 "image", 1976 "https://media.example/0000000000000000000000000000000000000000000000000000000000000019.webp", 1977 "800x600" 1978 ], 1979 [ 1980 "image", 1981 "https://media.example/000000000000000000000000000000000000000000000000000000000000001a.webp", 1982 "800x600" 1983 ], 1984 [ 1985 "image", 1986 "https://media.example/000000000000000000000000000000000000000000000000000000000000001b.webp", 1987 "800x600" 1988 ], 1989 [ 1990 "image", 1991 "https://media.example/000000000000000000000000000000000000000000000000000000000000001c.webp", 1992 "800x600" 1993 ], 1994 [ 1995 "image", 1996 "https://media.example/000000000000000000000000000000000000000000000000000000000000001d.webp", 1997 "800x600" 1998 ], 1999 [ 2000 "image", 2001 "https://media.example/000000000000000000000000000000000000000000000000000000000000001e.webp", 2002 "800x600" 2003 ], 2004 [ 2005 "image", 2006 "https://media.example/000000000000000000000000000000000000000000000000000000000000001f.webp", 2007 "800x600" 2008 ], 2009 [ 2010 "image", 2011 "https://media.example/0000000000000000000000000000000000000000000000000000000000000020.webp", 2012 "800x600" 2013 ], 2014 [ 2015 "image", 2016 "https://media.example/0000000000000000000000000000000000000000000000000000000000000021.webp", 2017 "800x600" 2018 ], 2019 [ 2020 "image", 2021 "https://media.example/0000000000000000000000000000000000000000000000000000000000000022.webp", 2022 "800x600" 2023 ], 2024 [ 2025 "image", 2026 "https://media.example/0000000000000000000000000000000000000000000000000000000000000023.webp", 2027 "800x600" 2028 ], 2029 [ 2030 "image", 2031 "https://media.example/0000000000000000000000000000000000000000000000000000000000000024.webp", 2032 "800x600" 2033 ], 2034 [ 2035 "image", 2036 "https://media.example/0000000000000000000000000000000000000000000000000000000000000025.webp", 2037 "800x600" 2038 ], 2039 [ 2040 "image", 2041 "https://media.example/0000000000000000000000000000000000000000000000000000000000000026.webp", 2042 "800x600" 2043 ], 2044 [ 2045 "image", 2046 "https://media.example/0000000000000000000000000000000000000000000000000000000000000027.webp", 2047 "800x600" 2048 ], 2049 [ 2050 "image", 2051 "https://media.example/0000000000000000000000000000000000000000000000000000000000000028.webp", 2052 "800x600" 2053 ], 2054 [ 2055 "image", 2056 "https://media.example/0000000000000000000000000000000000000000000000000000000000000029.webp", 2057 "800x600" 2058 ], 2059 [ 2060 "image", 2061 "https://media.example/000000000000000000000000000000000000000000000000000000000000002a.webp", 2062 "800x600" 2063 ], 2064 [ 2065 "image", 2066 "https://media.example/000000000000000000000000000000000000000000000000000000000000002b.webp", 2067 "800x600" 2068 ], 2069 [ 2070 "image", 2071 "https://media.example/000000000000000000000000000000000000000000000000000000000000002c.webp", 2072 "800x600" 2073 ], 2074 [ 2075 "image", 2076 "https://media.example/000000000000000000000000000000000000000000000000000000000000002d.webp", 2077 "800x600" 2078 ], 2079 [ 2080 "image", 2081 "https://media.example/000000000000000000000000000000000000000000000000000000000000002e.webp", 2082 "800x600" 2083 ], 2084 [ 2085 "image", 2086 "https://media.example/000000000000000000000000000000000000000000000000000000000000002f.webp", 2087 "800x600" 2088 ], 2089 [ 2090 "image", 2091 "https://media.example/0000000000000000000000000000000000000000000000000000000000000030.webp", 2092 "800x600" 2093 ], 2094 [ 2095 "image", 2096 "https://media.example/0000000000000000000000000000000000000000000000000000000000000031.webp", 2097 "800x600" 2098 ], 2099 [ 2100 "image", 2101 "https://media.example/0000000000000000000000000000000000000000000000000000000000000032.webp", 2102 "800x600" 2103 ], 2104 [ 2105 "image", 2106 "https://media.example/0000000000000000000000000000000000000000000000000000000000000033.webp", 2107 "800x600" 2108 ], 2109 [ 2110 "image", 2111 "https://media.example/0000000000000000000000000000000000000000000000000000000000000034.webp", 2112 "800x600" 2113 ], 2114 [ 2115 "image", 2116 "https://media.example/0000000000000000000000000000000000000000000000000000000000000035.webp", 2117 "800x600" 2118 ], 2119 [ 2120 "image", 2121 "https://media.example/0000000000000000000000000000000000000000000000000000000000000036.webp", 2122 "800x600" 2123 ], 2124 [ 2125 "image", 2126 "https://media.example/0000000000000000000000000000000000000000000000000000000000000037.webp", 2127 "800x600" 2128 ], 2129 [ 2130 "image", 2131 "https://media.example/0000000000000000000000000000000000000000000000000000000000000038.webp", 2132 "800x600" 2133 ], 2134 [ 2135 "image", 2136 "https://media.example/0000000000000000000000000000000000000000000000000000000000000039.webp", 2137 "800x600" 2138 ], 2139 [ 2140 "image", 2141 "https://media.example/000000000000000000000000000000000000000000000000000000000000003a.webp", 2142 "800x600" 2143 ], 2144 [ 2145 "image", 2146 "https://media.example/000000000000000000000000000000000000000000000000000000000000003b.webp", 2147 "800x600" 2148 ], 2149 [ 2150 "image", 2151 "https://media.example/000000000000000000000000000000000000000000000000000000000000003c.webp", 2152 "800x600" 2153 ], 2154 [ 2155 "image", 2156 "https://media.example/000000000000000000000000000000000000000000000000000000000000003d.webp", 2157 "800x600" 2158 ], 2159 [ 2160 "image", 2161 "https://media.example/000000000000000000000000000000000000000000000000000000000000003e.webp", 2162 "800x600" 2163 ], 2164 [ 2165 "image", 2166 "https://media.example/000000000000000000000000000000000000000000000000000000000000003f.webp", 2167 "800x600" 2168 ], 2169 [ 2170 "image", 2171 "https://media.example/0000000000000000000000000000000000000000000000000000000000000040.webp", 2172 "800x600" 2173 ] 2174 ], 2175 "content": "Carrots available this week.", 2176 "sig": "28775630afde6c73e412d47a1d36227fae11057595186655ceab5a6d96a60f25289a0f5b27c680025152f121b322c35e0bb248f9392567af946dc881f08eb6b5" 2177 } 2178 }, 2179 "expected": { 2180 "outcome": "focused", 2181 "event_id": "ac3b37c0368816b8d707e0e2e194c39291ea47fa7bb22dd998fa526b03609280", 2182 "image_count": 64, 2183 "diagnostics": [ 2184 "food_image_count_exceeded" 2185 ], 2186 "first_raw_tag": [ 2187 "image", 2188 "https://media.example/0000000000000000000000000000000000000000000000000000000000000000.webp", 2189 "800x600" 2190 ], 2191 "last_raw_tag": [ 2192 "image", 2193 "https://media.example/000000000000000000000000000000000000000000000000000000000000003f.webp", 2194 "800x600" 2195 ] 2196 } 2197 }, 2198 { 2199 "id": "food_admission_rejects_invalid_signature_031", 2200 "kind": "food_availability.verify_and_admit_event.invalid", 2201 "input": { 2202 "event": { 2203 "id": "f600337abfe4a2482225a369852c9899784c71d9221635b5ac34bca52a06d2d1", 2204 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2205 "created_at": 1700000060, 2206 "kind": 30402, 2207 "tags": [ 2208 [ 2209 "d", 2210 "nantes-carrots" 2211 ], 2212 [ 2213 "title", 2214 "Nantes Carrots" 2215 ], 2216 [ 2217 "summary", 2218 "Fresh bunches" 2219 ], 2220 [ 2221 "published_at", 2222 "1700000000" 2223 ], 2224 [ 2225 "location", 2226 "Central Saanich, BC" 2227 ], 2228 [ 2229 "price", 2230 "3", 2231 "CAD" 2232 ], 2233 [ 2234 "radroots:price_unit", 2235 "lb" 2236 ], 2237 [ 2238 "status", 2239 "active" 2240 ] 2241 ], 2242 "content": "Carrots available this week.", 2243 "sig": "94b1b19946890a42cff0b6c08c55f855291c18a7bf89ebc2f0e92af5fa486da207d1c80edd1c166367e63c573a3cfade38f10514cc4cd3b64d67f1ee42540077" 2244 } 2245 }, 2246 "expected": { 2247 "error": { 2248 "code": "signature_invalid", 2249 "message": "invalid NIP-01 event signature" 2250 } 2251 } 2252 }, 2253 { 2254 "id": "food_revision_accepts_later_created_at_032", 2255 "kind": "food_availability.validate_revision.valid", 2256 "input": { 2257 "previous": { 2258 "id": "5ce3afebae58643462c935730292791d178a3332686cc4d4e65b3196160209ae", 2259 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2260 "created_at": 1700000060, 2261 "kind": 30402, 2262 "tags": [ 2263 [ 2264 "d", 2265 "nantes-carrots" 2266 ], 2267 [ 2268 "title", 2269 "Nantes Carrots" 2270 ], 2271 [ 2272 "summary", 2273 "Fresh bunches" 2274 ], 2275 [ 2276 "published_at", 2277 "1700000000" 2278 ], 2279 [ 2280 "location", 2281 "Central Saanich, BC" 2282 ], 2283 [ 2284 "price", 2285 "3", 2286 "CAD" 2287 ], 2288 [ 2289 "radroots:price_unit", 2290 "lb" 2291 ], 2292 [ 2293 "radroots:quantity", 2294 "24", 2295 "lb" 2296 ], 2297 [ 2298 "status", 2299 "active" 2300 ] 2301 ], 2302 "content": "Carrots available this week.", 2303 "sig": "11dba7311bf10b63f7913463f6537ff1607d6242787a6c091ece6a4969b74b75d5b286005970fb7fae5de9187438d9b7436ffa2f3057d18ae9b2748843964567" 2304 }, 2305 "current": { 2306 "id": "78304e7b25d60f037f3c65556ecc31075e724394f7ee7c7f94081a4e083432a9", 2307 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2308 "created_at": 1700000061, 2309 "kind": 30402, 2310 "tags": [ 2311 [ 2312 "d", 2313 "nantes-carrots" 2314 ], 2315 [ 2316 "title", 2317 "Nantes Carrots" 2318 ], 2319 [ 2320 "summary", 2321 "Fresh bunches" 2322 ], 2323 [ 2324 "published_at", 2325 "1700000000" 2326 ], 2327 [ 2328 "location", 2329 "Central Saanich, BC" 2330 ], 2331 [ 2332 "price", 2333 "3", 2334 "CAD" 2335 ], 2336 [ 2337 "radroots:price_unit", 2338 "lb" 2339 ], 2340 [ 2341 "radroots:quantity", 2342 "24", 2343 "lb" 2344 ], 2345 [ 2346 "status", 2347 "active" 2348 ] 2349 ], 2350 "content": "Updated carrots", 2351 "sig": "deea0e868afa659aad33572c0c45aecc6d59756e05c442f268d5c7d85ffe319136b3696cbd894546587ea0e0c7090b185a585e236ecbd9050e66c8fc0422106a" 2352 } 2353 }, 2354 "expected": { 2355 "result": "accepted", 2356 "current_event_id": "78304e7b25d60f037f3c65556ecc31075e724394f7ee7c7f94081a4e083432a9" 2357 } 2358 }, 2359 { 2360 "id": "food_revision_rejects_invalid_previous_033", 2361 "kind": "food_availability.validate_revision.invalid", 2362 "input": { 2363 "previous": { 2364 "id": "7d097fd38c0b5a74f7e415178415d8a119607e2338b600fe136829f1dcec8a43", 2365 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2366 "created_at": 1700000060, 2367 "kind": 30402, 2368 "tags": [ 2369 [ 2370 "title", 2371 "Nantes Carrots" 2372 ], 2373 [ 2374 "d", 2375 "nantes-carrots" 2376 ], 2377 [ 2378 "summary", 2379 "Fresh bunches" 2380 ], 2381 [ 2382 "published_at", 2383 "1700000000" 2384 ], 2385 [ 2386 "location", 2387 "Central Saanich, BC" 2388 ], 2389 [ 2390 "price", 2391 "3", 2392 "CAD" 2393 ], 2394 [ 2395 "radroots:price_unit", 2396 "lb" 2397 ], 2398 [ 2399 "radroots:quantity", 2400 "24", 2401 "lb" 2402 ], 2403 [ 2404 "status", 2405 "active" 2406 ] 2407 ], 2408 "content": "Carrots available this week.", 2409 "sig": "46780ae06e1968be9e1031e84a25539a1b120dc70468fda0401078b627ab7fb264f5bbe19aaebe8f32b696aa829564dee58b740cf2f22595b3c1e5fa530dbd38" 2410 }, 2411 "current": { 2412 "id": "46e2c8f4db3621330939318af101b8fc55b5b65ca7bc9e3ea4d498b4627c634c", 2413 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2414 "created_at": 1700000061, 2415 "kind": 30402, 2416 "tags": [ 2417 [ 2418 "d", 2419 "nantes-carrots" 2420 ], 2421 [ 2422 "title", 2423 "Nantes Carrots" 2424 ], 2425 [ 2426 "summary", 2427 "Fresh bunches" 2428 ], 2429 [ 2430 "published_at", 2431 "1700000000" 2432 ], 2433 [ 2434 "location", 2435 "Central Saanich, BC" 2436 ], 2437 [ 2438 "price", 2439 "3", 2440 "CAD" 2441 ], 2442 [ 2443 "radroots:price_unit", 2444 "lb" 2445 ], 2446 [ 2447 "radroots:quantity", 2448 "24", 2449 "lb" 2450 ], 2451 [ 2452 "status", 2453 "active" 2454 ] 2455 ], 2456 "content": "Carrots available this week.", 2457 "sig": "65be312cd60c3c6ec5722bd947375640b9eb32f9dee2692ef25853e2c7ec64b4620aab142d0ad2b8ad6138d8948c962aac6c373ace60a6c99ebad1627b6a1cde" 2458 } 2459 }, 2460 "expected": { 2461 "error": { 2462 "code": "food_revision_previous_invalid", 2463 "message": "previous FoodAvailability revision is invalid: FoodAvailability core tag shape is invalid" 2464 } 2465 } 2466 }, 2467 { 2468 "id": "food_revision_rejects_invalid_current_034", 2469 "kind": "food_availability.validate_revision.invalid", 2470 "input": { 2471 "previous": { 2472 "id": "5ce3afebae58643462c935730292791d178a3332686cc4d4e65b3196160209ae", 2473 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2474 "created_at": 1700000060, 2475 "kind": 30402, 2476 "tags": [ 2477 [ 2478 "d", 2479 "nantes-carrots" 2480 ], 2481 [ 2482 "title", 2483 "Nantes Carrots" 2484 ], 2485 [ 2486 "summary", 2487 "Fresh bunches" 2488 ], 2489 [ 2490 "published_at", 2491 "1700000000" 2492 ], 2493 [ 2494 "location", 2495 "Central Saanich, BC" 2496 ], 2497 [ 2498 "price", 2499 "3", 2500 "CAD" 2501 ], 2502 [ 2503 "radroots:price_unit", 2504 "lb" 2505 ], 2506 [ 2507 "radroots:quantity", 2508 "24", 2509 "lb" 2510 ], 2511 [ 2512 "status", 2513 "active" 2514 ] 2515 ], 2516 "content": "Carrots available this week.", 2517 "sig": "11dba7311bf10b63f7913463f6537ff1607d6242787a6c091ece6a4969b74b75d5b286005970fb7fae5de9187438d9b7436ffa2f3057d18ae9b2748843964567" 2518 }, 2519 "current": { 2520 "id": "b694c47d68fe69f79794420a5b3409866f0e9208bab1ee2738299477fac0bdf7", 2521 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2522 "created_at": 1700000061, 2523 "kind": 30402, 2524 "tags": [ 2525 [ 2526 "d", 2527 "nantes-carrots" 2528 ], 2529 [ 2530 "title", 2531 "Nantes Carrots" 2532 ], 2533 [ 2534 "summary", 2535 "Fresh bunches" 2536 ], 2537 [ 2538 "published_at", 2539 "1700000000" 2540 ], 2541 [ 2542 "location", 2543 "Central Saanich, BC" 2544 ], 2545 [ 2546 "price", 2547 "03.00", 2548 "CAD" 2549 ], 2550 [ 2551 "radroots:price_unit", 2552 "lb" 2553 ], 2554 [ 2555 "radroots:quantity", 2556 "24", 2557 "lb" 2558 ], 2559 [ 2560 "status", 2561 "active" 2562 ] 2563 ], 2564 "content": "Carrots available this week.", 2565 "sig": "416dca196142e25a38b63600ec258d85221d1220192ea80e2c61c0f828837e4887690130e3460fb53bbbe2ad0f6fe80c143212ed7c1f4e898c0249b06c0236f1" 2566 } 2567 }, 2568 "expected": { 2569 "error": { 2570 "code": "food_revision_current_invalid", 2571 "message": "current FoodAvailability revision is invalid: FoodAvailability price must be a canonical unsigned decimal with at most 28 digits" 2572 } 2573 } 2574 }, 2575 { 2576 "id": "food_revision_rejects_identifier_coordinate_change_035", 2577 "kind": "food_availability.validate_revision.invalid", 2578 "input": { 2579 "previous": { 2580 "id": "5ce3afebae58643462c935730292791d178a3332686cc4d4e65b3196160209ae", 2581 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2582 "created_at": 1700000060, 2583 "kind": 30402, 2584 "tags": [ 2585 [ 2586 "d", 2587 "nantes-carrots" 2588 ], 2589 [ 2590 "title", 2591 "Nantes Carrots" 2592 ], 2593 [ 2594 "summary", 2595 "Fresh bunches" 2596 ], 2597 [ 2598 "published_at", 2599 "1700000000" 2600 ], 2601 [ 2602 "location", 2603 "Central Saanich, BC" 2604 ], 2605 [ 2606 "price", 2607 "3", 2608 "CAD" 2609 ], 2610 [ 2611 "radroots:price_unit", 2612 "lb" 2613 ], 2614 [ 2615 "radroots:quantity", 2616 "24", 2617 "lb" 2618 ], 2619 [ 2620 "status", 2621 "active" 2622 ] 2623 ], 2624 "content": "Carrots available this week.", 2625 "sig": "11dba7311bf10b63f7913463f6537ff1607d6242787a6c091ece6a4969b74b75d5b286005970fb7fae5de9187438d9b7436ffa2f3057d18ae9b2748843964567" 2626 }, 2627 "current": { 2628 "id": "16b893630a9b737ff4d05bbbc627ec68ad60c76498dbe75a3ebb1857042d5e08", 2629 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2630 "created_at": 1700000061, 2631 "kind": 30402, 2632 "tags": [ 2633 [ 2634 "d", 2635 "golden-beets" 2636 ], 2637 [ 2638 "title", 2639 "Nantes Carrots" 2640 ], 2641 [ 2642 "summary", 2643 "Fresh bunches" 2644 ], 2645 [ 2646 "published_at", 2647 "1700000000" 2648 ], 2649 [ 2650 "location", 2651 "Central Saanich, BC" 2652 ], 2653 [ 2654 "price", 2655 "3", 2656 "CAD" 2657 ], 2658 [ 2659 "radroots:price_unit", 2660 "lb" 2661 ], 2662 [ 2663 "radroots:quantity", 2664 "24", 2665 "lb" 2666 ], 2667 [ 2668 "status", 2669 "active" 2670 ] 2671 ], 2672 "content": "Carrots available this week.", 2673 "sig": "efd2572f098034f6d653fd6b8bce4486db2b6e366f4ea7832917328ddbacb286a47ad5b45c74b15323e2e271441371543f413e49fd03debe5332cc4f769b4565" 2674 } 2675 }, 2676 "expected": { 2677 "error": { 2678 "code": "food_coordinate_changed", 2679 "message": "FoodAvailability revision coordinate changed" 2680 } 2681 } 2682 }, 2683 { 2684 "id": "food_revision_rejects_author_coordinate_change_036", 2685 "kind": "food_availability.validate_revision.invalid", 2686 "input": { 2687 "previous": { 2688 "id": "5ce3afebae58643462c935730292791d178a3332686cc4d4e65b3196160209ae", 2689 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2690 "created_at": 1700000060, 2691 "kind": 30402, 2692 "tags": [ 2693 [ 2694 "d", 2695 "nantes-carrots" 2696 ], 2697 [ 2698 "title", 2699 "Nantes Carrots" 2700 ], 2701 [ 2702 "summary", 2703 "Fresh bunches" 2704 ], 2705 [ 2706 "published_at", 2707 "1700000000" 2708 ], 2709 [ 2710 "location", 2711 "Central Saanich, BC" 2712 ], 2713 [ 2714 "price", 2715 "3", 2716 "CAD" 2717 ], 2718 [ 2719 "radroots:price_unit", 2720 "lb" 2721 ], 2722 [ 2723 "radroots:quantity", 2724 "24", 2725 "lb" 2726 ], 2727 [ 2728 "status", 2729 "active" 2730 ] 2731 ], 2732 "content": "Carrots available this week.", 2733 "sig": "11dba7311bf10b63f7913463f6537ff1607d6242787a6c091ece6a4969b74b75d5b286005970fb7fae5de9187438d9b7436ffa2f3057d18ae9b2748843964567" 2734 }, 2735 "current": { 2736 "id": "a72f1b05cc4398de9eb9f21389ceadc2d49035667304125855099b86b009e6e1", 2737 "pubkey": "c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5", 2738 "created_at": 1700000061, 2739 "kind": 30402, 2740 "tags": [ 2741 [ 2742 "d", 2743 "nantes-carrots" 2744 ], 2745 [ 2746 "title", 2747 "Nantes Carrots" 2748 ], 2749 [ 2750 "summary", 2751 "Fresh bunches" 2752 ], 2753 [ 2754 "published_at", 2755 "1700000000" 2756 ], 2757 [ 2758 "location", 2759 "Central Saanich, BC" 2760 ], 2761 [ 2762 "price", 2763 "3", 2764 "CAD" 2765 ], 2766 [ 2767 "radroots:price_unit", 2768 "lb" 2769 ], 2770 [ 2771 "radroots:quantity", 2772 "24", 2773 "lb" 2774 ], 2775 [ 2776 "status", 2777 "active" 2778 ] 2779 ], 2780 "content": "Carrots available this week.", 2781 "sig": "fa3b264c55e767d3a1720439eef1c000659143004fbb22fa43ea15ad7b45c79ad4d59dfdbbbab368447ca345c426382f3c92b8377d6362d65e6f5b8b3d2a33e3" 2782 } 2783 }, 2784 "expected": { 2785 "error": { 2786 "code": "food_coordinate_changed", 2787 "message": "FoodAvailability revision coordinate changed" 2788 } 2789 } 2790 }, 2791 { 2792 "id": "food_revision_rejects_published_at_change_037", 2793 "kind": "food_availability.validate_revision.invalid", 2794 "input": { 2795 "previous": { 2796 "id": "5ce3afebae58643462c935730292791d178a3332686cc4d4e65b3196160209ae", 2797 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2798 "created_at": 1700000060, 2799 "kind": 30402, 2800 "tags": [ 2801 [ 2802 "d", 2803 "nantes-carrots" 2804 ], 2805 [ 2806 "title", 2807 "Nantes Carrots" 2808 ], 2809 [ 2810 "summary", 2811 "Fresh bunches" 2812 ], 2813 [ 2814 "published_at", 2815 "1700000000" 2816 ], 2817 [ 2818 "location", 2819 "Central Saanich, BC" 2820 ], 2821 [ 2822 "price", 2823 "3", 2824 "CAD" 2825 ], 2826 [ 2827 "radroots:price_unit", 2828 "lb" 2829 ], 2830 [ 2831 "radroots:quantity", 2832 "24", 2833 "lb" 2834 ], 2835 [ 2836 "status", 2837 "active" 2838 ] 2839 ], 2840 "content": "Carrots available this week.", 2841 "sig": "11dba7311bf10b63f7913463f6537ff1607d6242787a6c091ece6a4969b74b75d5b286005970fb7fae5de9187438d9b7436ffa2f3057d18ae9b2748843964567" 2842 }, 2843 "current": { 2844 "id": "fd0d610781437790e0ec242e3b3d0dd136b75c02c01533b98affd3566e09f54c", 2845 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2846 "created_at": 1700000061, 2847 "kind": 30402, 2848 "tags": [ 2849 [ 2850 "d", 2851 "nantes-carrots" 2852 ], 2853 [ 2854 "title", 2855 "Nantes Carrots" 2856 ], 2857 [ 2858 "summary", 2859 "Fresh bunches" 2860 ], 2861 [ 2862 "published_at", 2863 "1700000001" 2864 ], 2865 [ 2866 "location", 2867 "Central Saanich, BC" 2868 ], 2869 [ 2870 "price", 2871 "3", 2872 "CAD" 2873 ], 2874 [ 2875 "radroots:price_unit", 2876 "lb" 2877 ], 2878 [ 2879 "radroots:quantity", 2880 "24", 2881 "lb" 2882 ], 2883 [ 2884 "status", 2885 "active" 2886 ] 2887 ], 2888 "content": "Carrots available this week.", 2889 "sig": "4e4076d3a0a6b770df87208e54e93962eaa031c57d5168c425f0fb27526aa841a0878873035e75aa9ef98b0dfd654c718afeb02bebe28e590c9b870eb5a8c063" 2890 } 2891 }, 2892 "expected": { 2893 "error": { 2894 "code": "food_published_at_changed", 2895 "message": "FoodAvailability revision published_at changed" 2896 } 2897 } 2898 }, 2899 { 2900 "id": "food_revision_rejects_older_created_at_038", 2901 "kind": "food_availability.validate_revision.invalid", 2902 "input": { 2903 "previous": { 2904 "id": "5ce3afebae58643462c935730292791d178a3332686cc4d4e65b3196160209ae", 2905 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2906 "created_at": 1700000060, 2907 "kind": 30402, 2908 "tags": [ 2909 [ 2910 "d", 2911 "nantes-carrots" 2912 ], 2913 [ 2914 "title", 2915 "Nantes Carrots" 2916 ], 2917 [ 2918 "summary", 2919 "Fresh bunches" 2920 ], 2921 [ 2922 "published_at", 2923 "1700000000" 2924 ], 2925 [ 2926 "location", 2927 "Central Saanich, BC" 2928 ], 2929 [ 2930 "price", 2931 "3", 2932 "CAD" 2933 ], 2934 [ 2935 "radroots:price_unit", 2936 "lb" 2937 ], 2938 [ 2939 "radroots:quantity", 2940 "24", 2941 "lb" 2942 ], 2943 [ 2944 "status", 2945 "active" 2946 ] 2947 ], 2948 "content": "Carrots available this week.", 2949 "sig": "11dba7311bf10b63f7913463f6537ff1607d6242787a6c091ece6a4969b74b75d5b286005970fb7fae5de9187438d9b7436ffa2f3057d18ae9b2748843964567" 2950 }, 2951 "current": { 2952 "id": "4617873052bca26d7b39cdbc26a8134f759de807ba92d2052f96ecf07ab8d6ab", 2953 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 2954 "created_at": 1700000059, 2955 "kind": 30402, 2956 "tags": [ 2957 [ 2958 "d", 2959 "nantes-carrots" 2960 ], 2961 [ 2962 "title", 2963 "Nantes Carrots" 2964 ], 2965 [ 2966 "summary", 2967 "Fresh bunches" 2968 ], 2969 [ 2970 "published_at", 2971 "1700000000" 2972 ], 2973 [ 2974 "location", 2975 "Central Saanich, BC" 2976 ], 2977 [ 2978 "price", 2979 "3", 2980 "CAD" 2981 ], 2982 [ 2983 "radroots:price_unit", 2984 "lb" 2985 ], 2986 [ 2987 "radroots:quantity", 2988 "24", 2989 "lb" 2990 ], 2991 [ 2992 "status", 2993 "active" 2994 ] 2995 ], 2996 "content": "Older candidate", 2997 "sig": "eaa553976301cb71ea22446651909e20fc09bb736b72489ca434e2fd0184be2070fb259c0dd3b93bb8eda195a677eb977c2bc42da3c0b37062b23e908191de4c" 2998 } 2999 }, 3000 "expected": { 3001 "error": { 3002 "code": "food_revision_not_newer", 3003 "message": "FoodAvailability revision does not win NIP-01 ordering" 3004 } 3005 } 3006 }, 3007 { 3008 "id": "food_revision_equal_time_a_current_039", 3009 "kind": "food_availability.validate_revision.invalid", 3010 "input": { 3011 "previous": { 3012 "id": "6e3a51de252e123bee2b94da38d2796406e518abffe52c8295cde473b75e16d4", 3013 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 3014 "created_at": 1700000060, 3015 "kind": 30402, 3016 "tags": [ 3017 [ 3018 "d", 3019 "nantes-carrots" 3020 ], 3021 [ 3022 "title", 3023 "Nantes Carrots" 3024 ], 3025 [ 3026 "summary", 3027 "Fresh bunches" 3028 ], 3029 [ 3030 "published_at", 3031 "1700000000" 3032 ], 3033 [ 3034 "location", 3035 "Central Saanich, BC" 3036 ], 3037 [ 3038 "price", 3039 "3", 3040 "CAD" 3041 ], 3042 [ 3043 "radroots:price_unit", 3044 "lb" 3045 ], 3046 [ 3047 "radroots:quantity", 3048 "24", 3049 "lb" 3050 ], 3051 [ 3052 "status", 3053 "active" 3054 ] 3055 ], 3056 "content": "Equal-time B", 3057 "sig": "9f99d5fa61b0d9661590602ce8260bf9e9a2f022de1eb30bf22ccf29c253c6b66d08dab79048bc97a39dd062757bc2219bf1f9fc4aef1ec2c426282d73d8d6ff" 3058 }, 3059 "current": { 3060 "id": "8ed82f79ffc5e3ca5c6feba18822d0d8ed4da0fe37baf5352b492c45bc28c3d3", 3061 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 3062 "created_at": 1700000060, 3063 "kind": 30402, 3064 "tags": [ 3065 [ 3066 "d", 3067 "nantes-carrots" 3068 ], 3069 [ 3070 "title", 3071 "Nantes Carrots" 3072 ], 3073 [ 3074 "summary", 3075 "Fresh bunches" 3076 ], 3077 [ 3078 "published_at", 3079 "1700000000" 3080 ], 3081 [ 3082 "location", 3083 "Central Saanich, BC" 3084 ], 3085 [ 3086 "price", 3087 "3", 3088 "CAD" 3089 ], 3090 [ 3091 "radroots:price_unit", 3092 "lb" 3093 ], 3094 [ 3095 "radroots:quantity", 3096 "24", 3097 "lb" 3098 ], 3099 [ 3100 "status", 3101 "active" 3102 ] 3103 ], 3104 "content": "Equal-time A", 3105 "sig": "0ca47b54a0f4e534f49a5373d56a803ea9abaed24fe412fde6be71995ebdaa930395533f934101782fa199404976b17caa00303a6a93463d138c4b76a39becb9" 3106 } 3107 }, 3108 "expected": { 3109 "error": { 3110 "code": "food_revision_not_newer", 3111 "message": "FoodAvailability revision does not win NIP-01 ordering" 3112 } 3113 } 3114 }, 3115 { 3116 "id": "food_revision_equal_time_b_current_040", 3117 "kind": "food_availability.validate_revision.valid", 3118 "input": { 3119 "previous": { 3120 "id": "8ed82f79ffc5e3ca5c6feba18822d0d8ed4da0fe37baf5352b492c45bc28c3d3", 3121 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 3122 "created_at": 1700000060, 3123 "kind": 30402, 3124 "tags": [ 3125 [ 3126 "d", 3127 "nantes-carrots" 3128 ], 3129 [ 3130 "title", 3131 "Nantes Carrots" 3132 ], 3133 [ 3134 "summary", 3135 "Fresh bunches" 3136 ], 3137 [ 3138 "published_at", 3139 "1700000000" 3140 ], 3141 [ 3142 "location", 3143 "Central Saanich, BC" 3144 ], 3145 [ 3146 "price", 3147 "3", 3148 "CAD" 3149 ], 3150 [ 3151 "radroots:price_unit", 3152 "lb" 3153 ], 3154 [ 3155 "radroots:quantity", 3156 "24", 3157 "lb" 3158 ], 3159 [ 3160 "status", 3161 "active" 3162 ] 3163 ], 3164 "content": "Equal-time A", 3165 "sig": "0ca47b54a0f4e534f49a5373d56a803ea9abaed24fe412fde6be71995ebdaa930395533f934101782fa199404976b17caa00303a6a93463d138c4b76a39becb9" 3166 }, 3167 "current": { 3168 "id": "6e3a51de252e123bee2b94da38d2796406e518abffe52c8295cde473b75e16d4", 3169 "pubkey": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", 3170 "created_at": 1700000060, 3171 "kind": 30402, 3172 "tags": [ 3173 [ 3174 "d", 3175 "nantes-carrots" 3176 ], 3177 [ 3178 "title", 3179 "Nantes Carrots" 3180 ], 3181 [ 3182 "summary", 3183 "Fresh bunches" 3184 ], 3185 [ 3186 "published_at", 3187 "1700000000" 3188 ], 3189 [ 3190 "location", 3191 "Central Saanich, BC" 3192 ], 3193 [ 3194 "price", 3195 "3", 3196 "CAD" 3197 ], 3198 [ 3199 "radroots:price_unit", 3200 "lb" 3201 ], 3202 [ 3203 "radroots:quantity", 3204 "24", 3205 "lb" 3206 ], 3207 [ 3208 "status", 3209 "active" 3210 ] 3211 ], 3212 "content": "Equal-time B", 3213 "sig": "9f99d5fa61b0d9661590602ce8260bf9e9a2f022de1eb30bf22ccf29c253c6b66d08dab79048bc97a39dd062757bc2219bf1f9fc4aef1ec2c426282d73d8d6ff" 3214 } 3215 }, 3216 "expected": { 3217 "result": "accepted", 3218 "current_event_id": "6e3a51de252e123bee2b94da38d2796406e518abffe52c8295cde473b75e16d4" 3219 } 3220 } 3221 ] 3222 }