Azure / Azure/azure-sdk-tools

[API View] Validate and Enforce No Duplicate Line IDs

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

Description

## Summary
While reviewing a code file in API View, I encountered a bug caused by duplicate element IDs in the following revision:
🔗 https://spa.apiview.dev/review/8129e6c762924e02836a2e79b2b480a6?activeApiRevisionId=55c25374ba80457c94d26ddb6d83600e
This issue originated from the Python parser, and it caused the "Generate Copilot Review" flow to fail.

## Problem
- The error is not clearly communicated to users.
- The failure occurs late in the flow, making it harder to debug.
- There is no early validation to catch duplicate line IDs.

## Proposal
Introduce validation when a code file is created to:
- Detect duplicate line IDs early.
- Display a clear error message that:
- Identifies the specific duplicate line ID.
- Helps users understand that the parser needs to be fixed.

Contributor guide

Open the contributing guide

Research direction

Start at the API View code-file creation path and reproduce the failure using the linked revision. Trace how line IDs from the Python parser are handled; done means duplicate IDs are rejected early with an error naming the duplicated ID and directing users to fix the parser.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, python
Domain
api, backend, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.