Skip to content

feat: Help older custom tools migrate to V3 automatically#1125

Merged
hatayama merged 68 commits into
v3-betafrom
feature/hatayama/add-v3-tool-migration
May 14, 2026
Merged

feat: Help older custom tools migrate to V3 automatically#1125
hatayama merged 68 commits into
v3-betafrom
feature/hatayama/add-v3-tool-migration

Conversation

@hatayama
Copy link
Copy Markdown
Owner

@hatayama hatayama commented May 14, 2026

Summary

  • Adds a dedicated Custom Tool Migration wizard for projects that still contain older custom tool APIs.
  • Shows migration guidance only when older custom tools are detected, and lets users rerun the check from the menu.

User Impact

  • Users who upgrade to V3 and see Unity Console errors from older custom tools get a clear migration prompt instead of having to patch files by hand.
  • The migration wizard explains that clicking Migrate updates the affected files automatically and that the wizard can be reopened later from Window > Unity CLI Loop > Custom Tool Migration.
  • Setup stays responsive by avoiding repeated full migration scans during normal setup wizard opens.

Changes

  • Adds V3 custom tool source and asmdef migration rules for legacy namespaces, aliases, metadata constructors, registrar usage, and split assembly patterns.
  • Adds a separate migration wizard, startup check flow, cached preview handling, and scoped rescan behavior.
  • Keeps migration scans limited to project Assets and avoids package/cache folders and unrelated asmdefs.

Verification

  • ./Packages/src/Cli~/dist/darwin-arm64/uloop compile --project-path /Users/a12115/ghq/hatayama/unity-cli-loop --force-recompile --wait-for-domain-reload
  • ./Packages/src/Cli~/dist/darwin-arm64/uloop run-tests --project-path /Users/a12115/ghq/hatayama/unity-cli-loop --test-mode EditMode --filter-type regex --filter-value '^io.github.hatayama.UnityCliLoop.Tests.Editor.(ThirdPartyToolMigrationRulesTests|ThirdPartyToolMigrationFileServiceTests)'
  • git diff --check

Review Change Stack

hatayama added 30 commits May 13, 2026 00:42
Detect legacy third-party custom tool API usage during setup so suppressed update popups still surface when migration work is required. Add migration rules and file-service coverage to rewrite legacy tool contracts and asmdef references to the V3 ToolContracts assembly.
Keep supported tool attribute arguments and skip inert comments or strings so the V3 migration does not change tool visibility or rewrite non-code examples.
Limit source rewrites to legacy tool migration markers, handle McpTool entries inside shared attribute lists, and avoid scanning for migration targets when the recorded setup version is unchanged.
Rewrite qualified legacy tool attributes and keep the Application assembly reference when CustomToolManager usages migrate to the V3 registrar.
Scan C# attribute lists with source awareness and include the remaining renamed helper types so realistic V2 custom tools migrate to compilable V3 code.
Keep CustomToolManager metadata callers compilable by adding the Domain asmdef reference and rewriting explicit ToolInfo declarations.
Apply contract renames across legacy tool assemblies so schema and helper files without local using directives still compile after migration.
Global legacy usings can make a whole third-party asmdef eligible for contract migration even when manual registration lives in a separate file. Track registrar usage at the assembly level so migrated registrar calls get the Application and Domain references they need.
Custom tools can rely on global legacy usings without an asmdef, so treat no-asmdef sources as one implicit assembly during migration. Use migration-local unique temp and backup paths so project sidecar files are not overwritten or deleted while source files are rewritten.
Legacy custom tools can shorten the old namespace with a C# alias before calling CustomToolManager. Rewrite those alias-qualified registrar calls explicitly so the migration does not create invalid qualified V3 registrar names.
No-asmdef Unity projects still compile runtime and editor sources into different predefined assemblies. Keep those implicit assemblies separate during global-using migration, and finish alias-qualified legacy rewrites for tool attributes and registrar metadata.
Legacy tools can use global-qualified attributes or split ToolInfo metadata away from registration calls. Handle those forms so source rewrites clean the old attribute arguments and asmdefs receive Domain references when metadata types are migrated.
Unity asmref folders compile into their referenced asmdef, so include asmref resolution when deciding which assembly owns legacy source. Also limit assembly-wide global-using rewrites to files that actually use legacy tool API shapes, avoiding unrelated project type renames.
Interpolated strings can contain real C# expressions that reference legacy tool APIs. Keep interpolation holes visible to the migration mask so registrar and metadata references inside those expressions are rewritten while literal string text stays untouched.
Migration detection needs to follow Unity assembly routing and C# code masking closely enough to avoid leaving V2 API references behind.

