carlos / platform Public

spec rev 4: Paul's rulings on round 3, and the P2 fixes

Database backups of deleted apps split out to #199 with an operator
action meanwhile; 1-hour re-sign-in cooldown; baseline policy row;
notice cohorts and max() effective date; agreement and letterhead bound
and canonical; inactive console replica report; UX and copy before build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 12a744b681673e15e2647b7fc7c79d3fbbdc9cb7 parent d76ac87
2 files changed, +235 −53
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-dpa-and-retention-R4.md +104 −0
  • docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md +131 −53

CI cancelled — superseded by a newer push — run details

CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
  tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
  tofu: downloaded, digest verified
  aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
  aws: downloaded, digest verified
  archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
  archive: downloaded, digest verified
  installed in /tmp/carlos-opentofu-VMkF4q
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/aws/smithy-go v1.28.1
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading golang.org/x/sys v0.49.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/superfly/ltx v0.5.1
go: downloading golang.org/x/crypto v0.58.0
go: downloading golang.org/x/mod v0.41.0
go: downloading golang.org/x/net v0.62.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading golang.org/x/sync v0.24.0
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/memory v1.11.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1

amadan: job cancelled — a newer push superseded it

Intent

Attributed to this commit: 27.3 g CO₂e (3,031,760 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on dpa-and-retention, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-dpa-and-retention-R4.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-dpa-and-retention-R4.md
new file mode 100644
index 000000000..c8cb2da5a
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-dpa-and-retention-R4.md
@@ -0,0 +1,104 @@
+# Review brief: DPA and customer-set retention spec, round 4 (approved by Paul, targeted)
+
+Repo carlos/platform, branch `dpa-and-retention`, commit TIP (named in the prompt).
+Under review: `docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md`.
+Authorities: the code on this commit (its base is main edaed836). Relevant
+merged work: the visitor-statistics prune (`internal/console/analyticsprune.go`,
+`internal/analytics/prune.go`), box log retention (`internal/host/logretention.go`,
+`internal/host/logship.go`), console delivery (`internal/console/delivery.go`,
+`consolemail.go`), the owner-notice pattern (`notifyPlanOwners` in
+`internal/console/plangracepass.go`), account deletion (`internal/console/ownership.go`),
+route declarations (`internal/console/routedecls.go`), the operator gate
+(`operatorOnly`), step-up auth (`internal/console/stepup.go`), and AGENTS.md.
+Do not review against unmerged branches; if this work needs one, say so as a P1 and stop.
+
+You are an independent reviewer. Read the document, then the code it
+names, and check every claim against that code.
+
+## Fixed: do not re-argue
+
+- Paul's rulings, 2026-11-25 (spec §1): the DPA is accepted in the console
+ with no operator approval step; every promise in the privacy policy and
+ DPA is built; customers set retention per account and per app, default
+ indefinite. Report only mechanisms that fail to honour them.
+- Logs may only be shortened, not lengthened past the box's retention
+ (§5.3). You may argue the mechanism, not the scope.
+- The DPA legal text (§7) is boilerplate pending a lawyer; review whether
+ §7 matches what the platform actually does (subprocessors, regions,
+ deletion, breach), not its legal drafting.
+
+## What to check
+
+1. §2: is every "built" claim true on this commit? Is any privacy-policy
+ promise (the policy text is quoted in §2 and §8) missing from the table?
+2. §3: gate order and roles against the existing owner-only settings POSTs
+ and `requireFreshAuth`; whether the acceptance record proves what was
+ accepted (§3.4 digest fetch: SSRF, redirects, size, timeouts — the URL
+ comes from an operator, but the console fetches it).
+3. §4: the notice pass against `notifyPlanOwners`: retry, duplicates on
+ restart, accounts created after publish, owner changes, deleted accounts,
+ and whether "bounded per tick" can starve.
+4. §5.4: whether `analytics.Prune`'s walk can take a per-app resolver as
+ described (does it walk per app? where do account and app names come
+ from in the key layout?), and whether an app with no setting really costs
+ no listing. The daily admission and cursor semantics must still hold.
+5. §5.5: the box read of `apps/<sqid>/<app>/retention.json`. Is there an
+ existing per-app record the agent already reads on the serial bump that
+ this can ride, or does it add per-box polling of new keys (S3 request
+ cost is a standing concern: no new per-box polling)? Old-box/new-console
+ and new-box/old-console behaviour; the census implication.
+6. §6: deleting a user — every table that references a person's address
+ (grep the store for address/user columns), what breaks for sole owners,
+ in-flight sessions and CLI tokens, Keymail links, and whether "one
+ transaction" is achievable given the store's layout.
+7. Anything in the spec that contradicts AGENTS.md (gate order, wire-shape
+ additivity, "every carlos command is designed for a user with no infra
+ access", provider-neutral core).
+
+## Round 4: targeted
+
+Paul approved a fourth round on 2026-11-25, **limited to what rev 4
+changes**. Earlier rounds: `CODEX-FINDINGS-dpa-and-retention.md`, `-R2.md`,
+`-R3.md`. Rev 4 marks responses (R3-n) and records Paul's round 3 rulings
+in the review history. Treat these as fixed scope:
+- app database backups are split out to #199; this work only adds an
+ operator action and an "on request" promise (§6.6);
+- re-sign-in after deletion is a 1-hour cooldown in one gate (§6.2);
+- the first terms/privacy row is a baseline of the policy in force (§3.1).
+
+Review only: §3.1 (baseline), §3.3 and §3.8 (binding the agreement and
+letterhead; canonical fragment), §4.1 and §4.3 (cohorts, effective date),
+§6.2 (cooldown gate), §6.4 (inactive console replicas), §6.6 (operator
+database-backup action), §9's UX/copy sequence. Do not reopen other
+sections unless a rev 4 change breaks them.
+
+First give one line per P1 and P2 from round 3: resolved, partly, or not.
+
+## Severity
+
+- **P1**: unsafe, would not compile, a test fails, or it would not work.
+ Blocks merge.
+- **P2**: wrong or missing. Fixed without reopening this review. (The
+ census, and review of any newly changed security, root, termination
+ or production-storage behaviour, still check the fix; see AGENTS.md,
+ "Stopping rules".)
+- **P3**: clarity or polish. Goes on a follow-up list; never a reason for
+ another round.
+
+A P1 states its failure scenario and the evidence (file:line). Do not
+raise a P2 to P1 to keep the review open.
+
+## Output
+
+Findings ranked P1, P2, P3. Each gives the section or task, the problem,
+the evidence (file:line, verified), the failure scenario, a concrete
+fix and the invariant or trust boundary it breaks (that is its fault
+family). End with exactly one verdict:
+
+- **READY**: no P1 and no P2.
+- **READY AFTER FIXES**: no P1. The listed P2s are fixed without another
+ round.
+- **NOT READY**: one or more P1s, listed.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of
+your own. Do not run the full test suites.
diff --git a/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md b/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md
index 017838dfa..f9fe87974 100644
--- a/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md
+++ b/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md
@@ -1,6 +1,6 @@
# Data processing agreements and customer-set retention
-Status: draft rev 3, 2026-11-25. Branch `dpa-and-retention`.
+Status: draft rev 4, 2026-11-25. Branch `dpa-and-retention`.
Asked for by Paul, 2026-11-25 (prompts on the branch ledger).
Review history:
@@ -17,7 +17,16 @@ Review history:
through the Trash page's own purge (§6.5);
- console backups: **say 15 days** in the policy (§6.4).
- Paul, 2026-11-25: the record is a **PDF on headed paper** (§3.8).
-- Round 3 is the last in the budget.
+- Round 3 (Astra, `CODEX-FINDINGS-dpa-and-retention-R3.md`, 9c0f92fc):
+ NOT READY, 3 P1, 5 P2, marked **(R3-n)**. All three P1s were in
+ earlier families; Paul chose, 2026-11-25:
+ - deleted apps' database backups: **split out** to their own design
+ (#199's "full fix"); until it lands the DPA promises them deleted on
+ request within 30 days, through an operator action (§6.6);
+ - re-sign-in after deletion: **a 1-hour cooldown** in the one gate,
+ no attempt timestamps (§6.2);
+ - the live policy: **record a baseline first** (§3.1);
+ - a **short targeted round 4** on the sections rev 4 changes.
## 1. Why
@@ -65,7 +74,7 @@ the DPA this work adds promise:
| DPA on request | **by email** | built in (§3) |
| DPA: 30 days' notice of a subprocessor change, right to object | n/a | notices (§4), per-account applicability (§3.5) |
| DPA: breach notice within 48 hours | n/a | incident notices (§4.4) (R1-13) |
-| DPA: delete app data, backups included, within 30 days of deleting the app or account | **not for every app**: the trash sweep refuses an app with email estate or a provisioned store (`lifetimes_purge.go:236`, `release/trash.go:345`); only the Trash page's manual purge tears those down (`ownership.go:625`) (R2-3) | auto-purge through the same purge (§6.5) |
+| DPA: delete app data, backups included, within 30 days of deleting the app or account | **not for every app**: the trash sweep refuses an app with email estate or a provisioned store (`lifetimes_purge.go:236`, `release/trash.go:345`); only the Trash page's manual purge tears those down (`ownership.go:625`) (R2-3) | auto-purge through the same purge (§6.5); database backups on request until #199 (§6.6) |
| DPA: help with data-subject requests | n/a | the app's data is the customer's; logs and statistics are covered by §5, people by §6 |
## 3. Accepting the DPA
@@ -94,9 +103,17 @@ legal_documents(
```
Rows are append-only, apart from `effective_at` being set once (§4.3).
-With no `dpa` row the DPA pane does not render. The **first** row of a
-kind has `needs_notice = 0` and `effective_at = published_at`: there is
-nobody to notify. A later `dpa` row with `needs_notice = 1` names an
+With no `dpa` row the DPA pane does not render.
+
+**The first row of a kind is a baseline (Paul, R3-2).** For `terms` and
+`privacy`, the publish form offers only "Record the version already in
+force" until a row exists: `needs_notice = 0`, `effective_at` the date
+that version took effect (entered, not now), and no notice. It records
+what customers already have; it cannot change anything. Every later row
+goes out with notice, unless the operator marks it as not needing
+notice (a typo fix). For `dpa` the first row is the first agreement
+anyone can accept, so it too has no notice to give: nobody has
+accepted an earlier one. A later `dpa` row with `needs_notice = 1` names an
`effective_at` at least 35 days after `published_at` (30 days of notice
plus 5 for delivery); it is the earliest date, and §3.5 moves it later
per account.
@@ -145,14 +162,19 @@ published but not yet effective: an owner accepting during a notice
period sees that version's summary and accepts it directly, so they are
owed no notice for it.
-**The acceptance names what was shown (R2-7).** The form carries the
-document's `id` and `sha256` as hidden fields. The POST, and the
+**The acceptance names what was shown (R2-7, R3-7).** The pane shows
+the agreement itself, rendered from the stored `body` (§3.8), with the
+parties filled in from the current letterhead and the details typed
+into the form, so the owner reads the same text the PDF will carry. The
+form carries the document's `id` and `sha256` and the `letterhead.id`
+as hidden fields. The POST, and the
step-up replay of it (`stepup.go:325` parks and replays the form),
-accepts only if that id is still the newest `dpa` document and the
-digest matches. Otherwise nothing is recorded and the pane re-renders
+accepts only if that id is still the newest `dpa` document, the digest
+matches, and the letterhead id is still current. Otherwise nothing is recorded and the pane re-renders
with the newer text and "A new version was published while you were
-reading. Review it and accept again." The record stores the id it was
-given, never "whatever is newest now".
+reading. Review it and accept again." (A letterhead change gets the
+same treatment.) The record stores the ids it was given, never
+"whatever is current now".
The acceptance writes an audit row (`dpa.accept`, empty app) and emails
the accepting owner a confirmation with the record's fields, the
@@ -205,11 +227,13 @@ The operator sets the letterhead once, from `/fleet/legal`
```
letterhead(
id INTEGER PRIMARY KEY, -- append-only; the newest row is current
- logo BLOB, -- PNG or SVG, at most 200 KB; SVG sanitized (no script, no external refs)
+ logo BLOB, -- optional; PNG or SVG, at most 200 KB; SVG sanitized (no script, no external refs).
+ -- With no logo the entity name is set as a wordmark.
logo_type TEXT,
entity TEXT NOT NULL, -- e.g. 'Team Tito Limited'
registered_office TEXT NOT NULL,
company_number TEXT NOT NULL,
+ vat_number TEXT,
signatory TEXT NOT NULL, -- e.g. 'For and on behalf of Team Tito Limited'
privacy_address TEXT NOT NULL, -- e.g. privacy@carloku.com
footer TEXT, -- e.g. 'Carloku is run by Team Tito Limited.'
@@ -262,9 +286,12 @@ record page's print stylesheet is the fallback.
**The stored body.** The flagship publishes each version twice: the
site page at `/dpa/{version}/` and the agreement alone, a bare HTML
fragment, at `/dpa/{version}/agreement.html`. Publishing fetches the
-fragment through the guarded client (§3.4), digests the raw bytes, and
-stores it after an allow-list sanitize (headings, paragraphs, lists,
-links, emphasis; nothing else survives). The PDF and the digest
+fragment through the guarded client (§3.4) and runs an allow-list
+sanitize over it (headings, paragraphs, lists, links, emphasis). **If
+the sanitize changes a single byte, the publish is refused** with what
+it removed (R3-7): the fragment must already be canonical. So the
+stored `body` is exactly the fetched bytes, and `sha256` is the digest
+of the text the pane shows, the PDF prints and the customer accepted. The PDF and the digest
therefore describe exactly the text the customer accepted, whatever
happens to the website later.
@@ -285,7 +312,8 @@ notices(
created_at INTEGER NOT NULL,
created_by TEXT NOT NULL,
aware_at INTEGER, -- for 'incident': when the operator became aware
- open_until INTEGER NOT NULL -- recipients are re-resolved until this time
+ open_until INTEGER -- later owners are added until this time; NULL = while the
+ -- document's effective_at is unknown or in the future
)
notice_deliveries(
notice_id INTEGER NOT NULL,
@@ -295,15 +323,21 @@ notice_deliveries(
next_attempt_at INTEGER NOT NULL,
delivered_at INTEGER,
last_error TEXT,
+ cohort TEXT NOT NULL, -- 'initial' (snapshotted at creation) | 'later'
+ created_at INTEGER NOT NULL,
PRIMARY KEY(notice_id, account_id, address)
)
notice_accounts(notice_id INTEGER, account_id INTEGER, PRIMARY KEY(notice_id, account_id)) -- for 'accounts'
```
-The hourly pass, for each notice still open, inserts a delivery row for
-every current owner of every account in its audience that has none
-(`INSERT OR IGNORE`), so an owner added during the notice period is
-notified too. A document notice stays open until its `effective_at`.
+**The initial cohort is snapshotted in the same transaction that
+creates the notice** (R3-5): every owner of every account in the
+audience at that moment, `cohort = 'initial'`. Only that cohort decides
+a date (§4.3). After that, the hourly pass, for each notice still
+open, inserts a `cohort = 'later'` row for every owner it does not
+already have (`INSERT OR IGNORE`), so an owner added during the notice
+period is told too, without moving any date. A restart changes
+nothing: both cohorts are rows. A document notice stays open until its `effective_at`.
An owner who loses the role keeps their row; a delivery already sent
is not undone.
@@ -339,8 +373,9 @@ object by writing to the privacy address before that date.
**For `terms` and `privacy` the console sets the date (Paul, R2-2).**
The operator does not choose `effective_at`. The audience is fixed at
publication: the owners of every account at that moment. The console
-sets `effective_at` once, to 30 days after the last of those deliveries
-is accepted by the transport, and from then on shows it on
+sets `effective_at` once, to **max(published_at + 35 days, the last
+initial-cohort delivery + 30 days)** (R3-6), so it is never earlier
+than the date the email gave, and from then on shows it on
`/fleet/legal`. Until then `/fleet/legal` reads "Upcoming: date set
once every owner has been emailed", with the count still outstanding.
The notice email cannot know the final date, so it says "applies no
@@ -533,29 +568,30 @@ dispositions known now:
- The deletion runs in **one transaction** with the sole-owner check
(the shape `planmembers.go:53` already uses for membership changes).
-- **One identity gate (Paul's ruling on R1-2/R2-1).** A user can be
- created, or a credential minted, in exactly one place:
- `identityGate(tx, address, attemptStartedAt)`. It refuses when a
- deletion of that address committed after the attempt began, and runs
- inside the same transaction as the insert it guards. Every path
- calls it: `ResolveSignIn`'s create (`signinmethods_store.go:93`,
- reached from `completeSigninSession`, `emailsignin.go:311`, after
- the code is consumed at `:427`), session creation, `pollCLIAuth`'s
- token insert (`authstore.go:720`), social and Keymail callbacks,
- invitation acceptance, and agent-login links.
-- **What "began" means.** Each attempt already has a row with a
- creation time: the email code, the CLI auth request, the OAuth state,
- the invitation, the link. The gate takes that time, never "now".
- A fresh sign-in started after the deletion passes, so the person can
- register again later; only an attempt that predates the deletion is
- refused.
+- **One identity gate (Paul's rulings on R1-2, R2-1, R3-1).** A user
+ can be created, or a credential minted, in exactly one place:
+ `identityGate(tx, address, now)`, inside the same transaction as the
+ insert it guards. It refuses while a deletion of that address is less
+ than **1 hour** old. Every path calls it: `ResolveSignIn`'s create
+ (`signinmethods_store.go:93`, reached from `completeSigninSession`,
+ `emailsignin.go:311`, after the code is consumed at `:427`), session
+ creation, `pollCLIAuth`'s token insert (`authstore.go:720`), the
+ Keymail and social callbacks (`server.go:3905`), invitation
+ acceptance, and agent-login links.
+- **Why a cooldown.** Every sign-in attempt lives at most 15 minutes
+ (email code 15 min; `authFlowTTL` 10 min, `server.go:531`;
+ `CLIAuthTTL` 10 min, `authstore.go:44`), and the Keymail attempt
+ exists only as a browser cookie, so there is no trusted start time to
+ compare. One hour outlives every attempt, needs no start time at all,
+ and the cost is that a person who deletes their login waits an hour
+ to sign up again. A test reads every attempt-lifetime constant and
+ fails if any reaches the cooldown.
- **The marker.** Deletion writes `identity_deletions(subject_hmac,
- deleted_at)`, the address under the console's existing HMAC key, and
- the hourly worker removes rows older than the longest-lived attempt
- (asserted by a test that reads every attempt TTL constant; today the
- longest is the 7-day invitation, so markers are kept 8 days and the
- privacy policy says so). Linked sign-in subjects (Keymail, social)
- get a marker each.
+ deleted_at)`: the address, and each linked sign-in subject (Keymail,
+ social), under an HMAC keyed by the console's persistent signing key
+ (`st.SigningKey()`), not the per-process email-code key
+ (`store.go:87`), so a restart does not forget it. The hourly worker
+ removes markers older than the cooldown.
- **The guard test.** A source test lists every `INSERT INTO users`,
`sessions`, `cli_tokens` and sign-in-method statement in
`internal/console` and fails unless it sits in a function that calls
@@ -578,10 +614,22 @@ same action for requests that arrive by email (`operatorOnly` +
### 6.4 Console backups
Deleted rows leave the console's backups within 15 days (Paul, R2-4):
-console.db snapshots are kept 7 days (`lease.go:95`, applied box-wide
-including console.db, `ops/litestream.go:448`), and once a snapshot is
-removed the bucket keeps it 7 more days as a noncurrent version. One
-day of margin covers the hourly snapshot and lifecycle timing. Slice 4
+console.db snapshots are taken every 24 hours and kept 7 days
+(`lease.go:95`, applied box-wide including console.db,
+`ops/litestream.go:448`), and once a snapshot is removed the bucket
+keeps it 7 more days as a noncurrent version. One day of margin covers
+lifecycle timing.
+
+That holds only while the console's replicator runs (R3-4). A console
+replica prefix that is no longer written (left behind by a console move
+or a stopped replicator) never has its snapshots pruned. The sweep
+(§5.4) therefore also lists the console's replica prefixes and reports
+any whose newest object is older than 2 days and which is not the live
+replica: an operator alert, and a row on `/fleet/legal` with a
+**Delete** action (`operatorOnly` + `requireFreshAuth`, refusing the
+live prefix, deleting every version). It reports rather than deletes on
+its own, because deleting a console backup is not something to automate
+on a guess. Slice 4
measures it on dev before the policy changes. The policy says 15 days;
nothing in the platform changes.
@@ -607,6 +655,30 @@ ended raises an operator alert with the last error.
This is termination behaviour on production storage, so the task gets
its own review (stopping rule 3).
+### 6.6 Deleted apps' databases (Paul's ruling on R3-3)
+
+The purge above does not delete an app's database backups. A
+hibernating record's replica at `instances/<host>` and a move's staging
+at `moves/<host>/` are left behind by design when the record goes
+(`createleftovers.go:1-22`), and the data bucket never expires current
+objects. Deleting them automatically, across regions, fleets and moves,
+is #199's "full fix" and gets its own design. This work does not build
+it.
+
+Until it lands:
+
+- The DPA promises an app's **database backups** are deleted **on
+ request, within 30 days**, and everything else on its own.
+- `/fleet/legal` has an operator action: given an account and a
+ deleted app, list the hosts its records held (from the audit log and
+ the trashed records) and the replica and staging prefixes still
+ holding objects in this console's data bucket, then delete every
+ version of them (`operatorOnly` + `requireFreshAuth`, audited). It
+ refuses a host that a live record holds now. Prefixes in another
+ region's bucket, on a customer fleet or in a pool are listed as "not
+ reachable from this console" and handled by hand.
+- When #199 lands, the DPA's deletion clause changes with notice.
+
**Measurement.** Slice 4 measures the worst case on dev for an app with
a database, an object store and an email service: the trash period,
the purge, every object becoming noncurrent, and the 7-day noncurrent
@@ -632,7 +704,9 @@ must match:
whatever region the app runs in. Transfers out of the EU and UK use
the Commission's standard contractual clauses (module 2) and the UK
addendum.
-- Retention: as §5; deletion as §6.5.
+- Retention: as §5. Deletion: as §6.5, except database backups, which
+ are deleted on request within 30 days (§6.6). The approved copy says
+ "including backup copies, within 30 days" and is re-reviewed for this.
- Breach: within 48 hours of becoming aware (§4.4).
- Changes: 30 days' notice, applying per account (§3.5).
- Subprocessors for app data: Amazon Web Services only. Stripe sees
@@ -646,8 +720,7 @@ must match:
- carloku `/privacy/`: the DPA line points at account settings; the
400-day line becomes "for as long as the app's owner chooses; until
they choose, we keep them"; logs and errors get a line; the deletion
- line gains "or delete your sign-in yourself in the console" and says
- a scrambled marker of the address is kept 8 days; backups "within 8
+ line gains "or delete your sign-in yourself in the console"; backups "within 8
days" becomes "within 15 days" (§6.4); where visitor and log data is
kept (§7) is stated.
- Published as a new `privacy` document with notice (§4.3).
@@ -658,6 +731,9 @@ must match:
## 9. Slices
Each slice lands as its own merge; the first is something Paul can see.
+Every slice with UI or email starts with the house sequence (R3-8): a
+UX pass in the console mockup kit at mobile and desktop widths, in
+light and dark, then copy review of every string, then build.
1. **DPA acceptance.** `legal_documents` with the guarded fetch and
stored body, `letterhead`, `/fleet/legal` (documents, letterhead,
@@ -682,7 +758,8 @@ Each slice lands as its own merge; the first is something Paul can see.
5. **Deleting.** The inventory test, `identityGate` and its guard and
interleaving tests, the transaction, self-serve and operator; the
one `purgeApp` and auto-purge from the trash sweep (own review);
- the measurements in §6.4 and §6.5.
+ the operator database-backup action (§6.6); the inactive console
+ replica report (§6.4); the measurements in §6.4 and §6.5.
6. **Flagship switch-on (Paul's go).** Letterhead, IAM apply, publish
the DPA and the changed privacy policy with notice.
@@ -695,4 +772,5 @@ Each slice lands as its own merge; the first is something Paul can see.
- Lengthening log retention past the operator's limit (#1024 archive
tier).
- Regional placement of statistics and logs.
+- Automatic deletion of deleted apps' database backups (#199, §6.6).
- Holding back the carloku.com website in code (§4.3).