[APIView] WI-14: Approval Inheritance Policy & ClassifyTransition
- 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
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