Skip to content

Изолировать cross-LOD подсказки по mesh group (фикс утечки между мешами) - #181

Closed
SashaRX wants to merge 1 commit into
mainfrom
codex/fix-cross-lod-overlap-hints-issue
Closed

Изолировать cross-LOD подсказки по mesh group (фикс утечки между мешами)#181
SashaRX wants to merge 1 commit into
mainfrom
codex/fix-cross-lod-overlap-hints-issue

Conversation

@SashaRX

@SashaRX SashaRX commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Исправить баг, при котором cross-LOD подсказки (overlap/match hints) накапливались глобально и могли влиять на другие меши из‑за совпадения локальных sourceShellIndex, приводя к неверному выбору источника и порче сгенерированных UV2.

Description

  • Введён CrossLodHintState с двумя списками overlapHints и matchHints и словарь crossLodHints с ключом (MeshEntry source, string meshGroupKey) для изоляции состояния подсказок по паре исходный меш + meshGroupKey.
  • До старта transfer/auto‑tune состояние подсказок теперь очищается вызовом crossLodHints.Clear() вместо единого глобального списка, чтобы не переносить подсказки между независимыми запусками.
  • Для каждой целевой записи определяется соответствующее hintState, в GroupedShellTransfer.Transfer/TransferAsync передаются только hintState.overlapHints и hintState.matchHints, а результаты аккумулируются в том же hintState, чтобы подсказки применялись только к релевантной source/group паре.
  • Обновлена документация Documentation~/EXPERIMENTS.md с описанием проблемы и требованием ручной проверки в Unity после фикса.

Testing

  • Выполнен статический контроль изменений через git diff --check и поиск по коду (rg) для проверки замены глобальных списков на crossLodHints, и результаты показали, что старые глобальные накопители удалены и новые обращения добавлены успешно.
  • Проверено состояние рабочего дерева через git status, изменения оформлены в файлах Editor/Tools/LightmapTransferTool.cs и Documentation~/EXPERIMENTS.md.
  • Unity EditMode / интеграционные тесты не запускались в этом окружении, поскольку Unity недоступен в контейнере, поэтому требуется ручная проверка в Editor на нескольких mesh groups с совпадающими локальными индексами shell для финальной валидации поведения transfer.
  • Автоматическое создание PR/публикация не выполнялось из‑за отсутствия аутентификации CLI в окружении; код и проверки подготовлены для внесения в PR вручную из репозитория.

Codex Task

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 28ee4b26-2984-405a-bb39-fc232878de4f

📥 Commits

Reviewing files that changed from the base of the PR and between 21d382e and f4bda40.

📒 Files selected for processing (2)
  • Documentation~/EXPERIMENTS.md
  • Editor/Tools/LightmapTransferTool.cs

Comment @coderabbitai help to get the list of available commands.

SashaRX commented Aug 6, 2026

Copy link
Copy Markdown
Owner Author

Фикс вошёл в консолидированную ветку claude/security-pr-analysis-fmpzf0 коммитом d57c3c6. Закрыт как superseded.


Generated by Claude Code

@SashaRX SashaRX closed this Aug 6, 2026
SashaRX pushed a commit that referenced this pull request Aug 9, 2026
d57c3c6 ("isolate cross-LOD hints per mesh group (#181)") renamed the
accumulatedOverlapHints field to crossLodHints and updated two of its three
.Clear() call sites, missing the one inside ResetWorkingMeshesToFbx. The
identifier was left with no declaration anywhere in the repository — it
occurred exactly once, as a usage — so the editor assembly did not compile.

The class is not partial, there is no `using static`, and the line sits
outside every preprocessor conditional, so nothing could have resolved it.
This escaped CI because the pipeline only builds the native library; no job
compiles the Unity C# (no Unity licence), which is worth remembering when
weighing how much a green check means for this package.

crossLodHints.Clear() is the correct replacement: it is what the other two
reset paths already do, and ResetWorkingMeshesToFbx is the fullest reset of
the three.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0195YC4HWo1rQqEdFBb8p8jE
SashaRX pushed a commit that referenced this pull request Aug 10, 2026
d57c3c6 ("isolate cross-LOD hints per mesh group (#181)") renamed the
accumulatedOverlapHints field to crossLodHints and updated two of its three
.Clear() call sites, missing the one inside ResetWorkingMeshesToFbx. The
identifier was left with no declaration anywhere in the repository — it
occurred exactly once, as a usage — so the editor assembly did not compile.

The class is not partial, there is no `using static`, and the line sits
outside every preprocessor conditional, so nothing could have resolved it.
This escaped CI because the pipeline only builds the native library; no job
compiles the Unity C# (no Unity licence), which is worth remembering when
weighing how much a green check means for this package.

crossLodHints.Clear() is the correct replacement: it is what the other two
reset paths already do, and ResetWorkingMeshesToFbx is the fullest reset of
the three.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0195YC4HWo1rQqEdFBb8p8jE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant