Skip to content

Preserve refresh identity across lifecycle changes - #388

Merged
Eli Pinkerton (wallstop) merged 4 commits into
test/measure-editor-readinessfrom
fix/refresh-lifecycle-identities
Oct 21, 2026
Merged

Eli Pinkerton (wallstop) merged 4 commits into
test/measure-editor-readinessfrom
fix/refresh-lifecycle-identities

Conversation

@wallstop

@wallstop Eli Pinkerton (wallstop) commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

DISCLOSURE: LLM-GENERATED TEXT

Why: Missing scripts and owner transitions lose identity or publish stale refreshes.

What:

  • Retain missing-script GUIDs through moves, recovery and deletion.
  • Remove deleted saved references without requiring live wrappers.
  • Stop callbacks on pause or disposal; finish once after resume.
  • Restore missing selected assets while preserving saved order.

Refs #308

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • Documentation update

Checklist

  • I have added tests that prove my fix is effective
  • I have updated the documentation accordingly
  • I have updated the CHANGELOG for user-facing changes
  • My changes do not introduce breaking changes

Note

Overview
Fixes #308 by keeping asset refresh identity stable through missing scripts, moves, recovery, and owner lifecycle changes, without falling back to full-window refreshes for unrelated edits.

AssetChangeRefreshService now keeps GUID/path tracking when a managed asset becomes unresolved (missing script), drops identity only when the type leaves scope or the asset is truly gone, and stops publishing immediately on suspend/dispose while still finishing SliceCompleted once after resume when the queue is empty.

DataVisualizer treats temporarily unavailable selections separately from confirmed deletion: it restores selection when a saved GUID recovers, avoids picking a fallback row while an asset is merely unavailable, and on confirmed deletion calls AssetGuidOrder.RemovePersistedReferences to scrub saved order/selection without a live wrapper.

Adds RemovePersistedReferences on AssetGuidOrder, broad editor tests for the refresh service and GUID cleanup, and docs/CHANGELOG updates including performance probe reports and troubleshooting notes for missing-script and pause/close behavior.

Reviewed by Cursor Bugbot for commit 9762b80. Bugbot is set up for automated code reviews on this repo. Configure here.

@wallstop
Eli Pinkerton (wallstop) added this pull request to stack #387 October 21, 2026 06:56
@wallstop
Eli Pinkerton (wallstop) force-pushed the fix/refresh-lifecycle-identities branch from 20ac02f to 453feab Compare October 21, 2026 07:07
Missing scripts drop retained GUIDs, so later recovery, moves and deletion
lose identity. Definite unmanaged type changes keep stale saved scope.
Publication can also continue after the callback pauses or disposes the
owner. Reproduce these gaps with six failing service regression cases.

Retain unresolved identities, rescan move-source replacements, distinguish
scope removal, and stop work after owner transitions. Complete paused
presentation once on resume, including an empty queue. Remove confirmed
saved deletion references without a live wrapper. Keep a missing selected
GUID for recovery and restore its inspector when the script returns.

Validation: 729 EditMode and 15 PlayMode tests pass on Unity 6000.5.2f1
Windows with a confirmed idle AssetDatabase; the full local gate passes.
A real 12-asset probe passes selected missing-script recovery, deletion of
an unavailable asset, duplicate-path coalescing, labels, Undo/Redo, moves,
closed-window rename/reopen, stale callback rejection and simulated Play
pause/resume with custom order and selection. Cached refresh loads remain
zero; the owned root is deleted and seven editor windows remain.

An initial full run started during an editor update and hit busy guards.
It completed; a rerun after confirming idle passed all 729 cases. No busy
guard or test expectation was weakened. Unity 2021.3, other platforms,
real 100k/burst evidence and the wider acceptance remain unverified.

Refs #308.
@wallstop
Eli Pinkerton (wallstop) force-pushed the fix/refresh-lifecycle-identities branch from 453feab to 63e4ff0 Compare October 21, 2026 07:22
The 10k integration run reached its cooperative time limit during label
writes. Preserve the original terminal error and distinguish complete
fixture staging and earlier assertions from the unfinished burst matrix.
Record the environment, source hashes, stop limits and verified cleanup.

The real 12-asset smoke completed the lifecycle and actual-label checks.
The 10k run loaded all 10,000 rows and passed missing-script recovery,
rename, label include/exclude, Undo/Redo and move assertions, preserving
9,999 unrelated row identities. Final burst counts and timing were not
captured. Both stopped 100k staging attempts remain unmeasured.

Independent cleanup: no owned roots, one native host, seven editor windows
and idle AssetDatabase. The functional combined tree passed 730 EditMode
and 15 PlayMode tests. The report-only fast check and full 16-step gate
pass. Keep #306 and #308 open for their remaining acceptance matrices.

Refs #306, #308.
Issue #308 lacked completed large-label timing after the 10k attempt stopped during fixture writes. Measure the existing probe with 1,000 real assets and closed/open browser controls. Separate native label calls, explicit duplicate callback replay, reconciliation, operation counts and owned-resource cleanup.

The run completed in 357.7 seconds. The 1k closed/open writes took 140.5/143.5 seconds; the explicit 2,000-path callback took 77.7 ms. Counts include natural notifications and replay, not unique assets. No cached objects were reloaded. Full issue/platform/size matrices remain open. This documentation-only commit changes no package or test behavior; the functional tree previously passed 730 EditMode and 15 PlayMode tests. The full 16-step gate and raw-report arithmetic checks pass. Raw evidence, source identity, controls and limitations are recorded in the report. No performance guarantee or 100k claim.
The earlier 10k attempt stopped during sequential fixture label writes. Batched real edits now complete the 100/1k/10k write, flush, callback replay, reconciliation and lifecycle scenario. Preserve all raw measurements and controls, including slow results: 807 ms explicit duplicate-path callback and 221 seconds reconciliation at 10k. Zero refresh object load calls does not establish fast reconciliation.

The existing probe completed in 729.2 seconds on the unchanged functional tree, with cleanup independently verified. Report arithmetic/count checks and the full 16-step gate pass. No package/test behavior changed; the known functional tree passed 730 EditMode/15 PlayMode tests. The longest observed slice was 94.1 ms, so the configured 4 ms service budget is not a hard whole-slice guarantee. Remaining complete #308 matrices stay open.
@wallstop
Eli Pinkerton (wallstop) merged commit b907f75 into main Oct 21, 2026
5 checks passed
@wallstop
Eli Pinkerton (wallstop) deleted the fix/refresh-lifecycle-identities branch October 21, 2026 18:44
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