A2A chat read API: thread list, cursor pagination, unread counts (unified-chat slice 4) - #275
Conversation
…tion tests - fix a2a_threads sort order: was alphabetical by thread name, now ordered by latest activity timestamp descending - strip internal _last_ts from returned thread objects (not part of API shape) - export a2a_threads and a2a_thread_messages in service.__all__ - add tests: threads ordered by latest activity, before/after cursors, limit clamped at 200, stable pagination across concurrent insert, message id passed to since= rejected with clear 400 error
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Warning Review limit reached
Next review available in: 8 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by step-3.7-flash · Input: 66K · Output: 20.3K · Cached: 1.1M |
|
APPROVED with one required change. The behaviour change is correct and I proved it in both directions rather than reading the diff. One documentation gap has to close before this lands, because after this PR the ordering is a contract with no written record anywhere. The change is real and its test is not vacuousRed control — this branch's tests against master's Green — the same tests against this branch: So the ordering test fails on master by its own assertion, naming the exact defect, and passes here. That is the bar #272/#273 established and this clears it. Worth stating plainly: the other five tests pass on master too. They are regression coverage for the cursor/limit behaviour that already worked, not evidence for this change. One test defends the change; five defend what was already there. Both are worth having, but the PR reads as six-tests-for-a-fix and it is one.
|
…led as cards The bounded-probe question is ruled (bus 2679): executing a pre-specified acceptance bar is orchestration, inventing one is hands-on, and a probe run under the usage band must print a positive control or a denominator. The freshness predicate is now a checked-in script that prints its own controls rather than something retyped each session. Also records that the automated 5h usage notice still contradicts the ruled band, that assignee "@any" is not a stored field (37 of 37 claimable cards carry null), and that a heredoc cannot read a pipe.
…281) The GET /a2a/threads endpoint was changed in PR #275 to return threads sorted most-recently-active first (replacing the previous alphabetical ordering), but that contract change was unrecorded apart from the sort line and one test assertion. Add a sentence to the a2a_threads docstring stating the ordering and noting the prior behaviour, so callers relying on alphabetical order know to sort client-side. Closes tsk-4f7hsa.
CARD TITLE (intent, not commit subject): A2A chat read API: thread list, cursor pagination, unread counts (unified-chat slice 4)
Autonomous build of board card tsk-qthbox.
CONSUMER-VISIBLE CONTRACT CHANGE — read before merging
GET /a2a/threadschanges its sort order from alphabetical by thread name tomost-recently-active first. This is a shipped endpoint. Any consumer that relies on
the old ordering — including anything that reads the first element, or diffs the list
positionally — changes behaviour silently the moment this merges; nothing errors.
Measured before merge (2026-08-14), so the risk is stated with a number rather than as a
caution: zero consumers today. The taOSmd dashboard calls
/a2a/channels,/a2a/members,/a2a/messagesand/a2a/stream, not/a2a/threads; a filesystem sweepacross
~/Developmentand the fleet scripts (control: the same sweep for/a2a/messagesreturns 8 files) finds no caller of
/a2a/threadsoutside this repo. The endpoint appearsin
http_server.py,remote.py,service.pyand its tests, and nowhere else — it is notmentioned in
docs/,README.mdorCHANGELOG.md.So this is safe to land now, and the reason it is safe is that the endpoint has no
audience yet — not that the change is compatible. Flagged to @taOS-dev on the bus.
by latest activity timestamp descending
limit clamped at 200, stable pagination across concurrent insert,
message id passed to since= rejected with clear 400 error
Files:
taosmd/service.py | 8 +++--
tests/test_http_server.py | 91 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 97 insertions(+), 2 deletions(-)