AutoId review fixes: login pack sweep, refused sends kept, flight tag after send

- The login pack was never appraised: at login the PWD snapshot is cold, so ownership
  reads miss, the item classified Unknown and was skipped at 2 s. Unknown now waits
  (WaitSnapshot) until the snapshot has entries or 120 s pass, and a one-shot sweep runs
  at LoginCompleteAtMs + 30 s (and again after a hot reload's MarkAlreadyComplete, which
  restamps login): the player's owned items plus each owned side pack, uncached ones
  added as inventory work. The 5/s inventory cap still applies.
- The drain moved into AutoIdDrain.cs, a pure unit behind IAutoIdWorld, so it runs
  against a fake world in EngineRobustnessTests (cold snapshot for N seconds, then every
  pack item is sent, none before login + 30 s, at most 5 per second).
- A refused EnqueueRequestId keeps the entry, is not counted as sent, ends the tick's
  sending and does not take the inventory rate slot. The priority target is re-armed on
  refusal.
- The flight tag is registered only after _requestId returns true; the pending table is
  256 (MaxRequestIdQueue); IdentifyTagging covers 200 registrations and 200 matches.
- The 4096 pending cap applies only in Limited mode; _incoming is bounded at 16384 while
  DrainTick returns early, dropping the oldest and counting them.
- 0x0022 InventoryPutObjInContainer is read in SmartBoxHooks.ParseGameEvent so it works
  with ServerMessageStream off; ServerMessageStream is back to its base text.
- check_offthread_mutators.py: the stale DrainPending allow-list entry is replaced by
  LiveWorld's Enqueue.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Daniel Wallace 2026-10-12 16:29:54 -07:00
commit c9bbafbfb4
14 changed files with 670 additions and 218 deletions

View file

@ -17,6 +17,8 @@
CastSlot.cs the cast slot refuses during a world transition
CrashExitRule.cs which exit codes are crash exits (not ExitProcess(-1))
AutoIdPolicy.cs AutoIdMode All/Limited/Off: class, minimum age, post-transition defer
AutoIdDrain.cs the AutoId backlog against a fake world: login sweep, cold snapshot,
refused sends kept, bounds
IdRequester.cs the engine-send marker that tags every engine 0xC8
Run: dotnet run -c Release (exit 0 = pass, 1 = fail)
-->
@ -43,6 +45,7 @@
<Compile Include="..\..\src\RynthCore.Engine\Compatibility\CastSlot.cs" Link="Engine\CastSlot.cs" />
<Compile Include="..\..\src\RynthCore.Engine\Compatibility\CrashExitRule.cs" Link="Engine\CrashExitRule.cs" />
<Compile Include="..\..\src\RynthCore.Engine\Compatibility\AutoIdPolicy.cs" Link="Engine\AutoIdPolicy.cs" />
<Compile Include="..\..\src\RynthCore.Engine\Compatibility\AutoIdDrain.cs" Link="Engine\AutoIdDrain.cs" />
<Compile Include="..\..\src\RynthCore.Engine\Net\IdRequester.cs" Link="Engine\IdRequester.cs" />
</ItemGroup>