Skip to content

review(mcp): reject non-finite TRS components in node-anim helper - #588

Merged
fernandotonon merged 1 commit into
masterfrom
fix/mcp-node-anim-finite-trs
May 18, 2026
Merged

fernandotonon merged 1 commit into
masterfrom
fix/mcp-node-anim-finite-trs

Conversation

@fernandotonon

Copy link
Copy Markdown
Owner

CodeRabbit nit on PR #587 (merged) — readNumericArray accepted any JSON Double, but extremely large literals (e.g. 1e400) parse as Inf and would propagate silently into the keyframe + downstream exporters. Round-trip through glTF would then NaN-cascade.

Fix

  • std::isfinite() check on each component before storing.
  • Rejection message mentions "finite" so callers can distinguish from the type-mismatch path.

1 new test

  • SetNodeKeyframe_RejectsNonFiniteTRSComponent exercises 1e400 in a translate slot.

🤖 Generated with Claude Code

CodeRabbit nit on PR #587 — `readNumericArray` accepted any JSON
Double, but extremely large literals (e.g. `1e400`) parse as Inf
and would propagate silently into the keyframe + downstream
exporters. Round-trip through glTF would then NaN-cascade.

Fix: `std::isfinite()` check on each component; rejection message
mentions "finite" so callers know what failed. New regression test
on `SetNodeKeyframe_RejectsNonFiniteTRSComponent` exercises the
1e400 path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@fernandotonon has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 24 minutes and 42 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a0054daf-31fa-4a33-a978-1c01cafff364

📥 Commits

Reviewing files that changed from the base of the PR and between e9d1366 and a2e328a.

📒 Files selected for processing (2)
  • src/MCPServer.cpp
  • src/MCPServer_test.cpp
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mcp-node-anim-finite-trs

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 and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@fernandotonon
fernandotonon merged commit 903d6e5 into master May 18, 2026
20 checks passed
@fernandotonon
fernandotonon deleted the fix/mcp-node-anim-finite-trs branch May 18, 2026 00:56
fernandotonon added a commit that referenced this pull request May 18, 2026
Fourth sub-slice of #520. Adds a CLI subcommand to enumerate
node-animation clips on a scene file from the shell. Mirrors the
existing `qtmesh morph --list` precedent: one file in, names + count
out (text or `--json`). Useful for CI scripts that audit Mixamo-
style assets imported via the editor's GUI, and the round-trip
target for the future C5 glTF/FBX exporter work.

## What ships

- `cmdNodeAnim(argc, argv)` in `CLIPipeline.{h,cpp}` — parses
  `nodeanim <file> --list [--json]`, runs `MeshImporterExporter::importer`,
  reads `NodeAnimationManager::instance()->listClips()`, prints
  text or JSON. JSON shape mirrors `qtmesh morph --list --json`:
  `{ file, count, clips: [name…] }`.

- Subcommand registration in `main.cpp` (CLI-mode detection by
  first non-flag arg) and `CLIPipeline::run` dispatcher.

- Help text in `printUsage` next to the `morph` line.

## What's deferred

- Authoring on the CLI side (`--add-clip`, `--add-keyframe`,
  `-o out.gltf`) needs the C5 exporter round-trip first — otherwise
  edits don't persist anywhere outside the in-process scene.

## #520 status

| Sub-slice | Status |
|-|-|
| C1 — Manager data layer | shipped (#584) |
| C3 — Undo commands | shipped (#585) |
| C6 — MCP tools | shipped (#586, hardened #587 + #588) |
| C-CLI — `qtmesh nodeanim --list` | **this PR** |
| C2 — Inspector subgroup | follow-up |
| C4 — Dope-sheet integration | follow-up |
| C5 — glTF + FBX exporter round-trip | follow-up |

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant