fix: parseDueDate 增加合理性校验 - #131
Merged
Merged
Conversation
- 解析完时间戳后校验:不能是过去、不能超过 1 年后,否则报错并附带人类可读日期 - create/update 响应回显 YYYY-MM-DD 日期,方便调用方立刻发现异常 - 测试改用动态时间戳,避免硬编码日期过期导致 CI 失败 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
lishuceo
force-pushed
the
feat/claude-session-cff7db
branch
from
March 10, 2026 11:29
0af6dd7 to
56bc4d1
Compare
|
Claude finished @lishuceo's task in 1m 28s —— View job PR Review: parseDueDate 合理性校验
|
将过期校验的基准从当前时间改为当天 UTC 午夜, 避免设置全天任务截止"今天"时被误拒。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @lishuceo's task in 1m 20s —— View job PR Review: parseDueDate 合理性校验 (re-review after sync)
✅ Approved1 previous issue fixed: "today" dates are now correctly allowed by aligning the comparison to No new issues found. The changes in this sync commit cleanly address the previous review feedback:
|
lishuceo
added a commit
that referenced
this pull request
Apr 8, 2026
* fix: parseDueDate 增加合理性校验,防止错误时间戳静默传入飞书 API - 解析完时间戳后校验:不能是过去、不能超过 1 年后,否则报错并附带人类可读日期 - create/update 响应回显 YYYY-MM-DD 日期,方便调用方立刻发现异常 - 测试改用动态时间戳,避免硬编码日期过期导致 CI 失败 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: parseDueDate 允许"今天"作为截止日期 将过期校验的基准从当前时间改为当天 UTC 午夜, 避免设置全天任务截止"今天"时被误拒。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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
parseDueDate()解析完时间戳后增加合理性校验:不能是过去、不能超过 1 年后YYYY-MM-DD人类可读日期,方便调用方立刻发现异常Background
创建飞书任务时传入
due: "2026-03-13"+is_all_day: true,工具产生了错误的时间戳1728000000(对应 2024-10-04),飞书 UI 按毫秒级解释后显示为 1970 年。根因是工具对解析结果缺少合理性校验,错误值静默传入了 API。Test plan
🤖 Generated with Claude Code