- The flight tag is registered BEFORE _requestId again, so a 0xC8 that AC puts on the
wire inside the call is still tagged. EngineSend returns a token; a call that returns
false or throws hands it to EngineSendFailed, which retires the entry (a no-op once it
was matched, or when the slot now holds another id). FlightRecorderTests: a synchronous
send is tagged, a failed send leaves no live entry, a retire for another id or a bad
token is a no-op.
- Inventory sends wait (WaitCombat, kept, counted once) while a target is selected, a
cast is in flight (CastGate.GetCastBusyState) or an attack runs
(ClientActionGates.TryReadAttacking). Each 0xC8 raises AC's busy count, which plugins
gate casts on. The selected target and an open container are not held; All mode is
unchanged. combat= in the minute line, combat in /rc autoid status.
- The login sweep looks into containers only (ItemsCapacity > 0 in the PWD snapshot, the
engine's own pack rule), skips a tick while the pending list is full, and is marked
done only when nothing overflowed; otherwise it runs again once there is room.
- CollectOwnedIdsFromSnapshot has its doc comment back; HasPwdSnapshot and the new
IsContainerInSnapshot have their own. LiveWorld's send is renamed QueueIdentify and
block-bodied, so check_offthread_mutators.py scans it and its allow-list entry no
longer also covers the create-path Enqueue.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- 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>
A client crashed at login inside AC's CreateObject handling during the login create burst,
47 s after start, while pack items were being appraised at about 30 a second. Pack
appraisals now stay out of that burst.
- Login-complete counts as a transition. LoginLifecycleHooks.LoginCompleteAtMs (0 before
login and after a logout; a hot reload marks it at the reload). Container and Inventory
appraisals wait until 30 s after the later of login-complete and the last settle window
(AutoIdPolicy.TransitionEndMs), and are deferred while login has not completed. A
container opened after that point is still not deferred. The selected target is exempt.
- Inventory sends are capped at one per 200 ms (5 a second; AutoIdPolicy.InventoryRateAllows,
Verdict.WaitRate). Limited mode only; containers, the target and All mode are not capped.
- "rate" skip counter in /rc autoid and the per-minute line.
Tests: login defer (before, at, through and after login-complete; later-of with a portal;
the opened-container exemption; target exempt), the inventory rate (interval boundary and a
simulated drain never exceeding 5 in any second while reaching 5), the decision table with
the rate input.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A flight capture from one 26-minute session showed the client sending 3211 IdentifyObject
(0xC8) messages, most of everything it sent, because AutoId appraised every object the
client created. Bots already appraise at the point of use, so the background appraisals
are now limited.
AutoIdMode (engine.json "AutoIdMode", default Limited; /rc autoid all|limited|off, live
and saved; /rc autoid alone reports it):
All the old behaviour.
Limited only the selected target (fresh-cache skip), items in the container the
player has open now, and items in the player's own inventory with nothing
cached. The last two wait until the object is 2 s old and until 30 s after a
world transition's settle window ends (death, portal, teleport, landblock jump;
walking into the next landblock never defers). A container opened after the
settle ended is not deferred. Creatures, ground items, other players: never.
Off nothing, the selected target included.
Plugins' own RequestId calls are not limited; they still merge in the RequestId slot.
The decision is AutoIdPolicy (pure). AutoIdService now keeps a pending list on its drain
timer (waits for age/defer stay, skips leave), classifies each candidate from the PWD
snapshot (container / wielder / side pack owner, and the ground container from
ViewObjectContents), takes InventoryPutObjInContainer (0x0022) moves from the server
message stream, and rescans an opened container 2.5 s after the open.
Requester tagging: a thread-local EngineSendMarker around every engine RequestId call
(AutoId by class, plugin host API, the login self-identify, the Inventory panel hover).
A queued request carries its requester in PendingIdQueue and the main-thread drain
re-enters the marker around the real send. Only a marked send registers with the
flight recorder (FlightCapture.EngineSend, its own 64-entry table so bursts never evict
other engine calls), so its 0xC8 shows as [eng:autoid-target|autoid-container|
autoid-inventory|autoid-world|plugin|self|ui]; an unmarked 0xC8 stays [cli] and counts
as AC's or Decal's.
Per-minute log line "autoid 60s: ..." (its own line, not part of "hb #"): sends by
requester, cli, total, AutoId skips by reason (mode, age, defer, fresh), pending.
EngineSettings keeps upstream's MaxHotReloads, IltServerNames/IltHosts, ReportEndpoint
and CloseOnServerDisconnect next to AutoIdMode (owned keys, load and save).
Tests: EngineRobustnessTests (decision table against an independent expected function,
spot cases, defer window from WorldTransitionState inputs, classification, marker scopes
and thread-locality, requester through PendingIdQueue, heartbeat field names against the
launcher regex), FlightRecorderTests (identify tagging, foreign count, match window, burst),
EngineSettingsTests (AutoIdMode round trip, default left out). check_offthread_mutators.py:
DrainPending allow-listed like DrainTick (it only enqueues).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Native crash logger
- Per-address slots keep hit counts and a last-write tick; a repeat relogs at powers of
two, after 30 s, or for any non-AV code. The oldest noise slot is evicted when the
table is full.
- The logger checks its dedupe first, caches the module table, and opens the log
handle once at install. Managed-noise bucket (coreclr, clrjit, System.Private.CoreLib).
Main-thread queue
- The action ring (ActionRing) rejects non-teardown work during a world transition and
reserves its top 32 slots for teardown, so a stop is never lost behind held work.
IsTeardownKind is shared by the enqueue and drain sides. ActionRing.TryPeekAt lets the
cast drain's StopQueuedAtOrBefore walk the ring it no longer owns directly; the walk
now checks every queued entry, since an entry's time is taken before the ring's lock.
- MutatorGate: every AC-mutating helper opens with the same gate,
AcMainThreadQueue.MustQueue(teardown: X); IsDraining and ShouldDefer added; teardown
helpers are exempt from the hold. tools\check_offthread_mutators.py accepts MustQueue
as the gate (it asks MainThreadGuard.IsOnMainThread itself).
- MasteryFeed and VaultFeed pause during a transition. The heading slot drops a stale
heading; the overlay select is kept.
- RequestId never merges into an entry queued at or before the last transition hold;
EnqueueRequestId returns false during a transition.
- 0xF751 PlayerTeleport starts the 5 s settle window.
- Cast slot: the queue time and Pending are published with Volatile.Write (a plain 64-bit
store can tear on x86 and the drain reads both without the lock); the stop-wait flag is
reset before the publishing store.
Appraisals
- Appraisal data survives a client release for 10 min (bounded at 4096); evicted on
server delete (0xF747) and at session clear. 0xF747 is detected in SmartBox dispatch,
independent of capture.
Dumps
- Dump start/end markers in the log; the launcher holds its wedge kill while a dump is
in progress (DumpInProgressRule). The in-progress flag is cleared only when the writer
thread exits.
- The OOM dump triggers only on the main thread with AC's exact text, before stacks are
built. Dumps are pruned only after a successful write, and other live clients' dumps
are kept. CrashDump reads the file length before Delete.
- ExitProcess/RtlExitUserProcess detours forward crash codes first.
- The message box count is decremented first in a finally; 30 s safety reset when no box
is visible on the main thread.
- UsageStats counts the loader's CoreCLR fatal-error dumps (Logs\dumps\clr_*.dmp) as
crashes alongside crash_*.dmp.
Tests: EngineRobustnessTests, CrashLogFilterTests, UsageStatsTests.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Appraisals
- RequestId slot merges a pending request for the same object (PendingIdQueue), as the
QueryHealth slot does.
- AutoId: per-object last-sent time kept across client releases; no re-appraisal within
10 min while the data is cached, unless the server deleted the object (0xF747). Map
bounded at 8192 with a prune off the create path. The sent mark is set at the real
send in DrainRequestIds, not at queue time.
- The selected-target priority appraisal is skipped when its data is cached and fresh.
Main thread frozen
- Plugin ticks pause while AC's main thread is frozen (a main-thread message box, or no
beat for the hang watchdog's threshold); events keep flowing. Exposed through
GetEngineStatusJson (mainThreadFrozen, mainThreadStallMs, pluginTicksPausedMs) and the
heartbeat (pump=paused).
Crashes
- AC's OUT OF MEMORY box: one full-memory dump to <install>\Dumps before the box shows,
newest 3 kept.
- Native crash logger: pid, tid and date per entry; once per address; .NET Framework
AVs never charged to the limit; last-chance handler; stack overflow and heap
corruption codes. Build-SehTrampoline gains -NoDeploy.
- ProcessExitHooks: dead fail-fast detours removed; crash exit codes pass straight
through TerminateProcess/NtTerminateProcess.
- CoreCLR's own crash dump is left to the loader's existing ConfigureCrashDumps
(Loader.c, Logs\dumps\clr_*.dmp) and Publish-EngineCoreClr's createdump/DAC
handling; this change adds no second setup.
World transitions
- AcMainThreadQueue holds queued game-mutating work while the player is dead, in portal
space, or within 5 s after either or after a non-adjacent landblock jump. When the
window ends, stale casts, uses, selects and appraisals are dropped and stops and
cancels run in order. Walking across an adjacent landblock border never gates.
State is re-sampled after AC's tick, before the post-tick drain.
- Inventory panel actions are held during a transition too.
Diagnostics
- Heartbeat valargest= (largest free VA block); free and largest logged before and after
each plugin load and unload.
- CastSpell comments corrected to the actual main-thread paths.
Tests
- tools\EngineRobustnessTests and native\SehTrampoline\tests\CrashLogFilterTests.c.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A snapshot of the working tree for aelrynth.com/git/: the code, build files
and public docs. Internal review notes and agent instructions are left out.
MIT licensed; see LICENSE.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>