8000 fix(character-manage): preserve cantrips through MCP schema by Mnehmos · Pull Request #98 · Mnehmos/mnehmos.rpg.mcp · GitHub
[go: up one dir, main page]

Skip to content

fix(character-manage): preserve cantrips through MCP schema - #98

Merged
Mnehmos merged 2 commits into
mainfrom
codex/spellbook-cantrip-selection
Aug 14, 2026
Merged

Mnehmos merged 2 commits into
mainfrom
codex/spellbook-cantrip-selection

Conversation

@Mnehmos
@Mnehmos Mnehmos commented Aug 14, 2026
Copy link
Copy Markdown
Owner

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.

@repowise-bot
repowise-bot Bot commented Aug 14, 2026
Copy link
Copy Markdown

✅ Health of changed files: 4.8 (unchanged)

📋 At a glance
2 hotspots touched · 2 files with recent fix history · 10 dead-code findings.

Files & modules (2)
  • src (1 file)
    • .../consolidated/character-manage.ts
  • tests (1 file)
    • .../consolidated/character-manage.test.ts

✅ Health gate: passed

📌 Before you merge

  • Run .../consolidated/character-origin.test.ts, .../consolidated/open5e-authority.test.ts: they import the changed files
🔎 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
Loading

Solid arrows: code that imports the changed files (4 direct dependents, from the last indexed snapshot). Dashed: history/tests.

🔥 Hotspots touched (2)

  • .../consolidated/character-manage.ts: 8 commits/90d, 8 dependents
  • .../consolidated/character-manage.test.ts: 2 commits/90d, 0 dependents

💀 Dead code (10 findings)

  • 💀 .../consolidated/character-manage.ts ACTIONS (confidence 0.65)
  • 💀 .../consolidated/character-manage.ts XP_TABLE (confidence 0.65)
  • 💀 .../consolidated/character-manage.ts CLASS_SAVE_KEYS (confidence 0.65)
7 more
  • 💀 .../consolidated/character-manage.ts handleGet (confidence 0.65)
  • 💀 .../consolidated/character-manage.ts handleUpdate (confidence 0.65)
  • 💀 .../consolidated/character-manage.ts handleList (confidence 0.65)
  • 💀 .../consolidated/character-manage.ts handleDelete (confidence 0.65)
  • 💀 .../consolidated/character-manage.ts handleAddXp (confidence 0.65)
  • 💀 .../consolidated/character-manage.ts handleGetProgression (confidence 0.65)
  • 💀 .../consolidated/character-manage.ts handleLevelUp (confidence 0.65)

📊 See the full report for this PR
Your repo map with this PR's blast radius lit up, every caller of the contracts it changes, and health before and after. No sign-in. · ⭐ Star Repowise · 📥 Install bot · Silence on a single PR with [skip repowise] in the title · Per-repo toggle on repowise.dev/settings?tab=bot · Updated 2026-08-14 21:12 UTC

@coderabbitai
coderabbitai Bot commented Aug 14, 2026
Copy link
Copy Markdown

Warning

Review limit reached

@Mnehmos, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8e44421b-ddd4-4135-9714-3cb9a1ea0c03

📥 Commits

Reviewing files that changed from the base of the PR and between ff94baa and 7f79d29.

📒 Files selected for processing (2)
  • src/server/consolidated/character-manage.ts
  • tests/server/consolidated/character-manage.test.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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".

Comment on lines +384 to +386
character.cantripsKnown = args.cantripsKnown?.length
? [...new Set(args.cantripsKnown)]
: provisioningResult.cantripsGranted || [];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@Mnehmos
Mnehmos merged commit 98f589a into main Aug 14, 2026
5 checks passed
zxrfire pushed a commit to zxrfire/mnehmos.rpg.mcp that referenced this pull request Sep 8, 2026
* Support cantrip selection in character management

* fix(character-manage): preserve cantrips through MCP schema
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.

[bug] character_manage MCP schema drops cantripsKnown on update

1 participant

0