Skip to content

Fix release verification and registration lifecycle defects - #619

Draft
Eli Pinkerton (wallstop) wants to merge 57 commits into
masterfrom
codex/613-cache-settings
Draft

Eli Pinkerton (wallstop) wants to merge 57 commits into
masterfrom
codex/613-cache-settings

Conversation

@wallstop

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

Copy link
Copy Markdown
Collaborator

Why

Registration replay and teardown can lose ownership when custom-bus callbacks clear, remove or dispose token state. Editor settings, generated identifiers and release verification also contain defects.

What changed

  • Fix provider selection, registration accounting, stale-handle isolation, replay withdrawal and reentrant teardown.
  • Remove test-only production factories, observers, injection hooks and unused slot reset/readout paths. Tests use real storage, queues, assets and registration paths.
  • Remove the public test-only DxMessagingRuntimeSettingsProvider.Override API for 4.0. Use the resource asset; see the migration guide.
  • Preserve real cache versions, reset draining, snapshot ownership and stale-handle checks. Keep the idle-sweep registry readonly.
  • Rename changed storage benchmarks and update their checks. Historical rates for these workloads are not comparable.
  • Fix the Editor analyzer failure and isolate generated correctness projects when tracked source paths change.
  • Let actual pending compilation finish during Unity fixture setup and teardown after restoring owned compiler inputs.
  • Preserve native compilation, watchdog state, build inputs and licensed-resource cleanup.

How we know

Candidate fbddb80a passes the declared correctness and provenance checks. All eight workflows succeed. Four supported Unity versions pass Editor, PlayMode and IL2CPP scopes. All fourteen raw archives match the head, run, size and SHA256. All six licensed jobs confirm cleanup.

Each Editor passes 1,003 cases with the same 15 skips, including clean-import sample checks. Every prior Runtime outcome remains, plus 1,848 teardown regressions and one production-surface guard per scope. Internal benchmarks pass 207 cases; comparisons pass 470 with 66 unchanged skips. Five PlayMode allocation-honesty controls pass.

The unchanged extractor produces 41 actual-head rows. Release allocation fields remain unmeasured. Local checks pass 294 generator diagnostics, 2,697 portable tests, 692 documentation cases and 16 Unity-reference compilations. Native checks and original-host restoration are retained in the linked evidence.

Remaining verification

Wallstop must review all new code and user-facing copy before integration. Compare changes since the previously reviewed head.

The original #640 allocation failure and #502 capture root remain unexplained. Calibrated performance, native cost, adoption and release gates remain open.

References #642, #641, #613, #617, #618, #620, #621, #623, #624, #625, #626, #628, #634, #635, #636, #637, #638, #639, #640, #502, #511 and #575.

Copy link
Copy Markdown
Collaborator Author

The existing review head e404585a1a0d17f7dfb9afee139ff1bad27c8a51 passed CI 37697612619. Supported Unity and performance jobs are admitted through the central organization lock; the Unity 2021.3 job has acquired it and is running on ELI-MACHINE.

The separate formatter workflow fails before formatting at the existing high-severity dependency audit. Local reproduction and the bounded fix are tracked in #620. The draft remains open while those results and licensed gates are pending. This does not change #613's remaining review/integration and OOM-investigation limits.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Performance Numbers

Measured commit: fbddb80
Trusted reporting code (PR base): 916f0d7
Workflow run: 39126133967 attempt 1

Benchmark or harness paths changed, so historical deltas are non-comparable:

  • .github/actions/compute-unity-assemblies/action.yml
  • Tests/Editor/Allocations/AllocationMatrixTests.cs
  • Tests/Editor/Allocations/BenchmarkHarnessRobustnessTests.cs
  • Tests/Runtime/Benchmarks/BenchmarkProtocol.cs
  • Tests/Runtime/Benchmarks/DispatchThroughputBenchmarks.cs
  • Tests/Runtime/Benchmarks/HandlerCardinalityBenchmarkContractTests.cs
  • Tests/Runtime/Benchmarks/HandlerCardinalityBenchmarks.cs
  • Tests/Runtime/Benchmarks/RegistrationLifecycleBenchmarks.cs
  • Tests/Runtime/Benchmarks/SnapshotRebuildBenchmarks.cs
  • Tests/Runtime/Benchmarks/TargetMapBenchmarks.cs
  • scripts/unity/comparison-evidence-catalog-v1.json
  • scripts/unity/lib/asmdef-discovery.js
  • scripts/unity/reduce-paired-bracket.js
  • scripts/unity/run-ci-tests.ps1

Historical Standalone delta

Delta direction: + is better; - is worse.

Historical delta omitted because benchmark or harness code changed in this pull request.

Current TargetMap evidence

These raw rows are current-run diagnostics. Use fresh bracketed controls before accepting a micro-optimization.

