Repository navigation
Document TypeSpec API contracts in formal-methods guidance - #79840
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ Matt Pocock Skills ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
🟡 Changes recommended
The added TypeSpec rule is not yet actionable because it neither accounts for repository-specific generation commands nor requires a reproducible, pinned toolchain for generated output.
2 open issues
What changed in this PR
Updates shared formal-methods guidance to cover TypeSpec API contracts and generated consumer formats, while distinguishing contract compilation from implementation verification.
Changes:
- Adds TypeSpec guidance for defining API operations, payloads, and errors.
- Documents generating OpenAPI and JSON Schema outputs and handling generated-output drift.
- Preserves the existing TLA+/TLC and Koka verification guidance.
| File | Description |
|---|---|
| .github/aw/formal-methods.md | Adds TypeSpec API-contract guidance, generated OpenAPI and JSON Schema workflows, and clarification that compilation does not verify implementation behavior. |
Review effort: Lite (adaptive)
| - Compile the TypeSpec definitions and regenerate the configured outputs when | ||
| the contract changes. Fix drift in the `.tsp` source or emitter configuration, | ||
| not in generated files. Compilation checks the contract, not implementation behavior. |
| - Compile the TypeSpec definitions and regenerate the configured outputs when | ||
| the contract changes. Fix drift in the `.tsp` source or emitter configuration, | ||
| not in generated files. Compilation checks the contract, not implementation behavior. |

API consumers need definitions in different formats without maintaining separate copies of the same contract. The formal-methods instructions now direct agents to define APIs in TypeSpec and generate formats such as OpenAPI and JSON Schema from the same source.
The guidance also explains how to keep generated outputs in sync and distinguishes contract compilation from implementation verification.
Validation:
make check-instruction-prefixes,python3 scripts/check-instruction-prefixes.py .github/aw/formal-methods.md, andgit diff --checkpassed.