Phase 13, part 4: proving a team's domain

Before Supermarket crawls a team's website, reads its Search Console data
or publishes to it, the team proves the domain is theirs: a DNS TXT
record, a file on the site, or owning its Search Console property. One
team holds a domain at a time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 12:21:42 -07:00
co-authored by Claude Opus 5.5
parent d5fb1898e8
commit 47cc8b2b10
11 changed files with 444 additions and 8 deletions
+18 -1
View File
@@ -55,7 +55,7 @@ tools over MCP, approvals, limits and visibility, and the JSON API. Schema
39.
**Phase 13 (multi-tenant) is under way** on branch `phase13`, with a
Postgres schema per team (decided 2026-11-26); parts 1–3 are built.
Postgres schema per team (decided 2026-11-26); parts 1–4 are built.
**Phase 12 (signing in with the Core, OIDC) is set aside for now**
(2026-11-26): before it starts, the user will share the Federated Core's
@@ -2848,6 +2848,23 @@ stand.
- Not yet: an email address confirmed at sign-up. Domain proof (part 4)
keeps an unconfirmed team from doing anything with a website.
**Part 4 built 2026-11-26** on `phase13`.
- Schema 41 (the platform's): each team's `verify_token`
(`supermarket-verify=…`), when it proved its domain and how; a unique
index on a proved domain, so one team holds it at a time.
- Settings → Domain (admins, multi-tenant only): the three ways, each with
a *Check* button: a TXT record on the domain; the file
`/.well-known/supermarket-verification.txt` on the domain or its `www.`
(3 redirects at most, the first 4 KB read); or the connected Google
account being an owner of the domain's Search Console property (a domain
property, or a site on the domain). Another team's proof stands in the
way, until it's released (the platform's admins, part 7).
- Until it's proved, the routes that crawl the site, read its Search
Console data or publish to it (an audit, a sync, a new site, adding
pages, the theme, the search-engine setup, IndexNow, SEO changes and
briefs' pull requests) send the admin to Settings → Domain; an agent's
SEO change is refused too. Background jobs are part 5.
1. **Teams everywhere.**
- Every table that holds a company's data gets `team_id`, and its
unique keys include it. The settings table's key becomes