feat: admin rebuild/purge and the AUP + terms endpoints #138
No reviewers
Labels
No labels
area: api
area: auth
area: build
area: cache
area: ci
area: compare
area: model
area: provenance
area: rite
backport
blocked
breaking
confirmed
dependencies
duplicate
epic
invalid
needs-info
needs-triage
php
priority: high
priority: low
priority: medium
regression
type: chore
type: correction
type: docs
type: enhancement
type: feature
type: fix
type: perf
type: refactor
type: security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Directorium/Api!138
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/27-admin-purge-aup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rounds out Api v0.1 (epic #27) with the published policies and the cache-invalidation admin actions — all behind seams that stay inert without infrastructure. This is the last v0.1 code PR.
What's here
GET /v1/aup,GET /v1/terms(#30) — the acceptable-use policy and terms of use, served as versioned data (Legal\Policies). Public and cacheable.Edge\EdgeCache(#29) — the CDN-purge seam, withNullEdge(no-op default) andCloudflareEdge(purge_everythingvia the API, fromINTROIBO_CF_ZONE/_TOKEN).POST /v1/admin/purge(#29) +POST /v1/admin/rebuild(#28) — admin-only actions behindAdmin\AdminGate(a shared token viaX-Admin-Tokenor bearer). Rebuild reports the current data version and purges so a new build is served at once; the static tier is regenerated out of band withbin/generate-static.php. The admin routes are only registered whenINTROIBO_ADMIN_TOKENis set — no token, no admin surface.Verification
composer checkgreen: phpcs, PHPStan[OK], PHPUnit 95 tests / 331 assertions./v1/aup+/v1/termsserve versioned policy data;POST /v1/admin/purgeis 401 without the token and 200 (edge purged) with it;/v1/admin/rebuildreports the data version.Scope notes
Live Cloudflare purge and the admin token are maintainer-provisioned; the purge path is exercised behind the
EdgeCacheseam with a recording double. With this, Api v0.1 is code-complete — the calendar service, static tier, caching, metering, and admin/policy surface are all in place for the R2 / 3mi.org release, with MySQL + Cloudflare + DreamHost deploy as the remaining infra steps.Refs #27 #28 #29 #30