fix: WAL mode, results post UX, proactive session cleanup#129
Merged
adrunkhuman merged 1 commit intomasterfrom Mar 21, 2026
Merged
fix: WAL mode, results post UX, proactive session cleanup#129adrunkhuman merged 1 commit intomasterfrom
adrunkhuman merged 1 commit intomasterfrom
Conversation
…119) - Enable SQLite WAL mode in Database.initialize() with fallback warning - Fix PostResultsConfirmView buttons to separate interaction ack from channel.send so a send failure uses followup instead of double-messaging - Add WorkflowStateStore.cleanup_all_expired() covering all session and cooldown dicts; wired to a new 5-minute background task - Fix pre-existing dead code: cog_unload() is not called on Bot subclasses; replaced with async close() that also awaits task cancellation before shutting down - Add before_loop guards on both background tasks so they wait until ready Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
🚅 Deployed to the matchday-typer-pr-129 environment in patient-quietude
|
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
Database.initialize()with a warning if SQLite silently falls back (e.g. read-only fs)PostResultsConfirmViewbuttons: separate interaction acknowledgment fromchannel.sendso a send failure produces a followup rather than a confusing success+failure double-messageWorkflowStateStore.cleanup_all_expired()sweeping all session and cooldown dicts, called by a new_cleanup_sessions_taskbackground loop every 5 minutesBonus fix (no issue):
cog_unload()is never called onBotsubclasses — it's aCoglifecycle hook. This was pre-existing dead code; task cancellations were silently never running. Replaced withasync def close()which awaits task cancellation before teardown, and addedbefore_loopguards on both tasks so they wait until ready.Test plan
uv run pytest— 272 passed, 1 skipped/admin results postconfirm view — single message, no double-error on send failuresqlite3 typer.db "PRAGMA journal_mode;"returnswalafter first startupSession cleanup removed N expired DM session(s)after sessions age outCloses #87
Closes #91
Closes #119
🤖 Generated with Claude Code