Context
The repo has three separate seed paths: seed.py (local dev), seed_staging.py (staging QA fixtures), and e2e_seed.py (Playwright scenarios). Staging no longer needs seed_staging.py's bulk-seeding role — staging is already seeded, and /dev/test-events/ in backend/community/_dev_tools.py already provides an on-demand devtools pattern for generating test data (gated behind _require_dev_tools / MANAGE_EVENTS permission) instead of a fixed idempotent script.
One piece of seed_staging.py is still genuinely useful day-to-day: seeding join requests in various states (pending/tentative/approved/rejected, with/without email, custom answers) via _seed_join_requests.py and the JOIN_REQUEST_SPECS table in _seed_staging_data.py. Rather than deleting that capability outright, it should move into devtools as an on-demand endpoint, mirroring create_dev_test_event.
What needs to happen
- Add a new devtools endpoint (e.g.
POST /dev/test-join-requests/) in backend/community/_dev_tools.py, gated the same way as create_dev_test_event (_require_dev_tools, same router).
- Generate a randomized join request per call using the existing filler-name pools in
backend/community/_dev_tools_populate.py (_FIRST_NAMES/_LAST_NAMES) rather than the fixed JOIN_REQUEST_SPECS list — random phone number, and a payload letting the caller choose status (pending/tentative/approved/rejected) and whether the request has an email, matching the boolean/count-driven shape of DevTestEventIn.
- Populate
custom_answers against whatever JoinFormQuestions currently exist.
- Once the devtools endpoint covers this, remove the now-unused staging seed surface:
- Delete
seed_staging.py, _seed_staging_data.py, _seed_staging_rsvps.py, test_seed_staging.py.
- Move
is_seed_allowed (currently in _seed_staging_data.py) into _dev_tools.py, since that's its only remaining consumer.
- Trim
_seed_join_requests.py down to just seed_join_form_questions (still used by local seed.py); drop seed_join_requests/reset_join_requests and the staging import.
- Remove the
railway run --environment staging python backend/manage.py seed_staging line from CLAUDE.md.
Acceptance criteria
Context
The repo has three separate seed paths:
seed.py(local dev),seed_staging.py(staging QA fixtures), ande2e_seed.py(Playwright scenarios). Staging no longer needsseed_staging.py's bulk-seeding role — staging is already seeded, and/dev/test-events/inbackend/community/_dev_tools.pyalready provides an on-demand devtools pattern for generating test data (gated behind_require_dev_tools/MANAGE_EVENTSpermission) instead of a fixed idempotent script.One piece of
seed_staging.pyis still genuinely useful day-to-day: seeding join requests in various states (pending/tentative/approved/rejected, with/without email, custom answers) via_seed_join_requests.pyand theJOIN_REQUEST_SPECStable in_seed_staging_data.py. Rather than deleting that capability outright, it should move into devtools as an on-demand endpoint, mirroringcreate_dev_test_event.What needs to happen
POST /dev/test-join-requests/) inbackend/community/_dev_tools.py, gated the same way ascreate_dev_test_event(_require_dev_tools, same router).backend/community/_dev_tools_populate.py(_FIRST_NAMES/_LAST_NAMES) rather than the fixedJOIN_REQUEST_SPECSlist — random phone number, and a payload letting the caller choose status (pending/tentative/approved/rejected) and whether the request has an email, matching the boolean/count-driven shape ofDevTestEventIn.custom_answersagainst whateverJoinFormQuestions currently exist.seed_staging.py,_seed_staging_data.py,_seed_staging_rsvps.py,test_seed_staging.py.is_seed_allowed(currently in_seed_staging_data.py) into_dev_tools.py, since that's its only remaining consumer._seed_join_requests.pydown to justseed_join_form_questions(still used by localseed.py); dropseed_join_requests/reset_join_requestsand the staging import.railway run --environment staging python backend/manage.py seed_stagingline fromCLAUDE.md.Acceptance criteria
create_dev_test_eventseed_staging.py,_seed_staging_data.py,_seed_staging_rsvps.py, andtest_seed_staging.pyare deletedis_seed_allowedlives in_dev_tools.pyand_seed_join_requests.pyno longer imports from the deleted staging data moduleCLAUDE.mdno longer referencesseed_stagingmake agent-cipasses