feedback-free.openapps.xyz

Source

This app’s code and revision history are public. Download a copy or explore the files below.

Public
The app’s code and revision history are public.
Owned app · rev 4a4c54cd95c6
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone 54b9c9d7fdc2b68029ce2e57
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
← All files
policy-tests/moderation.json
{
  "version": "1",
  "name": "comments, statuses, hiding, merging and the changelog",
  "actors": {
    "Owen": "owen_user",
    "Vic": "vic_user",
    "Ann": "ann_user",
    "Eve": "eve_user"
  },
  "constants": {
    "BOUNDED_PUBLIC_PRINCIPAL_API": "api_principal"
  },
  "steps": [
    {
      "op": "setTime",
      "epoch": 1800000000
    },
    {
      "op": "as",
      "who": "Owen"
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa",
          "data": {
            "name": "Acme feedback",
            "intro": "",
            "tags": "[{\"id\":\"idea\",\"name\":\"Idea\"},{\"id\":\"bug\",\"name\":\"Bug\"}]",
            "createdBy": "owen_user",
            "createdAt": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/joins/owen_user",
          "data": {
            "at": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/owners/owen_user",
          "data": {
            "at": 1800000000
          }
        },
        {
          "path": "boardkeys/board_aaaaaaaaaaaaaaaa",
          "data": {
            "key": "kkkkkkkkkkkkkkkkkkkkkkkk"
          }
        }
      ]
    },
    {
      "op": "as",
      "who": "Vic"
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/joins/vic_user",
      "data": {
        "at": 1800000000
      }
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
          "data": {
            "title": "Dark mode",
            "details": "Please add it.",
            "tags": "[\"idea\"]",
            "status": "new",
            "statusAt": 1800000000,
            "votes": 1,
            "comments": 0,
            "pinned": false,
            "hidden": false,
            "name": "",
            "by": "vic_user",
            "createdAt": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1/votes/vic_user",
          "data": {
            "at": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/people/vic_user/votes/p1",
          "data": {
            "at": 1800000000
          }
        }
      ]
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p2",
          "data": {
            "title": "Dark mode",
            "details": "Please add it.",
            "tags": "[\"idea\"]",
            "status": "new",
            "statusAt": 1800000000,
            "votes": 1,
            "comments": 0,
            "pinned": false,
            "hidden": false,
            "name": "",
            "by": "vic_user",
            "createdAt": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p2/votes/vic_user",
          "data": {
            "at": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/people/vic_user/votes/p2",
          "data": {
            "at": 1800000000
          }
        }
      ]
    },
    {
      "op": "as",
      "who": "Ann"
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/joins/ann_user",
      "data": {
        "at": 1800000000
      }
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1/comments/c1",
          "data": {
            "body": "Same here.",
            "name": "",
            "team": false,
            "by": "ann_user",
            "at": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
          "data": {
            "comments": {
              "operation": "increment",
              "value": 1
            },
            "lastComment": "c1"
          }
        }
      ]
    },
    {
      "op": "expect",
      "expr": "get(/boards/board_aaaaaaaaaaaaaaaa/posts/p1).comments == 1"
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1/comments/c5",
          "data": {
            "body": "First!",
            "name": "",
            "team": false,
            "by": "ann_user",
            "at": 1700000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
          "data": {
            "comments": {
              "operation": "increment",
              "value": 1
            },
            "lastComment": "c5"
          }
        }
      ],
      "shouldFail": true
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1/comments/c2",
          "data": {
            "body": "Same here.",
            "name": "",
            "team": true,
            "by": "ann_user",
            "at": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
          "data": {
            "comments": {
              "operation": "increment",
              "value": 1
            },
            "lastComment": "c2"
          }
        }
      ],
      "shouldFail": true
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1/comments/c1",
          "data": {
            "body": "Same here.",
            "name": "",
            "team": false,
            "by": "ann_user",
            "at": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
          "data": {
            "comments": {
              "operation": "increment",
              "value": 1
            },
            "lastComment": "c1"
          }
        }
      ],
      "shouldFail": true
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
      "data": {
        "comments": {
          "operation": "increment",
          "value": 1
        },
        "lastComment": "c9"
      },
      "shouldFail": true
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1/comments/c3",
      "data": {
        "body": "Hi",
        "name": "",
        "team": false,
        "by": "ann_user",
        "at": 1800000000
      },
      "shouldFail": true
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
      "data": {
        "status": "planned",
        "statusAt": 1800000000
      },
      "shouldFail": true
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
      "data": {
        "hidden": true
      },
      "shouldFail": true
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
      "data": {
        "pinned": true
      },
      "shouldFail": true
    },
    {
      "op": "delete",
      "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
      "shouldFail": true
    },
    {
      "op": "delete",
      "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1/comments/c1",
      "shouldFail": true
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/changelog/e1",
      "data": {
        "title": "Shipped",
        "body": "",
        "posts": "[]",
        "at": 1800000000,
        "by": "ann_user"
      },
      "shouldFail": true
    },
    {
      "op": "as",
      "who": "Owen"
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1/comments/c4",
          "data": {
            "body": "Same here.",
            "name": "",
            "team": true,
            "by": "owen_user",
            "at": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
          "data": {
            "comments": {
              "operation": "increment",
              "value": 1
            },
            "lastComment": "c4"
          }
        }
      ]
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
      "data": {
        "status": "planned",
        "statusAt": 1800000000
      }
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
      "data": {
        "status": "shipped",
        "statusAt": 1800000000
      },
      "shouldFail": true
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
      "data": {
        "hidden": true,
        "pinned": true,
        "tags": "[\"bug\"]"
      }
    },
    {
      "op": "delete",
      "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1/comments/c1"
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
      "data": {
        "comments": {
          "operation": "increment",
          "value": -1
        }
      }
    },
    {
      "op": "expect",
      "expr": "get(/boards/board_aaaaaaaaaaaaaaaa/posts/p1).comments == 1"
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p9",
          "data": {
            "title": "Dark mode",
            "details": "Please add it.",
            "tags": "[\"idea\"]",
            "status": "planned",
            "statusAt": 1800000000,
            "votes": 1,
            "comments": 0,
            "pinned": false,
            "hidden": false,
            "name": "",
            "by": "owen_user",
            "createdAt": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p9/votes/owen_user",
          "data": {
            "at": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/people/owen_user/votes/p9",
          "data": {
            "at": 1800000000
          }
        }
      ]
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/changelog/e1",
      "data": {
        "title": "Dark mode is here",
        "body": "It follows your system.",
        "posts": "[\"p1\"]",
        "at": 1800000000,
        "by": "owen_user"
      }
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/changelog/e1",
      "data": {
        "title": "Dark mode is live"
      }
    },
    {
      "op": "as",
      "who": "Ann"
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p2",
          "data": {
            "votes": {
              "operation": "increment",
              "value": 1
            }
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p2/votes/ann_user",
          "data": {
            "at": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/people/ann_user/votes/p2",
          "data": {
            "at": 1800000000
          }
        }
      ]
    },
    {
      "op": "as",
      "who": "Owen"
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1/votes/ann_user",
          "data": {
            "at": 1800000000,
            "from": "p2"
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/people/ann_user/votes/p1",
          "data": {
            "at": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
          "data": {
            "votes": {
              "operation": "increment",
              "value": 1
            }
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p2",
          "data": {
            "merged": "p1",
            "status": "closed",
            "statusAt": 1800000000
          }
        }
      ]
    },
    {
      "op": "expect",
      "expr": "get(/boards/board_aaaaaaaaaaaaaaaa/posts/p1).votes == 2"
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1/votes/eve_user",
          "data": {
            "at": 1800000000,
            "from": "p2"
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/people/eve_user/votes/p1",
          "data": {
            "at": 1800000000
          }
        }
      ],
      "shouldFail": true
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1/votes/eve_user",
          "data": {
            "at": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/people/eve_user/votes/p1",
          "data": {
            "at": 1800000000
          }
        }
      ],
      "shouldFail": true
    },
    {
      "op": "delete",
      "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p2"
    },
    {
      "op": "as",
      "who": "Eve"
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/joins/eve_user",
      "data": {
        "at": 1800000000
      }
    },
    {
      "op": "setMany",
      "writes": [
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1/votes/eve_user",
          "data": {
            "at": 1800000000,
            "from": "p2"
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/people/eve_user/votes/p1",
          "data": {
            "at": 1800000000
          }
        },
        {
          "path": "boards/board_aaaaaaaaaaaaaaaa/posts/p1",
          "data": {
            "votes": {
              "operation": "increment",
              "value": 1
            }
          }
        }
      ],
      "shouldFail": true
    },
    {
      "op": "set",
      "path": "boards/board_aaaaaaaaaaaaaaaa/changelog/e1",
      "data": {
        "title": "Hacked"
      },
      "shouldFail": true
    },
    {
      "op": "delete",
      "path": "boards/board_aaaaaaaaaaaaaaaa/changelog/e1",
      "shouldFail": true
    }
  ]
}

Change history

Point store links to openapps.free
4a4c54cd95 · 18 hours ago
Release with preview
1d0728818d · 19 hours ago
Retry release
1abc843b3f · 19 hours ago
Bind app agent address in policy
00eb15f50d · 19 hours ago
Use OpenApps service URLs and add contribution strip
347a7b8ca0 · 19 hours ago
Bounded source sync
a0aaceae63 · 1 day ago
Bounded source sync
3125b8113f · 1 day ago
Bounded source sync
882a76ba95 · 1 day ago
Bounded source sync
852d9782ee · 1 day ago
Bounded source sync
a8ee705109 · 1 day ago