Drop the mayoral pick from the resident survey - #130
Merged
Merged
Conversation
The "Who do you plan to vote for as mayor?" question comes out of the Toronto resident survey definition, leaving "About you" as email and postal code. The mayoral_candidates options_source machinery stays: it is generic and still tested, so another election can ask the question without rebuilding it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Greptile SummaryThe PR removes the required mayoral-choice question from the Toronto resident survey definition, leaving email and postal code in the “About you” step.
Confidence Score: 5/5The PR appears safe to merge; the survey API and its known frontend consumer both handle the question set dynamically. The change is limited to removing one seed-defined question, and no fixed question-count, required-field, or cross-repository consumer contract was found that depends on
|
| Filename | Overview |
|---|---|
| db/seeds/elections/toronto_2026_city_priorities.json | Cleanly removes the mayoral-choice question without disturbing the remaining survey definition. |
Reviews (1): Last reviewed commit: "Drop the mayoral pick from the resident ..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the "Who do you plan to vote for as mayor?" question (
mayor_vote) from the Toronto resident survey definition. "About you" is now email + postal code; 31 questions remain.The
mayoral_candidatesoptions_source machinery (Warehouse::Election#mayoral_candidate_optionsand the question-model support) stays in place — it's generic and still covered by tests, so another election can ask the question without rebuilding it.Merging this does not remove it from prod
The seed JSON is a restore record, not a live source of truth — the database is authoritative once seeded. After merge, the question keeps serving from
/api/v1/.../surveysuntil one of:bin/rails db:seedruns (the seeder destroys questions no longer in the definition), orNote that re-running the seed also overwrites any CMS edits to the questions it names, so the CMS delete is the lighter-touch option.
Testing
bin/rails test test/tasks/elections_seed_test.rb test/models/warehouse/election_survey_test.rb test/controllers/api/v1/election_surveys_controller_test.rb— 28 runs, 0 failures.🤖 Generated with Claude Code