fix: Hot reload without --files no longer skips added methods because another file only adds enum members - #3034
Conversation
The skip reason for an added method whose body binds a compiled signature named only the files of the compiled API, which the Editor places from the compiled assembly's debug data. Nothing told the Editor which of the run's own files built the split type from source, so it could not tell which file to leave out. A default-selection run needs exactly that to drop a file whose only edit adds enum members (#2968). - Collect the source copy's files for the same-assembly split the same way the introduced-type split already does, and report them on that reason as splitSourceFiles; every other reason leaves the field null. - The Editor compiles the worker from source at run time and the JSON only passes between the Editor and its own worker process, so no protocol version changes.
With --files omitted, the default selection could pick up a file whose only edit adds enum members. Keeping it made the worker build the enum from source, so the added methods of other files that pass the enum to compiled code or an introduced type were skipped, and the response asked the caller to rerun with that file left out (#2968). A default selection is the tool's own choice, so the tool now leaves the file out itself. - The selection marks the files it chose; siblings a run pulls in and every explicit --files input stay unmarked, so explicit runs keep their behavior. - After the first transform, a marked file is left out only when its edit adds nothing but enum members, it holds no active patch, it declares no new type, and a skip row for a compiled type or a compiled signature names it as a file that builds the split from source. - The left-out file keeps its first-pass notices, gets one warning naming the enum members that still need uloop compile, and reports as unapplied; the worker reruns once without it and the results go back in the group's order. - The active set is read when the group starts, while the run is still on the main thread, because the patch ledgers must not be read after the worker await. - In Edit Mode, --compile-on-skip auto no longer compiles for this case: the other files apply, so nothing unapplied remains. Tests cover the classifier conditions one by one, the group split and splice, a failed or canceled rerun, and three end-to-end runs; mutating each condition fails the tests that name it.
The enum paragraph of the scope reference still implied that an enum member added beside other edits always blocks the added members that use it, which is no longer true when --files is omitted: the reload now leaves an enum-only file out and applies the other files. The paragraph states that, what the Warnings line names, and that a file with active patches or a new type stays in; the output reference lists the left-out entry among the Warnings kinds. SKILL.md is unchanged, and the generated copies are regenerated from the sources.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: hatayama/unity-cli-loop/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (6)
📒 Files selected for processing (17)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: hatayama/unity-cli-loop/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (6)
📒 Files selected for processing (25)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughDefault hot reload now tracks whether files were selected implicitly. When an eligible enum-member-only file contributes to a split-type skip, the processor leaves it out, retries the other files, and reports a warning for the omitted file. ChangesDefault-selection enum-file reload
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant HotReloadTools
participant HotReloadOrchestrator
participant HotReloadGroupProcessor
participant TransformWorker
participant ApplyGate
HotReloadTools->>HotReloadOrchestrator: pass selected files and default-selection status
HotReloadOrchestrator->>HotReloadGroupProcessor: process group files
HotReloadGroupProcessor->>TransformWorker: run first transform
TransformWorker-->>HotReloadGroupProcessor: return split reasons and file results
HotReloadGroupProcessor->>TransformWorker: retry with eligible enum files removed
TransformWorker-->>HotReloadGroupProcessor: return retry results
HotReloadGroupProcessor->>ApplyGate: apply retry output
HotReloadGroupProcessor-->>HotReloadOrchestrator: combine retry and left-out file results
Merge Risk: ⚪ Minimal · up to Default hot reload now leaves out enum-only files that would block other changes, and warns that those enum members still need a compile. Explicit file runs are unchanged. No actionable merge-blocking risk was identified in the supplied change. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The retry remains within the existing hot-reload operation and retains checks before applying code. No security boundary bypass was identified. One concurrency question remains about whether another run can change patch ownership while the retry decision is in progress. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 42.24% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 116 functions across 19 files. (6 skipped: 6 unsupported.)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Summary
uloop hot-reloadruns without--filesand the selected files include one whose only change adds enum members, the reload now leaves that file out on its own. The added methods in the other files that pass the enum to compiled code or to an introduced type then apply instead of being skipped.User Impact
uloop compile.--filesruns are unchanged.--compile-on-skip auto, this case no longer triggers the compile fallback, because nothing the run was asked to apply stays unapplied. The enum members wait for the next compile, and the existing enum-member warning stays.Changes
splitSourceFiles). Other reasons leave it null. The JSON only passes between the Editor and its own worker process, so the protocol version does not change.--filesinputs, stay unmarked.declaringFilesof the compiled-type row, or thesplitSourceFilesof the compiled-signature row.Verification
uloop compile: 0 errors.sync-tool-docs --checkpass.Closes #2968