You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/09/03 16:28:38 UTC
Re: [PR] fix(runtime-host): import external sessions without a configured default model [maka]
Astro-Han commented on PR #4227:
URL: https://github.com/apache/maka/pull/4227#issuecomment-5528806270
Severities for the review above, which I should have included with it.
**P2 — the new banner points at a settings section that does not exist.** Normal user path, and it is the one actionable instruction this PR adds: 设置 › 服务商 and Settings › Providers, where the section is `models`, labelled 模型 and Models. The dozen existing remedy strings in `conversation-copy.ts:467-478` all say 设置 · 模型 and Settings · Models.
**P2 — the candidate list multiplies connections by models.** Normal path: one candidate per enabled model per enabled connection, while a connection-level failure returns the same verdict for all of that connection's models, and a connection may enable up to 512. An unusable connection early in catalog order costs up to 512 `resolveExecutionConnection` calls, each a full runtime-policy lane round trip that reads the catalog and prepares connection material, on a lane shared with every other runtime-policy read and write.
**P2 — the summary's precision claim has no test.** Deleting the whole `preferred` block from `importModelCandidates` leaves all six new tests green, so "Behavior is unchanged when a default is set and ready" is unproven. A ready default that is not first in catalog order, asserted to win, is the missing case.
**P3 — the epoch ratchet test does not ratchet.** Reasonable recovery path, and this PR now requires a rebase: `assert.ok(RUNTIME_HOST_COMPATIBILITY_EPOCH > 101)` passes with no bump at all, since the merge base was already 106, so it cannot catch the epoch being lost in the conflict, which is exactly what a conflicted epoch line invites. The adjacent assertion uses `> 99` for 100.
**P3 — the comment at `:283-284` justifies the split with a banner that does not depend on it.** That banner comes from the `missing_default_connection` verdict in `session-send-projection.ts:110`. Keeping WorkHub fail-closed is right; this is the comment someone will read before merging the two resolvers back together.
**P3 — `sawNoModel` and `ImportBatchOutcome.noModel`** hold one fact in two places.
**P3 — `source_unreadable` is broader than its copy**, covering every pre-commit throw other than not-found, so an EACCES or an adapter bug also reports "may be too large or malformed".
**P3 — the summary's account of the batch change is backwards.** Before this PR `operation_unavailable` was rethrown and the batch already recorded it as failed; this PR is what starts returning `{ok: false}` with a reason. So that change prevents a regression this PR introduces rather than fixing an existing bug, and the current wording makes it read as optional polish.
**No finding** on the owner (model resolution already lives in this coordinator), on the reuse of `resolveExecutionConnection` and `authorizeConnectionModel`, on the completeness of the skip list, on concurrency or partial state, on the `NoUsableImportModelError` subclass (the failure-code union is deliberately narrow and widening it would leak into `session.configure`), or on the Desktop mapping reusing the existing typed-result seam rather than adding a second authority.
No P0 and no P1. Merge conditions rather than findings: the rebase, and re-deriving the epoch to 108 at the moment you rebase, since main took 107 for `token_usage` anchors and another open PR may take 108 first. And the scope question in the review is a decision rather than a defect.
<details><summary>简体中文</summary>
上面那份 review 的分级,应该跟着一起给的。
**P2 —— 新横幅指向一个不存在的设置分区。** 正常用户路径,而且这是本 PR 新增的唯一一句可执行指引:写的是「设置 › 服务商」和 Settings › Providers,而那一栏是 `models`,标签是「模型」和 Models。`conversation-copy.ts:467-478` 里现有的十几条同类提示统一写「设置 · 模型」和 Settings · Models。
**P2 —— 候选列表是连接乘以模型。** 正常路径:每个启用连接的每个启用模型各出一个候选,而连接级失败对这个连接的所有模型给出同一结论,一个连接最多可启用 512 个模型。catalog 顺序靠前的不可用连接要空转最多 512 次 `resolveExecutionConnection`,每次都是一整轮 runtime-policy lane(读 catalog、准备连接材料),而那条 lane 和其它所有 runtime-policy 读写共用。
**P2 —— 正文的精度声明没有测试。** 把 `importModelCandidates` 里整个 `preferred` 块删掉,六个新测试全绿,所以「Behavior is unchanged when a default is set and ready」没有被证明。缺的是一个 ready 的 default 排在 catalog 顺序之后、断言它仍胜出的用例。
**P3 —— epoch 的 ratchet 测试并不 ratchet。** 合理的恢复路径,而这个 PR 现在正需要 rebase:`assert.ok(RUNTIME_HOST_COMPATIBILITY_EPOCH > 101)` 在完全不 bump 时也会过,因为 merge base 上已经是 106,所以它抓不到「解冲突时把 epoch 丢了」,而这恰恰是冲突行最容易导致的。旁边那条的写法是 `> 99` 对应 100。
**P3 —— `:283-284` 的注释用一条并不依赖它的横幅来解释拆分。** 那条横幅来自 `session-send-projection.ts:110` 的 `missing_default_connection` verdict。保留 WorkHub fail-closed 是对的,但这正是以后有人想把两条解析合回去时会先读的注释。
**P3 —— `sawNoModel` 和 `ImportBatchOutcome.noModel`** 是同一个事实的两处表示。
**P3 —— `source_unreadable` 的覆盖面大于它的文案**,它涵盖除 not-found 外的全部 pre-commit 抛出,所以 EACCES 或适配器 bug 也会报「可能过大或已损坏」。
**P3 —— 正文对 batch 改动的叙述是反的。** 这个 PR 之前 `operation_unavailable` 是被 rethrow 的,batch 本来就记成 failed;是这个 PR 开始返回带 reason 的 `{ok: false}`。所以那段改动是防止本 PR 自身引入回归,不是修既有 bug,现在的措辞会让它读起来像可选的收尾。
**无发现**:归属(模型解析本来就在这个 coordinator 里)、对 `resolveExecutionConnection` 与 `authorizeConnectionModel` 的复用、跳过清单的完备性、并发与半状态、`NoUsableImportModelError` 子类(失败码 union 是刻意窄化的,加宽会泄漏到 `session.configure`)、以及 Desktop 侧复用既有 typed-result 接缝而不是另立权威。
没有 P0、没有 P1。属于合并条件而不是 finding 的:rebase,以及在 rebase 的那一刻把 epoch 重推成 108(main 已经把 107 给了 `token_usage` anchors,而别的 open PR 可能先占 108)。review 里的范围问题是一个决定,不是缺陷。
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org