Skip to content

test(proto): support descriptors without the legacy label API - #8552

Open
dipeshbabu wants to merge 1 commit into
livekit:mainfrom
dipeshbabu:codex/fix-protobuf-descriptor-tests
Open

dipeshbabu wants to merge 1 commit into
livekit:mainfrom
dipeshbabu:codex/fix-protobuf-descriptor-tests

Conversation

@dipeshbabu

Copy link
Copy Markdown

The protocol coverage tests crash with protobuf 7.36.2 because _repeated() evaluates fd.label as the default argument to getattr(), even when fd.is_repeated exists. Current descriptors expose is_repeated without the legacy label attribute, so the coverage assertions never run.

Read is_repeated first and evaluate the legacy fallback only when that attribute is absent. Add singular and repeated regression cases for both API shapes.

Validation:

  • The combined upstream-based test run reproduced six failures in the existing protocol coverage cases on protobuf 7.36.2. Direct checks of real Timestamp and ListValue descriptors reproduced the same AttributeError before the fix and return False/True afterward.
  • All 22 protocol coverage tests pass with protobuf 7.36.2, including the four compatibility regressions.
  • All four proposed fixes merge together without conflicts; the combined workflow, tool, AgentTask, and protocol suites pass 251 tests.
  • Ruff lint, formatting, and whitespace checks pass.

This is a test-only fix based directly on upstream main at cbb5770. Open-PR searches for is_repeated, descriptor, and protobuf found no overlapping fix; the dependency-update PR #7937 changes package manifests only.

@dipeshbabu
dipeshbabu requested a review from a team as a code owner November 14, 2026 02:18

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant