when-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 2315d847681e
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 3e1cb86700a5e96238d7a2f1
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/comments.json
{
  "version": "1",
  "name": "comments: anyone with the link can post under their own name; only the author or an owner removes one; nobody edits one",
  "actors": { "Olga": "olga_guest", "Pat": "pat_guest", "Sam": "sam_guest", "Eve": "eve_guest" },
  "constants": { "BOUNDED_PUBLIC_PRINCIPAL_API": "api_principal" },
  "steps": [
    { "op": "setTime", "epoch": 1800000000 },
    { "op": "as", "who": "Olga" },
    { "op": "setMany", "writes": [
      { "path": "polls/pollAAAAAAAAAAAAAAAA", "data": { "title": "Lunch", "timezone": "UTC", "options": "[{\"id\":\"o1\",\"start\":1800100000}]", "closed": false, "createdBy": "$Olga", "createdAt": 1800000000 } },
      { "path": "polls/pollAAAAAAAAAAAAAAAA/joins/olga_guest", "data": { "at": 1800000000 } },
      { "path": "polls/pollAAAAAAAAAAAAAAAA/owners/olga_guest", "data": { "at": 1800000000 } },
      { "path": "pollkeys/pollAAAAAAAAAAAAAAAA", "data": { "key": "ownerkeyownerkeyownerkey" } }
    ] },

    { "op": "as", "who": "Eve" },
    { "op": "set", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c_eve", "data": { "name": "Eve", "text": "hi", "by": "$Eve", "at": 1800000000 }, "shouldFail": true },

    { "op": "as", "who": "Pat" },
    { "op": "set", "path": "polls/pollAAAAAAAAAAAAAAAA/joins/pat_guest", "data": { "at": 1800000000 } },
    { "op": "set", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c1", "data": { "name": "Pat", "text": "After 6 only", "by": "$Sam", "at": 1800000000 }, "shouldFail": true },
    { "op": "set", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c1", "data": { "name": "Pat", "text": "", "by": "$Pat", "at": 1800000000 }, "shouldFail": true },
    { "op": "set", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c1", "data": { "name": "", "text": "After 6 only", "by": "$Pat", "at": 1800000000 }, "shouldFail": true },
    { "op": "set", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c1", "data": { "name": "Pat", "text": "After 6 only", "by": "$Pat", "at": 1800009999 }, "shouldFail": true },
    { "op": "set", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c1", "data": { "name": "Pat", "text": "After 6 only", "by": "$Pat", "at": 1800000000 } },
    { "op": "set", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c1", "data": { "text": "Any time" }, "shouldFail": true },
    { "op": "set", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c2", "data": { "name": "Pat", "text": "Typo above", "by": "$Pat", "at": 1800000000 } },
    { "op": "delete", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c2" },

    { "op": "as", "who": "Sam" },
    { "op": "set", "path": "polls/pollAAAAAAAAAAAAAAAA/joins/sam_guest", "data": { "at": 1800000000 } },
    { "op": "read", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c1" },
    { "op": "delete", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c1", "shouldFail": true },

    { "op": "as", "who": "Olga" },
    { "op": "set", "path": "polls/pollAAAAAAAAAAAAAAAA", "data": { "closed": true } },

    { "op": "as", "who": "Sam" },
    { "op": "set", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c3", "data": { "name": "Sam", "text": "See you there", "by": "$Sam", "at": 1800000000 } },

    { "op": "as", "who": "Eve" },
    { "op": "read", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c1", "shouldFail": true },

    { "op": "as", "who": "Olga" },
    { "op": "delete", "path": "polls/pollAAAAAAAAAAAAAAAA/comments/c1" },
    { "op": "expect", "expr": "get(/polls/pollAAAAAAAAAAAAAAAA/comments/c1) == null" },
    { "op": "expect", "expr": "get(/polls/pollAAAAAAAAAAAAAAAA/comments/c3).text == 'See you there'" }
  ]
}

Change history

Quality pass: comments, CSV export, share the final time, calendar menu, fixes
2315d84768 · 4 hours ago
Bounded source sync
145324066b · 1 day ago
Bounded source sync
ad9b674dac · 1 day ago
Bounded source sync
e5b69608f3 · 1 day ago
Bounded source sync
a1685914b0 · 1 day ago
Bounded source sync
7108f42d4d · 1 day ago
Bounded source sync
ffb51b672e · 1 day ago
Bounded source sync
23b5d0c53b · 1 day ago