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:
parent
44765436cd
commit
c9bbafbfb4
14 changed files with 670 additions and 218 deletions
|
|
@ -420,15 +420,21 @@ internal static unsafe class Program
|
|||
Out(c, Identify(Corpse));
|
||||
Has(Last(c), "[cli]", "a send without a requester is not registered");
|
||||
|
||||
// 64 sends in a burst do not push out other engine calls (their own table).
|
||||
// 200 sends in a burst (a full RequestId queue drained at once) do not push out other
|
||||
// engine calls (their own table), and every one of them is matched.
|
||||
c.EngineCall("UseObject", Corpse, 0);
|
||||
for (uint i = 0; i < 64; i++) c.EngineSend((byte)IdRequester.AutoIdWorld, 0x80100000 + i);
|
||||
for (uint i = 0; i < 200; i++) c.EngineSend((byte)IdRequester.AutoIdWorld, 0x80100000 + i);
|
||||
Out(c, Use(Corpse));
|
||||
Has(Last(c), "[eng] Use", "an identify burst leaves the pending use intact");
|
||||
Out(c, Identify(0x80100000 + 63));
|
||||
Has(Last(c), "[eng:autoid-world]", "the newest send of the burst still matches");
|
||||
Out(c, Identify(0x80100000));
|
||||
Has(Last(c), "[eng:autoid-world]", "and so does the oldest: 64 sends inside the match window all keep their slot");
|
||||
long foreignBefore = c.IdentifyForeignTotal;
|
||||
int matched = 0;
|
||||
for (uint i = 0; i < 200; i++)
|
||||
{
|
||||
Out(c, Identify(0x80100000 + i));
|
||||
if (Last(c).Contains("[eng:autoid-world] IdentifyObject", StringComparison.Ordinal)) matched++;
|
||||
}
|
||||
Eq(matched, 200, "200 registrations, 200 tagged identifies (oldest to newest)");
|
||||
Eq(c.IdentifyForeignTotal, foreignBefore, "none of the burst counted as foreign");
|
||||
|
||||
foreach (IdRequester who in Enum.GetValues<IdRequester>())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue