Backfill required RTDB fields and add migrate:backfill tooling - #223
Open
MaxwellBo wants to merge 1 commit into
Open
Backfill required RTDB fields and add migrate:backfill tooling#223MaxwellBo wants to merge 1 commit into
MaxwellBo wants to merge 1 commit into
Conversation
Reusable migrate:backfill script with a manifest driven by DEFAULT_* values; model and UI code no longer treat conference, caucus speaker settings, or resolution voting metadata as optional. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
scripts/lib/field-backfill.ts,scripts/backfill-missing-fields.ts,yarn migrate:backfill) with arequired-optional-fieldsmanifest sourced fromDEFAULT_*objects.conference, caucusspeakerDuration/speakerUnit/queueIsPublic, resolutionamendmentsArePublic/requiredMajority) and removes UI fallbacks that papered over missing data.AGENTS.md.Production backfill (run before merge)
Dry-run against production (read-only, no credentials):
Latest dry-run: 3824 paths across 66505 committees (speakerDuration 1584, speakerUnit 1219, requiredMajority 567, conference 205, amendmentsArePublic 186, queueIsPublic 63).
Apply with a Firebase service account that has Realtime Database admin access:
Test plan
yarn migrate:backfill -- --dry-runcompletes and reports expected field countsMade with Cursor