Azure / Azure/azure-sdk-tools

[APIView] WI-14: Approval Inheritance Policy & ClassifyTransition

Open
#15,005 0 comments 0 reactions 0 assignees View on GitHub
APIView
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

## Goal

Define the per-language approval inheritance policy and the version-transition classifier.

**Area:** Approvals · **Depends on:** Nothing (parallel with WI-1) · **Stable alone:** ✅ Yes — pure infrastructure, no behavior change

## Deliverables

### Configuration

Add keys to Azure App Configuration:
- `ApprovalInheritancePolicy:Default` — JSON blob per `ApprovalInheritancePolicyOptions` schema (§4.6.1)
- `ApprovalInheritancePolicy:{Language}` — Language-specific overrides (optional)

Create `APIViewWeb/Models/ApprovalInheritancePolicyOptions.cs` with `InheritanceRule` enum and six transition fields. Register as `IOptionsSnapshot>`.

### Implement `ClassifyTransition()`

Static method in `VersionNormalizationHelper.cs`:
1. Parse both versions' `VersionIdentifier` via `AzureEngSemanticVersion`
2. Determine transition kind: `PrereleaseToPrerelease`, `PrereleaseToStable`, `StableToPrerelease`, `StablePatch`, `StableMinor`, `StableMajor`
3. Look up rule in per-language policy (fallback to `Default`)

### Tests

- `VersionNormalizationTests.cs` — `ClassifyTransition` for all 6 transition kinds; language-specific overrides; default fallback

Contributor guide

Open the contributing guide

Research direction

Start with the ApprovalInheritancePolicyOptions schema in the issue and the existing Azure App Configuration registration patterns. Implement the policy and ClassifyTransition work in APIViewWeb/Models/ApprovalInheritancePolicyOptions.cs and VersionNormalizationHelper.cs, then run VersionNormalizationTests.cs; done means all six transition kinds, language overrides, and default fallback are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.