Skip to content

Fix autotracker period throttle, Dirty flag, and Lua debugger exception pause#91

Merged
emosaru merged 1 commit into
mainfrom
claude/thirsty-ramanujan-411597
May 14, 2026
Merged

Fix autotracker period throttle, Dirty flag, and Lua debugger exception pause#91
emosaru merged 1 commit into
mainfrom
claude/thirsty-ramanujan-411597

Conversation

@emosaru
Copy link
Copy Markdown
Contributor

@emosaru emosaru commented May 14, 2026

Summary

  • MemorySegment.ShouldUpdate: fixed an inverted CompareTo sign (> 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. MemoryTimer had the correct sign the whole time.
  • LuaMemorySegment: the Lua callback's return value is now captured; a truthy result clears Dirty so normal period-based throttling resumes after each successful update. Previously Dirty was 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 the OnSegmentDataUpdated virtual no-op).

Test plan

  • Connect an autotracker and verify memory segment callbacks fire at their configured period (not every 30 ms)
  • Confirm a segment with a returning-true callback stops showing as dirty after the first successful update
  • Trigger a Lua error with no DAP debugger attached — confirm no EnterExceptionPause log line appears
  • Trigger a Lua error with a DAP debugger attached and exception-break enabled — confirm pause still works

🤖 Generated with Claude Code

…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>
@emosaru emosaru requested a review from a team May 14, 2026 08:03
@emosaru emosaru merged commit 9c7267c into main May 14, 2026
3 checks passed
@emosaru emosaru deleted the claude/thirsty-ramanujan-411597 branch May 14, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant