Skip to content

修复 Tier1 在 Postgres 上 datetime 序列化崩溃#46

Merged
Protocol-zero-0 merged 1 commit into
masterfrom
fix/tier1-datetime-serialization
Jun 12, 2026
Merged

修复 Tier1 在 Postgres 上 datetime 序列化崩溃#46
Protocol-zero-0 merged 1 commit into
masterfrom
fix/tier1-datetime-serialization

Conversation

@Protocol-zero-0

Copy link
Copy Markdown
Contributor

问题

生产(PG)跑圈定后的 Tier1 发现时,agents/paradigm_agent.py 的 _build_structure_prompt 对信号原始行 json.dumps 抛 'Object of type datetime is not JSON serializable',Tier1 全程失败(Tier2 不受影响)。SQLite 时间戳为字符串,测试未暴露。

修复

json.dumps(..., default=str);回归测试:含 datetime 的信号行能正常进 prompt(master 代码上红、本分支绿)。

验证

全套 pytest:15 failed / 506 passed,失败清单为既有 15 条。

_build_structure_prompt 对原始 DB 行 json.dumps 时,PG 返回的
datetime 对象(SQLite 为字符串)抛 TypeError,Tier1 发现整体失败。
加 default=str 保持双后端一致;附回归测试(datetime 行能进 prompt)。
@Protocol-zero-0 Protocol-zero-0 merged commit e98acec into master Jun 12, 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