Repository navigation
Log the player's vital updates and death-teleport arrivals - #331
Merged
Merged
Conversation
A character left at the lifestone with 0 health after a death stayed there for hours until a relog, and the client log could not say why: the server's health restore may have been refused by the client (no item record, or an older sequence than the one held), or login complete may never have ended the server's portal space. Neither left a line. Now the client log gets, with no change to what is taken or refused: - every vital update of the player's own, its value, sequence and what the world did with it (taken, or refused and why, with both sequences); - any other refused update of the player's own, once per property every 10 s; - login complete going out at a teleport's arrival, or the login's held one released by it and then sent; - one warning when the health is still 0 on the session clock 30 s after an arrival that followed a death, naming the last health update. The world notes what it did; the session turns the notes into a new HostEvent::Diagnostic, which the console prints and the multi-session host also writes to the client log without --console. The lines are documented in launch-options.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of the death-recall logging. A farming bot gets several taken vital updates a second from regeneration and combat; logging all of them would cycle its client log in under two days. Taken vital updates are now logged only while a death is watched (from the health seen at 0 until it comes back, or until a still-dead warning was written); refusals are always logged, other kinds still at most once per property every 10 s. A session that never dies writes no vital lines. The still-dead warning after an arrival kept moving its deadline with every later arrival, so a bot recalling more often than every 30 s while dead never got it; the first arrival now sets the time and a later one only changes the teleport it names. A death followed by no arrival at all (the client never arrived, so never sent login complete) now warns once after 60 s. The health coming back ends the death and anything pending for it; the separate died flag is gone. The runner sends the held login complete through the session state, so it cannot go out without its line. A test through the runner was not practical: the runner loop can only be built over a live connection, and the loopback harnesses reach the held path only with a window that draws the world or with the game data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Logging only, with no behaviour change. When a character is next left at 0 health at the lifestone after a death, these lines should show which of two things happened:
New client-log lines
They use the console's
--notice style and go toclient.logwith or without--console.-- vital: health 140 (id 2) seq 17: refused, sequence 17 vs held 18; health now 147-- vital: health 147 (id 2) seq 3: refused, not in items; health now unknown-- vital: stamina 90 (id 4) seq 5: refused, no player guid; stamina now unknown-- vital: health 0 (id 2) seq 20: taken; health now 0-- quality: own Int property 25 seq 9: refused, sequence 9 vs held 40 (2 more refused since the last line)-- login complete sent: teleport 3 arrived at 0x81640007-- still dead 30 s after the death teleport 5 to 0x81640007 (last health update: s=50.000, 0, taken)-- still dead 60 s after dying with no teleport arrival (last health update: ...)One change from the original request: taken vital updates are not logged every time. The request assumed they are rare. They aren't: ACE sends regeneration updates every few seconds, and one per hit or cast in combat. Logging all of them would cycle a farming bot's 8 MiB of
client.login under two days. Refusals are always logged. Taken updates are logged only around a death, which is the window that matters.How it works
session/vital_watch.rs, rate-limits those notes, remembers the last health update and runs the death timers.HostEvent::Diagnostic(String).QualityStamps::heldlets a refusal name the sequence it was compared against.What reading the code found (not yet confirmed live)
Player_Death.csandPlayer_Location.cs. So arefused, sequence N+1 vs held N+2line right after atakenline for the same 75% value is normal on every death, not the bug.Tests
session::vital_watch,session::state,world::tests, andac-core's quality stamps.scripts/check.ps1passes. One earlier full run crashed inac-render's GPU tests with an access violation. This PR doesn't touchac-render; those tests passed run alone (849/849), and the next full run passed.SessionState::send_held_login_complete, which a test pins.🤖 Generated with Claude Code