Complete Rust-backed voting reports and historical import
Outcome Make protocols, interactive reports, DOCX and research exports correct and complete from Rust snapshots, and migrate the agreed legacy Rails voting history once without runtime fallback. Confirmed gaps - The interactive report shows an unsupported banner and proposal data but no Rust voting details; the DOCX generator emits only an unsupported message; research export writes status=unavailable with no polls. - Protocol/decision builders do query Rust, but their broad rescue can turn failures into persisted error prose. Coverage was reduced to a few examples. - Current report logic iterates open/cancelled/superseded runs, assumes primarily two options, and can fall back to the in-favor option when a closed binary result is pending, risking a fabricated approval. N-way selection, abstention, manual attribution, casting weight and incomplete/tied outcomes need explicit semantics. - No Rails-poll-to-Rust importer exists. The Rust schema lacks legacy presentation metadata and cannot render an imported run whose proposal/point source was deleted. Acceptance criteria - Protocol and decision generation include only eligible terminal runs and correctly represent binary, n-way selection, point, abstention, unanimous, manual and casting outcomes; pending/tied/incomplete/cancelled/superseded states never fabricate a decision. - Interactive report, print view, DOCX and research JSON use the same Rust-backed projection and preserve authorization/confidentiality/public-result rules. Background generation has an explicit trusted reader identity and fails visibly/retryably rather than persisting an error as valid content. - A product decision defines the history boundary (all rows versus tenant/date cutoff), retention, title/summary/public visibility, unresolved votes and orphan/deleted sources. - A bounded, restartable and idempotent importer uses stable run identities, never mutates source tables, reports every rejected/orphaned row, and supports dry-run plus reconciliation of run/option/electorate/vote/totals/results counts. - Migration is rehearsed on a current production backup, rerun/rollback is verified, checksums/invariants are recorded, and imported history renders through reports/exports without Rails runtime reads. - Focused report/export/import tests, real PostgreSQL constraints and representative large-meeting performance checks pass.
Checklist
0 of 4 complete- Make the shared Rust report projection exclude non-results and correctly render binary, n-way, abstention, unanimous, manual, casting, tie and pending states.
- Restore interactive/print voting reports, DOCX and research export through the same authorized Rust-backed projection.
- Define and implement a stable, restartable importer including presentation metadata, orphan/tombstone handling and explicit rejection reporting.
- Rehearse import, rollback/reapply, reconciliation and report/export rendering on a current production backup.
- Area
- Kaukus
- Kind
- Feature
- Priority
- High
- Task ID
tsk_y3hahew6xg- Updated