lib

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

upgraded_boundaries.v1.json (5585B)


      1 {
      2   "suite": "social_upgraded_boundaries",
      3   "contract_version": "1.0.0",
      4   "vectors": [
      5     {
      6       "id": "social_operational_listing_published_at_valid_001",
      7       "kind": "social.operational_listing.parse_event.valid",
      8       "input": {
      9         "event": {
     10           "kind": 30402,
     11           "content_shape": "operational_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_operational_listing_published_at_invalid_002",
     27       "kind": "social.operational_listing.parse_event.invalid",
     28       "input": {
     29         "event": {
     30           "kind": 30402,
     31           "content_shape": "operational_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_relay_list_read_write_valid_004",
     48       "kind": "social.relay_list.parse_event.valid",
     49       "input": {
     50         "event": {
     51           "kind": 10002,
     52           "content": "",
     53           "tags": [
     54             [
     55               "r",
     56               "wss://relay.example.test",
     57               "read"
     58             ],
     59             [
     60               "r",
     61               "wss://relay2.example.test",
     62               "write"
     63             ]
     64           ]
     65         }
     66       },
     67       "expected": {
     68         "result": "ok",
     69         "model": "List"
     70       }
     71     },
     72     {
     73       "id": "social_relay_list_bad_marker_invalid_005",
     74       "kind": "social.relay_list.parse_event.invalid",
     75       "input": {
     76         "event": {
     77           "kind": 10002,
     78           "content": "",
     79           "tags": [
     80             [
     81               "r",
     82               "wss://relay.example.test",
     83               "admin"
     84             ]
     85           ]
     86         }
     87       },
     88       "expected": {
     89         "result": "error",
     90         "error_class": "parse_error",
     91         "field": "relay.marker"
     92       }
     93     },
     94     {
     95       "id": "social_farm_rejects_private_ops_json_invalid_007",
     96       "kind": "social.farm.parse_event.invalid",
     97       "input": {
     98         "event": {
     99           "kind": 30340,
    100           "content": {
    101             "workspace": {
    102               "pubkey": "workspace_pubkey",
    103               "d_tag": "AAAAAAAAAAAAAAAAAAAAAA"
    104             },
    105             "farm_group_id": "field-group",
    106             "document_id": "AAAAAAAAAAAAAAAAAAAAAg",
    107             "document_kind": "FarmTask",
    108             "encoded_change": "abc-DEF_012"
    109           },
    110           "tags": [
    111             [
    112               "d",
    113               "AAAAAAAAAAAAAAAAAAAAAA"
    114             ]
    115           ]
    116         }
    117       },
    118       "expected": {
    119         "result": "error",
    120         "error_class": "parse_error",
    121         "private_fields_rejected": true
    122       }
    123     },
    124     {
    125       "id": "social_file_metadata_rejects_farm_file_marker_invalid_008",
    126       "kind": "social.file_metadata.parse_event.invalid",
    127       "input": {
    128         "event": {
    129           "kind": 1063,
    130           "content": "private caption",
    131           "tags": [
    132             [
    133               "url",
    134               "https://media.example.test/private.jpg"
    135             ],
    136             [
    137               "m",
    138               "image/jpeg"
    139             ],
    140             [
    141               "x",
    142               "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
    143             ],
    144             [
    145               "radroots:owner_document",
    146               "FarmTask",
    147               "AAAAAAAAAAAAAAAAAAAAAg"
    148             ]
    149           ]
    150         }
    151       },
    152       "expected": {
    153         "result": "error",
    154         "error_class": "parse_error",
    155         "rejected_tag": "radroots:owner_document"
    156       }
    157     },
    158     {
    159       "id": "social_nip29_group_metadata_not_public_social_009",
    160       "kind": "social.group.classification.valid",
    161       "input": {
    162         "event": {
    163           "kind": 39000,
    164           "content": "{\"name\":\"Field Group\"}",
    165           "tags": [
    166             [
    167               "d",
    168               "field-group"
    169             ],
    170             [
    171               "supported_kinds",
    172               "78",
    173               "30078"
    174             ]
    175           ]
    176         }
    177       },
    178       "expected": {
    179         "result": "ok",
    180         "public_social_kind": false,
    181         "home_feed_candidate_kind": false,
    182         "market_candidate_kind": false,
    183         "private_farm_ops_kind": true,
    184         "group_infrastructure": true
    185       }
    186     },
    187     {
    188       "id": "social_surface_kind_sets_valid_010",
    189       "kind": "social.surface_kinds.classification.valid",
    190       "input": {
    191         "kinds": {
    192           "classified_listing": 30402,
    193           "retired_legacy_listing_kind": 30403,
    194           "report": 1984,
    195           "farm_crdt_change": 78,
    196           "relay_auth": 22242,
    197           "http_auth": 27235
    198         }
    199       },
    200       "expected": {
    201         "result": "ok",
    202         "home_feed_classified_listing": true,
    203         "home_feed_retired_legacy_listing_kind": false,
    204         "home_feed_report": false,
    205         "home_feed_farm_crdt_change": false,
    206         "home_feed_relay_auth": false,
    207         "home_feed_http_auth": false,
    208         "market_classified_listing": true,
    209         "market_retired_legacy_listing_kind": false,
    210         "moderation_report": true,
    211         "retired_legacy_listing_kind_accepted": false,
    212         "private_farm_ops_farm_crdt_change": true,
    213         "private_farm_ops_relay_auth": false,
    214         "private_farm_ops_http_auth": false
    215       }
    216     }
    217   ]
    218 }