Repository navigation
fix(history): ISO 时间校验日历日期,插件版本升到 0.15.25-shared.6 - #16
Merged
Merged
Conversation
Date.parse 会把超出当月的日数顺延到下个月,例如 --until 2026-02-30T23:00:00Z 被当成 3 月 2 日,时间窗被悄悄放宽。 现在纯日期和 ISO 时间都先校验写出的年月日,不存在的日期报 "is not a calendar date";小时、时区等其余部分仍交给 Date.parse。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
发布 PR #15 新增的 bin/transcripts.mjs 与本次日期校验修复,两个 manifest 按 docs/guide/01-setup.md 的要求一起升级。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f50147c919
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
上一提交用本地 new Date(y, m, d) 校验日期,ISO 时间因此被两类情况误拒: 0000–0099 年会被构造函数映射到 1900 年代,本地日历跳过的日子(如 Pacific/Apia 的 2011-12-30)对 UTC 时间也判无效。改为按 Date.parse 所用 的前推格里历做纯算术校验;纯日期的本地零点改用 setFullYear 构造,0050-01-01 这类纯日期也不再被误拒。四个时区下 24 组常规输入与 main 结果一致。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
处理 #15 里 Codex review 的两条未处理意见。
日期校验:
bin/transcripts.mjs只对纯日期(2026-02-30)做了日历校验,ISO 时间直接交给Date.parse,而 V8 会把超出当月的日数顺延到下月:--until 2026-02-30T23:00:00Z实际变成2026-03-02T23:00Z,时间窗被悄悄放宽。现在两种写法都先按Date.parse所用的前推格里历做纯算术校验(不经过本地时区和Date构造函数),不存在的日期报is not a calendar date;小时越界、时区等仍由Date.parse处理。纯日期的本地零点改用setFullYear构造,顺带修好0050-01-01这类 0–99 年纯日期被误拒的旧问题。scripts/transcripts.test.mjs新增:2026-02-30T23:00:00Z、2026-04-31T00:00判非日历日期;0000-01-01T00:00:00Z、TZ=Pacific/Apia下的2011-12-30T12:00:00Z(萨摩亚本地跳过的日子)、纯日期0050-01-01按原样解析。各例在对应修复前失败、修复后通过。版本号:#15 新增了运行时 helper 但两个 manifest 停在
0.15.25-shared.5,按docs/guide/01-setup.md一起升到0.15.25-shared.6。本机 Claude 目录型 marketplace 与 Codex 同版本覆盖安装其实已拿到新代码,升版本主要是遵守发布流程、照顾按版本判断更新的安装方式。验证:
PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH" bash scripts/check.sh→all checks passed.(fork guards、75 个 Node 测试、Python 测试 18+8+9+22+26、Bun 111 个、runtime 产物与源码一致)🤖 Generated with Claude Code