Skip to content

feat(tap): dynamic collection filters and multiple signal collections#1338

Open
trezy wants to merge 1 commit intobluesky-social:mainfrom
gamesgamesgamesgamesgames:feat/dynamic-tap-config
Open

feat(tap): dynamic collection filters and multiple signal collections#1338
trezy wants to merge 1 commit intobluesky-social:mainfrom
gamesgamesgamesgamesgames:feat/dynamic-tap-config

Conversation

@trezy
Copy link

@trezy trezy commented Feb 16, 2026

Summary

Adds endpoints for dynamically updating collection filters at runtime, eliminating the need to restart Tap to add new collections.

Use case

I'm building HappyView, a lexicon-driven AppView software. I'm trying to leverage existing software in the Atmosphere that solves AppView responsibilities, such as Tap. The Tap server works well, except that we have to restart the whole server to add new collections.

This PR makes those collections dynamic, so they can be updated via an endpoint. This allows HappyView (and any other software leveraging Tap) to update the collections without further user intervention (i.e. restarting the Tap server).

New Endpoints

Path Description
GET /collection-filters Get current collection filters
PUT /collection-filters Update collection filters at runtime
GET /signal-collections Get current signal collections
PUT /signal-collections Update signal collections at runtime

All endpoints accept/return { "collections": ["nsid1", "nsid2"] }.

Changes

  • signal-collection string flag replaced with signal-collections string slice (backwards-compatible; still reads TAP_SIGNAL_COLLECTION env)
  • Collection filters and signal collections are now protected by sync.RWMutex for safe concurrent read/write
  • TapServer receives a reference to Resyncer so filter updates propagate to both firehose and resync workers
  • Pluralised flags that are no longer singular

Test plan

  • Verify TAP_SIGNAL_COLLECTION env still works (backwards compat)
  • Verify TAP_SIGNAL_COLLECTIONS env works with comma-separated values
  • PUT /collection-filters updates firehose and resyncer filtering in real time
  • PUT /signal-collections updates repo discovery in real time
  • Existing tests pass (go test ./cmd/tap/...)

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