test(temporal): D-A3 storage-form 轴补齐 SQL 系——Field.time 遗留扫描 + wasm 驱动两条遗留扫描 (#4191) - #4205
Merged
Merged
Conversation
…he wasm driver (#4191) The legacy-storage sweep — the same rows injected below the write path in the raw pre-convention forms, answered through the read-repair — existed only for driver-sql's datetime cell. Formalize the axis in the spec module doc (the writerForm tag doubles as the per-row legacy seeding basis: native → raw platform-native instant, wire → raw text spelling; no new exports, so consumers pinned to older spec SHAs stay buildable) and add the missing SQL-family cells: - driver-sql: Field.time on un-backfilled legacy storage — INTEGER epoch ms of the epoch-day wall clock (a_midnight = the measured #3994 hazard, INTEGER 0) and full-timestamp TEXT pinned to the boundary day. The seedLegacyTimeRows testkit half existed since #3994 with no consumer; the repair path that closed #3994 now has its own regression lock. - driver-sqlite-wasm: datetime + time legacy sweeps via a local LegacyStorage subclass — the inherited repair seam gets pinned where an inheritance-breaking override would actually surface. Same acceptance rule as the canonical sweeps, cell for cell: identical expected row-id sets. Any cell that differs is a repair-path drift — the signal #3773 / #3994 / #4047 all lacked. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWHvwFgUU2U8M9nbV1g1iQ
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 106 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWHvwFgUU2U8M9nbV1g1iQ
os-zhuang
marked this pull request as ready for review
July 30, 2026 15:25
This was referenced Jul 30, 2026
Merged
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.
按 #4191 的建议形状落地 storage-form 轴的 SQL 系格子(sibling PR:cloud 侧 turso 消费者,见下)。
改动
1. spec —— 把轴正式化,但不加新导出(
temporal-conformance.ts)writerForm标签兼作逐行的遗留播种判定依据(native→ 平台原生 instant 的裸形态,wire→ 未被改写的文本拼写),并钉死Field.time两处歧义(native = epoch 日的 INTEGER epoch ms,a_midnight即 Field.time repeats the #3912 pattern: writes unnormalised, repaired only on read — window filters and ORDER BY are silently wrong on SQLite #3994 实测的 INTEGER 0;wire = 携带 fixture 边界日2026-07-28的全量时间戳文本),让每个消费者播出同样的字节。legacyForm与writerForm1:1 可推导,加字段是冗余;且 cloud 仓按.objectstack-shapin 消费 spec,新导出会让 sibling PR 依赖本 PR 先合并。物理拼写留在各驱动自己的套件里(issue 的「不下沉方言拼写」)。check:docs(250 files in sync)与check:api-surface(unchanged)均绿。2. driver-sql ——
Field.time遗留格(issue 表格里:150缺失的那格)seedLegacyTimeRows/forgetCanonicalTime自 #3994 起就躺在 testkit 里无人消费;现在TEMPORAL_TIME_CASES全量跑在未回填的遗留存储上(INTEGER epoch ms + 全量时间戳 TEXT,marker 已清),修复 #3994 的那条读取路径(sqliteCanonicalTimeSql)从此有了自己的回归锁。3. driver-sqlite-wasm —— datetime + time 两条遗留格
本地
LegacyStorageWasmDriver子类(driver-sql 的 testkit 刻意不出包,跨包复用要么发布测试工具、要么违反 import 规范,故各消费者自带 ~20 行播种子类,与 issue「各驱动注入手法不同」的形状一致)。继承使人默认修复路径「白拿」——这两条 describe 钉的正是「wasm 侧覆盖 knex seam 丢掉修复表达式」只会在这里红的那种回归。验收即轴规则:遗留形态与 canonical 形态的行 id 集合逐格相同。
测试
sql-driver-temporal-conformance.test.ts:61 passed(新增 9 个 time 遗留格)sqlite-wasm-temporal-conformance.test.ts:61 passed(新增 15 datetime + 9 time 遗留格)修改清单综合评估(#4191 全表,本 PR 之后的余量)
:107)seedLegacyTimeRowscollection.insertMany直塞 string/Date混合,绕过syncSchema收敛;建议下一个 PR 单独做initialData/ 持久化恢复形态,测的是 D-E3 的 schema-到达收敛本身matchesFilterCondition)Date/epoch 值。哪些格子应当共享、哪些像$gt-on-datetime 一样是不可共享格,得先按 D-A3.1 的 scope rule 议定,不宜闷头写断言StrategyContext借道 driver 的 coercion);preview 与 formula 同属类型盲,同样先裁决顺带
pnpm --filter @objectstack/spec check:generated目前在 main 上即红:feat(spec): 未在手写文档中出现的 schema 变体让 CI 失败(#4165 反向漂移闸门) #4177 新增的check:variant-docs未进台账分类,对账阶段直接退出。与本任务无关,已按 Prime Directive chore: version packages #10 立项 → check:generated 台账缺check:variant-docs分类——#4177 落地后本地 wrapper 在 main 上直接红 #4203。Closes 无(#4191 分步落地,本 PR 只封 SQL 系格子)。
🤖 Generated with Claude Code
https://claude.ai/code/session_01SWHvwFgUU2U8M9nbV1g1iQ
Generated by Claude Code