Commit Graph

10 Commits

Author SHA1 Message Date
Dash
adc368a4b3 fix(host): preserve code values in coverage tables
Encode special code values as HTML entities so backslash-pipe pairs cannot split GFM table cells. Keep ordinary code spans and verify the production Markdown through the GFM parser.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 10:54:49 +13:00
Dash
c2201a0684 fix(host): resolve templated contract channels and fail on unresolved names
The coverage scanner only read literal desktopChannel values, so the eight
browser-backend:* entries that #9991 builds with
Object.entries(HOST_BROWSER_SETTINGS_ACTIONS).map(([action]) => `browser-backend:${action}`)
were silently skipped and listed as B (window-local) although client mode
proxies them to the Host.

- Resolve the key of Object.entries(X)/Object.keys(X) iteration callbacks
  from X's declared properties.
- Any contract-side channel name the scanner cannot resolve now fails
  generation instead of disappearing; the delegation table's
  HOST_CONTRACT_CHANNELS.map((def) => def.desktopChannel) is recognised as a
  pass-through of names already read from the contract file.
- Lift the constant resolver into createConstResolver so tests exercise the
  real code on the real contract file.

Reclassified (B -> contract): browser-backend:get-state, set-kind,
set-use-real-profile, reset, get-health, recover, probe-source-read,
open-extension-store. Contract 67 -> 75, B 361 -> 353, window class
386 -> 378 (registered 372 -> 364). Host work stays 985.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 09:41:29 +13:00
Dash
291a649254 fix(host): normalize scanner paths on Windows and refresh coverage
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 09:17:59 +13:00
Dash
13ad706f87 test(host): 同步通道领域加断言,措辞改为“用户填写的值”
SYNC_LOCAL_DOMAINS 按 A 规则的领域名判定同步通道是否本地读。新增断言:
其中每个领域都必须是某条 A 规则的 reason,并核对设置与账号提示两类同步
通道的判定和文案,领域改名时测试直接失败,不会静默改判。

计划文档同步 1041669c7a 的改判:扫描计入参数默认值后,唯一改判的通道是
git-review:open-file,A(git 与工作树)→ C-两段式(openReviewFile 第 4 个
参数默认值是 shell.openPath)。A 918 → 917,C-两段式 40 → 41,C 87 → 88,
990 不变;巡检 133 个(722 次)不变。两份证据仍是旧格式计数报告,没有重录,
按记录的 kind 读取;唯一同名的 ghosts:workdir-prefs 在两份证据里都没有调用。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 08:51:26 +13:00
Dash
1041669c7a fix(host): 按通道类型计数并扫描参数默认值中的窗口依赖
Preserve invoke/event identity in versioned usage reports and rankings, read legacy reports by their recorded kind, and detect shell.openPath in the real git-review open-file default argument.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 08:45:25 +13:00
Dash
542a420b18 docs(host): 登录首帧提示的同步通道归 S·本地
auth:has-persisted-session-hint-sync 只同步读 profile 目录里有没有存量会话标记,
用来在第一帧之前决定是否启用亮色门;这时事件流还没连上,Host 推的镜像赶不上,
同一台电脑上窗口读同一份 profile 就能回答。登录状态本身仍以 Host 为准。
“账号与凭据”加回本地读取的领域:S·本地 8、S·镜像 6(全是 ghosts:*),
要 Host 做的总数不变。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 03:41:36 +13:00
Dash
8599e2d25d docs(host): 清单单列同步与回执通道,C 类按处理方式细分,给出要 Host 做的总数
- S 同步通道(AST 识别给 event.returnValue 赋值的处理函数,14 个)从 A 中单列:
  S·本地 7(界面设置,窗口本地读 profile)、S·镜像 7(6 个 ghosts:* 与登录提示,
  数据归 Host,需窗口缓存镜像或改界面为异步,放进插件那一小批单独设计)。
- R 回执通道 6 个(model-favorites:host-*、setup-migration:host-*、
  app-preferences:reply):主进程向界面要数据,先标出、不排期。
- C 按审查定的四种细分:C-后台 32、C-两段式 39、C-窗口本地 11、C-专项设计 4。
- update-relaunch:* 归 A 的“升级与交接”领域,注明归交接任务。
- 总口径:真正要 Host 做的 = A + C-后台 + C-两段式 = 918 + 32 + 39 = 989,巡检实际
  调用 133 个;窗口类 385 个中客户端模式已注册 371、未注册 12。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 03:23:52 +13:00
Dash
09a161d11c docs(host): 清单区分窗口本地设置与客户端模式下未注册的窗口通道
- update-relaunch:blocking-* 问的是“重启会打断哪些任务”,是 Host 持有的运行状态,
  从窗口类移到 A,并在计划里记为归升级与交接流程的剩余项。
- 新增 W 类“窗口本地设置(含同步通道)”:侧栏设置与项目顺序,以及给
  event.returnValue 赋值的同步通道(属于设置、账号提示或未登记前缀)。同步通道走
  异步 HTTP 只会阻塞主进程,由窗口本地读同一份 profile;其它后台领域的同步读取仍是
  A,注明需 Host 预取后本地回放。
- 给出三个数:窗口类且客户端模式已注册 361、未注册 12(电脑控制与浏览器,未实现)、
  真正要 Host 接的 A 930。
- 生成的清单只写文件不写行号(行号留在 --json),避免一合并就过期。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 03:03:02 +13:00
Dash
462c16045f docs(host): 通道清单按 A/B/C 归属分类并核对 B 类在客户端模式的行为
清单脚本给每个未代理通道标归属:A 必须由后台处理、B 永久留在窗口、C 待定(写明
原因)。判定写在脚本的 OWNERSHIP_RULES(通道名/注册模块)里,再加依赖判定:处理
函数及其调用的两层桌面函数用到窗口 API 时,后台领域改判 C;发送方校验与发给单个
窗口的推送不计。结果:A 941、B 363、C 87;夹具巡检实际调用 A 144 个(782 次)。

调用计数报告附带写入时的主进程处理者快照(仅源码运行且设了 CINDY_IPC_USAGE_FILE),
对照客户端模式登录页与普通模式巡检两份快照:B 类 347 个窗口本地照常处理,14 个在
客户端模式被误拒(电脑控制与浏览器状态等),只记录、不改行为。巡检脚本改为按无查询
参数的地址识别主窗口。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 02:54:28 +13:00
Dash
664d86d4bd docs(host): 生成桌面 IPC 通道的 Host 覆盖清单与真实使用排行
scripts/host-channel-coverage.mjs 用 TypeScript 类型检查器解析桌面主进程全部
ipcMain 注册(含常量、模板、循环与包装函数),按“已在合同 / 客户端自有 /
只属于窗口 / Host 还没接”分类,生成 docs/host/channel-coverage.md。
host-client-usage-tour.mjs 在隔离 --mock 沙箱里走一遍界面夹具,调用计数存为
docs/host/evidence/channel-usage-mock-tour.json,清单按它给未接通道排序。

当前:1454 个通道,合同 61、窗口 362、Host 未接 1029;夹具巡检实际调用 253 个,
其中 150 个 Host 还没接。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 02:06:34 +13:00