Skip to main content

build-a-contract-test-suite

Build a contract test suite that verifies provider and consumer compatibility across versions, examples, errors, and deployment order. Use when independently released components share an interface.

来源信息

仓库
protosphinx/sphinxstack
最近来源活动
2026年7月29日 13:55
检测到的 SKILL.md 语言
英语
星标
2
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
build-a-contract-test-suite
category
code
description
Build a contract test suite that verifies provider and consumer compatibility across versions, examples, errors, and deployment order. Use when independently released components share an interface.
# build-a-contract-test-suite Test the behavior consumers depend on, including failures. ## When to use - Use for APIs, events, schemas, files, SDKs, queues, or database views shared across release boundaries. - Do not let provider mocks become the only evidence of provider behavior. ## Procedure 1. Inventory producers, consumers, versions, environments, owners, and compatibility policy. 2. Define request, response, event, field, error, ordering, auth, timing, and semantic obligations. 3. Capture consumer expectations as minimal versioned examples and invariants. 4. Verify expectations against the real provider implementation in a controlled environment. 5. Add optional, unknown, deprecated, invalid, timeout, pagination, duplicate, and retry cases. 6. Test old consumer with new provider and new consumer with old provider where rollout can overlap. 7. Publish results with artifact versions and block only changes that violate supported contracts. 8. Remove stale contracts through an explicit consumer retirement process. ## Done - A contract suite records provider, consumers, versions, compatibility rules, success, error, and edge cases - CI evidence verifies real-provider behavior and supported mixed-version deployment orders
在 GitHub 查看