Skip to content

[EPAC-897]: MP attendance record: show how often each MP votes and how often they miss divisions#802

Merged
riddim-developer-bot[bot] merged 3 commits into
mainfrom
symphony/epac-897-mp-attendance-record-show-how-often-each-mp-vote
Jun 14, 2026
Merged

[EPAC-897]: MP attendance record: show how often each MP votes and how often they miss divisions#802
riddim-developer-bot[bot] merged 3 commits into
mainfrom
symphony/epac-897-mp-attendance-record-show-how-often-each-mp-vote

Conversation

@riddim-developer-bot

@riddim-developer-bot riddim-developer-bot Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR implements the iOS-side verification tests, snapshots, localizations, and documentation for the MP attendance record feature, fulfilling the EPAC-897 requirements.

Changes:

  • Entities / Models: Verified AttendanceRecord and MPAttendance computed models correctly distinguish paired absences (which are pre-arranged and not treated the same as unexplained absences) and avoid counting divisions before the member was sworn in.
  • Ports: Verified MPAttendanceQueryPort for querying raw tallies.
  • Adapters:
    • Verified SwiftDataMPAttendanceAdapter maps MemberVote.type counts ("yea", "nay", "paired", "absent") accurately.
    • Verified MemberAttendanceSection displays the headline percentage with denominator (e.g. "Present 89% of the time — 412 of 463 divisions since [date sworn in]").
    • Verified national and party averages display correctly for comparison.
    • Linked the source label to "Parliament.ca open API — Recorded Votes".
  • Documentation: Added the LoadMPAttendance use case to docs/architecture/use-case-catalog.md.
  • Localization: Added French translation keys and localized copies to fr.lproj/Localizable.strings.
  • Tests:
    • Created LoadMPAttendanceTests to cover use case logic, including rate calculation and peer averages.
    • Created SwiftDataMPAttendanceAdapterTests to cover the database queries and the sworn-in date exclusions.
    • Updated SnapshotTests with standard and no-date/no-comparison states for the AttendanceRecordCard view, generating and committing the reference images.

Verification

  • Run xcodebuild test for the unit tests:
    • LoadMPAttendanceTests passed.
    • SwiftDataMPAttendanceAdapterTests passed.
  • Run xcodebuild test for the snapshot tests:
    • SnapshotTests/testMPAttendanceCard_standard passed.
    • SnapshotTests/testMPAttendanceCard_noDateNoComparison passed.
  • Run bash scripts/check-boundaries.sh to confirm no Clean Architecture boundary violations.

@riddim-developer-bot riddim-developer-bot Bot enabled auto-merge (squash) June 14, 2026 00:00
@riddim-developer-bot riddim-developer-bot Bot force-pushed the symphony/epac-897-mp-attendance-record-show-how-often-each-mp-vote branch from 371c6b2 to 51e41b3 Compare June 14, 2026 05:24
@riddim-developer-bot riddim-developer-bot Bot merged commit ee73d5d into main Jun 14, 2026
34 of 35 checks passed
@riddim-developer-bot riddim-developer-bot Bot deleted the symphony/epac-897-mp-attendance-record-show-how-often-each-mp-vote branch June 14, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants