Skip to content

test(perf): preserve deregistration trial pairing - #424

Merged
Eli Pinkerton (wallstop) merged 1 commit into
masterfrom
perf/session-220-paired-deregistration-evidence
Aug 16, 2026
Merged

test(perf): preserve deregistration trial pairing#424
Eli Pinkerton (wallstop) merged 1 commit into
masterfrom
perf/session-220-paired-deregistration-evidence

Conversation

@wallstop

@wallstop Eli Pinkerton (wallstop) commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace four independently minimized deregistration arms with one complete H/B/B/H trial selection
  • balance eight preparation trials (four forward, four reverse) and emit every trial total/direction for artifact-level auditability
  • distinguish synthetic arithmetic from measured provenance, enforce the timed H/B/B/H order, and restore nested idle-sweep scopes if state construction fails
  • document the diagnostic-only memory tradeoff and retain the no-candidate verdict for [Bug]: research: MessagePipe parity #414

Science

The old diagnostic could combine four different host phases. The new marker retains all arms from one trial and reports jointTrialSelection=true, sameTrialArms=true, the selected trial, and the full trialSequence.

Four fresh-population invocations in one loaded Mono editor qualified only 2/4 samples. The final balanced eight-trial sample also rejected itself at 3.79% handler-excess spread. This PR therefore improves evidence quality but does not implement or claim acceptance for the exact-MessageBus specialization.

Validation

  • fresh Unity assembly timestamp newer than edited source
  • Unity MCP focused contracts: 48/48
  • Unity MCP real diagnostic: 1/1
  • Node tests: 421/421
  • npm run validate:all
  • CSharpier, Prettier, Markdownlint, spelling, ASCII prose, and git diff --check
  • final Unity postflight: idle editor, clean scene, main stage, no prefab stage
  • two adversarial review rounds; final verdict: zero findings

The only Unity console errors are pre-existing malformed Assets/Plugins/Zenject/package.json.meta host-project errors outside this package.

Refs #414.


Note

Low Risk
Changes are confined to perf benchmarks, contract tests, and documentation; no production dispatch or registration behavior is modified.

Overview
Replaces the deregistration H/B/B/H palindrome diagnostic that minimized four arms in separate seven-trial windows with RunPairedDiagnostic, which runs eight trials, prepares all four fresh populations before timing, executes the arms back-to-back, and keeps the lowest complete palindrome so arms never come from different host phases. Preparation alternates forward/reverse; the structured log and tests record jointTrialSelection, sameTrialArms, trialSequence, and fixed H/B/B/H execution order, while arithmetic-only AnalyzePalindrome paths no longer claim measured provenance.

Adds DeregistrationAttributionPalindromeSample, injects benchmark registry isolation via CreateState (dispose on failed construction), and extends contract coverage for floor selection and arm indexing. Perf methodology and campaign decisions document the accepted joint method, diagnostic peak-memory tradeoff, and that this still does not authorize the exact-MessageBus candidate.

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

Copilot AI lite review requested due to automatic review settings August 16, 2026 00:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

Performance Numbers

Measured commit: 00a360c
Trusted reporting code (PR base): 66043e2
Workflow run: 31918393329 attempt 1

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

  • Tests/Runtime/Benchmarks/DispatchThroughputBenchmarks.cs
  • Tests/Runtime/Benchmarks/RegistrationLifecycleBenchmarkContractTests.cs
  • Tests/Runtime/Benchmarks/RegistrationLifecycleBenchmarks.cs

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_TARGET_MAP_BENCHMARK scenario=TargetMap_16_Churn keyCount=16 operation=Churn totalOperations=1980000 operationsPerSecond=395123.017 wallClockMs=5011.098 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=16 targetMapCapacity=32 observedInvocations=2000000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_16_Hit keyCount=16 operation=Hit totalOperations=51570000 operationsPerSecond=10312660.179 wallClockMs=5000.650 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=16 targetMapCapacity=32 observedInvocations=51590000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_16_Miss keyCount=16 operation=Miss totalOperations=60530000 operationsPerSecond=12105314.839 wallClockMs=5000.283 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=16 targetMapCapacity=32 observedInvocations=0
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_1_Churn keyCount=1 operation=Churn totalOperations=2130000 operationsPerSecond=424954.620 wallClockMs=5012.300 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=1 targetMapCapacity=4 observedInvocations=2150000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_1_Hit keyCount=1 operation=Hit totalOperations=49780000 operationsPerSecond=9954558.779 wallClockMs=5000.724 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=1 targetMapCapacity=4 observedInvocations=49800000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_1_Miss keyCount=1 operation=Miss totalOperations=61140000 operationsPerSecond=12227149.479 wallClockMs=5000.348 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=1 targetMapCapacity=4 observedInvocations=0
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_256_Churn keyCount=256 operation=Churn totalOperations=1820000 operationsPerSecond=362513.593 wallClockMs=5020.501 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=256 targetMapCapacity=512 observedInvocations=1840000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_256_Hit keyCount=256 operation=Hit totalOperations=45100000 operationsPerSecond=9019232.824 wallClockMs=5000.425 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=256 targetMapCapacity=512 observedInvocations=45120000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_256_Miss keyCount=256 operation=Miss totalOperations=55350000 operationsPerSecond=11068550.684 wallClockMs=5000.655 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=256 targetMapCapacity=512 observedInvocations=0
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4096_Churn keyCount=4096 operation=Churn totalOperations=1400000 operationsPerSecond=279461.690 wallClockMs=5009.631 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4096 targetMapCapacity=8192 observedInvocations=1420000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4096_Hit keyCount=4096 operation=Hit totalOperations=48260000 operationsPerSecond=9651862.171 wallClockMs=5000.071 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4096 targetMapCapacity=8192 observedInvocations=48280000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4096_Miss keyCount=4096 operation=Miss totalOperations=59200000 operationsPerSecond=11837585.606 wallClockMs=5001.020 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4096 targetMapCapacity=8192 observedInvocations=0
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4_Churn keyCount=4 operation=Churn totalOperations=1950000 operationsPerSecond=388852.760 wallClockMs=5014.752 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4 targetMapCapacity=8 observedInvocations=1970000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4_Hit keyCount=4 operation=Hit totalOperations=50780000 operationsPerSecond=10155420.329 wallClockMs=5000.285 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4 targetMapCapacity=8 observedInvocations=50800000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4_Miss keyCount=4 operation=Miss totalOperations=63400000 operationsPerSecond=12679176.361 wallClockMs=5000.325 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4 targetMapCapacity=8 observedInvocations=0
[Standalone] DXM_TARGET_MAP_CONSTRUCTION keyCount=1 wallClockMs=0.000100 operationsPerSecond=9970089.731 gcAllocations=-1 gcAllocatedBytes=-1 targetMapCapacity=4
[Standalone] DXM_TARGET_MAP_CONSTRUCTION keyCount=16 wallClockMs=0.000592 operationsPerSecond=1688654.354 gcAllocations=-1 gcAllocatedBytes=-1 targetMapCapacity=32
[Standalone] DXM_TARGET_MAP_CONSTRUCTION keyCount=256 wallClockMs=0.008175 operationsPerSecond=122324.159 gcAllocations=-1 gcAllocatedBytes=-1 targetMapCapacity=512
[Standalone] DXM_TARGET_MAP_CONSTRUCTION keyCount=4 wallClockMs=0.000221 operationsPerSecond=4520795.660 gcAllocations=-1 gcAllocatedBytes=-1 targetMapCapacity=8
[Standalone] DXM_TARGET_MAP_CONSTRUCTION keyCount=4096 wallClockMs=0.130900 operationsPerSecond=7639.419 gcAllocations=-1 gcAllocatedBytes=-1 targetMapCapacity=8192

@wallstop
Eli Pinkerton (wallstop) merged commit 8ac1992 into master Aug 16, 2026
46 of 47 checks passed
@wallstop
Eli Pinkerton (wallstop) deleted the perf/session-220-paired-deregistration-evidence branch August 16, 2026 01:45
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.

2 participants