Add gated first-run site setup #263

Merged
erik merged 3 commits from feat/task-92bd1817-gated-site-setup into main 2026-07-18 21:08:44 -05:00
Owner

Summary

Clean generated sites now remain unpublished until an authenticated owner completes explicit site and actor setup. Existing configured installations are backfilled as complete, while the repository development fixture remains opt-in.

Task

Task: task-92bd1817

Changes

  • Persist setup completion with upgrade-compatible backfill.
  • Gate public pages, feeds, content APIs, media, and federation before setup.
  • Keep health, login, assets, settings, and owner setup accessible.
  • Add an owner-only setup checklist separating deployment status from site and actor identity fields.
  • Create/select the actor, generate signing keys, and publish only after valid completion.
  • Remove implicit example-actor defaults and keep the repository fixture behind an explicit development flag.
  • Document first login, setup, and verification for generated sites.

Testing

  • Clean setup and route-gating tests
  • Validation, completion, federation, and upgrade tests
  • Generated-site and development-fixture tests
  • ./scripts/pre-pr.sh
  • Manual repository dev startup and homepage check

Checklist

  • ./scripts/pre-pr.sh passes
  • Documentation updated
  • No unrelated changes included
## Summary Clean generated sites now remain unpublished until an authenticated owner completes explicit site and actor setup. Existing configured installations are backfilled as complete, while the repository development fixture remains opt-in. ## Task Task: task-92bd1817 ## Changes - Persist setup completion with upgrade-compatible backfill. - Gate public pages, feeds, content APIs, media, and federation before setup. - Keep health, login, assets, settings, and owner setup accessible. - Add an owner-only setup checklist separating deployment status from site and actor identity fields. - Create/select the actor, generate signing keys, and publish only after valid completion. - Remove implicit example-actor defaults and keep the repository fixture behind an explicit development flag. - Document first login, setup, and verification for generated sites. ## Testing - [x] Clean setup and route-gating tests - [x] Validation, completion, federation, and upgrade tests - [x] Generated-site and development-fixture tests - [x] `./scripts/pre-pr.sh` - [x] Manual repository dev startup and homepage check ## Checklist - [x] `./scripts/pre-pr.sh` passes - [x] Documentation updated - [x] No unrelated changes included
feat: gate publishing on first-run setup
All checks were successful
CI / build-lint-test (pull_request) Successful in 2m14s
aa31d8557e
Task: #task-92bd1817
test: verify post-setup API access
All checks were successful
CI / build-lint-test (pull_request) Successful in 2m11s
20872d68e7
Task: #task-92bd1817
Author
Owner

Review summary

The PR implements an explicit, migration-backed setup lifecycle for generated sites, gates publication until owner setup succeeds, preserves existing installations, and keeps the repository example actor behind a development-only opt-in.

Acceptance criteria

  • Met: Clean migrated databases have no setup row or actor, and the example actor default was removed from the actor API.
  • Met: Setup-gate tests cover the neutral public response plus continued access to login, callbacks, health, assets, and authenticated setup.
  • Met: Feed, media, content API, actor, WebFinger, and queue-worker behavior is blocked before setup.
  • Met: The owner-only checklist separates deployment readiness from site/actor fields and tests verify secret values are not rendered.
  • Met: Required site and actor fields, usernames, and public URLs are validated while preserving submitted values on errors.
  • Met: Invalid submissions leave setup incomplete, without an actor or public site access.
  • Met: Successful setup persists site identity, creates/selects the submitted actor, generates signing keys, and records completion last.
  • Met: Tests verify homepage, feed, API, and configured actor federation behavior after completion.
  • Met: Migration tests stage an existing configured database and verify completion is backfilled.
  • Met: Generated actor defaults and placeholders no longer contain slugkitexample or Slugkit Example; pre-setup federation is unavailable.
  • Met: The repository Procfile explicitly opts into the development fixture, while generated Procfiles are tested not to include that flag.
  • Met: Automated coverage exercises clean state, route gating, validation, completion, upgrade compatibility, development fixtures, and pre/post federation behavior.
  • Met: Generated-site documentation covers deployment prerequisites, first login, /setup, identity permanence, and post-setup verification.