- Treat generic legacy type references as assembly-scoped API usage
- Keep interpolation holes in verbatim interpolated strings visible to rewrites
- Resolve C# files to the most specific asmdef or asmref source directory
Package Manager content is not project-owned source, so the migration should avoid rewriting package folders in place. Limit the automatic scan to project assets and keep package contents untouched.
Raw interpolated string holes can contain legacy API calls that need the same syntax-aware rewriting as regular and verbatim interpolated strings. Keep raw literal text inert while allowing code inside interpolation holes to migrate.
Migration should not rename unrelated project types just because their names match old tool contract types. Limit contract renames to unqualified legacy use, the old namespace, or aliases that explicitly point to the old namespace.
Bare McpTool attributes can belong to unrelated packages, while split files in a legacy assembly can still rely on global uLoopMCP usings. Require legacy context before rewriting bare attributes and detect all renamed contract type references when planning split-file migration.
Assemblies detected through a separate global uLoopMCP using can have sibling files that only contain shorthand McpTool attributes. Treat those attributes as assembly-scoped migration targets so the migrated global using does not leave unresolved legacy attributes behind.
Unqualified legacy-like names can belong to unrelated project code, and namespace prefixes can resemble the old namespace without being it. Require an actual legacy namespace or qualified attribute marker for direct source migration and anchor namespace replacement to full namespace tokens.
Drop the removed V2 ToolInfo description argument during custom tool migration and keep nested string literals inside interpolation holes inert so migration rewrites only executable code.
Keep the V2 displayDevelopmentOnly argument when dropping the removed ToolInfo description parameter so migrated registrar metadata preserves tool visibility and compiles against the V3 constructor.
Limit assembly-scoped legacy rewrites to global using declarations so file-scoped imports do not migrate sibling files, and avoid treating current V3 ToolInfo constructor arguments as the removed V2 description signature.
Separate predefined firstpass assemblies during global-using migration and exclude only the project-root Packages directory so Assets folders with the same name can still be migrated.
Scan only Unity-compiled Assets sources and remove legacy ToolInfo description arguments even when descriptions are passed through variables or named arguments.
Carry global legacy namespace aliases across assembly-scoped migration so split files can be rewritten, and keep current ToolInfo constructor calls with arbitrary local variable names intact.
Rewrite constructor arguments only when the source constructor is a legacy ToolInfo reference, including type aliases, so current V3 ToolInfo calls keep their schema argument intact.
Detect already-migrated UnityCliLoopToolRegistrar usage when rewriting legacy editor references so mixed assemblies keep the Application and Domain dependencies they still need.
Avoid rewriting using-alias left-hand identifiers while migrating their targets so same-name legacy aliases remain valid after ToolInfo and helper type rewrites.
hatayama added 20 commits May 14, 2026 11:56
Require legacy API context before treating CustomToolManager as the V2 registrar, so unrelated project-owned type names do not trigger asmdef dependency churn.
Reduce the intensity of the migration alert background and border so the warning stays visible without dominating the setup wizard.
Make the migration alert outline slightly stronger so the softened warning color still has clear visual separation.
Scan third-party tool migration targets in small batches with progress so opening the setup wizard does not block the editor on large projects. Cache preview results between refreshes, keep migration detection scoped to likely source files, and surface a progress bar while the check runs.
Treat the shared Application GUID as a valid V3 reference unless legacy C# source confirms that the asmdef still points at the old editor assembly. Only add Domain references when migrated or current source actually uses Domain APIs, preventing setup migration prompts for already-compiling project assemblies.
Run a lightweight V3 custom tool migration presence check only when the setup wizard sees a package version change, then start the full preview only for windows opened with detected migration targets. This keeps manual setup wizard opens responsive while still surfacing migration work during upgrades.
Separate V3 custom tool migration from Setup Wizard so setup auto-show state and migration detection no longer share one window lifecycle. The migration wizard now owns its menu item, startup target check, preview progress, refresh, and migrate action while Setup Wizard returns to CLI and skill setup only.
Tell users that closing the dedicated migration wizard is safe because it can be reopened later from the Unity CLI Loop menu.
Align the migration alert with the existing caution palette so the wizard matches the darker amber warning styling.
Use a lighter border weight so the migration wizard warning matches the requested visual balance.
Measure the migration wizard content after layout so the window shrinks or expands to the warning copy and footer hint instead of relying on a fixed height.
Use the Setup Wizard width as the migration wizard baseline and fit only the height to content so long migration messages wrap vertically instead of widening the window.
Show a dedicated disabled button label when no migration targets remain so the wizard communicates that there is nothing left to migrate.
Ensure the migration wizard refresh path rescans project files instead of returning a cached preview, so manually fixed or newly added tools are reflected while the Editor stays open.
Extend startup migration detection to catch already-rewritten V3 tool sources whose asmdefs still need current references, so the migration wizard appears for repairable partial states.
Limit startup migration detection to asmdefs that belong to assemblies with current API references, so unrelated malformed asmdefs do not block repairable migration targets.
Mirror assembly-scoped Domain global-using detection in the startup scan and avoid parsing unrelated asmdefs when previewing or applying repairable asmdef migrations.
GetRegisteredCustomTools returns ToolInfo from the Domain assembly, so migrated assemblies must receive the Domain asmdef reference even when source code only uses the registrar return value indirectly.
Remove obsolete description arguments from migrated ToolSettingsCatalogItem calls and carry global ToolInfo type aliases across split assembly files so migrated projects keep compiling after V3 API rewrites.
Global ToolInfo type aliases should not grant full legacy namespace context to sibling files. Limit them to alias constructor migration so unrelated bare project types stay untouched.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Warning

