forgetproof Try the button

Rendered from demo/README.md; raw Markdown.

The demo site#

The demo at forget.stellarminds.ai is a Starlette app in the format of act.stellarminds.ai: it serves the landing page and the console, two sample hosts, the public documentation, and Pim's side of the ForgetMe button. This page shows you how it is put together, how to run and test both services locally, how to record the examples the pages show, what the landing page runs, and how it is deployed.

Status: deployed from main by Railway as two services, site and company.

Pim is the demo's fictional personal agent and the host: the server behind the button. Bay Parcel is the Company it shared an address with, the reference Company on its own origin. Every run builds real stores for a fictional user and ends with signed receipts the browser verifies. The glossary has the rest.

The files#

Run it locally#

Both origins, the Company first, then Pim pointed at it:

uv sync --all-extras
COMPANY_DEV_CLIENTS=1 uv run python -m company &                      # http://localhost:8090, the reference Company
FORGETME_COMPANY_URL=http://localhost:8090 PIM_ORIGIN=http://127.0.0.1:8080 uv run python -m demo.server   # http://localhost:8080

Each ends its start with Uvicorn running on; curl -s http://localhost:8080/health answers {"ok": true, …, "cross_provider": true}. On Windows in PowerShell:

$env:COMPANY_DEV_CLIENTS="1"; Start-Process uv -ArgumentList "run python -m company"
$env:FORGETME_COMPANY_URL="http://localhost:8090"; $env:PIM_ORIGIN="http://127.0.0.1:8080"; uv run python -m demo.server

COMPANY_DEV_CLIENTS=1 lets the Company accept Pim's loopback client id; never set it in production. Without FORGETME_COMPANY_URL Pim runs the local-only level, with the courier simulated and labelled, and /health reports "cross_provider": false. PIM_ORIGIN is where the Company fetches Pim's client metadata document (/poppy/agent.json); it defaults to http://127.0.0.1:$PORT, and on Railway to https://$RAILWAY_PUBLIC_DOMAIN, so set it to the custom domain there (https://forget.stellarminds.ai).

Record the examples#

The pages show recorded examples until a live run replaces them. Record them inside the image, so the files carry no local path or user name:

