Skip to content

Treat a named "(Vacancy)" entry in a division's pairs as a vacant seat - #296

Merged
Br3nda merged 1 commit into
mainfrom
bugfix/vacancy-with-name-in-pairs
Nov 15, 2026
Merged

Br3nda merged 1 commit into
mainfrom
bugfix/vacancy-with-name-in-pairs

Conversation

@Br3nda

@Br3nda Br3nda commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

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 word Vacancy, 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.

Type of change

  • Bug fix

How this was checked

I added specs for the four forms APH used, and ran the spec/lib specs (all pass). I also applied the new rule to APH's real XML for 5 Feb 2025. It treats exactly the 7 Birmingham ... (Vacancy) entries as vacancies and misses none. I have not rerun the full parse for that day.

  • Checked the affected area on my own or a staging system
  • Ran the automated tests
  • Ran /code-review (or equivalent)
  • GitHub Actions tests
  • Documentation updated, or not needed

Assisted-by: Claude Code:claude-sonnet-5-5

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>
@Br3nda
Br3nda merged commit d62dc5d into main Nov 15, 2026
5 checks passed
@Br3nda
Br3nda deleted the bugfix/vacancy-with-name-in-pairs branch November 15, 2026 07:06
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.

2 participants