fix(acp): enforce authentication discriminator boundaries - #184
Open
YoungSx wants to merge 3 commits into
Open
Conversation
Default only an absent v1 type to agent, reject non-string discriminators, and preserve unsupported strings and payload fields. Share version-aware authentication serialization across DTO, collection, and initialize roots so unknown fields cannot override the negotiated method identity. Add raw initialize transport regressions, presentation selection coverage, and schema round-trip properties. Validation: 593 SDK tests, 26 presentation authentication tests, analyzer and package validation, external nupkg consumer, and a 9-case failing whitelist mutation. Refs #147
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
原始 initialize 报文把认证
type写成空白、数字或 null 时,SDK 会把它当作缺省 agent,继而发出不该发送的 authenticate。现在只有未提供type或精确的agent可以执行认证;未知字符串保持原值但不可执行,错误 JSON 类型按协议拒绝。认证报文的读写共用版本规则:v1 使用
id,显式 v2 使用methodId并要求判别字段;未知载荷和 terminal 的 args/env 在往返中保留。直接 DTO、集合和 initialize 嵌套路径均覆盖,生产默认仍为 v1。依据:ACP AuthMethod schema 的缺省判别规则及 terminal 方法不得传给 authenticate 的要求;v2 schema 的显式判别与字段名。
验证:
4de1fbc1的 GitHub CI:16 项通过,1 项仓库条件 GUI 检查跳过;PR 可合并,无冲突。条件跳过不算 Windows 真机 GUI 验证。Refs #147。交付该单 PR A;终端交互登录为后续 PR B,本 PR 不关闭总单。