Add safety timeout for slist capture#102
Open
rodarvus wants to merge 1 commit into
Open
Conversation
SendSlistCommand sets a one-shot gate (slistCommandSent = true) when
it enables the HSPslistCapture trigger group and sends "slist hsp",
expecting HSP_stop_sList to fire on the {/spellheaders} closing tag.
If that output never arrives -- lag, link flap, a conflicting plugin
gagging the close, etc. -- the gate stays locked forever and the
plugin silently never refreshes its spell list.
Schedule a 10-second safety timer when the request is sent. On normal
completion HSP_stop_sList deletes the timer, so the recovery path
never runs. On interruption the timer fires, disables the trigger
group, and clears the gate so the next char.status broadcast can
re-request slist.
Co-Authored-By: Claude Opus 4.7 (1M context) <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
SendSlistCommandinSpellupRecast/Hadar_Spellups.xmlsets a one-shot gate (slistCommandSent = true) when it enables theHSPslistCapturetrigger group and sendsslist hsp, expectingHSP_stop_sListto fire on the closing{/spellheaders}tag and clear the in-progress state. If that closing tag never arrives — heavy lag, link flap, a conflicting plugin that gags the close, an interrupted slist mid-stream — the gate stays locked, the trigger group stays enabled, and the plugin silently never refreshes its spell list for the rest of the session. Three other call sites (fullspellupresetand friends) reset the gate manually, but a user who hits an interrupted slist has no way to know that's the cause.This adds a 10-second safety timer. On normal completion,
HSP_stop_sListdeletes the timer and behavior is unchanged. On interruption, the timer fires, disables the trigger group, and clears the gate so the nextchar.statusbroadcast can re-request slist.Diff overview
In
SendSlistCommand:In
HSP_stop_sList(cancel on success):New function (only runs on timeout):
The timer pattern matches the existing
rcwarningtimers in this file (timer_flag.Enabled+timer_flag.OneShot+timer_flag.Replacewith a script-callback function name).Test plan
fullspellupresetthen anychar.statusbroadcast).HSP_stop_sListfires on{/spellheaders},DeleteTimercancels the safety timer, no debug log line about resetting the gate.🤖 Generated with Claude Code