[Standalone] DXM_INT_KEY_MAP_CONSTRUCTION keyCount=1 wallClockMs=0.000103 operationsPerSecond=9671179.884 gcAllocations=-1 gcAllocatedBytes=-1 mapCapacity=4
[Standalone] DXM_INT_KEY_MAP_CONSTRUCTION keyCount=16 wallClockMs=0.000602 operationsPerSecond=1662337.662 gcAllocations=-1 gcAllocatedBytes=-1 mapCapacity=32
[Standalone] DXM_INT_KEY_MAP_CONSTRUCTION keyCount=256 wallClockMs=0.007300 operationsPerSecond=136986.301 gcAllocations=-1 gcAllocatedBytes=-1 mapCapacity=512
[Standalone] DXM_INT_KEY_MAP_CONSTRUCTION keyCount=4 wallClockMs=0.000212 operationsPerSecond=4708097.928 gcAllocations=-1 gcAllocatedBytes=-1 mapCapacity=8
[Standalone] DXM_INT_KEY_MAP_CONSTRUCTION keyCount=4096 wallClockMs=0.119900 operationsPerSecond=8340.284 gcAllocations=-1 gcAllocatedBytes=-1 mapCapacity=8192
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_16_ChurnWithTrim keyCount=16 operation=ChurnWithTrim totalOperations=90000 operationsPerSecond=16240.203 wallClockMs=5541.803 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=16 targetMapCapacity=32 observedInvocations=110000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_16_Hit keyCount=16 operation=Hit totalOperations=73810000 operationsPerSecond=14760538.707 wallClockMs=5000.495 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=16 targetMapCapacity=32 observedInvocations=73830000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_16_Miss keyCount=16 operation=Miss totalOperations=86480000 operationsPerSecond=17295209.955 wallClockMs=5000.228 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=16 targetMapCapacity=32 observedInvocations=0
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_1_ChurnWithTrim keyCount=1 operation=ChurnWithTrim totalOperations=120000 operationsPerSecond=23755.005 wallClockMs=5051.567 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=1 targetMapCapacity=4 observedInvocations=140000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_1_Hit keyCount=1 operation=Hit totalOperations=76990000 operationsPerSecond=15395908.620 wallClockMs=5000.679 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=1 targetMapCapacity=4 observedInvocations=77010000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_1_Miss keyCount=1 operation=Miss totalOperations=88860000 operationsPerSecond=17764461.118 wallClockMs=5002.122 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=1 targetMapCapacity=4 observedInvocations=0
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_256_ChurnWithTrim keyCount=256 operation=ChurnWithTrim totalOperations=90000 operationsPerSecond=16253.623 wallClockMs=5537.227 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=256 targetMapCapacity=512 observedInvocations=110000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_256_Hit keyCount=256 operation=Hit totalOperations=66970000 operationsPerSecond=13393821.594 wallClockMs=5000.067 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=256 targetMapCapacity=512 observedInvocations=66990000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_256_Miss keyCount=256 operation=Miss totalOperations=83020000 operationsPerSecond=16602823.856 wallClockMs=5000.354 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=256 targetMapCapacity=512 observedInvocations=0
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4096_ChurnWithTrim keyCount=4096 operation=ChurnWithTrim totalOperations=90000 operationsPerSecond=16196.843 wallClockMs=5556.638 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4096 targetMapCapacity=8192 observedInvocations=110000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4096_Hit keyCount=4096 operation=Hit totalOperations=61980000 operationsPerSecond=12394001.096 wallClockMs=5000.806 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4096 targetMapCapacity=8192 observedInvocations=62000000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4096_Miss keyCount=4096 operation=Miss totalOperations=81910000 operationsPerSecond=16381491.846 wallClockMs=5000.155 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4096 targetMapCapacity=8192 observedInvocations=0
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4_ChurnWithTrim keyCount=4 operation=ChurnWithTrim totalOperations=90000 operationsPerSecond=16298.724 wallClockMs=5521.905 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4 targetMapCapacity=8 observedInvocations=110000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4_Hit keyCount=4 operation=Hit totalOperations=74720000 operationsPerSecond=14942885.261 wallClockMs=5000.373 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4 targetMapCapacity=8 observedInvocations=74740000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4_Miss keyCount=4 operation=Miss totalOperations=86580000 operationsPerSecond=17314641.147 wallClockMs=5000.392 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4 targetMapCapacity=8 observedInvocations=0

Copy link
Copy Markdown
Collaborator Author

Updated the existing draft to exact head 84883ad69c7647ae679b4605ce43bae725c1e42c after local verification and complete restoration.

  • Resolve dependency audit failures in PR 619 #620: the maintained Markdown CLI keeps the same engine, rules, 267 actual files, negative diagnostics, and fixed bytes. Fresh installation, unchanged severity policy, and full audit report zero vulnerabilities. All 1,442 Node tests, two Python archive tests, and required commit/push hooks pass.
  • Investigate OOM during console settings asset scans #613: establish the shared editor idle condition before the two production rescans. Preserve +2 rescan/+2 lookup/one load/zero search assertions and the production safety guard. The same old synchronous fixture fails on 2021.3, 2022.3, and 6000.3 CI; all three central cleanup chains succeeded. The revised fixture passes 50 distinct native executions, the 117-case affected scope, and the 975-case ordinary Editor scope, including 13 shipping sample quality cases, on Unity 6000.4.6f1. All run GUIDs, results, and cleanup evidence are retained.
  • Correct stale licensing instructions: the organization configuration owns two-holder admission, physical runner serialization, and resource/account health. Normal dispatch uses pinned acquire/work/return/classify/release/confirmed-cleanup actions automatically.

Original host samples (43 files plus metadata), package sources, and clean active scene are restored and verified; the restored baseline assembly is fresh. All six existing user edits are preserved. Supported-version and stripped IL2CPP validation, OOM root-cause limits, and maintainer review remain separate gates. This PR stays draft; no issue closes and no release-readiness claim follows.

Copy link
Copy Markdown
Collaborator Author

Exact head 84883ad69c7647ae679b4605ce43bae725c1e42c now passes all 17 jobs in CI 37703838482, including script tests on Ubuntu, macOS, and Windows. Prettier Auto Fix 37703838453 also succeeds with the dependency gate preserved; its installed Markdown command and CI lint gate pass. CSharpier, Unity Docs Gate, and documentation deployment succeed.

Unity Tests 37703838396 has admitted its 2021.3.45f1 job through the central organization lock and reached Standalone work. Its mode XML and final cleanup gate are still pending; individual continue-on-error step conclusions do not establish a passing Unity result. Remaining supported-version, performance, stripped-player, integration, and human review gates keep this PR draft.

Copy link
Copy Markdown
Collaborator Author

The supported-floor result is now available: Unity 2021 job 113073678698 fails the cache integration test because compilation remains active throughout its 64-update precondition (Compiling=True, updating=False). XML retains 998 passes, one failure, 11 existing skips, and zero inconclusive cases. All central license-return, classification, release, and confirmed-cleanup gates pass.

Official UPM Test Framework 1.4.5 source confirms EditModeRunner locks assembly reloads while tests execute. The same job log starts another compilation for changed Assets/csc.rsp before its test prebuild step, then completes/reloads after the suite. This supports a pending-compilation lifecycle explanation; an idle polling loop cannot itself release the framework lock. Unity's RecompileScripts instruction is the candidate to investigate before constructing transient test settings. The local 50-repeat result does not prove this supported-floor failure resolved. The PR remains draft; no timeout or assertion change is accepted.

Copy link
Copy Markdown
Collaborator Author

Pushed exact head d4c06af73a8a5477aebe912facb7d05f3743ba20. The cache regression now yields the framework's WaitForDomainReload instruction when compilation is pending, then constructs settings and executes the original rescan/cache assertions. Ordinary frame polling could not complete the reload held by EditModeRunner. Production safety guards and timeouts are unchanged.

Native evidence at Unity 6000.4.6f1: 10 genuine pending-compilation probes, 50 separate executions of the final fixture, 117/117 affected tests, and 975/975 Editor tests, including 13 sample-quality cases. All accepted results have zero failed/skipped/inconclusive tests and verified framework cleanup. Original host samples and package files are restored by hashes, and the baseline assembly is fresh. Source and raw evidence are detailed in #613.

Commit and push hooks pass; the committed fixture SHA-256 matches the tested bytes. The new supported-version, performance, and stripped-player gates remain required. This PR stays draft for those gates, review, and integration. The separate OOM root cause remains unresolved.

Copy link
Copy Markdown
Collaborator Author

DISCLOSURE: LLM-GENERATED TEXT

Pushed 5c74fd4 after the supported Unity 2021 job exposed a documentation capture dependency on the uninitialized IMGUI style cache. The compiler specimen now resolves the same font through the public inspector skin API; its diagnostic/source assertions and the verified compilation handoff remain unchanged.

Verification: original cold-cache failure reproduced 50/50; candidate passes 50/50 cold-cache probes, 50 distinct native runs with confirmed cleanup, related documentation 9/9, and full ordinary Editor 975/975 including all 13 sample quality cases. Format/spelling/diff and commit/push hooks pass. Original editor files, 43 samples/root metadata and six user edits are restored byte for byte; the baseline assembly is fresh and the temporary fixture is absent.

New exact-head Unity run 37711381000 and performance run 37711380137 are queued. New CSharpier, Prettier, documentation deployment and Unity Docs Gate already succeed; CI and devcontainer checks are still running. All licensed jobs use central admission and acquired-scoped return/classify/release/confirmed cleanup. This remains a draft: supported-head CI, shipping verification and human review remain pending. No issue closed.

Comment thread Runtime/Core/MessageBus/MessageBus.cs Outdated
/// includes registrations sharing a handler, priority, or context and
/// duplicate registrations held by reference count. Never read on dispatch.
/// </remarks>
internal int LiveRegistrationCountForTesting

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Can we get rid of any and all "ForTesting" style methods, members, and concepts? I want every path to be "production" and have no code in production assemblies that is test-only. Here and throughout.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in d2378cad. Runtime and Editor assemblies no longer expose test/benchmark-only observers, injection hooks, storage factories or Action conversions. Tests now inspect real production storage and exercise the production queue, asset, settings and registration paths. The shared inspector snapshot moved into CustomEditors because the shipped UI uses it.

The public test-only DxMessagingRuntimeSettingsProvider.Override API is also removed for 4.0; the migration guide, runtime-settings guide and changelog describe resource-asset configuration. The idle-sweep registry remains readonly. Two benchmark workloads now use real production operations and have new names, so their old rates are not compared.

Local checks: 2,699 portable and 692 documentation passes; native 400 changed Editor passes, two full Runtime runs, 114 benchmark contracts and 315 allocation-assembly passes. The full local Editor scope remains incomplete because the host has older sample imports; clean CI must verify those cases. Exact original-host restoration is verified. All four supported-version CI legs are now required on this new head; previous-head green results are not reused.

This update also includes #642's separately reproduced reentrant teardown fix in a2c199c5. Please review the new code and user-facing copy when the new-head CI qualification is ready.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The deeper production-consumer audit found 20 more test-only members under ordinary names. They are now removed in a2ae41b7: slot/interface readouts, speculative Clear paths, unused snapshot state, and the ordered-key observer. Tests retain real reset/drain/version/key-order assertions; only the two withdrawn test-only Clear cases retire.

