Skip to content

fix: unify country field to human-readable name across cyclist tools - #20

Merged
mpicciolli merged 2 commits into
mainfrom
fix/unify-country-field
Jul 5, 2026
Merged

fix: unify country field to human-readable name across cyclist tools#20
mpicciolli merged 2 commits into
mainfrom
fix/unify-country-field

Conversation

@mpicciolli

@mpicciolli mpicciolli commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Problem

The country field was inconsistent across tools:

Tool Source column Example value
pcm_get_player_info STA_country.gene_sz_flag France
pcm_search_team STA_country.gene_sz_flag France
pcm_search_cyclist STA_country.CONSTANT FRA
pcm_get_team_roster STA_country.CONSTANT FRA

An 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: CONSTANT holds the code, not the country name.

Change

pcm_search_cyclist and pcm_get_team_roster now select gene_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_flag exists and holds the readable name. Snapshots updated; 148 tests pass.

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>
Copilot AI review requested due to automatic review settings July 5, 2026 12:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_cyclist to select STA_country.gene_sz_flag as country and clarify the schema description.
  • Update pcm_get_team_roster to select STA_country.gene_sz_flag as country and 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.

@mpicciolli
mpicciolli merged commit 6b3234b into main Jul 5, 2026
2 checks passed
@mpicciolli
mpicciolli deleted the fix/unify-country-field branch July 5, 2026 13:22
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