Fix autotracker period throttle, Dirty flag, and Lua debugger exception pause#91
Merged
Merged
Conversation
…on pause - MemorySegment.ShouldUpdate: fix inverted comparison that caused updates to spam every poll tick until the period elapsed, then stop permanently - LuaMemorySegment: clear Dirty flag when the Lua callback returns a truthy value so normal period-based throttling resumes after each successful update - LuaDebuggee.EnterExceptionPause: bail early when no DAP session is attached so Lua errors don't trigger debugger pause logic at runtime - Make MemorySegment abstract (OnSegmentDataUpdated was already abstract) Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
MemorySegment.ShouldUpdate: fixed an invertedCompareTosign (> 0→< 0) that caused memory segments to update on every 30 ms poll tick until the period elapsed, then never update again — the exact opposite of the intended throttle behavior.MemoryTimerhad the correct sign the whole time.LuaMemorySegment: the Lua callback's return value is now captured; a truthy result clearsDirtyso normal period-based throttling resumes after each successful update. PreviouslyDirtywas never cleared.LuaDebuggee.EnterExceptionPause: added an early-out guard (HasActiveSession) so Lua errors at runtime don't enter the DAP exception-pause path — including its log line — when no debugger is attached.MemorySegment: made abstract (was already effectively abstract via theOnSegmentDataUpdatedvirtual no-op).Test plan
truecallback stops showing as dirty after the first successful updateEnterExceptionPauselog line appears🤖 Generated with Claude Code