c36808ba also fixes the pinned Editor analyzer failure and isolates generated correctness-project caches when tracked input paths change. Content edits reuse the cache; added, removed or renamed paths select a different project. Old cache directories remain intact.

The final source passes 464 affected native Editor cases, two full Runtime runs, 114 benchmark contracts and 315 allocation cases, with only the same predeclared skips. Scripts pass 1,463 cases plus two archive tests; pinned Sonar/Roslyn3.8 is RED1/GREEN0. Exact original-host restoration is verified at 10:43:26 UTC. New-head CI is running; the d2378ca CI failure is retained separately. The local full Editor sample-fixture limit remains explicit, so clean CI must qualify those shipping fixtures before this is ready for final review.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Implemented throughout Runtime and Editor, including the ordinary-name test-only readout/reset members. Tests now own observation and isolation; the inspector snapshot builder lives with its production UI consumers. The removed public settings Override API has migration guidance. Final head is fbddb80; changes since the reviewed head.

All294generator diagnostics,16copied-Unity-reference compilations,10native root/dependent pairs and464affected native Editor cases pass. Six standard workflows are green. Current Unity/performance jobs are still queued for self-hosted runners, so the Windows compilation path remains unqualified. The host is restored; prior failures and the incomplete local sample scope remain retained. PR stays draft and unmerged.

@wallstop

Copy link
Copy Markdown
Collaborator Author

Review follow-up to #619 (comment): wallstop requests removal of all test-only methods, members, and concepts from production assemblies throughout the repository. I am auditing Runtime, Editor, production source-generator projects, and shipped samples, including seams whose names do not contain ForTesting. The reviewed head remains 36aff4a.

The baseline RED condition is production-owned test hooks, mutable test injection points, and benchmark-only execution paths. The intended correction removes those seams rather than just renaming them. Tests will exercise real production behavior, with inspection and orchestration housed in test assemblies where necessary. Real production operations currently mislabeled as test-only will retain their behavior and acquire accurate names/documentation. The inspector state builder is used by three production UI consumers; its production role will be reflected in its location and name.

Before delivery I will retain a complete seam/caller inventory, verify affected behavior and cleanup, check shipping/source contracts and supported Unity builds, and review any benchmark workload changes explicitly. No assertions, timeouts, allocation thresholds, or historical evidence will be weakened. Stop for unexplained behavior, timing-path, or cleanup drift. This follow-up and the separate local #642 correction will be aggregated into the existing PR after practical local qualification; #642 has not yet been reviewed by wallstop. Evidence: ignored .artifacts/perf-lab/619-production-path-review-s470 and progress/session-470.md.

@wallstop

Copy link
Copy Markdown
Collaborator Author

The review audit found another explicit test-only API: docs/reference/runtime-settings.md labels DxMessagingRuntimeSettingsProvider.Override as test-only and tells production code not to call it. Repository call sites are fixtures; resource loading and editor asset validation are the production configuration paths.

Before this additional correction, the proposed change is to withdraw Override and its token chain from Runtime, keep the real Current/resource-cache/reset behavior, and move fixture configuration/cleanup into test assemblies. This is a 4.0 API removal, so the reference, memory guide, migration guide, and changelog will explain it. Relabeling the test API as a production feature would not address the feedback.

Qualification will retain production resource/cache/reset and live asset-change checks. Fixture scope lifecycle checks will be identified as fixture checks. The old override-token allocation row will become a zero-allocation check of the actual cached Current getter, with fixture configuration outside measurement. Existing public dispatch allocation budgets remain unchanged. Stop for unexplained source, behavior, allocation, or cleanup drift; no native or CI result is claimed for this new correction yet. Evidence remains .artifacts/perf-lab/619-production-path-review-s470.

@wallstop

Copy link
Copy Markdown
Collaborator Author

Prospective combined native qualification for the production-path review cleanup plus the exact #642 candidate. The frozen Unity-visible packet changes 139 paths under Runtime/Editor/Tests, from 800 original files to 858 candidate files; its manifest SHA256 is 791c9bed995c891d995355ee1c8b0ea48d743ee01469fae5dcdb762aa2423139. The original host is fully restored and independently verified after #642's component phase. No combined source overlay or tests have started.

Question: can the production assemblies run all supported messaging/editor behavior after removing test/benchmark observers, mutable injection hooks, test-only Action conversions and public runtime-settings Override, with inspection/configuration owned solely by test assemblies? RED: the production-surface guard fails against the actual old Core; old member inventories/caller analysis and failures are retained. Current combined portable scope: 2,699 passes; all 16 assemblies compile against copied live Unity references. These are preliminary checks only.

Before installation, require a complete fresh idle/clean main-stage observer, every original preservation pin, all 800 original native file bytes, original 19 modules/bridge, three host bridge sources, SDK modules/sources/default5000, original profiler configuration/history and original clean scene. Back up the six compiler-input/metadata paths touched by real Editor settings operations. Install only the 139 frozen owned differences, including their metadata and the retired empty Testing directory. Refresh, audit actual compiler inputs against the 16 frozen assembly source rosters and the unchanged host sample sources, and compare the rebuilt bridge's complete image/IL against the original before admitting a unique domain nonce and all 20 actual module identities.

