Skip to content

Increase test coverage for TransformCommands, gizmos, and MCP read_file bounds#282

Merged
fernandotonon merged 26 commits into
masterfrom
codex/coverage-push-multi-file
Apr 11, 2026
Merged

Increase test coverage for TransformCommands, gizmos, and MCP read_file bounds#282
fernandotonon merged 26 commits into
masterfrom
codex/coverage-push-multi-file

Conversation

@fernandotonon
Copy link
Copy Markdown
Owner

@fernandotonon fernandotonon commented Apr 11, 2026

Summary

  • add new branch-focused coverage tests for TransformCommands undo/redo edge paths
  • add extra ScaleGizmo and TranslationGizmo tests for query flag propagation and unknown object highlight behavior
  • add MCPServer read_file coverage for max_lines clamp behavior at low/high bounds

Test updates

  • TransformCommandsTests
    • DuplicateCommand_RedoRecreatesAndSelectsCloneWithoutEntity
    • GroupCommand_UndoRestoresChildrenToOriginalNonRootParent
    • UngroupCommand_UndoRestoresGroupUnderOriginalParentAndSkipsForbiddenChild
    • SubMeshTransformCommand_NonZeroSubMeshIndexTargetsCorrectSubMesh
  • ScaleGizmoTests
    • HighlightUnknownObjectReturnsZeroAndClearsHighlight
    • extended query flag assertions on all axes
  • TranslationGizmoTests
    • SetQueryFlagsAppliesToAllAxes
    • HighlightUnknownObjectReturnsZeroAndClearsHighlight
  • MCPServerTest
    • ReadFile_MaxLinesIsClampedToSupportedBounds

Validation

  • cmake --build build_cov_local --target UnitTests -j8
  • `build_cov_local/debug/UnitTests --gtest_filter='TransformCommandsTests.:ScaleGizmoTests.:TranslationGizmoTests.:MCPServerTest.ReadFile_'

Summary by CodeRabbit

  • New Features

    • Extended scan command with new CLI options for format filtering, size/mesh/material/vertex/animation constraints, skeleton/animation/texture/material presence checks, file naming case enforcement, and animation/bone name requirements.
    • Added colorized output icons for scan results when counts are positive.
  • Documentation

    • Updated qtmesh scan documentation with new option flags and example invocations.

…-80-again

# Conflicts:
#	src/CLIPipeline_test.cpp
#	src/ScanEngine_test.cpp
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5f8ce165-c2bb-42a8-b425-e40b1f32d31d

📥 Commits

Reviewing files that changed from the base of the PR and between 39d69fb and d1a384c.

📒 Files selected for processing (7)
  • src/CLIPipeline.cpp
  • src/CLIPipeline_test.cpp
  • src/MCPServer_test.cpp
  • src/ScaleGizmo_test.cpp
  • src/TranslationGizmo_test.cpp
  • src/commands/TransformCommands_test.cpp
  • website/src/DocsApp.jsx

📝 Walkthrough

Walkthrough

The PR extends the scan CLI with configurable filtering options (formats, file/mesh/material/vertex/animation constraints) and introduces CLI override precedence via a catch-all scope. Tests are added for gizmo query flag propagation, transform command undo/redo behavior, and filesystem API bounds clamping. Documentation is updated accordingly.

Changes

Cohort / File(s) Summary
Scan CLI Implementation
src/CLIPipeline.cpp
Added colorizeIconWhenPositive() helper; extended formatScanSummary() with colorization flag; implemented new CLI scan options (format/size/mesh/vertex/animation/skeleton/texture/material filters); added argument parsing with validation for non-negative inputs and CSV normalization; appended catch-all ScanScope for highest-precedence CLI overrides.
Scan CLI Tests
src/CLIPipeline_test.cpp
Updated animation test to use .fbx export format; strengthened return code assertions; added error tests for invalid --max-vertices and --file-name-case; added success/failure tests verifying CLI overrides trigger violations, precedence over scoped rules, and clearing via empty values.
Gizmo Tests
src/ScaleGizmo_test.cpp, src/TranslationGizmo_test.cpp
Extended existing test to verify query flag propagation to all axes; added tests confirming highlight functions return zero and clear state when called with unrelated objects.
Transform Command Tests
src/commands/TransformCommands_test.cpp
Added in-test helper for two-submesh mesh construction; added tests for duplicate/group/ungroup/submesh transform undo/redo workflows and parent restoration.
Filesystem API Tests
src/MCPServer_test.cpp
Added test verifying read_file clamps max_lines argument to supported bounds (0 and 9999).
Documentation
website/src/DocsApp.jsx
Updated qtmesh scan docs with new option flags, example invocations, and symbol-prefixed output formatting; clarified --flag value and --flag=value syntax and CLI override timing relative to config loading.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~28 minutes

Possibly related PRs

Poem

🐰 Hops through scan flags with glee,
Override precedence set so free,
Query flags dance on gizmo spins,
Transform undo lets the testing begin!
From CLI to docs, all aligned—
A rabbit-approved refine!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.12% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: adding test coverage for three specific components (TransformCommands, gizmos, and MCP read_file bounds).
Description check ✅ Passed The description is comprehensive with clear summary, detailed test updates section, and validation steps, though it lacks explicit feature/bugfix categorization from the template.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/coverage-push-multi-file

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 c9f6d50 into master Apr 11, 2026
19 checks passed
@fernandotonon fernandotonon deleted the codex/coverage-push-multi-file branch April 11, 2026 20:42
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