Rate limit exceeded

@hatayama has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 25 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9b8b5fe7-079b-4e63-aded-814daffd6d78

📥 Commits

Reviewing files that changed from the base of the PR and between 05be99e and a453b3a.

📒 Files selected for processing (4)
  • Assets/Tests/Editor/ThirdPartyToolMigrationFileServiceTests.cs
  • Packages/src/Editor/Domain/ThirdPartyToolMigrationData.cs
  • Packages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationFileService.cs
  • Packages/src/Editor/Presentation/Setup/ThirdPartyToolMigrationWizardWindow.cs
📝 Walkthrough

Walkthrough

This PR introduces a complete third-party tool V3 migration feature: a scanning service that detects and rewrites legacy tool APIs into current contracts, a wizard UI for guided migration, comprehensive test coverage of transformation rules and project scanning, and integration into the editor startup flow.

Changes

Third-party Tool V3 Migration

Layer / File(s) Summary
Domain contracts and migration data structures
Packages/src/Editor/Domain/ThirdPartyToolMigrationData.cs
Three immutable readonly structs (ThirdPartyToolMigrationPreview, Progress, Result) track migration state with file counts and paths; IThirdPartyToolMigrationPort defines the port contract for preview, target detection, and apply operations.
Infrastructure: migration file service implementation
Packages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationFileService.cs
Implements full migration scanning and file rewriting: inventories candidate files under Assets, detects legacy markers in C# and asmdef, maps assembly-scope usage patterns, generates cached migration plans (sync and async with progress), and applies rewrites safely using temp-file swaps.
Migration rules and transformation tests
Assets/Tests/Editor/ThirdPartyToolMigrationRulesTests.cs
Validates 70+ test cases for C# source rewriting (legacy tool/contract/attribute forms, argument removal/preservation, qualified/global/alias attributes, string literal and interpolation handling), asmdef reference rewriting, assembly-split migration, and legacy-API detection with false-positive avoidance.
Migration service integration tests
Assets/Tests/Editor/ThirdPartyToolMigrationFileServiceTests.cs
Tests full service behavior: preview caching and invalidation, incremental progress reporting, apply-migration across split-file/alias scenarios, asmdef repair and deduplication, asmref directory precedence, and Unity project scope exclusions (ignoring Library, Packages, outside Assets).
Application use case and composition wiring
Packages/src/Editor/Application/UseCases/ThirdPartyToolMigrationUseCase.cs, ThirdPartyToolMigrationUseCaseRegistry.cs, Packages/src/Editor/CompositionRoot/UnityCliLoopApplicationRegistration.cs
ThirdPartyToolMigrationUseCase coordinates all migration operations via injected IThirdPartyToolMigrationPort with input validation; registry ensures singleton use case; composition registers the wired use case during application initialization.
Migration wizard editor window UI
Packages/src/Editor/Presentation/Setup/ThirdPartyToolMigrationWizardWindow.cs
EditorWindow with auto-open detection (async), progress-driven async preview, state transitions for checking/targets/no-targets views, migrate/refresh buttons, content-height resizing, and progress-bar updates during migration scanning.
Migration wizard window tests and UI styling
Assets/Tests/Editor/ThirdPartyToolMigrationWizardWindowTests.cs, Packages/src/Editor/Presentation/Setup/SetupWizardWindow.uss
Tests wizard auto-show logic, status/progress/button text formatting, PrepareForOpen initialization, and WithContentHeight resizing with center preservation and min/max clamping; adds USS styling for migration-alert variant and progress-bar element.
Presentation integration and setup window refactoring
Packages/src/Editor/Presentation/PresentationEditorStartup.cs, Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs
Integrates migration wizard into editor startup; refactors SetupWizardWindow version auto-show to add explicit cancellation-aware EvaluateVersionChange method with early cancellation check and version-suppression recording.
Assembly dependency and setup window test updates
Assets/Tests/Editor/OnionAssemblyDependencyTests.cs, Assets/Tests/Editor/SetupWizardWindowTests.cs
Adds assembly dependency test validating migration wizard schedules target checks via EditorApplication.delayCall rather than invoking synchronously; reformats SetupWizardWindowTests call to multi-line argument list.

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly Related PRs

  • hatayama/unity-cli-loop#922: Modifies SetupWizardWindow auto-show suppression logic and corresponding tests; related to the setup window refactoring in this PR.
🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: Help older custom tools migrate to V3 automatically' directly and clearly summarizes the main change: adding automatic migration support for legacy custom tools to V3.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 feature/hatayama/add-v3-tool-migration

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
Packages/src/Editor/Presentation/Setup/ThirdPartyToolMigrationWizardWindow.cs (1)

190-193: ⚡ Quick win

Add Debug.Assert after registry lookup.

For defensive programming and fail-fast behavior, add a Debug.Assert after retrieving the use case from the registry to validate the composition root wired the dependency correctly.

🛡️ Proposed assertion to validate registry state
 private void InitializeApplicationServices()
 {
     _thirdPartyToolMigrationUseCase = ThirdPartyToolMigrationUseCaseRegistry.GetRegisteredUseCase();
+    Debug.Assert(_thirdPartyToolMigrationUseCase != null, "migration use case must be registered");
 }
🤖 Prompt for 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.

In
`@Packages/src/Editor/Presentation/Setup/ThirdPartyToolMigrationWizardWindow.cs`
around lines 190 - 193, After calling
ThirdPartyToolMigrationUseCaseRegistry.GetRegisteredUseCase() in
InitializeApplicationServices, add a Debug.Assert to validate that
_thirdPartyToolMigrationUseCase is not null (use
System.Diagnostics.Debug.Assert) so the composition root wired the dependency;
include a short message like "ThirdPartyToolMigrationUseCase must be registered"
to aid diagnosis and place the assert immediately after the assignment to
_thirdPartyToolMigrationUseCase.
🤖 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 `@Packages/src/Editor/Domain/ThirdPartyToolMigrationData.cs`:
- Around line 13-22: The constructors for ThirdPartyToolMigrationPreview (and
the corresponding other struct around lines 56-65) currently assign the
caller-provided string[] directly to the FilePaths field, allowing external
mutation; change the constructors to defensively copy the array before storing
(e.g., if filePaths is non-null create a new string[] copy or use
Array.Copy/Clone, otherwise use Array.Empty<string>), and keep FilePaths as the
same public property type so callers see an immutable snapshot of the input.

In
`@Packages/src/Editor/Presentation/Setup/ThirdPartyToolMigrationWizardWindow.cs`:
- Around line 330-348: The Debug.Assert in HandleMigrateThirdPartyTools assumes
ApplyMigration always returns Changed=true which is false when there's nothing
to migrate; remove or replace the assertion and explicitly handle the no-change
case by checking the ThirdPartyToolMigrationResult (result) and only calling
AssetDatabase.Refresh() when result.Changed is true, otherwise update the
UI/state to reflect "no changes" (e.g., still set _isMigrating = false and call
RefreshUI()); reference the HandleMigrateThirdPartyTools method, the
_thirdPartyToolMigrationUseCase.ApplyMigration call, the
ThirdPartyToolMigrationResult/result.Changed check, Debug.Assert,
AssetDatabase.Refresh(), _isMigrating and RefreshUI to locate where to implement
this conditional handling.

---