Blocking issues

  • None.

Warnings

  • None.

Verdict

Approved. CI passed for commit 20872d68e7, and all 13 acceptance criteria are evidenced by implementation and tests.

### Review summary The PR implements an explicit, migration-backed setup lifecycle for generated sites, gates publication until owner setup succeeds, preserves existing installations, and keeps the repository example actor behind a development-only opt-in. ### Acceptance criteria - **Met:** Clean migrated databases have no setup row or actor, and the example actor default was removed from the actor API. - **Met:** Setup-gate tests cover the neutral public response plus continued access to login, callbacks, health, assets, and authenticated setup. - **Met:** Feed, media, content API, actor, WebFinger, and queue-worker behavior is blocked before setup. - **Met:** The owner-only checklist separates deployment readiness from site/actor fields and tests verify secret values are not rendered. - **Met:** Required site and actor fields, usernames, and public URLs are validated while preserving submitted values on errors. - **Met:** Invalid submissions leave setup incomplete, without an actor or public site access. - **Met:** Successful setup persists site identity, creates/selects the submitted actor, generates signing keys, and records completion last. - **Met:** Tests verify homepage, feed, API, and configured actor federation behavior after completion. - **Met:** Migration tests stage an existing configured database and verify completion is backfilled. - **Met:** Generated actor defaults and placeholders no longer contain `slugkitexample` or `Slugkit Example`; pre-setup federation is unavailable. - **Met:** The repository Procfile explicitly opts into the development fixture, while generated Procfiles are tested not to include that flag. - **Met:** Automated coverage exercises clean state, route gating, validation, completion, upgrade compatibility, development fixtures, and pre/post federation behavior. - **Met:** Generated-site documentation covers deployment prerequisites, first login, `/setup`, identity permanence, and post-setup verification. ### Blocking issues - None. ### Warnings - None. ### Verdict **Approved.** CI passed for commit `20872d68e7`, and all 13 acceptance criteria are evidenced by implementation and tests.
chore: exercise first-run setup in dev
All checks were successful
CI / build-lint-test (pull_request) Successful in 2m17s
d6ea53768c
Task: #task-92bd1817
Author
Owner

Review summary

The latest update makes normal repository development exercise the same clean first-run setup flow as generated sites, while retaining the example actor only as an explicit opt-in fixture. The local database reset was kept outside version control.

Acceptance criteria

  • Met: All 13 criteria from the prior review remain satisfied.
  • Met: Procfile.dev no longer seeds the example actor automatically, so a clean local database enters setup mode.
  • Met: The explicit SLUGKIT_DEVELOPMENT_FIXTURE=true mechanism remains available and is documented for fixture-dependent work.
  • Met: Tests verify the default repository Procfile does not enable the development fixture.
  • Met: Manual verification confirmed a clean database returns the setup-in-progress page with HTTP 503 while /health remains available.

Blocking issues

  • None.

Warnings

  • None.

Verdict

Approved. CI passed for commit d6ea53768c, and all 13 acceptance criteria remain met.

### Review summary The latest update makes normal repository development exercise the same clean first-run setup flow as generated sites, while retaining the example actor only as an explicit opt-in fixture. The local database reset was kept outside version control. ### Acceptance criteria - **Met:** All 13 criteria from the prior review remain satisfied. - **Met:** `Procfile.dev` no longer seeds the example actor automatically, so a clean local database enters setup mode. - **Met:** The explicit `SLUGKIT_DEVELOPMENT_FIXTURE=true` mechanism remains available and is documented for fixture-dependent work. - **Met:** Tests verify the default repository Procfile does not enable the development fixture. - **Met:** Manual verification confirmed a clean database returns the setup-in-progress page with HTTP 503 while `/health` remains available. ### Blocking issues - None. ### Warnings - None. ### Verdict **Approved.** CI passed for commit `d6ea53768c`, and all 13 acceptance criteria remain met.
erik merged commit 292843e898 into main 2026-07-18 21:08:44 -05:00
erik deleted branch feat/task-92bd1817-gated-site-setup 2026-07-18 21:08:44 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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
erik/slugkit!263
No description provided.