Repository navigation
fix(character-manage): preserve cantrips through MCP schema - #98
Conversation
|
✅ Health of changed files: 4.8 (unchanged) 📋 At a glance Files & modules (2)
✅ Health gate: passed 📌 Before you merge
🔎 More signals (3)🗺️ Change map flowchart LR
subgraph PR ["Changed in this PR (1 with dependents)"]
f_src_server_consolidated_character_manage_ts[".../consolidated/character-manage.ts 🔥"]:::changed
end
f_scripts_seed_bastion_ts["scripts/seed-bastion.ts"]
f_src_server_consolidated_character_manage_ts --> f_scripts_seed_bastion_ts
f_src_server_consolidated_batch_manage_ts[".../consolidated/batch-manage.ts"]
f_src_server_consolidated_character_manage_ts --> f_src_server_consolidated_batch_manage_ts
f_src_server_consolidated_index_ts[".../consolidated/index.ts"]
f_src_server_consolidated_character_manage_ts --> f_src_server_consolidated_index_ts
f_src_server_consolidated_npc_manage_ts[".../consolidated/npc-manage.ts"]
f_src_server_consolidated_character_manage_ts --> f_src_server_consolidated_npc_manage_ts
t_tests_server_consolidated_character_origin_test_ts(["✅ .../consolidated/character-origin.test.ts"]):::guard
t_tests_server_consolidated_character_origin_test_ts -.-> f_src_server_consolidated_character_manage_ts
classDef changed fill:#dbeafe,stroke:#1d4ed8,color:#1e3a5f
classDef warn fill:#fef3c7,stroke:#b45309,color:#78350f
classDef guard fill:#dcfce7,stroke:#15803d,color:#14532d
Solid arrows: code that imports the changed files (4 direct dependents, from the last indexed snapshot). Dashed: history/tests. 🔥 Hotspots touched (2)
💀 Dead code (10 findings)
7 more
📊 See the full report for this PR |
|
Warning Review limit reached
Next review available in: 42 seconds You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f79d29607
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| character.cantripsKnown = args.cantripsKnown?.length | ||
| ? [...new Set(args.cantripsKnown)] | ||
| : provisioningResult.cantripsGranted || []; |
There was a problem hiding this comment.
Keep provisioning metadata aligned with selected cantrips
When a caller creates an auto-provisioned spellcaster with an explicit cantripsKnown list, the provisioner is still called without its supported customCantrips option, so provisioningResult.cantripsGranted contains the class defaults while these lines store the caller's selection. The response later exposes the untouched result as _provisioning.cantripsGranted; for example, a wizard created with only ['Fire Bolt'] reports that all four default wizard cantrips were granted even though the character contains one. Pass the selection into provisioning or report the final persisted list so the response is not contradictory.
Useful? React with 👍 / 👎.
* Support cantrip selection in character management * fix(character-manage): preserve cantrips through MCP schema
Fixes #97. The action-level character update schema already accepted cantripsKnown, but the top-level MCP registration schema omitted it. Because the MCP SDK validates through that registration schema, cantrip selections were stripped before the handler while levelled spell selections persisted. Adds the missing field and a regression test at the registration boundary. Validation: targeted character_manage 72/72, full suite 2254 passed / 7 skipped across 147 files, npm run build, and git diff --check.