Improve Gmail threads.list and threads.get conformance#27
Open
Bbbstin wants to merge 12 commits into
Open
Conversation
Threads with no messages are no longer listed because they have no latest-message timestamp.
Capture a sanitized two-message provider response and verify the minimal message shape and order against it.
Prefer the latest visible message date, falling back to the latest member for fully hidden threads. Add sanitized provider captures and regression coverage.
Record sanitized read-side captures for a mixed Spam thread and extend hidden-message regression coverage across Trash and Spam.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
threads.listdeterministic by ordering threads by their latest visible member message, falling back to the latest member for fully hidden threads, with a stable thread ID tie-breaker before offset pagination; persisted Thread rows with no member messages are no longer listedthreads.listlabel filtering with Gmail by requiring one member message to satisfy all requestedlabelIdsthreads.getwith the read contract by ordering messages deterministically, limitingformattofull,metadata, andminimal, and treating the same empty-thread orphan state as not foundincludeSpamTrash, result estimates, pagination, same-subject thread identity, formats, and orphan handlingValidation
cd packages/environments/mock-gmail && uv run --extra dev pytest tests/test_conformance.py -q(43 passed)cd packages/environments/mock-gmail && uv run --extra dev pytest tests -q(260 passed)git diff --checkNotes
mainand is independent of Fix Gmail multi-label filtering #26 (both touchtests/test_api.py, but in unrelated tests: Fix Gmail multi-label filtering #26 adds message-list filtering coverage, while this PR only makes the thread-deletion setup deterministic)scripts/smoke_dev.shand Docker/base-image checks are not applicable because this PR does not change launcher, control, devhub, Docker, or base-image behavior