Skip to content

fix(engine): handle non-numeric user and group IDs gracefully and support update_github_token config#122

Open
Rat0323 wants to merge 1 commit into
Renyus:masterfrom
Rat0323:fix-session-id-non-numeric-value-error
Open

fix(engine): handle non-numeric user and group IDs gracefully and support update_github_token config#122
Rat0323 wants to merge 1 commit into
Renyus:masterfrom
Rat0323:fix-session-id-non-numeric-value-error

Conversation

@Rat0323

@Rat0323 Rat0323 commented Jun 3, 2026

Copy link
Copy Markdown

This PR fixes a ValueError: invalid literal for int() with base 10 crash/warning log that spams when session_memory_summarizer or reflection runs daily background summaries on non-QQ platforms or WebUI sessions (which use alphanumeric user/session IDs like Rat or webchat!...).

By catching ValueError during the integer casting of the private user ID / group ID, the history fetch functions will now return an empty list ([]) gracefully and skip querying the OneBot API for incompatible text-based IDs, preventing execution failures and console warning spams.

Also fixes a mock-event truthiness issue in test_result_clean.py unit tests where standard MagicMock() objects returned truthy values for any attribute accesses, breaking the newly added is_at_or_wake_command check inside should_clean_result logic.

Additionally, adds support for an optional update_github_token config setting under the update_notify group. If configured, it includes the Bearer token in update check commits requests to lift GitHub's unauthenticated API rate limits and avoid spams of 403 Rate Limit Exceeded warnings on shared or high-frequency checking IPs.

@Rat0323 Rat0323 force-pushed the fix-session-id-non-numeric-value-error branch from 124bd84 to 6650525 Compare June 3, 2026 23:21
@Rat0323 Rat0323 changed the title fix(engine): handle non-numeric user and group IDs gracefully in history fetches fix(engine): handle non-numeric user and group IDs gracefully and support update_github_token config Jun 3, 2026
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