Skip to content

fix(as.mo): resolve abbreviated genus when species has subspecies (#288 follow-up)#301

Merged
msberends merged 1 commit into
mainfrom
claude/genus-matching-subspecies-fix-c0r1ok
Jun 27, 2026
Merged

fix(as.mo): resolve abbreviated genus when species has subspecies (#288 follow-up)#301
msberends merged 1 commit into
mainfrom
claude/genus-matching-subspecies-fix-c0r1ok

Conversation

@msberends

Copy link
Copy Markdown
Owner

When a genus+species abbreviation like "P. ovale" was used, the previous
bypass (Issue #288) checked sum(sp_exact) == 1, which failed if the species
also had subspecies sharing the epithet (ovale curtisi, ovale wallikeri).
The fix extends the bypass to fire whenever all exact species matches belong
to one genus, collapsing to the species-rank record (subspecies == "") for
genus+species queries and preserving the chosen row for explicit subspecies
queries.

Also extends the data-invariant test to cover all taxonomic rank columns
from domain to subspecies, not just the terminal three.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01M4fqQYQYJ3drdudkDYNqAY

… follow-up)

When a genus+species abbreviation like "P. ovale" was used, the previous
bypass (Issue #288) checked sum(sp_exact) == 1, which failed if the species
also had subspecies sharing the epithet (ovale curtisi, ovale wallikeri).
The fix extends the bypass to fire whenever all exact species matches belong
to one genus, collapsing to the species-rank record (subspecies == "") for
genus+species queries and preserving the chosen row for explicit subspecies
queries.

Also extends the data-invariant test to cover all taxonomic rank columns
from domain to subspecies, not just the terminal three.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M4fqQYQYJ3drdudkDYNqAY
@msberends msberends merged commit 5184253 into main Jun 27, 2026
2 of 4 checks passed
@msberends msberends deleted the claude/genus-matching-subspecies-fix-c0r1ok branch June 27, 2026 13:20
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