GREEN scopes: the changed real Editor/settings/source-index/inspector fixtures; the ordinary full Editor scope twice with the existing documentation PNG writer and performance categories excluded; full Runtime twice; benchmark contract tests separately from timed PerfBench rows; and the candidate allocation quality scope with unchanged measurement rules/budgets. Require positive expected coverage, zero failed/inconclusive cases, source-derived roster accounting, only documented existing platform skips, exact frozen module/source/SDK/profiler identity before each run, and matching GUID/path passive framework cleanup with the original clean scene. Stop for any unexplained compile/source/module/roster/scene/profiler/cleanup failure; retain raw failures and fix causes without relaxing assertions/timeouts. No #640 original-failure attribution or historical comparison of the renamed storage workloads follows.

Finally retire the nonce, restore every owned source/metadata path and directory, refresh, and prove all original 800 files, 675 preservation pins, original19 modules/bridge, SDK/default5000, host sources, compiler-input bytes/timestamps, profiler/history and original scene. Keep the ten inherited primary-worktree edits untouched. No merge/release or SDK/runner change is authorized by this protocol; combined CI and wallstop review remain pending.

@wallstop

Copy link
Copy Markdown
Collaborator Author

Pre-install recovery clarification for the frozen combined native packet: if compilation or admission stops, restore only the 139 declared owned paths after a fresh complete idle/clean main-stage check, original SDK/default5000 and three bridge-source pins, original profiler/history, and exact known original-or-candidate bytes at every owned path. Preserve unowned paths. A separately prepared source-restoration snippet may observe scriptCompilationFailed=true; that exception admits source recovery only, never NUnit. It records actual module identities and marker ownership, retires only its matching nonce, restores frozen original bytes, then requires refresh and the full original-source/module/bridge/SDK/compiler-input/profiler/scene verification. Unknown source changes, active framework work, profiler drift or a dirty scene still stop recovery. No combined source has been installed yet.

@wallstop

Copy link
Copy Markdown
Collaborator Author

Combined native v1 stopped at 399 passes / 1 fixture failure: the script-navigation probe lived in an Editor-only folder, so Unity correctly refused to attach it. The probe is being moved, with its GUID, to the Runtime test assembly; the navigation assertion stays unchanged. Cleanup is inactive/error-free with the original clean scene. The v1 nonce and all139 source differences were retired; original19/bridge/SDK/profiler/source checks pass.

Postflight also caught a verifier bug (comparing an implicitly formatted JSON Date string) and a real fixture metadata issue: all six compiler-input files have exact original bytes, but Mono's managed timestamp setter truncated the sidecar mtime by four100ns ticks. The read-only before/current audit is retained. Before v2, restore only that known400ns timestamp difference through macOS's nanosecond filesystem API, guarded by exact sidecar bytes/current drift, fresh safe state and all original package/bridge/SDK/profiler/source pins. Preserve access time and file contents. Verify all six original timestamps by DateTime ticks. Future fixtures will retain the original file under an ignored same-directory backup and restore it by rename, so no timestamp setter rounds away metadata. No assertion or source/mtime requirement is relaxed.

@wallstop

Copy link
Copy Markdown
Collaborator Author

Before native v2: original v1 restoration is now exact at 08:37:53 UTC, including every original file/module/bridge/SDK/profiler/scene pin and all six compiler-input byte/timestamp records. The known400ns sidecar mtime was restored without changing bytes; the DateTime verifier now compares ticks. Raw v1 failure/refusal/audit/recovery evidence is retained.

V2 changes only the fixture causes: move the navigation probe (same GUID) into the Runtime test assembly, and preserve compiler-input originals by same-directory ignored backups restored by rename, with constructor rollback and best-effort cleanup. The navigation assertion, production behavior, budgets and stop rules stay unchanged. Frozen v2 Unity-visible manifest SHA256: 8efc6fbb3bbdf272e338ce33038e02962bad95a677ed023c0fe56355461a5603, 139 changed paths, 800 original / 858 candidate files. All16 updated Unity-reference compilations pass; the current381 source-input roster is frozen with it.

Apply the same previously declared native scopes and strict source/module/bridge/SDK/profiler/scene/GUID-cleanup/restoration rules under a new unique v2 nonce/results root. First rerun the same400-case focused Editor roster, then the affected full scopes and allocation quality scope only after source/image admission. Stop before further tests for any unresolved failure. No v2 source is installed yet.

@wallstop

Copy link
Copy Markdown
Collaborator Author

Native v2 focused Editor scope now passes all400 exact v1-roster cases, including unchanged script navigation. Matching GUID/path cleanup is inactive/error-free with the original clean scene. An additional read-only check proves all six compiler-input bytes and exact timestamps restored, with no hidden fixture backups left.

The first full Editor run is retained as incomplete: 976 passes, zero failures, one existing missing-guide skip and eight inconclusive imported-sample cases. This host has its older imports at Assets/DxMessagingSamples, not the clean CI fixture. The read-only inventory found nine missing fixture files and twelve existing files different from the package. Those imports are unreviewed host data and their twelve compiled source hashes are preserved by the native contract. A second import would duplicate GUIDs/assembly names; the local setup guidance requires refusing that. I am preserving the imports and the inconclusive result, without excluding or weakening any sample assertion.

The full sample-fixture verdict therefore remains pending the unchanged clean CI provisioner on all supported Unity versions. Before more local data, prospectively continue only the independent, source-bound full Runtime repeats, benchmark contracts and allocation quality scopes under the same frozen v2 packet/module/SDK/profiler/scene rules. Local full Editor qualification remains incomplete; no aggregate native-pass or sample-adoption claim follows. Any new failure/inconclusive result in these independent scopes still stops its scope. Final restoration requirements remain exact.

