fix(contract): Hub 2xx 响应 schema 全覆盖 + legacy planned 路径 superseded-by 标注 + 门禁 fail-closed - #2161
Merged
Merged
Conversation
…y 标注 + 门禁 fail-closed - 16 个 Hub-implemented 2xx 响应补 content schema(SessionCreate/HubUser/AuthRefreshResponse/Attachment/Message/HubPendingAgentTask/AgentTeam/Resource),全仓 2xx schema 缺口清零 - 21 个 legacy planned 路径补 x-agenthub-superseded-by 标注(friend-requests/旧消息操作/v1 conversations·auth·users·contacts·groups·devices → 现役 /client /web 路由) - verify-openapi-contract.py 新增 2xx-schema 覆盖 ratchet:Hub-implemented 200/201/202 description-only 响应 fail-closed,基线 openapi-schema-baseline.json(当前空) - 变异自测:移除任一 schema 立即 FAIL;yaml 解析/duplicate-keys 测试/doc-ssot/ci-gates/shared-rest-contract 全过 Co-authored-by: Cursor <cursor@vectorcontrol.tech>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
范围(Harvey P2-3/P2-5/P2-7 收口,round-18)
SessionCreate/HubUser/AuthRefreshResponse组件,复用Attachment/Message/HubPendingAgentTask/AgentTeam/Resource。sync 200 为array<Message>(与 handler 返回[]MessageResponse一致);pin/recall/edge-ack 等 nil-data 端点为Resource。/client/friend-requests*、/client/messages*旧消息操作、/v1/conversations|auth|users|contacts|groups|devices→/client//web对应实现)。verify-openapi-contract.py新增 2xx-schema 覆盖 ratchet——Hub-implemented 的 200/201/202 若为 description-only(无 content 无 $ref)即 fail-closed,当前基线为空清单openapi-schema-baseline.json;204 天然无 body 豁免。验证(本地已跑)
python3 scripts/verify/verify-openapi-contract.py✅(153 implemented routes / 0 schema violations)POST /web/agent-teamsschema → 立即 FAIL ✅go test ./internal/handler/(含 TestOpenAPIDoesNotContainDuplicateMappingKeys)✅verify-shared-rest-contract.py/verify-doc-ssot.py/verify-ci-gates.py✅git diff --check✅