#!/usr/bin/env sh set -eu # PPE E2E content seed (§9 deployed-environment harness). # # The Tier-1 docker seed (seed-gitea.sh) stands up a throwaway Gitea. PPE # instead runs against the REAL Gitea (git.wiggleverse.org) — which it # shares with prod. To exercise the §22.4a metadata UI (faceted filter # SLICE-3, edit panel SLICE-4, bulk bar SLICE-5) on PPE WITHOUT touching # real OHM content, this script seeds a DEDICATED, PPE-only registry + # content repo: # # wiggleverse/rfc-registry-ppe — PPE's own project registry (prod # keeps using wiggleverse/rfc-registry, # so prod is never affected). # wiggleverse/rfc-app-ppe-content — content for the one project the PPE # registry describes: a default # (document) collection + a faceted # `bdd` named collection with a # fields: schema + three entries. # # Point PPE at the PPE registry with: # flotilla-core overlay set rfc-app-ppe REGISTRY_REPO=rfc-registry-ppe # The app's startup reconciler sweep loads this content into cached_rfcs # on the next deploy/restart (no webhook needed for the initial load). # # Auth: pass a Gitea token with org repo-create + content-write scope via # GITEA_TOKEN (the wiggleverse admin token — see the wgl-gitea-admin # skill; never echo it). The collection path the E2E suite hits is # /p/ohm/c/bdd, so the seeded project id is `ohm` (matching the Tier-1 # seed and DEFAULT_PROJECT_ID=ohm) and the collection is `bdd`. # # Idempotent: repos/files that already exist are left as-is. Pass # RESEED=1 to force-overwrite the three entry files back to their seed # values (so a re-run restores SLICE-4/5's expected preconditions). GITEA="${GITEA_URL:-https://git.wiggleverse.org}" ORG="${GITEA_ORG:-wiggleverse}" REGISTRY_REPO="${REGISTRY_REPO:-rfc-registry-ppe}" CONTENT_REPO="${CONTENT_REPO:-rfc-app-ppe-content}" PROJECT_ID="${DEFAULT_PROJECT_ID:-ohm}" TOKEN="${GITEA_TOKEN:?set GITEA_TOKEN to a wiggleverse-org admin/bot token (do not echo it)}" RESEED="${RESEED:-0}" api() { curl -s -H "Authorization: token $TOKEN" "$@"; } # mutate