Copy link
Copy Markdown
Collaborator Author

The deeper symbol audit found additional test-only surface under ordinary names at d2378cad: IHandlerActionCache.Version/LastSeenVersion/LastSeenEmissionId, IEvictableSlot.Version and its slot readout implementations have zero production consumers. TypedSlot.Clear and TypedGlobalSlot.Clear are speculative full-reset paths exercised only by tests; real reclamation uses Reset. Reserved slot snapshot sentinels and the bus-global snapshot list likewise have no production reader/producer.

Follow-up hypothesis: remove these readouts, unused test reset paths and reserved test-visible storage while preserving the actual cache version fields, slot versions, inner-cache drain order, reset/sweep generations and production Reset behavior. This addresses the request beyond the ForTesting name pattern. The #503 finding of bus-cache counters with no observers remains a separate source lead; it does not justify a throughput claim.

RED: the old assembly still exposes these members and only tests consume them. GREEN: absence guards plus unchanged real reset/drain, stale-handle, snapshot, allocation and full supported-version behavior. Move remaining observations into test assemblies or use the real cache fields there. Retiring assertions of an exclusively test-only reset API will be recorded explicitly; do not remove assertions of real reclamation behavior or raise any threshold. Freeze all changes and rerun practical affected local/native checks before one further aggregate update. The d237 CI run remains tied to d237 and cannot qualify the follow-up. No host edit occurs before a fresh native source/module admission.

Copy link
Copy Markdown
Collaborator Author

The same follow-up also includes HandlerActionCache<T>.OrderedEntries.KeyAt: its only caller is the ordered-storage contract test. Move that observer into EntryStorageInspection in the test assembly, retain the exact key-order assertions, and extend the absence guard. Production iteration continues through its real ValueAt path. This raises the explicit retired test-only member census from 19 to 20; it changes no test budget or production dispatch behavior.

Copy link
Copy Markdown
Collaborator Author

Prospective native follow-up for the ordinary-name test-only members: frozen source manifest 854be308ea2997ca76e0e34f046178ca4e27b27033ffadcc533649d29a27cb3f, 140 owned Native paths, 800 original files, 858 candidate files, 16 exact package source rosters plus the 12 untouched host sample sources. This is the follow-up working tree over d237, not d237's CI source.

RED guards retain the 19-member failure and the additional KeyAt-only failure. Local GREEN: 2,697 portable passes, 692 documentation passes, all 16 copied-live-Unity-reference compilations, formatting, markdown, spelling, package validation and catalog/profile contracts. Only the two removed test-only Clear APIs retire their two tests; real cache reset/version/sentinel/drain and key-order assertions are preserved.

After fresh idle/scene/source/SDK/default5000/profiler admission, install only the 140 manifest-owned paths, refresh, audit actual compiler rosters and all 19 package/sample modules plus the unchanged-source host bridge. Admit the actual loaded candidate only after full bridge image/IL/metadata equality outside identified identity/debug bytes, explicit removed-member probes and a new nonce. All prior research nonces must be absent.

Frozen native scope: all 398 prior focused Editor case names except the two withdrawn Clear tests; two full Runtime runs (4,682 passes plus the existing non-batch optimization-report skip); benchmark contracts (114 passes plus the explicit baseline-writer skip); full allocation assembly (315 passes). Fail on changed roster/outcome or assertion/budget drift. The full local Editor scope remains unattempted here because the unchanged host lacks the CI sample fixtures; retain v2's incomplete result and require clean CI.

During a test or SDK observation timeout, poll files only; no replay or timeout change. On completion or failure, retire the nonce and restore every owned path. Requalify all 800 original files/675 preservation pins, all 19 original modules and bridge, SDK/three host sources, all 15 profiler fields, six external compiler inputs including exact timestamps, original sole clean scene and absent research markers. Controlled recovery is limited to known owned source bytes; it cannot admit tests. Evidence: ignored .artifacts/perf-lab/619-production-path-review-s470/native-v3. No merge, release, campaign or historical allocation-attribution claim.

Copy link
Copy Markdown
Collaborator Author

Pre-admission correction to the preceding native protocol: the exact-roster preparer refused before any v3 SDK call or source install. The two retired Clear tests were in the prior full Editor result, not the old 400-case focus; the stated 398 projection was incorrect.

The corrected frozen focus retains all 400 old focused cases and adds 64 actual typed-slot, bus-global and invariant cases from the prior full Editor roster: TypedSlotShapeTests contributes 31 after its two explicitly withdrawn test-only Clear cases, BusGlobalSlotLiveCountTests contributes eight, and MessageBusInvariantTests contributes 25. Thus 464 exact case names must pass. The full roster is frozen in native-v3/protocol.json before execution. No candidate data exist under the mistaken projection, and no assertion or threshold is changed. All other source/module/ownership/restoration guards, two full Runtime runs, benchmark contracts, allocation scope and the full-Editor fixture limitation remain as declared.

Copy link
Copy Markdown
Collaborator Author

The d2378ca Unity workflow is FAILED on all four versions: Editor tests never run because Tests/Editor/EditorSourceIndexInspection.cs:51 triggers the pinned Sonar S3172 delegate-subtraction diagnostic. Runtime/player outcomes and both performance jobs are separate; passing leaves do not turn these jobs green. Unity2022 also retains a deleted ISweepable.cs compiler-input error that must be diagnosed separately.

