feat(desktop): add Runtime Host Pricing adapter - #2148
Conversation
|
Thanks for keeping pagination, CAS handling, and uncertain-outcome reconciliation inside the existing Runtime Host client. The adapter boundary and focused coverage look solid overall. I found one reconnect boundary that seems worth tightening. Could we bind the snapshot to |
5ede3ce to
77284e0
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Thanks for addressing the reconnect ownership boundary by binding Pricing snapshots to both the Host epoch and connection identity. I re-reviewed the expanded adapter across Pricing semantics, connection lifecycle, and test coverage.
Revision-pinned pagination, bounded restart, CAS reconciliation, uncertain-outcome handling, provenance, reset/delete behavior, and omitted-versus-zero rates all look consistent with #2015. The adapter remains on the existing Runtime Host client seam without introducing another Pricing authority, and the focused unit and UDS coverage is proportionate to the failure surface.
The remaining end-to-end response-loss and caller write-block journeys belong to the later integration layer and do not need to hold this isolated adapter core. CI is green. Approving.
English
Summary
Why
Pricing callers should not need to understand Host pagination, connection epochs, or whether a lost mutation response is safe to retry. Keeping those rules in the existing Desktop Runtime Host client also prevents the renderer from becoming a second pricing authority.
Design
committedorunchangedresult reloads the authoritative snapshot. A failed reload remains a known save outcome instead of being reported as an uncertain commit.Scope
This is the isolated Pricing adapter core. It does not register renderer IPC, change the Pricing UI, call the retained
usage:pricing:*handlers, activate the Host-backed production path, or add TUI support.Validation
npm run format:checknpm run lintnpm run typecheckbuild:overlay.简体中文
概要
原因
Pricing 调用方不应理解 Host 分页、connection epoch,或自行判断丢失响应的 mutation 能否安全重试。把这些规则留在现有 Desktop Runtime Host client 中,也能避免 renderer 变成第二个 Pricing authority。
设计
committed或unchanged后重新读取权威 snapshot;如果刷新失败,仍保留“保存结果已知”,不会误报成 commit outcome uncertain。范围
本 PR 只包含隔离的 Pricing adapter core,不注册 renderer IPC、不修改 Pricing UI、不调用暂时保留的
usage:pricing:*handler、不激活 Host-backed production path,也不增加 TUI 支持。验证
npm run format:checknpm run lintnpm run typecheckbuild:overlay后已通过。Part of #2015 and #2010.