Repository navigation
Treat a named "(Vacancy)" entry in a division's pairs as a vacant seat - #296
Merged
Merged
Conversation
APH lists a senator who has left as "Birmingham, S. J. (Vacancy)" in the pairs, and not as the bare word "Vacancy". The parser only recognised the bare word, so it looked up Simon Birmingham as a sitting senator on 2025-02-05, found none, and stopped the whole day. A name followed by "(Vacancy)", with or without a trailing full stop or space, now counts as a vacant seat. The parser drops that pair, as it already does for the bare word, and the senator listed against it. Assisted-by: Claude Code:claude-sonnet-5-5 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
benrfairless
approved these changes
Nov 15, 2026
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.
What and why
APH writes a vacant Senate seat in the pairs list as the name of the senator who left, followed by "(Vacancy)", for example
Birmingham, S. J. (Vacancy). The parser only recognised the bare wordVacancy, so it looked up Simon Birmingham as a sitting senator on 5 Feb 2025 and stopped the whole day.The parser now treats any name ending in
(Vacancy)as a vacant seat and drops that pair, as it already does for the bare word.proofvalue.Type of change
How this was checked
I added specs for the four forms APH used, and ran the
spec/libspecs (all pass). I also applied the new rule to APH's real XML for 5 Feb 2025. It treats exactly the 7Birmingham ... (Vacancy)entries as vacancies and misses none. I have not rerun the full parse for that day./code-review(or equivalent)Assisted-by: Claude Code:claude-sonnet-5-5