docker build -t forgetproof-demo . && mkdir -p out
docker run --rm -e FORGETPROOF_HOME=/tmp/rec-home -e FORGETPROOF_SITE_RUNS=/tmp/rec-runs -v "$PWD/out:/out" forgetproof-demo python -m demo.forgetme /out/forget-me.json
docker run --rm -e FORGETPROOF_HOME=/tmp/rec-home -e FORGETPROOF_SITE_RUNS=/tmp/rec-runs -v "$PWD/out:/out" forgetproof-demo python -m demo.forgetme /out/withdrawal-local-only.json --local-only
docker run --rm -e FORGETPROOF_HOME=/tmp/rec-home -e FORGETPROOF_SITE_RUNS=/tmp/rec-runs -v "$PWD/out:/out" forgetproof-demo python -m demo.record_stories /out/stories.json
cp out/forget-me.json demo/public/recorded/withdrawal-cross-provider.json && cp out/*.json demo/public/recorded/

Each recording run prints its steps and ends with the path it wrote; out/ then holds three JSON files, and tests/test_public.py checks that none carries a local path or a personal identifier.

Tests#

uv run pytest tests/test_site.py             # every story in-process, plus the HTTP surface and the shared chrome (several minutes)
uv run pytest tests/test_public.py           # the public docs, deep links, shares, retention, exported examples
uv run pytest tests/test_forgetme.py         # the ForgetMe contract: owners, references, idempotency, concurrency, restart, the lease choice
uv run pytest tests/test_forgetme_schemas.py # every fixture, and both parties' live answers, against the v1 schemas
uv run pytest tests/test_company.py          # the reference Company's conformance set, over Poppy
uv run pytest tests/test_poppy.py            # negotiation, identity, the approval exchange; both parties' documents against the Poppy kit's schemas
uv run pytest tests/test_cross_provider.py   # Pim's aggregate with the Company (own thread and port; Pim on a port too) and the simulated recipients
uv run pytest tests/test_wire.py             # a public-contract client over real HTTP, Pim and the Company as separate processes
uv run --extra browser python -m playwright install chromium
uv run --extra browser pytest tests/test_browser.py   # the button in Chromium: cancel, double click, pending then resolved, keyboard, labels, 375 px
node packages/forgetme-button/example/walkthrough.mjs http://localhost:8080   # the headless host, from Node

Each pytest run ends with a passed count and no failed; the walkthrough ends with a courier line.

ForgetMe on the landing page#

The first visit shows a recorded run (both lease-note choices), from public/recorded/forget-me.json; nothing runs until "Run it fresh" is clicked. A fresh scenario builds Pim's real stores in FORGETPROOF_SITE_RUNS/forget-me/<scenario>/, issues the synthetic session as an HttpOnly cookie (fm_session; headless clients send it as a Bearer token), and puts the real <forget-me-button> beside each of John's memories. Scenario starts count against the same per-visitor limits as story runs, at most FORGETME_MAX_SCENARIOS (12) scenarios are live at a time, and each expires after FORGETME_SCENARIO_TTL seconds (30 minutes), world and all. What is simulated, and labelled on the page: the session, the courier, the recorded example. Not simulated: authorization (checked on every call against the session that owns the reference or operation), the stores, the erasure, the receipts.

Integration steps for a host, the contract and the outcome vocabulary: forgetme-button.

The cross-provider level#

With FORGETME_COMPANY_URL set, every scenario opens a synthetic account for John at the reference Company with his old address already shared, the way a courier he used months ago would hold it. The fixture mints the refresh token a sign-in would have produced, for Pim's client identity; Pim exchanges it at the Company's token endpoint with a client assertion, and from then on every request to the Company carries a Session JWT (one Session per scenario: a random sid and User ID, never derived from John's details), Poppy-Version: 1.0, Poppy-Extensions: "stellarminds.ai/forget-me";v="1", "operations";v="3" and the access token; tokens and the Session id stay private to the scenario (recipients.json).

The preview of the old address lists the recipients as holders and as choices, and for Bay Parcel the exact terms it stated when Pim asked (a preview and a submit without an approval, which the Company answers with 403 approval_required); the button shows them word for word. Confirming with Bay Parcel chosen is John's approval of that revision: Pim records it in the scenario's ledger (pim/approvals.json) and sends it with the request as Poppy-Approval; the Company performs the withdrawal once. Pim never approves on John's behalf; a recipient whose terms changed, or that asks for an approval of terms John has not seen, ends error with that sentence. The result shows one row per holder of every party with action, evidence, unresolved item and time. Bay Parcel's receipts are re-served as received and verified by Pim against the keys Bay Parcel publishes; the browser verifies them again. Each booking shares Pim's current address with the Company, so after the forget the Company's own records hold the new one.

Tunables: FORGETME_RECIPIENT_TIMEOUT (8 s), FORGETME_RECIPIENT_POLL (20 s per ask), FORGETME_RECIPIENT_RETRY (3 s before an unreachable recipient is tried again, on status reads).

Deploy#

The root Dockerfile builds one image for both services; the Railway settings are in .railway/railway.ts (site and company, each with its own volume at /data and its own domain; applied with railway config apply). demo/entrypoint.sh hands the volume to the unprivileged user fp on start. Variables: on site, FORGETME_COMPANY_URL=https://company.forget.stellarminds.ai and PIM_ORIGIN=https://forget.stellarminds.ai (and ADMIN_TOKEN to lift the rate limits from the console); on company, COMPANY_DATA=/data/company and COMPANY_ORIGIN=https://company.forget.stellarminds.ai (never COMPANY_DEV_CLIENTS in production). RUNS_RETENTION_DAYS, SHARE_TTL_DAYS and RETENTION_SWEEP_SECONDS have defaults, and the commit shown by /health comes from Railway's own RAILWAY_GIT_COMMIT_SHA. Merging to main deploys; GET /health on each service names the live commit.

Next steps#