Skip to content

feat(scan): bundled retro validation profiles (ps1, n64, nds, dreamcast) (#366) - #713

Merged
fernandotonon merged 3 commits into
masterfrom
feat/retro-profiles-366
Jun 5, 2026
Merged

feat(scan): bundled retro validation profiles (ps1, n64, nds, dreamcast) (#366)#713
fernandotonon merged 3 commits into
masterfrom
feat/retro-profiles-366

Conversation

@fernandotonon

@fernandotonon fernandotonon commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add bundled validation-only platform profiles: ps1, n64, nds, and dreamcast under profiles/.
  • Each profile documents validation vs export scope in description and enables texture probing for budget rules from Scan: budget rules (triangles, bones, textures, POT, format allow-list) #365.
  • Snapshot tests lock critical numeric limits and verify applyPlatformProfile maps rules into ScanConfig.

Profile defaults (tunable starting points)

Profile Triangles Tri/mesh Bones Texture max Notes
ps1 5k 2k 16 256px TIM/CLUT import deferred
n64 12k 4k 32 256px ROM/microcode compliance not claimed
nds 4k 2k 16 256px NSBMD/NSBTX export deferred
dreamcast 15k 8k 64 512px PVR allow-list placeholder (png/jpg/pvr)

Test plan

  • UnitTests --gtest_filter="PlatformProfile*" — 16/16 pass locally
  • CI green (linux unit tests + cross-platform builds)
  • qtmesh scan ./assets --target ps1 loads profile (manual smoke)

Closes #366

Made with Cursor

Summary by CodeRabbit

  • New Features

    • Added validation profiles for PS1, N64, NDS, and Dreamcast with platform-specific geometry and texture limits.
  • Documentation

    • CLI help updated to list the new retro targets.
  • Tests

    • Added tests to validate loading and application of the retro profiles.
  • Chores

    • Packaged app now includes the profiles and installs them to the system profiles location on Linux.

Add ps1, n64, nds, and dreamcast lint presets with snapshot tests that lock critical budget limits and document validation-only scope.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@fernandotonon, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 37 minutes and 53 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

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.

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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 32e8cb9d-bacd-4eed-996e-4a577c9eb387

📥 Commits

Reviewing files that changed from the base of the PR and between 7dd906c and ec3663f.

📒 Files selected for processing (1)
  • .github/workflows/deploy.yml
📝 Walkthrough

Walkthrough

This PR adds four bundled JSON validation presets (ps1, n64, nds, dreamcast) specifying geometry and texture budgets and metadata, updates the scan --target CLI help to list them, extends tests to load and apply each profile, and updates packaging/discovery so profiles are shipped and discovered on Linux and macOS.

Changes

Retro Platform Validation Profiles

Layer / File(s) Summary
Retro platform JSON preset definitions
profiles/ps1.json, profiles/n64.json, profiles/nds.json, profiles/dreamcast.json
Four new validation presets define geometry budgets (triangle/vertex/bone/submesh/material/draw-call limits), texture constraints (max dimension, non-power-of-two flag, format allow-lists, UV requirements), and platform metadata (category: retro, scope: validation, plus inspect_textures for Dreamcast).
CLI help text documentation update
src/CLIPipeline.cpp
The scan --target <id> help line lists the new retro profile IDs (ps1, n64, nds, dreamcast) and removes example-base from the documented examples.
Profile loading and integration test coverage
src/PlatformProfile_test.cpp
Adds assertions that builtin IDs include the retro profiles and four GTest cases that load each profile, assert rule/metadata values (including allowed texture formats), apply the profile to ScanConfig, and validate derived config fields.
Packaging and builtin discovery
.github/workflows/deploy.yml, src/PlatformProfile.cpp
Packaging steps copy ./bin/profiles/ into both Linux .deb and macOS app-bundle locations; built-in profile candidate directories now include /usr/share/qtmesheditor/profiles on Linux builds.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 I hopped through profiles, neat and spry,
PS1 to Dreamcast under retro sky,
Budgets set and textures scoped with care,
Packaged, tested, ready — rabbit-approved flair! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: bundled retro validation profiles for four platforms (ps1, n64, nds, dreamcast), which matches the primary objective of the PR.
Description check ✅ Passed The PR description covers the summary, profile defaults with a helpful table, and test plan. It follows the spirit of the template by providing high-level overview and technical details, though it deviates from the exact template structure.
Linked Issues check ✅ Passed The PR successfully delivers all coding requirements from issue #366: four bundled JSON profiles (ps1.json, n64.json, nds.json, dreamcast.json) with descriptions documenting validation scope, numeric budgets appropriate for retro targets, snapshot tests locking critical limits, and integration into build packaging.
Out of Scope Changes check ✅ Passed All changes are aligned with issue #366 scope: profile JSON files, snapshot tests, CLI help update referencing new profiles, and packaging integration to bundle profiles. No extraneous changes detected.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/retro-profiles-366

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.

@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: d33ebd5102

ℹ️ 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 thread src/CLIPipeline.cpp
"\n"
"Scan options:\n"
" --target <id> Alias for --profile (CI-friendly). Built-in targets include: example-minimal, example-base\n"
" --target <id> Alias for --profile (CI-friendly). Built-in targets include: ps1, n64, nds, dreamcast, example-minimal\n"

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 Bundle profiles with packaged CLI targets

When the CLI is run from the release .deb/Docker image, these advertised targets won't be found: I checked the Manual Pack step in .github/workflows/deploy.yml, and it copies ./bin/cfg, ./bin/media, and ./bin/platforms into /usr/share/qtmesheditor but never copies ./bin/profiles; PlatformProfileLoader only searches the app directory's profiles locations (and env/source-test fallbacks), so qtmesh scan --target ps1 will fail outside a build tree unless the profiles directory is included in the package.

Useful? React with 👍 / 👎.

Copy profiles/ into release packages and probe /usr/share/qtmesheditor/profiles on Linux so qtmesh scan --target works outside build trees.

Co-authored-by: Cursor <cursoragent@cursor.com>

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/deploy.yml:
- Line 798: The packaging step copies the contents of ./bin/profiles/ directly
into ./pack-deb/usr/share/qtmesheditor/ causing profile files to live at
/usr/share/qtmesheditor/ instead of /usr/share/qtmesheditor/profiles where
src/PlatformProfile.cpp (probe at line ~106) expects them; update the cp
invocation in .github/workflows/deploy.yml so the profiles directory is created
under the target (e.g., target ./pack-deb/usr/share/qtmesheditor/profiles/) or
copy the profiles directory itself (remove the trailing slash on ./bin/profiles)
so installed packages place JSONs under the profiles/ subdirectory.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a7ec4907-0097-4fc1-be4a-cd0439f62c50

📥 Commits

Reviewing files that changed from the base of the PR and between d33ebd5 and 7dd906c.

📒 Files selected for processing (2)
  • .github/workflows/deploy.yml
  • src/PlatformProfile.cpp

Comment thread .github/workflows/deploy.yml Outdated
Copy the profiles directory itself so JSON presets land at /usr/share/qtmesheditor/profiles/ where PlatformProfileLoader probes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

sonarqubecloud Bot commented Jun 5, 2026

Copy link
Copy Markdown

@fernandotonon
fernandotonon merged commit 520e0fc into master Jun 5, 2026
20 checks passed
@fernandotonon
fernandotonon deleted the feat/retro-profiles-366 branch June 5, 2026 17:30
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.

Profiles: bundled retro targets (ps1, n64, nds, dreamcast) validation presets

1 participant