Uh oh!
There was an error while loading. Please reload this page.
refactor(runtime-host): use typed request as sole operation API - #3784
Conversation
Generated-by: OpenAI Codex
Astro-Han
left a comment
There was a problem hiding this comment.
I reviewed this head. No Spec blocking issues, but a hard governance breach blocks approval.
[P1] Breaking API change implemented before governance decision settled
The PR removes 17 exported RuntimeHostConnection methods (documented breaking change) citing Discussion #3618, which is still "proposed/not approved" until 2026-08-26. CONTRIBUTING.md:28 requires dev@maka.apache.org discussion before implementation. No dev-list decision record is linked.
Fix: hold/return to draft, settle on dev list, then implement the accepted decision.
Checks on 5f1d2b7291 are test: queued / package: failure (installer harness flake) — not green.
简体中文
存在治理流程硬性阻断,需先经邮件列表决策。
M4n5ter
left a comment
There was a problem hiding this comment.
English
I reviewed this head and found no other correctness or design issues. One important boundary remains:
[Important] Make validated status() the only client status surface
DirectRequestOperationKey still includes host.status, so callers can use connection.request('host.status', {}) and bypass the Host identity correlation performed by connection.status(). The reconnecting implementation also routes status() through #request() → connection.request(), bypassing that validation.
A structurally valid response with a mismatched hostEpoch, compositionId, or compositionRevision can therefore be accepted. This also leaves two status contracts despite the PR’s goal of preserving validated status() as a dedicated boundary.
Please make status() the only supported client status surface:
- exclude
host.statusfromDirectRequestOperationKey; - reject
host.statusat the publicrequest()boundary at runtime; - have direct
status()use the private connection-scoped request pipeline and the canonical Host identity validator; - have reconnecting
status()preserve query retry by dispatching through the underlyingconnection.status().
简体中文
我审查了当前提交,没有发现其他 correctness 或 design 问题。目前只剩一个重要边界需要处理:
[Important] 让经过校验的 status() 成为唯一的客户端状态入口
DirectRequestOperationKey 仍然包含 host.status,因此调用方可以使用 connection.request('host.status', {}),绕过 connection.status() 所执行的 Host 身份相关性校验。重连实现中的 status() 也通过 #request() → connection.request() 派发,同样绕过了该校验。
因此,只要响应结构合法,即使其中的 hostEpoch、compositionId 或 compositionRevision 与当前连接不一致,也可能被接受。这也使系统继续维护两套状态调用契约,与本 PR 将经过校验的 status() 保留为专用边界的目标不符。
建议让 status() 成为唯一受支持的客户端状态入口:
- 从
DirectRequestOperationKey中排除host.status; - 在公开
request()的运行时边界拒绝host.status; - 让直连
status()使用私有、connection-scoped 的请求管线和统一的 Host 身份校验; - 让重连
status()通过底层connection.status()派发,在保留 query retry 的同时保留身份校验。
Generated-by: OpenAI Codex
likun666661
commented
Aug 25, 2026
Addressed the validated status boundary review in
Added coverage for type/runtime bypass rejection, mismatched Host identity failure, and reconnect retry without falling back to Verification:
|
The direction is right and the alias removal is thorough. Neither note below blocks the merge — one thing just works against the PR's own claim. [P3] Making |
Astro-Han
left a comment
There was a problem hiding this comment.
Approving. Both notes above are non-blocking: the host.status exception is worth revisiting so the reconnect loop does not stay duplicated three ways, and the liveness-probe tightening just needs a line in the description.
Uh oh!
There was an error while loading. Please reload this page.
Summary
request<K>()the sole direct Runtime Host operation surface on direct and reconnecting connections.status(), subscriptions, capabilities, listeners, lifecycle, andclose()behavior.Implements the scoped concept-reduction candidate from Discussion #3618.
Verification
npm run buildnpm run lintnpm run format:checknpm --workspace @maka/runtime-host test(1,144 passed)npm --workspace maka-agent run test:dist(453 passed)Breaking change
Direct
RuntimeHostConnectionconsumers must call the typed operation API, for exampleconnection.request('turn.start', input), instead of operation-specific forwarding aliases. Dedicated lifecycle and streaming APIs remain unchanged.AI use
Tool(s) and scope: OpenAI Codex implemented the API reduction, migrated callers, and ran verification. The commit includes a
Generated-bytrailer.Checklist
Does this PR entail a change in behavior?