Repository navigation
Preserve checked client snapshots / 保留受检客户端快照与有界恢复 - #73
Merged
Merged
Conversation
This was referenced Oct 8, 2026
Merged
Replace removed core names some? and add-watch/remove-watch with non-nil? and add-watch!/remove-watch!; alpha.23 carries the short-circuit proof fix (calcit#1865) that unblocks recollect patching. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
tiye
force-pushed
the
fix/checked-patches-62
branch
from
October 9, 2026 13:31
4b30d73 to
2b7fb6d
Compare
tiye
marked this pull request as ready for review
October 9, 2026 16:53
This was referenced Oct 9, 2026
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.
中文
关联 #62、calcit-lang/calcit#1529/#1865、mvc-works/ws-edn.calcit#53。基于已合并 #69,目标分支为 main;不再受 alpha.20 短路证明问题阻塞。本 PR 包含 #74 的四处已获授权非空判断迁移,避免重复合并。
实现
try-patch-twig,不在应用复制 op/path/index 校验。app.client-state依次校验 envelope、change-op、安全执行 patch、deep decode ClientStore。错误只暴露阶段 tag。ClientSnapshot一次提交 raw base 与 typed ClientStore;组件直接消费解码结果,避免重新退化为 Dynamic。:on-error:非文本帧、非法 EDN 和连接错误进入:wire恢复阶段,既不读取也不输出宿主错误对象;patch/深层 decode 保留各自阶段。some?与 watcher 旧入口已迁移。没有改模块缓存、扩大业务 schema、增加 unsafe 或调整质量 baseline。验证
当前修复 HEAD:
83bf05b3d32e42b327785eef310cf5e01f3cff1e。使用 crates.io CLI/npm alpha.23、Node 24.4.1 与正常 Caps 安装的模块。fix --workflow strict --verify、双入口 check-only、client/server 原全部 check-public(含新增 namespace)、format 与 diff 检查通过。[ws-edn/message] expected a text WebSocket message;修复后非文本和非法 EDN 均不逃出回调,raw/typed 快照对象保留、至多一次恢复连接、拒绝中间增量、完整快照恢复、无业务 dispatch 或私有输入日志。83bf05b的完整 CI 37962214824 已成功,包括原 strict、全部测试、构建及 PR preview;没有复用旧提交的绿灯。仍需外部 review 后合并。路由 payload 等剩余开放边界归 #63,不在本 PR 伪称完成;本 PR 也不代表 alpha.24 或稳定版最终消费者验收。
English
Refs #62, calcit-lang/calcit#1529/#1865 and mvc-works/ws-edn.calcit#53. Based on merged #69 and now targeting main. The alpha.20 short-circuit proof blocker is resolved. This includes the four authorized nil-predicate migrations from #74, avoiding duplicate merge work.
Implementation
Reuse published Recollect 0.0.57
try-patch-twig. A pure boundary validates envelope and operations, applies the checked patch and deep-decodes ClientStore.ClientSnapshotatomically commits raw patch base and typed store; components consume the typed value. Failures preserve the last valid snapshot, allow at most one recovery connection per cycle, and require a full root replacement before accepting more increments.Published ws-edn 0.0.37 now feeds non-text frames, invalid EDN and connection errors through its existing on-error callback into the application's
:wirerecovery stage. Opaque host errors are neither inspected nor logged; patch/decode retain separate stage tags. Use the published alpha.23 CLI/npm pair containing the general short-circuit proof repair, with obsolete nil/watcher names migrated. No module-cache edits, business-schema widening, added unsafe or baseline changes. Wire/storage protocols remain unchanged; refresh the page for the new in-memory StorePayload representation.Verification
Repair HEAD:
83bf05b3d32e42b327785eef310cf5e01f3cff1e. Actual crates.io/npm alpha.23, Node 24.4.1 and normally installed published dependencies.Original strict workflow, both entries, all client/server public checks including the new namespace, format and diff checks passed. Original 73 native attached tests, 58 identical-AST JS replays, eight browser contracts and credential/dispatch/date/wire tests passed. New host assertions failed before the fix on the unhandled non-text frame, then passed after the fix: preserved raw/typed snapshot identity, bounded reconnect, rejected intermediate increments, full-snapshot recovery, no business dispatch or private-frame logging. Original JS/Vite build passed with the unchanged budget and an existing 729.30 kB chunk warning.
Latest HEAD
83bf05bpassed full CI 37962214824, including original strict, all tests, build and PR preview. External review is still required. Route/open UI boundaries remain under #63. This PR does not claim final alpha.24/stable consumer acceptance.