Correction protocol: reproduce S3172 locally using the exact manifest-pinned SonarAnalyzer.CSharp10.34.0.3385 payload and Roslyn3.8 against actual Unity references, then express the same owned single-method callback unsubscription clearly and rerun analysis plus affected real Editor behavior. Keep the rule, compiler diagnostics, assertions, budgets and timeouts unchanged. Inspect the actual cached source-input/graph evidence for CS2001 before choosing any cache change; no retry-until-pass, broad runner cleanup, SDK repair or health/campaign dispatch. Bundle corrections with the already-local a2ae41b follow-up before one further push.

All native-v3 scopes pass (464 Editor; two full Runtime4682+same skip;114 benchmark contracts+explicit skip;315 allocation cases). Exact original host restoration completed09:52:58UTC: all140ownedpaths/800sources/675pins,19originalmodules+bridge,SDK5000,15profilerfields,sixcompiler-input bytes AND timestamps,clean originalscene,no researchmarker. Those results remain bound to a2ae41b, not a future correction. Raw failing CI artifacts and diagnosed causes will be retained under .artifacts/perf-lab/619-review-ci-s470/d2378cad-failed.

Copy link
Copy Markdown
Collaborator Author

The pinned Roslyn3.8/Sonar10.34 analyzer reproduces exactly one S3172 against the actual 48 Editor test sources, with zero compiler errors. Binding the same reflected single-method callback to a typed local before -= removes that diagnostic; no suppression or rule setting changes.

All 12 failed Unity archives are now downloaded and verified against GitHub size/SHA/head metadata. All four Editor archives have no NUnit XML and retain S3172. The eight Runtime/player XML files contain passing leaves; Unity2022 still fails diagnostic verification because its cached Bee graph initially compiles a response file containing removed ISweepable.cs, then rebuilds the graph. That error is retained, not ignored.

Cache correction hypothesis: the generated correctness-test project namespace must include the tracked package input path set. Reuse the Library when contents change under the same paths; allocate a different generated project when paths are added, removed or renamed. Compute a short SHA from git ls-files names only, and apply it to ordinary Editor/PlayMode/standalone project paths. Preserve all old directories and diagnostics; do not clear a runner cache, weaken compiler verification, alter editor installations, touch #510 health/campaign state, or change performance/shipping cache paths.

RED/GREEN controls will execute the actual workflow PowerShell: unchanged path set/content edits keep the key; add/remove/rename changes it; unrelated docs do not change it; missing/empty source checkout fails closed. Verify existing path-safety and workflow contracts, normal script tests and the full affected native/editor checks before the aggregate push. Fresh four-version CI must then show no stale compiler input and successful license/lock cleanup. No readiness or performance claim follows from the cache change.

Copy link
Copy Markdown
Collaborator Author

Prospective final native Editor-helper correction: manifest a940bc015003c2384054d0aa38c13d928344c013867d155f77912c169bf450f5, 140 owned paths, 800 original/858 candidate files, exact16package compiler source rosters plus12untouchedhostsample sources. Relative to the completed a2ae41b native-v3 packet, only EditorSourceIndexInspection binds its same reflected single-method callback to a typed local before removal. The exact pinned Sonar/Roslyn3.8 reproduction changes from one S3172 to zero, with zero compiler errors. Source-set cache controls execute the actual workflow PowerShell; the final full script run is active after moving controls into its PowerShell harness to keep the unchanged JS line budget.

Repeat the frozen464-case affected Editor scope, two full Runtime4682+known1skip scopes, benchmark114+explicit1skip and allocation315 scopes. No changed case roster, assertion, budget or timeout is accepted. Local full Editor remains fixture-incomplete/unattempted here; existing imported assets are untouched and fresh four-version CI must qualify shipping samples.

Every SDK/menu/source operation requires the fresh complete passive observer, all675/800source pins and the applicable candidate/original phase. SDK/default5000, three host sources, all15profilerfields and the sole clean scene stay fixed. Audit actual381compiler inputs/all19modules+bridge and prove full bridge image/IL/metadata equality outside identified identity/debug bytes before admitting actual loaded images/removed-member probes/newnonce. All previous1/2/3research markers must be absent. During tests or a timed-out SDK observation, FILEPOLLONLY; no replay or timeout change. Retire the nonce, restore140paths and prove all800original/675pins/original19+bridge/SDK/profiler/sixexternalcompiler-inputbytesANDexacttimestamps/originalscene/noMarkers before push or stopping.

Evidence: ignored .artifacts/perf-lab/619-production-path-review-s470/native-v4. Controlled recovery is limited to frozen owned source bytes and cannot admit tests. This is correctness verification of changed code; it is not another historical#640 attribution trial, a calibrated performance result, runner repair, #510 dispatch or integration approval.

Copy link
Copy Markdown
Collaborator Author

Current-head c36808b qualification is FAIL, not green: Unity2021 job117654764642 reports15 Editor failures (988pass/15fail/15skip), while Play4496 and IL2CPP4492 pass. First failure RealDeferredCallbacksDoNotRewritePreparedCompilerInputs reaches PrepareCompilerInputs, writes/imports a distinct sidecar, then its queued idle callback finds compilation pending and correctly defers. Subsequent tests see isCompiling=true while NUnit locks reloads; sidecar/settings/inspector assertions cascade. No production guard or test assertion will be weakened.

