Skip to content

feat(hub): additive optional limit/keyset pagination on unbounded list endpoints (#291)#293

Merged
physercoe merged 1 commit into
mainfrom
agent/deepseek-1/291-feat-hub-additive-optional-limit-keyset
Jun 14, 2026
Merged

feat(hub): additive optional limit/keyset pagination on unbounded list endpoints (#291)#293
physercoe merged 1 commit into
mainfrom
agent/deepseek-1/291-feat-hub-additive-optional-limit-keyset

Conversation

@agentfleets

Copy link
Copy Markdown
Collaborator

Closes #291

Summary

  • Audit events (GET /v1/teams/{team}/audit): added ?before= / ?after= ISO-8601 keyset cursors on ts, modelled on the agent_events (ts, seq) pattern
  • Channel events (GET /v1/teams/{team}/channels/{channel}/events): added ?before= keyset cursor on received_ts
  • A2A cards (GET /v1/teams/{team}/a2a/cards): added optional ?limit=N (absent = unlimited, max 1000)

All changes are purely additive — when before/after/limit are absent, the response is byte-identical to the prior release.

Endpoints paginated + params

Endpoint Params
GET /v1/teams/{team}/audit ?limit=, ?before=, ?after=
GET /v1/teams/{team}/channels/{channel}/events ?limit=, ?since=, ?before=
GET /v1/teams/{team}/a2a/cards ?handle=, ?limit=

Test plan

  • go build ./... and go vet ./... pass
  • go test ./internal/server/ -timeout=20m passes (332s)
  • TestListAudit_KeysetPagination — backward/forward keyset walk, no gap/overlap, order, limit caps
  • TestListEvents_BeforeCursor — before cursor walk, boundary cases
  • TestListTeamA2ACards_Limit — no-params unchanged, limit caps, limit=0 ignored, limit clamped

Note

Whether to impose a protective default truncation limit is a separate product decision — this PR does not add one.

🤖 Generated with Claude Code

…t endpoints (#291)

- audit events: add ?before= / ?after= ISO-8601 keyset cursors on ts
- channel events: add ?before= keyset cursor on received_ts
- A2A cards: add optional ?limit=N (absent = unlimited, max 1000)
- Tests: keyset walk no-gap/no-overlap, limit caps, no-params unchanged

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@agentfleets agentfleets requested a review from physercoe June 14, 2026 05:14
@physercoe physercoe merged commit 7ebb006 into main Jun 14, 2026
4 checks passed
@physercoe physercoe deleted the agent/deepseek-1/291-feat-hub-additive-optional-limit-keyset branch June 14, 2026 05:14
physercoe pushed a commit that referenced this pull request Jun 14, 2026
Hub robustness sweep (#74#79) + Projects-tab segmented sub-tabs.
- ADR-045 D4 storage maintenance (#288)
- raw-SQL-error no-leak sweep (#280/#283), rows.Err audit (#286),
  FTS/routing status codes (#287), owner-or-steward gate (#281),
  read-pool cap + rows.Close defer (#292), additive pagination (#293)
- segmented Projects | Workspaces tabs (#289)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

feat(hub): additive optional limit/keyset pagination on unbounded list endpoints (#78)

3 participants