补齐 RSS 旧库 guid 迁移,修复 MCP 管理面序列化与版本显示问题#1126
Open
leavrcn wants to merge 1 commit into
Open
Conversation
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.
背景
在
v6.7.0中,RSS 主链路已经引入guid字段与基于guid的去重逻辑,但旧的 SQLite RSS 数据库在升级后仍可能出现兼容问题。实际排查发现,问题不在于
guid主逻辑缺失,而在于 legacy 数据库的迁移时机不足:rss_schema.sql已包含依赖guid的索引guid列,会在 schema 执行阶段直接报错get_current_config返回包含编译后正则对象时,无法 JSON 序列化get_system_status在版本文件为空或不可用时,未优先回退到包内版本,导致显示unknown本 PR 修复内容
1. 修复配置查询结果的 JSON 序列化问题
get_current_config的返回值增加 JSON-safe 清洗re.Pattern转换为可序列化结构:typepatternflags2. 修复系统版本显示逻辑
get_system_status优先读取trendradar.__version__version文件unknown3. 补齐 RSS 旧库
guid兼容迁移rss_items表补齐guid列guid相关索引在 schema 执行阶段直接失败guid = url回填兼容性说明
v6.7.0已有的 RSS 主链路设计guid去重逻辑测试与验证
Focused tests
语法校验
结果
get_system_status不再错误返回unknownguidguid=url回填