feat(privacy): what the farm keeps about testers, for how long, and removing it #138

Merged
HumanBean merged 1 commit from HumanBean/Beanstalk:feat/gdpr-retention into main 2026-11-21 23:40:49 +00:00
Owner

GDPR: the farm kept testers' data (login, PC name, hardware, last seen, reports with log tails) for good, with no notice and no way to remove it. This adds a privacy notice, retention limits and self-service removal.

What changed

  • /privacy page: linked from the footer, /how and the agent app's sign-in. It covers what the farm keeps, who sees it, OpenAI's part (PR content, hardware tags and numbers, never a login, PC name, log or picture), Cloudflare and IP addresses (the farm logs none), how long, how to remove it, and [email protected]. It links Longshot's https://longshot.magicbean.dev/privacy.
  • Retention, in the sweeper, hourly:
    • A PC not seen for 90 days is removed (BEANSTALK_AGENT_KEEP_DAYS), never while it holds a lease.
    • After 180 days (BEANSTALK_REPORT_KEEP_DAYS), reports, job attempts and jobs stop naming their tester: they point at a retired, hidden stand-in, ag_removed, and the log tail, the stored envelope and the job's live log are dropped. The numbers, results and hardware model stay. Old dashboard_dispatches rows are deleted.
  • Remove my PC: on the page (POST /privacy/remove, with CSRF), from the agent (DELETE /api/v1/agents/me, beanstalk-agent remove), and as "Log out and remove this PC" in the app's log-out dialog. Removal anonymises at once, under the same rules.
  • Bug fixed: reports.envelope kept every picture's base64, so the "kept a day" failure pictures actually stayed in the database for good. New reports are stored without them, and migration 0025 strips them from the ones already stored.
  • Kept, on purpose: approvals, requests and requester/author/approver names. They record who let code run on volunteers' PCs and were already public on Forgejo; the notice says so.
  • Docs: README, agent/README, architecture (a new Privacy section), protocol, and deploy (§13).

Still to do before ready

  • Tests: written (coordinator/tests/test_retention.py, ClientChecks.cs) but not run on the author's PC (its rule); CI runs them.
  • Screenshots of /privacy, the remove dialog and the app's link: not built or run yet.
  • [email protected] must exist and reach the team.
  • Legal-basis wording ("you chose to lend your PC") needs a person's read.
  • Old v1 agents' reports have no hardware.tags, so once anonymised they show no hardware tags.

Measurements

The sweep is hourly and indexed by last_seen and created_at (migration 0025). No effect on job dispatch or reports' handling beyond the envelope now being smaller.

🤖 Generated with Claude Code

GDPR: the farm kept testers' data (login, PC name, hardware, last seen, reports with log tails) for good, with no notice and no way to remove it. This adds a privacy notice, retention limits and self-service removal. ## What changed - **`/privacy` page:** linked from the footer, `/how` and the agent app's sign-in. It covers what the farm keeps, who sees it, OpenAI's part (PR content, hardware tags and numbers, never a login, PC name, log or picture), Cloudflare and IP addresses (the farm logs none), how long, how to remove it, and [email protected]. It links Longshot's https://longshot.magicbean.dev/privacy. - **Retention**, in the sweeper, hourly: - A PC not seen for 90 days is removed (`BEANSTALK_AGENT_KEEP_DAYS`), never while it holds a lease. - After 180 days (`BEANSTALK_REPORT_KEEP_DAYS`), reports, job attempts and jobs stop naming their tester: they point at a retired, hidden stand-in, `ag_removed`, and the log tail, the stored envelope and the job's live log are dropped. The numbers, results and hardware model stay. Old `dashboard_dispatches` rows are deleted. - **Remove my PC:** on the page (`POST /privacy/remove`, with CSRF), from the agent (`DELETE /api/v1/agents/me`, `beanstalk-agent remove`), and as "Log out and remove this PC" in the app's log-out dialog. Removal anonymises at once, under the same rules. - **Bug fixed:** `reports.envelope` kept every picture's base64, so the "kept a day" failure pictures actually stayed in the database for good. New reports are stored without them, and migration 0025 strips them from the ones already stored. - **Kept, on purpose:** approvals, requests and requester/author/approver names. They record who let code run on volunteers' PCs and were already public on Forgejo; the notice says so. - **Docs:** README, agent/README, architecture (a new Privacy section), protocol, and deploy (§13). ## Still to do before ready - [ ] **Tests:** written (`coordinator/tests/test_retention.py`, `ClientChecks.cs`) but not run on the author's PC (its rule); CI runs them. - [ ] **Screenshots** of `/privacy`, the remove dialog and the app's link: not built or run yet. - [ ] **[email protected]** must exist and reach the team. - [ ] **Legal-basis wording** ("you chose to lend your PC") needs a person's read. - [ ] **Old v1 agents' reports** have no `hardware.tags`, so once anonymised they show no hardware tags. ## Measurements The sweep is hourly and indexed by `last_seen` and `created_at` (migration 0025). No effect on job dispatch or reports' handling beyond the envelope now being smaller. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(privacy): what the farm keeps about testers, for how long, and removing it
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 6s
CI / Workflow lint (actionlint) (pull_request) Successful in 6s
CI / Coordinator image (pull_request) Successful in 13s
CI / Agent build and checks (pull_request) Successful in 1m22s
CI / Coordinator tests (pull_request) Failing after 1m38s
aa155ab37c
A /privacy page (linked from every footer, /how, the app's sign-in and Log out)
says what the farm stores about testers, who sees it, how long it is kept and
how to remove it, with the contact [email protected].

- Retention: the sweeper, hourly, removes PCs not seen for 90 days
  (BEANSTALK_AGENT_KEEP_DAYS) and takes the tester out of reports, tries and
  jobs older than 180 days (BEANSTALK_REPORT_KEEP_DAYS); dashboard dispatches
  that old are deleted.
- Removing: a signed-in tester removes one or all of their PCs on /privacy;
  the app's 'Log out and remove this PC' and 'beanstalk-agent remove' call the
  new DELETE /api/v1/agents/me; a maintainer runs
  'python -I -m beanstalk.privacy forget <login>' for an emailed request.
  Removed rows point at a stand-in agent (migration 0025), lose their logs, and
  jobs' failed/skipped lists get unlinkable random ids, so the numbers and
  counts stay.
- The report's copy as received (reports.envelope) kept every picture's base64,
  so the failure pictures said to be kept a day stayed there for good. It is now
  stored without them, and migration 0025 strips the ones already stored.
- Discord usernames stay on the BigBeans' Testers pages; the page says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member

Possibly related, for context:

  • PR #120 feat(coordinator): testers' details are for BigBeans; everyone else sees the testers in numbers — Prior privacy change hid tester identities publicly; PR still retains identities in historical reports.
  • PR #85 feat: a failure's pictures, kept a day — Earlier failure-picture retention work; this fixes lingering base64 in stored envelopes.
Possibly related, for context: - PR #120 feat(coordinator): testers' details are for BigBeans; everyone else sees the testers in numbers — Prior privacy change hid tester identities publicly; PR still retains identities in historical reports. - PR #85 feat: a failure's pictures, kept a day — Earlier failure-picture retention work; this fixes lingering base64 in stored envelopes.
HumanBean changed title from WIP: feat(privacy): what the farm keeps about testers, for how long, and removing it to feat(privacy): what the farm keeps about testers, for how long, and removing it 2026-11-21 23:40:36 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Beanstalk!138
No description provided.