Repository navigation
Fix shared TypeSpec naming fixtures for downstream lint - #17326
Conversation
|
Haoling Dong (@haolingdong-msft) Could you review this follow-up and help arrange a bot-authored REST specs sync? It fixes the 76 type-aware lint errors exposed by Azure/azure-rest-api-specs#47437, with regression coverage for the fixture boundary handling. The existing REST specs PR also fails Protected Files because I opened it under Josh's account; the policy requires trusted automation or an allowlisted maintainer to author shared-skill sync PRs. No policy changes are proposed here. --generated by Copilot |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
47bbe86 to
7c744b8
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Fixture scope validation diverges from production, and preservation tests depend unconditionally on an unsynced authoring file.
1 open issue
What changed in this PR
Updates shared TypeSpec naming guidance and evaluation infrastructure, including fixture typing fixes for downstream lint compatibility.
Changes:
- Integrates shared C# naming guidance into authoring and scoped customization workflows.
- Adds naming, routing, preservation, and fixture regression coverage.
- Updates benchmark skill isolation, pipeline discovery, and documentation.
| File | Description |
|---|---|
| evals/workflows/mock/typespec-naming-handoffs.eval.yaml | Tests authoring-to-naming handoffs. |
| eng/pipelines/azure-typespec-author-benchmark.yml | Removes legacy skill-directory arguments. |
| eng/common/pipelines/skill-eval.yml | Discovers naming evaluations. |
| .github/skills/README.md | Documents shared naming ownership. |
| .github/skills/azure-typespec-author/SKILL.md | Integrates naming planning and delegation. |
| .github/skills/azure-typespec-author/references/validation.md | Adds client-configuration validation safeguards. |
| .github/skills/azure-typespec-author/references/client-configuration.md | Defines optional naming analysis. |
| .github/skills/azure-typespec-author/references/authoring-plan.md | Separates source and client plans. |
| .github/skills/azure-typespec-author/evaluate/scripts/check-employee-service.test.mjs | Tests compiled resource checks. |
| .github/skills/azure-typespec-author/evaluate/scripts/check-employee-service.mjs | Checks resource reachability and operations. |
| .github/skills/azure-typespec-author/evaluate/README.md | Documents updated benchmark workflows. |
| .github/skills/azure-typespec-author/evaluate/pipeline/typespec-author-preeval.yml | Overlays selected naming skill sources. |
| .github/skills/azure-typespec-author/evaluate/pipeline/typespec-author-invoke-shard.ts | Isolates runtime skill mounts. |
| .github/skills/azure-typespec-author/evaluate/pipeline/typespec-author-invoke-shard.test.ts | Tests skill staging and isolation. |
| .github/skills/azure-typespec-author/evaluate/evals/007014.eval.yaml | Checks SDK-generation routing. |
| .github/skills/azure-typespec-author/evaluate/evals/007013.eval.yaml | Checks assessment routing. |
| .github/skills/azure-typespec-author/evaluate/evals/007012.eval.yaml | Checks naming-only routing. |
| .github/skills/azure-typespec-author/evaluate/evals/007011.eval.yaml | Checks enum-authoring routing. |
| .github/skills/azure-typespec-author/evaluate/evals/007010.eval.yaml | Checks data-plane authoring routing. |
| .github/skills/azure-typespec-author/evaluate/evals/007009.eval.yaml | Checks ARM property authoring routing. |
| .github/skills/azure-typespec-author/evaluate/evals/007008.eval.yaml | Covers documentation-only boundaries. |
| .github/skills/azure-typespec-author/evaluate/evals/007007.eval.yaml | Covers client-configuration opt-out. |
| .github/skills/azure-typespec-author/evaluate/evals/007006.eval.yaml | Checks default naming analysis. |
| .github/skills/azure-typespec-author/evaluate/evals/007005.eval.yaml | Checks naming-plan inclusion. |
| .github/skills/azure-typespec-author/evaluate/evals/007004.eval.yaml | Checks delegated direct edits. |
| .github/skills/azure-typespec-author/evaluate/evals/007003.eval.yaml | Covers unsupported language targets. |
| .github/skills/azure-typespec-author/evaluate/evals/007002.eval.yaml | Checks shipped-name preservation. |
| .github/skills/azure-typespec-author/evaluate/evals/007001.eval.yaml | Checks C# naming recommendations. |
| .github/skills/azure-typespec-author/evaluate/evals/003001.eval.yaml | Broadens accepted operation syntax. |
| .github/skills/azure-typespec-author/evaluate/evals/002007.eval.yaml | Accepts alternative payload suffixes. |
| .github/skills/azure-typespec-author/evaluate/evals/002005.eval.yaml | Adds compiled resource grading. |
| .github/skills/azure-typespec-author/evaluate/.vally.yaml | Declares skill mounts and naming suites. |
| .github/skills/azsdk-common-typespec-naming/SKILL.md | Defines shared naming workflow. |
| .github/skills/azsdk-common-typespec-naming/references/naming-conventions.md | Dispatches language-specific guidance. |
| .github/skills/azsdk-common-typespec-naming/references/csharp-naming.md | Defines C# member naming guidance. |
| .github/skills/azsdk-common-typespec-naming/references/csharp-model-naming.md | Defines C# model naming guidance. |
| .github/skills/azsdk-common-typespec-naming/references/apply.md | Defines scoped naming edits. |
| .github/skills/azsdk-common-typespec-naming/evals/README.md | Documents naming evaluation coverage. |
| .github/skills/azsdk-common-typespec-naming/evals/preservation.test.mjs | Tests customization preservation assertions. |
| .github/skills/azsdk-common-typespec-naming/evals/fixtures/standalone-apply/tspconfig.yaml | Configures the minimal fixture. |
| .github/skills/azsdk-common-typespec-naming/evals/fixtures/standalone-apply/package.json | Declares the local compiler shim. |
| .github/skills/azsdk-common-typespec-naming/evals/fixtures/standalone-apply/mock-typespec-compiler/tsp.mjs | Simulates compile-sequence validation. |
| .github/skills/azsdk-common-typespec-naming/evals/fixtures/standalone-apply/mock-typespec-compiler/package.json | Registers the mock compiler command. |
| .github/skills/azsdk-common-typespec-naming/evals/fixtures/standalone-apply/main.tsp | Supplies the naming target. |
| .github/skills/azsdk-common-typespec-naming/evals/fixtures/standalone-apply/existing-client.tsp | Supplies overrides to preserve. |
| .github/skills/azsdk-common-typespec-naming/evals/fixtures/generic-customization-mcp.mjs | Mocks general SDK customization. |
| .github/skills/azsdk-common-typespec-naming/evals/fixtures/customization-mcp.test.mjs | Tests fixture contracts and malformed inputs. |
| .github/skills/azsdk-common-typespec-naming/evals/fixtures/customization-mcp.mjs | Mocks naming validation and customization rejection. |
| .github/skills/azsdk-common-typespec-naming/evals/eval.yaml | Adds naming and customization evaluations. |
| .github/skills/.vally.yaml | Registers the naming evaluation directory. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
/check-enforcer override |
* Extract shared TypeSpec naming skill and tool-based customization Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Cover exact numeric enum naming across TCGC capabilities Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Test generic customization routing Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Refine TypeSpec naming orchestration Make client configuration a separate default authoring step with an explicit opt-out, clarify customization ownership and verification, and document assessment evidence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Make client configuration opt-out non-blocking Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Harden TypeSpec author benchmark behavior Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fix remaining author benchmark failures Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Address naming review safeguards Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Remove naming MCP dependency Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Restore naming MCP workflow Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Clarify TypeSpec naming skill routing Exclude naming-only client.tsp overrides from author routing and make shipped-name compatibility a hard gate before naming style. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fix naming and preview-version benchmark failures Require naming profile reads during default client configuration planning and clarify preview replacement and excluded-default reversal. Add an offline planning regression without relaxing the existing live assertions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Address C# naming review feedback Remove the underscore enum convention and automatic casing guidance, correct date/time examples, and incorporate applicable semantic naming checks from the .NET review rules. Replace obsolete enum expectations and add focused naming regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Defer TypeSpec assessment naming integration Restore the assessment skill to the PR base and remove its naming handoff cases and integration claims. Retain authoring, standalone read-only naming review, and routing boundaries. Track the deferred integration in #17297. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Add fallback for unavailable naming customization tool Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Apply TypeSpec naming overrides directly Replace naming-only customization tool calls with scoped client.tsp edits and align authoring handoffs and regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fix TypeSpec naming benchmark feedback Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Format shared TypeSpec naming skill fixtures Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Sync naming fixture lint fixes from Azure/azure-sdk-tools#17326 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Sync TypeSpec authoring skill naming integration Include the authoring workflow, client configuration reference, validation safeguards, naming evaluations, and compiled-service grader from Azure/azure-sdk-tools#17121. Preserve REST specs' local evaluation setup and adapt the grader for type-aware linting. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Sync latest naming fixture scope validation from tools PR 17326 Import upstream 0996ff06f86f scope-specific customization path validation and expanded regression coverage. Preserve the authoring integration and explicitly type the test response helper for downstream TypeScript narrowing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Summary
Follow up on #17121 to fix the type-aware lint failures exposed by Azure/azure-rest-api-specs#47437.
unknown, narrow requests and arguments before access, and preserve inferred reply types with JSDoc.anyvalues.Validation
The REST specs Protected Files failure is separate: that sync PR needs to be authored by trusted automation or an allowlisted maintainer. This PR does not weaken that policy.