Skip to content

feat: add ?include=destination to attempts#780

Open
alexluong wants to merge 7 commits intomainfrom
feat/include-destination
Open

feat: add ?include=destination to attempts#780
alexluong wants to merge 7 commits intomainfrom
feat/include-destination

Conversation

@alexluong
Copy link
Collaborator

@alexluong alexluong commented Mar 23, 2026

Summary

  • ?include=destination on attempts endpoints: List and retrieve attempts can now include the full destination object in responses, avoiding extra API calls for clients
  • New ListDestination method: Adds batch-fetch capability with TenantID + IDs + Type + Topics filters, replacing the old ListDestinationByTenant variadic-opts API
  • N+1 elimination: listAttemptsInternal now groups destination IDs by tenant and batch-fetches via ListDestination instead of calling RetrieveDestination per unique destination
  • Removed ListDestinationByTenant: All callers migrated, old interface method + types (ListDestinationByTenantOpts, DestinationFilter, WithDestinationFilter) removed

Commits

Commit Description
d1848189 Add ?include=destination to list/retrieve attempts endpoints
fa0083a9 Extract destinationDisplayer interface for testability
ca98ddbe Surface errors, add nullable fields, expand test coverage
23dd03ff Replace ListDestinationByTenant with ListDestination

Test plan

  • go build ./... passes
  • go vet ./... passes
  • go test ./internal/tenantstore/... -count=1 — all pass (memtenantstore + redistenantstore)
  • go test ./internal/apirouter/... -count=1 — all pass
  • 10 new drivertest conformance tests for ListDestination (IDs filter, deleted exclusion, wrong tenant, type/topics filters)

🤖 Generated with Claude Code

alexluong and others added 4 commits March 23, 2026 00:19
Batch-fetches destinations from tenant store and displays them via
registry when include=destination is requested.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Decouples display logic from destregistry.Registry via a
destinationDisplayer interface used by both DestinationHandlers
and LogHandlers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Surface unexpected errors from RetrieveDestination/Display instead of
  silently swallowing (deleted/not-found destinations still skip gracefully)
- Mark response_data, event, destination as nullable in OpenAPI spec
- Add include=destination to all 4 attempt endpoint descriptions in spec
- Add tests: destination-scoped list with include, deleted destination
  on both retrieve and list

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ListDestination method with TenantID + IDs + Type + Topics filters,
replacing the old ListDestinationByTenant variadic-opts API. This enables
batch-fetch by ID (used in listAttemptsInternal to eliminate N+1 calls)
and provides a cleaner filter interface.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
outpost-docs Ready Ready Preview, Comment Mar 23, 2026 9:34am
outpost-website Ready Ready Preview, Comment Mar 23, 2026 9:34am

Request Review

@alexluong alexluong changed the title feat: add ?include=destination to attempts + replace ListDestinationByTenant with ListDestination feat: add ?include=destination to attempts Mar 23, 2026
alexluong and others added 2 commits March 23, 2026 16:03
…lision

Also remove unnecessary slice copy in HMGET args and dead `_ = data`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ayList

Remove unnecessary interface + wrapper struct pattern. Add DisplayList
helper to consolidate repeated display loop.

Co-Authored-By: Claude Opus 4.6 <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.

2 participants