fix: unify country field to human-readable name across cyclist tools - #20
Merged
Conversation
pcm_search_cyclist and pcm_get_team_roster returned the country code (STA_country.CONSTANT, e.g. FRA) while pcm_get_player_info and pcm_search_team returned the readable name (gene_sz_flag, e.g. France). All tools now return the readable name so agents get a consistent country format across results. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR standardizes the country field returned by cyclist-related tools so that it consistently returns a human-readable country name (from STA_country.gene_sz_flag) instead of a 3-letter code (from STA_country.CONSTANT), aligning pcm_search_cyclist and pcm_get_team_roster with pcm_get_player_info and pcm_search_team.
Changes:
- Update
pcm_search_cyclistto selectSTA_country.gene_sz_flagascountryand clarify the schema description. - Update
pcm_get_team_rosterto selectSTA_country.gene_sz_flagascountryand clarify the schema description. - Refresh Vitest snapshots to reflect the new country values (e.g.,
"Belgium"instead of"BEL").
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/tools/snapshots/search-cyclist.test.ts.snap | Snapshot updates for country values now returning human-readable names. |
| test/tools/snapshots/get-team-roster.test.ts.snap | Snapshot updates for roster country values now returning human-readable names. |
| src/tools/search-cyclist.ts | Switch country selection to co.gene_sz_flag and update schema description. |
| src/tools/get-team-roster.ts | Switch country selection to co.gene_sz_flag and update schema description. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Problem
The
countryfield was inconsistent across tools:pcm_get_player_infoSTA_country.gene_sz_flagFrancepcm_search_teamSTA_country.gene_sz_flagFrancepcm_search_cyclistSTA_country.CONSTANTFRApcm_get_team_rosterSTA_country.CONSTANTFRAAn agent cross-referencing results (e.g. matching a cyclist's country against a team's) got two different formats. The schema descriptions were also misleading:
CONSTANTholds the code, not the country name.Change
pcm_search_cyclistandpcm_get_team_rosternow selectgene_sz_flag(the human-readable name), matching the other two tools. Schema descriptions updated accordingly.Verified against all four fixture saves (2018, 2019, 2021, 2025) that
gene_sz_flagexists and holds the readable name. Snapshots updated; 148 tests pass.