ci(temporal): the non-SQL backends run under a skewed process zone too - #4180
Merged
Merged
Conversation
`driver-sql` has run under `TZ=America/New_York` since #3979, but the other backends the temporal conformance matrix holds to one standard never did — and they are the ones whose correctness rests ENTIRELY on process-zone independence, because they have no server to blame. `storageDatetimeValue` and `storageTimeValue` fold an instant through UTC getters, the filter-token resolver derives "today" from UTC calendar parts, and the analytics bucketer does the same. Swap a single `getUTC*` for its local twin and every one of those shifts by the host's offset, silently — the exact defect ADR-0053 D-C1 records for a `Date` bound to a Postgres TIME column. So core, formula, driver-memory, driver-mongodb and service-analytics now run in the same job under the same skewed zone. Whole suites rather than the temporal files alone, matching the reason the driver-sql step gives: a TZ-sensitive assumption anywhere in a package should fail here before it ships. Both test steps now also ASSERT the process zone is skewed. Nothing did before, so a dropped `TZ:` line would have returned the job to UTC coverage with everything still green — the vacuous pass the live-server suites already close on the SERVER side by asserting a non-UTC server. Verified the guard rejects both `TZ=UTC` and an unset TZ, and accepts America/New_York. Measured before landing: all five suites already pass under America/New_York (-5/-4, with DST), Asia/Kolkata (+05:30) and Pacific/Chatham (+12:45). This found nothing today, which is what a ratchet is for — it makes the property enforced rather than incidental. The job keeps its "live PG + MySQL" name deliberately: the name is the required check, so renaming would silently drop the gate wherever branch protection lists it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TqqZmPS5a4gJGBoCTwipFr
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TqqZmPS5a4gJGBoCTwipFr
os-zhuang
marked this pull request as ready for review
July 30, 2026 14:26
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.
补上温度一致性矩阵的最后一条环境轴:非 SQL 后端此前从未在偏移的进程时区下跑过。
为什么这几个包更需要
driver-sql自 #3979 起就在TZ=America/New_York下运行,但矩阵同样约束的另外几个后端从来没有——而恰恰是它们的正确性完全依赖「与进程时区无关」,因为它们没有服务器可以推责:storageDatetimeValue/storageTimeValue用 UTC getter 折算瞬间把其中任何一个
getUTC*换成本地版本,全都会按宿主偏移悄悄平移——正是 ADR-0053 D-C1 记录的那个缺陷(Date绑到 Postgres TIME 列时按进程时区序列化)。所以 core、formula、driver-memory、driver-mongodb、service-analytics 现在都在同一个 job、同一个偏移时区下运行。跑整包而不只是时间相关的文件,理由与 driver-sql 那一步给出的一致:包里任何一处对时区的隐含假设,都应该在发布前先在这里红掉。
顺带堵掉一个空转风险
两个测试步骤现在都会断言进程时区确实是偏移的。此前没有任何东西做这件事——删掉一行
TZ:,整个 job 会退回 UTC 覆盖而依然全绿。这与活库套件在服务器侧断言非 UTC 是同一条纪律,只是进程侧一直缺着。守卫已实测:
TZ=UTC与未设置 TZ 都以退出码 1 拦下,America/New_York放行。诚实的结论:今天它什么也没抓到
落地前我先在本地量过:五个套件在 America/New_York(−5/−4,含 DST)、Asia/Kolkata(+05:30)、Pacific/Chatham(+12:45)三个时区下全部通过。
所以这是棘轮而非捉虫——它把「折算一律走 UTC」这条性质从「碰巧正确」变成「被强制」。这一点值得写明,而不是把 job 说得像发现了什么。
一处刻意不改
job 的名称仍是「Temporal Conformance (live PG + MySQL)」,尽管它现在也跑非服务器的包。名称就是 required check,改名会在分支保护引用它的地方悄悄丢掉这道闸——该文件自己在 dogfood 分片处就警告过这个陷阱。已在 job 注释里写明范围已扩大。
无包变更,故无 changeset。
Refs #4081、ADR-0053 D-A3 / D-C1。
🤖 Generated with Claude Code
https://claude.ai/code/session_01TqqZmPS5a4gJGBoCTwipFr
Generated by Claude Code