Add seed_test_rfc.py for §8 manual testing

Slice 5 will own the §13 graduation flow that creates per-RFC repos
from super-drafts; until then, the §8 active-RFC view needs a dev
shortcut to bring an `state: active` entry plus a per-RFC repo into
existence. The script:

- Creates `<org>/rfc-NNNN-<slug>` via bot.ensure_rfc_repo_seed,
  seeding RFC.md on main.
- Registers the §4.1 webhook on the per-RFC repo.
- Creates (or graduates) the meta-repo entry with state=active,
  id=RFC-NNNN, repo=<full>.

Requires the operator's gitea_login to have a `users` row (sign in
once via OAuth first); refuses to synthesize a fake user since the
§6 / §15.9 attribution surfaces read from it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ben Stull
2026-05-24 05:01:20 -07:00
parent 3bc8fe92af
commit b57b4ffc4b
2 changed files with 284 additions and 0 deletions
+18
View File
@@ -175,6 +175,24 @@ After bring-up:
- `gitea ls /api/v1/repos/wiggleverse/meta/contents/rfcs` after a
proposal merges should show one new `<slug>.md`.
## Seeding an active RFC for §8 testing
Slice 2 (the active-RFC view per §8) needs an entry whose `state` is
`active` and whose per-RFC repo exists. Slice 5's graduation flow
will land the proper path; until then, `scripts/seed_test_rfc.py` is
the dev shortcut. Sign in once via OAuth so a `users` row exists,
then:
```sh
cd backend && .venv/bin/python ../scripts/seed_test_rfc.py \
--slug open-human-model \
--title "Open Human Model"
```
The script creates `wiggleverse/rfc-NNNN-<slug>`, seeds `RFC.md` on
`main`, registers the webhook, and graduates the meta entry. The §8
surface at `/rfc/<slug>` then has something real to render.
## Troubleshooting
- **The catalog stays empty after a merge.** Check that the webhook