Nitpick comments:
In
`@Packages/src/Editor/Presentation/Setup/ThirdPartyToolMigrationWizardWindow.cs`:
- Around line 190-193: After calling
ThirdPartyToolMigrationUseCaseRegistry.GetRegisteredUseCase() in
InitializeApplicationServices, add a Debug.Assert to validate that
_thirdPartyToolMigrationUseCase is not null (use
System.Diagnostics.Debug.Assert) so the composition root wired the dependency;
include a short message like "ThirdPartyToolMigrationUseCase must be registered"
to aid diagnosis and place the assert immediately after the assignment to
_thirdPartyToolMigrationUseCase.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5235234b-2111-4cb3-ac74-a14505488daa

📥 Commits

Reviewing files that changed from the base of the PR and between a862688 and 05be99e.

⛔ Files ignored due to path filters (10)
  • Assets/Tests/Editor/ThirdPartyToolMigrationFileServiceTests.cs.meta is excluded by none and included by none
  • Assets/Tests/Editor/ThirdPartyToolMigrationRulesTests.cs.meta is excluded by none and included by none
  • Assets/Tests/Editor/ThirdPartyToolMigrationWizardWindowTests.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Application/UseCases/ThirdPartyToolMigrationUseCase.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Application/UseCases/ThirdPartyToolMigrationUseCaseRegistry.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Domain/ThirdPartyToolMigrationData.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Infrastructure/ThirdPartyToolMigration.meta is excluded by none and included by none
  • Packages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationFileService.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationRules.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Presentation/Setup/ThirdPartyToolMigrationWizardWindow.cs.meta is excluded by none and included by none
📒 Files selected for processing (15)
  • Assets/Tests/Editor/OnionAssemblyDependencyTests.cs
  • Assets/Tests/Editor/SetupWizardWindowTests.cs
  • Assets/Tests/Editor/ThirdPartyToolMigrationFileServiceTests.cs
  • Assets/Tests/Editor/ThirdPartyToolMigrationRulesTests.cs
  • Assets/Tests/Editor/ThirdPartyToolMigrationWizardWindowTests.cs
  • Packages/src/Editor/Application/UseCases/ThirdPartyToolMigrationUseCase.cs
  • Packages/src/Editor/Application/UseCases/ThirdPartyToolMigrationUseCaseRegistry.cs
  • Packages/src/Editor/CompositionRoot/UnityCliLoopApplicationRegistration.cs
  • Packages/src/Editor/Domain/ThirdPartyToolMigrationData.cs
  • Packages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationFileService.cs
  • Packages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationRules.cs
  • Packages/src/Editor/Presentation/PresentationEditorStartup.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardWindow.uss
  • Packages/src/Editor/Presentation/Setup/ThirdPartyToolMigrationWizardWindow.cs

Comment thread Packages/src/Editor/Domain/ThirdPartyToolMigrationData.cs
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 25 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="Packages/src/Editor/Presentation/Setup/ThirdPartyToolMigrationWizardWindow.cs">

<violation number="1" location="Packages/src/Editor/Presentation/Setup/ThirdPartyToolMigrationWizardWindow.cs:302">
P2: Initial migration scan is always scheduled, ignoring `_shouldRefreshAfterCreateGui` and triggering unnecessary rescans.</violation>
</file>

<file name="Packages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationFileService.cs">

<violation number="1" location="Packages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationFileService.cs:1279">
P2: Guard `.asmdef`/`.asmref` JSON parsing so malformed project files don't crash the migration scan.

(Based on your team's feedback about validating user-editable external inputs.) [FEEDBACK_USED]</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Preserve migration preview/result snapshots against array mutation, keep no-op migration runs from refreshing assets, honor the initial refresh flag, and skip malformed assembly JSON during migration scans.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 4 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="Packages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationFileService.cs">

<violation number="1" location="Packages/src/Editor/Infrastructure/ThirdPartyToolMigration/ThirdPartyToolMigrationFileService.cs:1451">
P2: `TryReadJsonObject` only handles parse errors, so file read failures can still throw and terminate migration scanning. Catch I/O read exceptions as well so callers can consistently skip unreadable files.

(Based on your team's feedback about handling read/parse failures together in JSON file polling/migration flows.) [FEEDBACK_USED]</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Treat assembly definition and reference read failures like malformed JSON so migration scans can continue when a user-editable file is locked or blocked.
@hatayama hatayama merged commit 8412aa4 into v3-beta May 14, 2026
11 checks passed
@hatayama hatayama deleted the feature/hatayama/add-v3-tool-migration branch May 14, 2026 16:28
@github-actions github-actions Bot mentioned this pull request May 14, 2026
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