fix: store channel list config values as strings to prevent deseriali…#366
Closed
modship wants to merge 1 commit intoRightNow-AI:mainfrom
Closed
fix: store channel list config values as strings to prevent deseriali…#366modship wants to merge 1 commit intoRightNow-AI:mainfrom
modship wants to merge 1 commit intoRightNow-AI:mainfrom
Conversation
…zation failures Discord guild IDs (and other numeric IDs) were parsed as TOML integers by upsert_channel_config(), but the config structs expect Vec<String>. This caused "invalid type: integer, expected a string" errors when loading config. - Always serialize FieldType::List items as TOML strings - Align TelegramConfig::allowed_users from Vec<i64> to Vec<String> for consistency - Add deserialize_string_or_int_vec helper on all 22 channel Vec<String> fields for backwards compatibility with existing config files containing integers
Member
|
Implemented in v0.3.25. Channel config deserialization fixed with deserialize_string_or_int_vec helper applied to all Vec ID fields across 20 channel configs. |
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.
Discord guild IDs (and other numeric IDs) were parsed as TOML integers by upsert_channel_config(), but the config structs expect Vec. This caused "invalid type: integer, expected a string" errors when loading config.
Summary
When I configure Discord through the web interface, everything seems fine, but the backend reports an error.
2026-03-06T09:49:01.868039Z WARN openfang_kernel::config: Failed to deserialize merged config, using defaults error=invalid type: integer 1171XXXXXXXXXXXXX718, expected a string in channels.discord.allowed_guilds path=/data/config.tomlChanges
Testing
cargo clippy --workspace --all-targets -- -D warningspassescargo test --workspacepassesSecurity