[TypeSpec Requirement] Block all PRs adding swagger in a new API version#42823
Closed
mikeharder wants to merge 30 commits into
Closed
[TypeSpec Requirement] Block all PRs adding swagger in a new API version#42823mikeharder wants to merge 30 commits into
mikeharder wants to merge 30 commits into
Conversation
Co-authored-by: Copilot <copilot@github.com>
Next Steps to MergeNext steps that must be taken to merge this PR:
Comment generated by summarize-checks workflow run. |
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
ravimeda
added a commit
that referenced
this pull request
May 8, 2026
…iewer (TSP-REQUIRED-V1) (#42846) * Encode TypeSpec-required policy for new API versions into ARM API Reviewer (TSP-REQUIRED-V1) Adds rule `TSP-REQUIRED-V1` to the ARM API Reviewer agent so it flags PRs that introduce a new API version directory containing only handwritten OpenAPI swagger. Updates to handwritten swagger inside pre-existing API version directories are explicitly permitted and are not flagged. The full rule definition (severity, three detection signals, fix, and false-positive guidance) lives in `.github/instructions/openapi-review.instructions.md` §2A. Cross-references are added to the ARM and TypeSpec instruction files so the rule is visible on every review path. The agent's Step 3 (Breaking Change Comparison) is augmented to apply the check while it is already inspecting the previous version folder. Eval coverage: a new category (12xxxx) with three stimuli — violation case (handwritten new version flagged), TypeSpec-generated new version (true negative), and maintenance edit to an existing handwritten version (true negative). This is the agent-side companion to the deterministic CI check tracked in PR #42823. It can land independently and remain in place after that check ships, with the agent rule serving as the descriptive surface (severity, fix, rule ID) for review feedback. ### Files changed | File | Change | | --- | --- | | `.github/instructions/openapi-review.instructions.md` | New §2A defining `TSP-REQUIRED-V1` (policy, three detection signals, severity, fix, false-positive avoidance). New checklist bullet. | | `.github/instructions/armapi-review.instructions.md` | New §0 cross-reference summarizing the rule for ARM PRs. New "Authoring Format" checklist section. | | `.github/instructions/typespec-review.instructions.md` | §9.1 rewritten — drops future-tense Q4 FY26 wording, points to the canonical rule definition, confirms maintenance edits to existing handwritten OpenAPI remain permitted. Checklist line updated. | | `.github/agents/arm-api-reviewer.agent.md` | Step 3 augmented with the TypeSpec-required check, reusing the existing previous-version lookup. | | `.github/cspell.yaml` | Added `handwrittensvc`, `legacysvc`, `tspgenservice` to the eval-suite per-file dictionary. | | `.github/skills/evals/arm-api-reviewer/evaluate/eval-typespec-required.yaml` | New eval category 12xxxx — three stimuli for `TSP-REQUIRED-V1`. | | `.github/skills/evals/arm-api-reviewer/fixtures/arm-openapi/typespec-generated-spec.json` | Compliant ARM spec with the `x-typespec-generated` extension at the top level (true-negative fixture). | | `.github/skills/evals/arm-api-reviewer/.vally.yaml`, `README.md`, `run-evals.ps1`, `fixtures/README.md` | Eval-suite metadata: 28 → 31 stimuli, 11 → 12 eval files, 14 → 15 ARM OpenAPI fixtures. | ### Validation - `cspell` passes on all changed files - `prettier --check` passes on all changed files ### Related - PR #42823 — deterministic CI check that blocks PRs adding swagger in a new API version (in development) - eng.ms TypeSpec policy: https://eng.ms/docs/products/azure-developer-experience/design/api-specs/api-typespec * Enhance line number pattern matching in eval report format to support additional citation formats
saprakas
pushed a commit
to iyyappam/azure-rest-api-specs
that referenced
this pull request
May 12, 2026
…iewer (TSP-REQUIRED-V1) (Azure#42846) * Encode TypeSpec-required policy for new API versions into ARM API Reviewer (TSP-REQUIRED-V1) Adds rule `TSP-REQUIRED-V1` to the ARM API Reviewer agent so it flags PRs that introduce a new API version directory containing only handwritten OpenAPI swagger. Updates to handwritten swagger inside pre-existing API version directories are explicitly permitted and are not flagged. The full rule definition (severity, three detection signals, fix, and false-positive guidance) lives in `.github/instructions/openapi-review.instructions.md` §2A. Cross-references are added to the ARM and TypeSpec instruction files so the rule is visible on every review path. The agent's Step 3 (Breaking Change Comparison) is augmented to apply the check while it is already inspecting the previous version folder. Eval coverage: a new category (12xxxx) with three stimuli — violation case (handwritten new version flagged), TypeSpec-generated new version (true negative), and maintenance edit to an existing handwritten version (true negative). This is the agent-side companion to the deterministic CI check tracked in PR Azure#42823. It can land independently and remain in place after that check ships, with the agent rule serving as the descriptive surface (severity, fix, rule ID) for review feedback. ### Files changed | File | Change | | --- | --- | | `.github/instructions/openapi-review.instructions.md` | New §2A defining `TSP-REQUIRED-V1` (policy, three detection signals, severity, fix, false-positive avoidance). New checklist bullet. | | `.github/instructions/armapi-review.instructions.md` | New §0 cross-reference summarizing the rule for ARM PRs. New "Authoring Format" checklist section. | | `.github/instructions/typespec-review.instructions.md` | §9.1 rewritten — drops future-tense Q4 FY26 wording, points to the canonical rule definition, confirms maintenance edits to existing handwritten OpenAPI remain permitted. Checklist line updated. | | `.github/agents/arm-api-reviewer.agent.md` | Step 3 augmented with the TypeSpec-required check, reusing the existing previous-version lookup. | | `.github/cspell.yaml` | Added `handwrittensvc`, `legacysvc`, `tspgenservice` to the eval-suite per-file dictionary. | | `.github/skills/evals/arm-api-reviewer/evaluate/eval-typespec-required.yaml` | New eval category 12xxxx — three stimuli for `TSP-REQUIRED-V1`. | | `.github/skills/evals/arm-api-reviewer/fixtures/arm-openapi/typespec-generated-spec.json` | Compliant ARM spec with the `x-typespec-generated` extension at the top level (true-negative fixture). | | `.github/skills/evals/arm-api-reviewer/.vally.yaml`, `README.md`, `run-evals.ps1`, `fixtures/README.md` | Eval-suite metadata: 28 → 31 stimuli, 11 → 12 eval files, 14 → 15 ARM OpenAPI fixtures. | ### Validation - `cspell` passes on all changed files - `prettier --check` passes on all changed files ### Related - PR Azure#42823 — deterministic CI check that blocks PRs adding swagger in a new API version (in development) - eng.ms TypeSpec policy: https://eng.ms/docs/products/azure-developer-experience/design/api-specs/api-typespec * Enhance line number pattern matching in eval report format to support additional citation formats
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.
No description provided.