Skip to content

fix(ratings): lower minimum cyclist rating to 50 - #41

Merged
mpicciolli merged 3 commits into
mainfrom
fix/rating-min-50
Aug 6, 2026
Merged

fix(ratings): lower minimum cyclist rating to 50#41
mpicciolli merged 3 commits into
mainfrom
fix/rating-min-50

Conversation

@mpicciolli

@mpicciolli mpicciolli commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

pcm_update_cyclist_ratings rejected any rating below 55, but the actual game minimum is 50. This lowers the validation bound and aligns the documentation.

Changes

  • src/tools/update-cyclist-ratings.ts: Zod bound min(55)min(50), and the schema description now reads 50–85
  • AGENTS.md / README.md: tool tables updated to 50–85

The `pcm_update_cyclist_ratings` tool rejected ratings below 55, but the
actual game minimum is 50. Update the Zod bound and the docs accordingly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 6, 2026 02:45

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

Aligns pcm_update_cyclist_ratings with the game’s actual minimum rating by lowering the input validation floor and updating user-facing documentation accordingly.

Changes:

  • Lowered the Zod validation minimum for rating inputs from 55 to 50 in pcm_update_cyclist_ratings.
  • Updated the tool’s schema description and documentation tables to reflect the 50–85 range.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/tools/update-cyclist-ratings.ts Lowers the validated minimum rating to 50 and updates the tool input description accordingly.
README.md Updates the documented rating range for pcm_update_cyclist_ratings to 50–85.
AGENTS.md Updates the internal tool table entry to reflect the 50–85 rating range.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tools/update-cyclist-ratings.ts
mpicciolli and others added 2 commits August 6, 2026 08:10
Add boundary coverage for the rating range: 50 is accepted end-to-end and
49 is rejected by the input schema with a `too_small` issue on `minimum: 50`.
Arguments now go through the registered input schema, since `callTool`
invokes the tool callback directly and would otherwise skip validation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (1)

test/tools/update-cyclist-ratings.test.ts:51

  • inputSchema() uses optional chaining (?.) and then immediately passes the result into z.object(...). If the tool registration ever regresses, this will throw an unhelpful error from inside Zod rather than clearly stating the tool wasn't registered. Make the failure explicit by fetching the tool and throwing with a clear message before constructing the schema.
	const inputSchema = () =>
		z.object(mcp.getTool("pcm_update_cyclist_ratings")?.config.inputSchema);

@mpicciolli
mpicciolli merged commit 392ad17 into main Aug 6, 2026
4 checks passed
@mpicciolli
mpicciolli deleted the fix/rating-min-50 branch August 6, 2026 12:27
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