<!--
SPDX-FileCopyrightText: 2026 Science Against Authoritarianism Contributors
SPDX-License-Identifier: CC-BY-SA-4.0
-->

# Public Identity, URL Verification & Anonymous Release Runbook

*Why this document exists.* **Science Against Authoritarianism (Pharos)** is
designed to stand on its verifiable code, open data, and falsifiable citations
— **not** on any individual maintainer or commercial company. Removing personal
and corporate identifiers from public-facing surfaces also reduces personal
retaliation risk when publishing research on authoritarianism, wealth capture,
and transnational kleptocracy.

---

## 1. Current URL & Identity Audit (`2026-12-01`)

| Surface | Current State | Status |
|---|---|---|
| **Canonical public observatory URL** | **[`https://pharos-observatory.pages.dev`](https://pharos-observatory.pages.dev)** — neutral `*.pages.dev` static bundle deployed directly from scrubbed `site/dist/` with edge HTTP security headers (`site/public/_headers`) | **LIVE (ANONYMOUS)** |
| **Public prose, site, metadata, and built `site/dist/`** | Scrubbed to collective stewardship (`Science Against Authoritarianism Contributors` / `The Pharos Project`); enforced via salted SHA-256 token digests (zero plaintext PII) in both `tests/test_public_identity.py` and `site/vite.config.js` `closeBundle()` | **CLEAN (HASH-ENFORCED)** |
| **Internal working logs** (`STATUS.md`, `docs/CHRONICLE.md`, `docs/RFC_PARTNERSHIPS.md`) | Scrubbed in-repo AND explicitly excluded from `site/dist/` staging (`make site-verify` asserts their absence) | **EXCLUDED FROM PORTAL** |
| **Source git repository** | Kept **strictly private**; never flipped public and never pushed with personal commit metadata exposed to the public portal | **PRIVATE (ISOLATED)** |
| **External outreach email / optional custom domain** | No personal email exposed anywhere; custom-domain cutover is automated via `./pharos domain --set https://<neutral-domain>` (hard-blocks personal/company domains) and runtime-origin JS | **READY FOR CUTOVER** |

---

## 2. Neutral Custom Domain Cutover Runbook (1-Command Switch)

All Pharos routes (`/universities`, `/research-partners`, `/syllabus`, `/replication`, `/press`, `/students`, `/ask`, `/forecast`, `/api/v1/observatory.json`, `/croissant.json`, `/datapackage.json`) and frontend generators (`resolvePortalOrigin()`) automatically adapt to any HTTPS custom domain at runtime.

1. **Register a neutral, project-only domain** (never bind a personal or commercial company domain; `validate_portal_url()` hard-blocks forbidden tokens). Enable WHOIS privacy redaction (included free at Cloudflare Registrar, Porkbun, or Njalla). Neutral `.org` candidates verified available via PIR RDAP on `2026-12-02` are recorded in [`portal_domain.json`](portal_domain.json) (e.g., `pharosobservatory.org`, `pharos-observatory.org`, `pharosscience.org`, `pharoscommons.org`, `scienceagainstauthoritarianism.org`).
2. **Attach the domain to Cloudflare Pages (`pharos-observatory`):**
   - Add the new domain as a **Custom Domain** on the `pharos-observatory` Pages project (`CNAME` apex/www -> `pharos-observatory.pages.dev`), wait for TLS issuance (`Active`), and enable **Always Use HTTPS** + **DNSSEC**.
3. **Flip all static metadata, sitemaps, `CITATION.cff`, Croissant 1.0, Frictionless & 237 polity APIs in one command:**
   ```bash
   ./pharos domain --set https://pharosobservatory.org --dry-run   # preview affected surfaces
   ./pharos domain --set https://pharosobservatory.org             # apply + regenerate interop
   make dashboard && make site-verify                              # verify 12/12 GREEN + 0 leaks
   ```
4. **Deploy the updated `site/dist/` bundle and verify live HTTPS, redirects, HSTS, CSP & CORS:**
   ```bash
   ./pharos domain --check https://pharosobservatory.org
   ```

---

## 3. Optional Future Step: History-Scrubbed Public Git Mirror

The personal source repository is kept **strictly private** — do **not** flip a personal private repository to public (`gh repo edit --visibility public`). If contributors later wish to open a standalone public Git mirror alongside `https://pharos-observatory.pages.dev`:

1. **Create a neutral, project-scoped Git namespace** (e.g., `pharos-observatory` on Codeberg, GitLab, or a standalone GitHub organization with zero personal or company branding).
2. **Export a clean, history-scrubbed orphan snapshot** from a verified `11/11 GREEN` tree so historical local `.git` metadata is never published:
   ```bash
   git checkout --orphan public-release
   git config user.name "Pharos Maintainers"
   git config user.email "maintainers@pharos-observatory.invalid"
   git commit -m "release: Pharos / Science Against Authoritarianism"
   ```
3. **Strict-FOSS redistribution option:** Run `PHAROS_STRICT_FOSS=1 make pipeline-offline` to exclude non-commercial upstream providers (Freedom House & GI-TOC) at build time, or toggle `?foss=1` in the live portal UI.
4. **Independent second-grader review:** Generate a blind, grade-stripped 10-entry verification packet via `./pharos grader-pack`.
5. **Institution outreach:** Send only from a neutral project-only channel (never a personal inbox); see [`PARTNER_INSTITUTIONS.md`](PARTNER_INSTITUTIONS.md).