Prospective fixture investigation: reproduce and retain current raw XML/logs, compare real Unity compilation/import state around owned compiler-input writes, then batch asset imports only inside the existing test-owned compiler-input scope. Restore all original bytes and exact timestamps before releasing the batch so test mutations cannot request a pending compilation during NUnit. Production execution remains unchanged. Verify constructor-failure cleanup, nested/exception restoration, focused repeats, affected Editor scope and full supported-version CI before acceptance. Stop on original-input drift, missed cleanup, altered assertions or an unexplained failure. Evidence stays under mutable619-review-ci-s470/c36808-current and a separate correction packet; c368 results remain unfavorable evidence.

Copy link
Copy Markdown
Collaborator Author

Native fixture correction protocol before install: frozen full candidate manifest SHA256 f7f5feb4345f099105bcd9e02cf135f2c910f56b7bcdcc80843410eb08565884 (140 owned changed paths;800 original/858 candidate files). Only two source files differ from c36808b, both in Tests/Editor: compiler-input scope batches imports with finally cleanup, and the existing prepared-input test adds an explicit no-pending-compilation assertion. All16 copied-Unity-reference compilations pass. Native-v5 will require source/loaded-module/bridge image admission, original675 pins/SDK5000/profiler/clean scene guards, the exact464 focused Editor roster across50 repeats, affected full Editor scope with existing unavailable sample fixtures retained as incomplete, then exact original restoration. Stop for failures, leaked import batches, input/timestamp drift or unsafe observer state. This is quality verification, not a third historical #640 attribution trial or performance claim.

Copy link
Copy Markdown
Collaborator Author

Native-v5 full Editor scope is declared before its run: exact native-v2 full roster minus the two removed test-only TypedSlot.Clear/TypedGlobalSlot.Clear cases, expected974pass/0fail/1same sample-guide skip/8same unavailable-CI-sample inconclusives. It remains INCOMPLETE, even if those counts match; no imports or assertions are weakened to turn it green. Clean supported-version CI must exercise those shipping fixtures. All50 focused464-case repeats remain required separately. Loaded comparison now proves v4→v5 changes only the Editor test assembly; all18 other package/sample module identities and bytes and the host bridge match exactly.

Copy link
Copy Markdown
Collaborator Author

A4ca9d qualification is FAIL. First2021 raw archives match exact head/run/size/SHA:989Editor passes/14failures/15same skips, Runtime4496/4492pass. The new prepared-input assertion/test now passes, but after the test-owned import batch is released compilation remains pending and the same downstream idle-dependent cases defer. Batching alone is insufficient; this unfavorable result is retained. Static CI also reports TrackedCSharpUsesBlockCommentsAndAscendingComparisons: my new two-line // prose in EditorSettingsStateScope must use the repository's block-comment form.

Prospective next correction: preserve real production callbacks and file operations; convert the two compiler-input-owning fixture setup/teardown methods to UnitySetUp/UnityTearDown enumerators. Before constructing owned state and after restoring/disposing every owned resource, yield Unity's supported RecompileScripts instruction only when actual EditorApplication.isCompiling is true. These fixture methods must not be ordinary SetUp actions that rerun after domain reload. No artificial delay, timeout change, production override, test skip or weakened assertion. Correct the comment style and run all generator diagnostics locally before another aggregate push. Verify copied-source compilation, repeated root case, related Editor scope and full affected scope, then supported-version raw CI. Stop on cleanup leaks, reload reconstruction failure or any new unexplained behavior. Native source/domain admission must explicitly account for expected framework-controlled reloads with exact pre/post sources and module identities; no silent relaxation of the old persistent-domain protocol.

Copy link
Copy Markdown
Collaborator Author

Native-v6 protocol before install: manifest SHA256 f60dc178fbeaecda42e054e172ea9dec352c8bb095d0226f9a4dc1772327c0be,140owned changed paths/800original/858candidate files. Only three Editor test source files differ from pushedA4: two fixtures now use UnitySetUp/UnityTearDown to let actual pending compilation finish through RecompileScripts before acquiring and after releasing owned state; the input scope comment uses required block syntax. All294generator diagnostics pass and all16copied-Unity-reference compilations pass. Building the diagnostics tests regenerated two tracked analyzer DLLs; those generated changes were restored to the exactA4payload before the final16compilations/freeze.

This is a deterministic CI defect, so the local minimum is10 paired root runs, each selecting RealDeferredCallbacksDoNotRewritePreparedCompilerInputs followed by RegenerateSidecarAppliesSynchronouslyWhenEditorCanMutateAssets, then the exact464affected Editor roster and the full Editor roster (expected974pass/0fail/1same skip/8same missing sample inconclusives, still INCOMPLETE). Every run requires its unique GUID/raw/passive cleanup. Expected framework-controlled reloads are admitted only after proving all675preservation pins/all858candidate files/19package+sample module identities and bytes/bridge identity and bytes/SDK5000/profiler/original clean scene exact; a unique post-run record renews the live domain nonce. Original initial admission stays retained. Any module/source/state drift, framework error, missing cleanup, or unexplained result stops the phase. Restore all original140paths/19modules/bridge/external input bytes AND exact timestamps before push/handoff. No disabled assertion, synthetic busy override, wait duration increase, production hook or third #640 historical trial.

The lifecycle choice follows Unity's action/reload contract: ordinary setup reruns after a reload; Unity setup resumes instead. Evidence remains separate under 619-production-path-review-s470/native-v6; A4failures remain retained.

This branch has not been deployed

No deployments
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