Repository navigation
test(dogfood): 把 temporal 这条线固化成端到端门禁;docs 审计范围传错时立即报错 - #4077
Merged
Merged
Conversation
…on a mis-scoped docs audit Two follow-ups from the temporal line, both aimed at the same weakness: a failure that is silent is a failure nobody finds. 1. temporal-storage-e2e.dogfood.test.ts — the four verifications that actually caught #3912/#3928/#3994/#4033, turned into a gate. Every one of those bugs passed its own layer's unit tests: the driver, the strategy and the read path were each internally consistent, and what disagreed was what a value physically IS between them. The symptoms were correspondingly quiet — the list showed the row, the chart drew the bar, only the filtered/sorted/ labelled view was wrong. So the assertions run through the real HTTP write and read path: - a date window returns the rows inside it (the original #3912 report was a dashboard dateRange returning empty), and 23:30Z / 00:30Z keep their UTC calendar day — two instants a naive write path shifts in opposite directions, so either direction is caught regardless of host zone; - a temporal column sorts chronologically both ways, and the two directions must differ (a silently-ignored sort would otherwise pass); - every accepted Field.time input shape converges on one stored wall clock, and an equality filter cannot be split by the writer's spelling; - a timeDimensions bucket reaches the caller with its label. Verified adversarially: reverting #4033's projectedDimensions() turns the analytics case red and nothing else, so the gate tests the seam it claims. The suite deliberately does NOT send epoch milliseconds for a time field. The record validator answers that with 400 invalid_time and should — the driver's epoch handling defends an in-process writer binding a Date, not an API client. That boundary is now pinned too, so the driver's leniency is never mistaken for an accepted wire shape. 2. .claude/workflows/docs-accuracy-audit.js — the scope fallback no longer swallows a caller mistake. `args.docs ?: ALL_HANDWRITTEN` covered both "audit everything" and "your args were malformed", and the Workflow tool delivers args verbatim: passing a JSON-encoded string left args.docs undefined, silently widened a 12-doc request to all 147, and burned ~294 agents with nothing in the output saying the scope had been ignored. Omitting args entirely still means a full audit; supplying an unusable args.docs now throws, and the resolved scope is logged either way. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TPxNwPnjcn599ujXpU3ibJ
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
…not the field-level literal `check-error-code-casing` (ADR-0112 D1) flagged the lowercase 'invalid_time' in a comparison position. The literal is a legitimate D6 field-addressed validator code, so an EXEMPT_FILES entry would have been sanctioned — but the assertion is strictly better without it: the standard SCREAMING envelope code plus the offending field name IS the boundary contract, and pinning the field-level code adds no assurance while costing an exemption the next reader has to interpret. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TPxNwPnjcn599ujXpU3ibJ
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.
temporal 线的两项收尾,针对同一个弱点:静默的失败没人会发现。
1.
temporal-storage-e2e.dogfood.test.ts把真正抓到 #3912 / #3928 / #3994 / #4033 的四项验证变成常设门禁。
这几个 bug 有个共同签名,正是单测结构性抓不到的:driver、strategy、读路径各自内部自洽,各层自己的测试全绿;不一致的是「一个值在层与层之间物理上到底是什么」。症状因此都很安静 —— 列表里有这条记录、图上画出了柱子,只有筛选/排序/标签那一面是错的。所以断言全部走真实 HTTP 读写路径:
23:30Z/00:30Z保持 UTC 日历日 —— 这两个时刻会被 naive 写路径往相反方向移动,因此无论宿主时区如何,任一方向的偏移都会被抓到Field.time全部可接受输入形态收敛到同一个存储墙钟,等值过滤不会因写入者的拼法而分裂timeDimensions分桶带着标签返回对抗性验证:把 #4033 的
projectedDimensions()回退后,只有 analytics 那条变红、其余 7 条仍绿 —— 证明这个门测的确实是它声称的那道缝,不是恰好通过。一处刻意的取舍:不发送 epoch 毫秒给 time 字段。校验层对此返回 400
invalid_time,这是对的 —— driver 的 epoch 处理是给内部绑定Date的写入方兜底,不是给 API 客户端的。这条边界本身也一并固化,免得 driver 的宽容被误当成合法的 wire 形态。2.
.claude/workflows/docs-accuracy-audit.js范围回落不再吞掉调用方的错误。
原来
args.docs ?: ALL_HANDWRITTEN同时覆盖了「审全部」和「你参数传错了」两种情况。Workflow 工具原样传递args,所以传成 JSON 字符串时args.docs为undefined,一个 12 篇的请求被静默放大成全部 147 篇、烧掉约 294 个 agent,而输出里没有任何一句提示范围被忽略了。现在:不传
args仍是合法的全量审计;传了但args.docs不可用则抛错;两种情况都会log()出最终范围。六种输入形态逐一验证(隔离验证,没有真跑 workflow —— 那正是要防的那支舰队):
{docs:[a,b]}{docs:"a.mdx"}{docs:[]}{focus:...}无 docs验证
🤖 Generated with Claude Code
https://claude.ai/code/session_01TPxNwPnjcn599ujXpU3ibJ
Generated by Claude Code