lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README | LICENSE

upgraded_boundaries.v1.json (6606B)


      1 {
      2   "suite": "social_upgraded_boundaries",
      3   "contract_version": "0.1.0",
      4   "vectors": [
      5     {
      6       "id": "social_listing_published_at_valid_001",
      7       "kind": "social.listing.parse_event.valid",
      8       "input": {
      9         "event": {
     10           "kind": 30402,
     11           "content_shape": "listing_markdown",
     12           "tags": [
     13             [
     14               "published_at",
     15               "1780000000"
     16             ]
     17           ]
     18         }
     19       },
     20       "expected": {
     21         "result": "ok",
     22         "field": "published_at"
     23       }
     24     },
     25     {
     26       "id": "social_listing_published_at_invalid_002",
     27       "kind": "social.listing.parse_event.invalid",
     28       "input": {
     29         "event": {
     30           "kind": 30402,
     31           "content_shape": "listing_markdown",
     32           "tags": [
     33             [
     34               "published_at",
     35               "not-a-number"
     36             ]
     37           ]
     38         }
     39       },
     40       "expected": {
     41         "result": "error",
     42         "error_class": "parse_error",
     43         "field": "published_at"
     44       }
     45     },
     46     {
     47       "id": "social_listing_draft_uses_listing_model_valid_003",
     48       "kind": "social.listing_draft.parse_event.valid",
     49       "input": {
     50         "event": {
     51           "kind": 30403,
     52           "content_shape": "listing_markdown",
     53           "tags_shape": "listing_tags_full"
     54         }
     55       },
     56       "expected": {
     57         "result": "ok",
     58         "model": "RadrootsListing"
     59       }
     60     },
     61     {
     62       "id": "social_relay_list_read_write_valid_004",
     63       "kind": "social.relay_list.parse_event.valid",
     64       "input": {
     65         "event": {
     66           "kind": 10002,
     67           "content": "",
     68           "tags": [
     69             [
     70               "r",
     71               "wss://relay.example.test",
     72               "read"
     73             ],
     74             [
     75               "r",
     76               "wss://relay2.example.test",
     77               "write"
     78             ]
     79           ]
     80         }
     81       },
     82       "expected": {
     83         "result": "ok",
     84         "model": "RadrootsList"
     85       }
     86     },
     87     {
     88       "id": "social_relay_list_bad_marker_invalid_005",
     89       "kind": "social.relay_list.parse_event.invalid",
     90       "input": {
     91         "event": {
     92           "kind": 10002,
     93           "content": "",
     94           "tags": [
     95             [
     96               "r",
     97               "wss://relay.example.test",
     98               "admin"
     99             ]
    100           ]
    101         }
    102       },
    103       "expected": {
    104         "result": "error",
    105         "error_class": "parse_error",
    106         "field": "relay.marker"
    107       }
    108     },
    109     {
    110       "id": "social_list_set_calendar_address_valid_006",
    111       "kind": "social.list_set.parse_event.valid",
    112       "input": {
    113         "event": {
    114           "kind": 31924,
    115           "content": "Shared schedule for farm operations.",
    116           "tags": [
    117             [
    118               "d",
    119               "AAAAAAAAAAAAAAAAAAAA_A"
    120             ],
    121             [
    122               "title",
    123               "farm calendar"
    124             ],
    125             [
    126               "a",
    127               "31923:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc:AAAAAAAAAAAAAAAAAAAA-A"
    128             ]
    129           ]
    130         }
    131       },
    132       "expected": {
    133         "result": "ok",
    134         "typed_model": "RadrootsCalendar",
    135         "generic_model": "RadrootsListSet"
    136       }
    137     },
    138     {
    139       "id": "social_farm_rejects_private_ops_json_invalid_007",
    140       "kind": "social.farm.parse_event.invalid",
    141       "input": {
    142         "event": {
    143           "kind": 30340,
    144           "content": {
    145             "workspace": {
    146               "pubkey": "workspace_pubkey",
    147               "d_tag": "AAAAAAAAAAAAAAAAAAAAAA"
    148             },
    149             "farm_group_id": "field-group",
    150             "document_id": "AAAAAAAAAAAAAAAAAAAAAg",
    151             "document_kind": "FarmTask",
    152             "encoded_change": "abc-DEF_012"
    153           },
    154           "tags": [
    155             [
    156               "d",
    157               "AAAAAAAAAAAAAAAAAAAAAA"
    158             ]
    159           ]
    160         }
    161       },
    162       "expected": {
    163         "result": "error",
    164         "error_class": "parse_error",
    165         "private_fields_rejected": true
    166       }
    167     },
    168     {
    169       "id": "social_file_metadata_rejects_farm_file_marker_invalid_008",
    170       "kind": "social.file_metadata.parse_event.invalid",
    171       "input": {
    172         "event": {
    173           "kind": 1063,
    174           "content": "private caption",
    175           "tags": [
    176             [
    177               "url",
    178               "https://media.example.test/private.jpg"
    179             ],
    180             [
    181               "m",
    182               "image/jpeg"
    183             ],
    184             [
    185               "x",
    186               "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
    187             ],
    188             [
    189               "radroots:owner_document",
    190               "FarmTask",
    191               "AAAAAAAAAAAAAAAAAAAAAg"
    192             ]
    193           ]
    194         }
    195       },
    196       "expected": {
    197         "result": "error",
    198         "error_class": "parse_error",
    199         "rejected_tag": "radroots:owner_document"
    200       }
    201     },
    202     {
    203       "id": "social_nip29_group_metadata_not_public_social_009",
    204       "kind": "social.group.classification.valid",
    205       "input": {
    206         "event": {
    207           "kind": 39000,
    208           "content": "{\"name\":\"Field Group\"}",
    209           "tags": [
    210             [
    211               "d",
    212               "field-group"
    213             ],
    214             [
    215               "supported_kinds",
    216               "78",
    217               "30078"
    218             ]
    219           ]
    220         }
    221       },
    222       "expected": {
    223         "result": "ok",
    224         "public_social_kind": false,
    225         "home_feed_candidate_kind": false,
    226         "market_candidate_kind": false,
    227         "private_farm_ops_kind": true,
    228         "group_infrastructure": true
    229       }
    230     },
    231     {
    232       "id": "social_surface_kind_sets_valid_010",
    233       "kind": "social.surface_kinds.classification.valid",
    234       "input": {
    235         "kinds": {
    236           "active_listing": 30402,
    237           "listing_draft": 30403,
    238           "report": 1984,
    239           "farm_crdt_change": 78,
    240           "relay_auth": 22242,
    241           "http_auth": 27235
    242         }
    243       },
    244       "expected": {
    245         "result": "ok",
    246         "home_feed_active_listing": true,
    247         "home_feed_listing_draft": false,
    248         "home_feed_report": false,
    249         "home_feed_farm_crdt_change": false,
    250         "home_feed_relay_auth": false,
    251         "home_feed_http_auth": false,
    252         "market_active_listing": true,
    253         "market_listing_draft": false,
    254         "moderation_report": true,
    255         "draft_owner_listing_draft": true,
    256         "private_farm_ops_farm_crdt_change": true,
    257         "private_farm_ops_relay_auth": false,
    258         "private_farm_ops_http_auth": false
    259       }
    260     }
    261   ]
    262 }