From a90e829a8c45cf78c788c2713dc3594d13ba93d8 Mon Sep 17 00:00:00 2001 From: tiye Date: Fri, 16 Oct 2026 20:50:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=20Tabletwo=20=E5=88=B0=20Cal?= =?UTF-8?q?cit=200.30.1=20=E9=85=8D=E5=AF=B9=E8=BF=90=E8=A1=8C=E5=B9=B6?= =?UTF-8?q?=E6=B8=85=E7=90=86=E6=97=A7=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/upload.yaml | 1 + README.md | 27 ++++++++++++------- calcit.cirru | 50 +++++++++++++++++------------------ deps.cirru | 25 +++++++++--------- package.json | 2 +- yarn.lock | 10 +++---- 6 files changed, 61 insertions(+), 54 deletions(-) diff --git a/.github/workflows/upload.yaml b/.github/workflows/upload.yaml index 8c449c8..6218ba7 100644 --- a/.github/workflows/upload.yaml +++ b/.github/workflows/upload.yaml @@ -57,6 +57,7 @@ jobs: calcit calcit.cirru --check-only --warn-dyn-method calcit calcit.cirru --entry server --check-only --warn-dyn-method calcit calcit.cirru fix --workflow strict --verify --format edn + calcit calcit.cirru analyze weak-types --only deprecated-call --format json | jq -e '.data.summary.calls == 0' calcit calcit.cirru test --exclude-tag server-effect --require-match --summary-only calcit calcit.cirru --entry server test --tag server-effect --require-match --summary-only diff --git a/README.md b/README.md index 6dbb352..d1142c9 100644 --- a/README.md +++ b/README.md @@ -12,16 +12,19 @@ `package.json` 中的 `@calcit/procs` 必须与它精确配对。 模块使用 `deps.cirru` 中的正式 tag,npm 新包安装保留一小时隔离。 -当前 CLI / `@calcit/procs` 精确配对正式 0.30.0。本轮为 0.30.1 迁移准备, -将应用和原测试的底层 Map 读取改为公开 `get` / Option 接口;缺失值仍还原为 +当前 CLI / `@calcit/procs` 精确配对 0.30.1-alpha.4,并已执行实际运行验收, +不是只读兼容性探测。前轮已将应用和原测试的底层 Map 读取改为公开 `get` / Option 接口;缺失值仍还原为 原来的 nil,保留现有 decoder、false、0 和默认值,不新增统一包装或强转。 段落排序使用类型化 `MapEntry` 保留 String key。拖放缺少 target/base 时明确报错; 同时修复原 `update` 把嵌套 session 路径当单键、移动后未更新编辑光标的问题, 改用 `update-in` 并处理 Option 输入,Number session key 不变。 排序键依赖使用正式 Bisection Key 0.0.32,并同步正式 std 0.2.43,避免严格图中 -根依赖仍固定旧 std;不使用候选分支或 hash。本次依赖更新不改应用源码、原断言、 -数据库、部署目录或 COS 前缀。实时协作依赖同步已发布的 Cumulo Reel 0.0.54、 -Recollect 0.0.61、WS-EDN 0.0.40 和 Respo Message 0.0.35,保持根依赖与传递依赖一致。 +根依赖仍固定旧 std;不使用候选分支或 hash。实时协作依赖同步正式 tag 的 +Cumulo Reel 0.0.55、Recollect 0.0.62、WS-EDN 0.0.41、Respo Message 0.0.37, +并同步 Respo 0.16.122、UI 0.7.41、Alerts 0.10.55、Markdown 0.4.56、Feather 0.4.29。 +没有模块或业务引用的 Memof 从根依赖和双入口配置移除,不改其 Anchor 合同。 +15 处旧调用迁移到 `defref`、`match`、`distinct-values` 和 `set-interval!`; +保留 Set 去重、分支默认值及定时器参数语义。原断言、数据库、部署目录与 COS 前缀不变。 此次依赖更新不代表服务器已经准备好,也不触发生产合并部署。 ```sh @@ -31,6 +34,7 @@ caps verify --toolchain calcit calcit.cirru --check-only --warn-dyn-method calcit calcit.cirru --entry server --check-only --warn-dyn-method calcit calcit.cirru fix --workflow strict --verify --format edn +calcit calcit.cirru analyze weak-types --only deprecated-call --format json calcit calcit.cirru test --exclude-tag server-effect --require-match --summary-only --format edn calcit calcit.cirru --entry server test --tag server-effect --require-match --summary-only --format edn calcit calcit.cirru js @@ -80,6 +84,10 @@ Markdown 高亮回调保持 String 输入和输出。Text 导出通过类型化 验收还包括双入口完整 strict、严格依赖图、生产构建、 隔离 WebSocket 与持久化,以及真实浏览器交互。 测试使用合成数据库和独立服务,不连接生产存储。 +本轮原有共同测试 native / JS 各 51/51(无排除),server-effect 2/2; +完整 strict 无诊断,应用废弃调用为零。真实浏览器双客户端验证登录、 +含 HTML 字面量和 Unicode 的段落修改同步,以及删除 Confirm 的取消、确认和同步。 +隔离 native 服务验证访客 patch、未知消息分支、回调实际 Unit、断连、持久化及 SIGINT 正常退出。 Dynamic / unsafe 数量基线已退役,不以统计预算代替类型和业务语义门槛。 ## 部署 @@ -97,11 +105,10 @@ calcit calcit.cirru --entry server ## 限制 -- 完整交互及迁移验收尚未完成,局部测试不代表整个应用已可发布。 -- 0.30.1 尚未正式发布;正式依赖图下 alpha.4 只读检查的服务端 77/77 通过, - 客户端仍有 Respo 和 Alerts 的 6 个失败定义(308 通过、131 阻塞、1 级联)。 - 该静态探测不是 alpha 运行验收;本轮不改用 alpha、不宣称整图已兼容 0.30.1。 -- 删除 Confirm 与 Text 弹窗完整内容仍需独立验收。 +- 0.30.1 尚未正式发布,当前明确固定 alpha.4;服务端也必须安装匹配 CLI 与模块, + 不能只升级网页后继续运行旧服务。服务器准备情况未确认,本 PR 不触发生产合并部署。 +- Text 导出的排序、标题和 Unicode 原断言通过,但本地浏览器点击后未暴露可读取的弹窗, + 完整弹窗内容与 HTML 转义的浏览器验收仍未完成,不计作通过。 - 框架 state、投影和宿主的开放边界仍存在,不宣称全应用已静态化。 - Highlight.js 保留原 legacy 调用及弃用提示,依赖中仍有旧 require 写法告警。 - Vite 保留大 chunk 提示,未通过放宽阈值掩盖。 diff --git a/calcit.cirru b/calcit.cirru index 2df8a47..ae552e6 100644 --- a/calcit.cirru +++ b/calcit.cirru @@ -5,23 +5,23 @@ :entries $ {} :default $ {} (:description |) (:init-fn 'app.client/main!) (:mode :js) (:reload-fn 'app.client/reload!) (:target :browser) :feature-policy $ {} - :modules $ [] |respo.calcit/ |recollect/ |memof/ |respo-ui.calcit/ |ws-edn.calcit/ |cumulo-util.calcit/ |respo-message.calcit/ |cumulo-reel.calcit/ |alerts.calcit/ |bisection-key/ |respo-feather.calcit/ |respo-markdown.calcit/ + :modules $ [] |respo.calcit/ |recollect/ |respo-ui.calcit/ |ws-edn.calcit/ |cumulo-util.calcit/ |respo-message.calcit/ |cumulo-reel.calcit/ |alerts.calcit/ |bisection-key/ |respo-feather.calcit/ |respo-markdown.calcit/ :type-slots $ {} :server $ {} (:description |) (:init-fn 'app.server/main!) (:mode :native) (:reload-fn 'app.server/reload!) (:target :native) :feature-policy $ {} - :modules $ [] |recollect/ |memof/ |cumulo-util.calcit/ |cumulo-reel.calcit/ |bisection-key/ |calcit.std/ |calcit-wss/ + :modules $ [] |recollect/ |cumulo-util.calcit/ |cumulo-reel.calcit/ |bisection-key/ |calcit.std/ |calcit-wss/ :type-slots $ {} :files $ {} 'app.client $ %{} 'FileEntry :defs $ {} '*states $ %{} 'CodeEntry (:doc |) - :code $ quote $ defatom *states + :code $ quote $ defref *states {} $ :states $ {} :cursor $ [] :examples $ [] :schema $ :: 'Ref $ :: 'Map 'Tag 'Dynamic '*store $ %{} 'CodeEntry (:doc |) - :code $ quote $ defatom *store (Option :none) + :code $ quote $ defref *store (Option :none) :examples $ [] :schema $ :: 'Ref $ :: 'Option (:: 'Map 'Tag 'Dynamic) 'connect! $ %{} 'CodeEntry (:doc |) @@ -56,8 +56,7 @@ when and config/dev? $ not= op :states println |Dispatch op data - case-default op - ws-send! $ {} (:kind :op) (:op op) (:data data) + match op :states $ let[] (cursor s) params $ reset! *states decode-map-as update-states @*states @@ -65,6 +64,7 @@ , s :: 'Map 'Tag 'Dynamic :effect/connect $ do (connect!) &unit + _ $ ws-send! $ {} (:kind :op) (:op op) (:data data) , &unit :examples $ [] :schema $ :: 'Fn $ {} (:return 'Unit) @@ -113,9 +113,8 @@ :code $ quote $ defn on-server-data (data) let data-map $ decode-map-as data $ :: 'Map 'Tag 'Dynamic - case-default + match .unwrap-or (get data-map :kind) nil - js/console.warn "|unknown server data kind:" data :patch $ let changes $ .unwrap-or (get data-map :data) nil when config/dev? $ js/console.log |Changes $ to-js-data changes @@ -126,6 +125,7 @@ next-value $ patch-twig base $ schema/read-patch-changes changes next-store $ decode-map-as next-value $ :: 'Map 'Tag 'Dynamic reset! *store $ Option :some next-store + _ $ js/console.warn "|unknown server data kind:" data , &unit :examples $ [] :schema $ :: 'Fn $ {} (:return 'Unit) @@ -443,11 +443,8 @@ unsafe-coerce ui/row $ :: 'Map 'Tag 'Dynamic comp-navigation (:logged-in? navigation-view) (:count navigation-view) if (:logged-in? navigation-view) - case-default + match .unwrap-or (get router :name) nil - div - {} $ :style ui/flex - <> $ str router :profile $ comp-profile .unwrap-or (get store-map :user) nil decode-map-as router-data $ :: 'Map 'Number 'Dynamic @@ -462,6 +459,9 @@ .unwrap-or (get article-data :focuses) nil .unwrap-or (get article-data :members) nil , paragraph-id + _ $ div + {} $ :style ui/flex + <> $ str router comp-login $ >> states :login let visible? $ and (:logged-in? navigation-view) (non-nil? paragraph-id) @@ -1891,11 +1891,11 @@ 'app.server $ %{} 'FileEntry :defs $ {} '*client-caches $ %{} 'CodeEntry (:doc |) - :code $ quote $ defatom *client-caches ({}) + :code $ quote $ defref *client-caches ({}) :examples $ [] :schema $ :: 'Ref $ :: 'Map 'Number (:: 'Map 'Tag 'Dynamic) '*initial-db $ %{} 'CodeEntry (:doc |) - :code $ quote $ defatom *initial-db + :code $ quote $ defref *initial-db if path-exists? $ dbg storage-file do (println "|Found local EDN data") @@ -1906,11 +1906,11 @@ :examples $ [] :schema $ :: 'Dynamic '*reader-reel $ %{} 'CodeEntry (:doc |) - :code $ quote $ defatom *reader-reel @*reel + :code $ quote $ defref *reader-reel @*reel :examples $ [] :schema $ :: 'Ref $ :: 'cumulo-reel.core/ReelState (:: 'Map 'Tag 'Dynamic) '*reel $ %{} 'CodeEntry (:doc |) - :code $ quote $ defatom *reel + :code $ quote $ defref *reel ReelState :base @*initial-db :db @*initial-db :records ([]) :merged? false :examples $ [] :schema $ :: 'Ref $ :: 'cumulo-reel.core/ReelState (:: 'Map 'Tag 'Dynamic) @@ -1970,8 +1970,8 @@ println $ str "|Server started on port:" port ; "|init it before doing multi-threading" identity @*reader-reel - set-interval 200 $ fn () $ render-loop! - set-interval 600000 $ fn () $ persist-db! + set-interval! 200 $ fn () $ render-loop! + set-interval! 600000 $ fn () $ persist-db! on-control-c on-exit! :examples $ [] :schema $ :: 'Fn $ {} (:return 'Dynamic) @@ -2041,15 +2041,15 @@ (:message sid msg) let action $ decode-map-as (parse-cirru-edn msg) (:: 'Map 'Tag 'Dynamic) - case-default + match .unwrap-or (get action :kind) nil - println "|unknown action:" action :op $ dispatch! decode-map-as .unwrap-or (get action :op) nil , 'Tag .unwrap-or (get action :data) nil , sid + _ $ println "|unknown action:" action (:disconnect sid) do (println "|Client closed!") (dispatch! :session/disconnect nil sid) _ $ println "|unknown data:" data @@ -2101,7 +2101,7 @@ recollect.memo :refer $ begin-twig-frame! finish-twig-frame! app.$meta :refer $ calcit-dirname calcit.std.fs :refer $ path-exists? check-write-file! - calcit.std.time :refer $ set-interval + calcit.std.time :refer $ set-interval! calcit.std.date :refer $ Date get-time! extract-time calcit.std.path :refer $ join-path 'app.style $ %{} 'FileEntry @@ -2208,9 +2208,8 @@ :user $ twig-user $ option:unwrap-or get-in db-map $ [] :users user-id {} - :router $ assoc router :data $ case-default + :router $ assoc router :data $ match .unwrap-or (get router :name) nil - {} :home $ {} :articles $ twig-articles $ .unwrap-or (get db-map :articles) nil :focuses $ twig-focuses :article-id sessions users @@ -2224,6 +2223,7 @@ :focuses $ twig-focuses :paragraph-id sessions users :members $ twig-members article-id sessions users :profile $ twig-profile sessions users + _ $ {} :count $ count sessions :color $ rand-hex-color! {} @@ -2884,7 +2884,7 @@ users $ decode-map-as option:unwrap-or (get db-map :users) ({}) :: 'Map 'String $ :: 'Map 'Tag 'Dynamic - maybe-user $ -> users (vals) (.to-list) + maybe-user $ -> users (distinct-values) (.to-list) find $ fn (user) = username $ .unwrap-or get @@ -2978,7 +2978,7 @@ option:unwrap-or (get db-map :users) ({}) :: 'Map 'String $ :: 'Map 'Tag 'Dynamic maybe-user $ find - .to-list $ vals users + .to-list $ distinct-values users fn (user) = username $ .unwrap-or get diff --git a/deps.cirru b/deps.cirru index 9943cb5..95798cc 100644 --- a/deps.cirru +++ b/deps.cirru @@ -1,17 +1,16 @@ -{} (:calcit-version |0.30.0) +{} (:calcit-version |0.30.1-alpha.4) :version |0.1.1 - :dependencies $ {} (|Cumulo/cumulo-reel.calcit |0.0.54) - |Cumulo/cumulo-util.calcit |0.0.28 - |Respo/alerts.calcit |0.10.52 - |Respo/respo-feather.calcit |0.4.26 - |Respo/respo-markdown.calcit |0.4.54 - |Respo/respo-message.calcit |0.0.35 - |Respo/respo-ui.calcit |0.7.39 - |Respo/respo.calcit |0.16.120 + :dependencies $ {} (|Cumulo/cumulo-reel.calcit |0.0.55) + |Cumulo/cumulo-util.calcit |0.0.29 + |Respo/alerts.calcit |0.10.55 + |Respo/respo-feather.calcit |0.4.29 + |Respo/respo-markdown.calcit |0.4.56 + |Respo/respo-message.calcit |0.0.37 + |Respo/respo-ui.calcit |0.7.41 + |Respo/respo.calcit |0.16.122 |calcit-lang/bisection-key |0.0.32 - |calcit-lang/calcit-wss |0.2.34 + |calcit-lang/calcit-wss |0.2.35 |calcit-lang/calcit.std |0.2.43 - |calcit-lang/memof |0.0.38 - |calcit-lang/recollect |0.0.61 - |mvc-works/ws-edn.calcit |0.0.40 + |calcit-lang/recollect |0.0.62 + |mvc-works/ws-edn.calcit |0.0.41 diff --git a/package.json b/package.json index ecd94b1..2edfb4a 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "vite": "^8.2.2" }, "dependencies": { - "@calcit/procs": "0.30.0", + "@calcit/procs": "0.30.1-alpha.4", "escape-html": "^1.0.3", "nanoid": "^5.1.5" } diff --git a/yarn.lock b/yarn.lock index 57e23fe..fbc7fea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,15 +12,15 @@ __metadata: languageName: node linkType: hard -"@calcit/procs@npm:0.30.0": - version: 0.30.0 - resolution: "@calcit/procs@npm:0.30.0" +"@calcit/procs@npm:0.30.1-alpha.4": + version: 0.30.1-alpha.4 + resolution: "@calcit/procs@npm:0.30.1-alpha.4" dependencies: "@calcit/finger-vec": "npm:0.1.1" "@calcit/ternary-tree": "npm:0.0.26" "@cirru/parser.ts": "npm:0.0.10" "@cirru/writer.ts": "npm:^0.1.9" - checksum: 10c0/4ffe1e9fb7fcc46aae5c95d30e9e20c84582bd527602726ef600322ce3aca9bdcf251f8a3816073dfd4dd7d353d01358df7cd6ba45feba8756dc4dcf17cdb987 + checksum: 10c0/5613c2f4ba262f37167e4a7862449b1e8466fe5d92ecb0e2728f420f4494d37d1da5299685b61514822b535c1ad732e41caa1f35ae09e410c26b2c0c5d6d8166 languageName: node linkType: hard @@ -725,7 +725,7 @@ __metadata: version: 0.0.0-use.local resolution: "tabletwo@workspace:." dependencies: - "@calcit/procs": "npm:0.30.0" + "@calcit/procs": "npm:0.30.1-alpha.4" bottom-tip: "npm:^0.1.3" cirru-color: "npm:^0.2.4" copy-text-to-clipboard: "npm:^3.2.2"