615 Commits

Author SHA1 Message Date
Patrick Linnane
acd5185984
Fix various typos (#1373) 2023-07-25 22:43:05 -05:00
Daniel Holmgren
46beab62ee
Fix flaky partition queue test (#1386)
fix flaky partition queue test
2023-07-25 18:54:18 -05:00
devin ivy
353ff19f99
Apply block rules for third parties on replies and embeds (#1378)
* apply block rules for third parties on replies and embeds

* tidy terminology around blocking and actor relationships

* apply third-party blocking functionality to appview

* tidy, bsky tests
2023-07-24 16:35:04 -04:00
Daniel Holmgren
23d701e723
Refactor appview media embeds (#1343)
* refactor appview services

* tidy types

* Allow moderators to take and reverse actor takedowns (#1330)

allow moderators to take and reverse actor takedowns

*  Allow searching reports by moderator did (#1283)

*  Allow searching reports by moderator did

*  Remove .only flags on tests

*  Update snapshot

*  Add checks for did match in actions

* v0.4.1

* Make sequencer leader behavior optional on pds (#1250)

* make sequencer leader behavior optional on pds

* tidy

* use 127.0.0.1 in with-test-db.sh for colima (#1297)

So, since Docker Desktop has licensing issues, some folks use colima for
running containers on their macOS machines (The licensing exempted
CLI-only version of Docker only exists on Linux).

Unfortunately, colima binds host ports only on the IPv4 localhost
address (`127.0.0.1`) while the atproto postgres clients will attempt to
connect to the IPv6 localhost address (`::1`) that macOS sets in
/etc/hosts.  See https://github.com/abiosoft/colima/issues/583 and
https://github.com/lima-vm/lima/issues/1330 for the tickets against
colima. (Docker Desktop binds to both IPv4 and IPv6 localhost addresses
and so doesn't have this issue.)

To workaround this silly issue, we can use `localhost` within the docker
containers and docker-compose, but need to set the `DB_POSTGRES_URL` env
var to use the IPv4 localhost explicitly.

(Asking folks to edit /etc/hosts causes other tools to break and will be
overridden on each OS upgrade.)

* Subscription util tests (#1295)

* consecutive list tests

* flesh out subscription util tests

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>

* Content reporting on record fields (#1351)

* content reporting on record fields

* fix test

* tests

* tidy

* Check rkey contents just for non-tids (#1353)

check rkey content for non-tids

*  Added new procedure for sending admin email (#1312)

* 🚧 Added new lexicon for sending admin email

*  Add moderation mailer

*  Switch to text email content from html

* 🧹 Cleanup some early implementation code and reflect PR reivew

*  Use smtp host instead of gmail service config

*  Move to using single smtp url

* v0.4.2

* Patch up a couple sqlite tests (#1355)

patch up a couple sqlite tests

* Increase appview keepalive (#1360)

increase keepalive to 90s

* Appview - serve feed skeletons (#1265)

* proxy timeline skeleton construction to appview

* add getFeedSkeleton to appview

* mount route

* smart proxy feed skeletons

* tests

* proper error code

* only proxy specific feeds

* build branch

* update proxyable feed logic, should use feed publisher rather than generator

* fix feed proxy tests, configure feed publisher (in addition to generator)

* hotfix: prevent user-supplied rkey on posts with createRecord (#1313)

* prevent user-supplied rkey on posts with createRecord

* allow empty-string rkey parameter

Co-authored-by: devin ivy <devinivy@gmail.com>

---------

Co-authored-by: devin ivy <devinivy@gmail.com>

* add slurs to reserved words (#1318)

* add slurs to reserved words (#1314)

* Update reserved.ts

Add slurs to reserved words

* Update reserved.ts

fix typo

* Update reserved.ts to clean up the slur list

* linting

* pluralise

---------

Co-authored-by: jess <jesslarkdev+gh@gmail.com>

* identifier: tweaks and additions to slur list (#1319)

* Refactor appview repo subscription for memleak (#1308)

* refactor to remove closure in loop

* move consecutive item out of p-queue

* Handle validation improvements (#1336)

* Handle matches and false positives for unacceptable words in handles

* move handle validation logic to pds

* missed merge

* add cfg flag

* encode lists

* fix build issues

* move words to cfg

* tidy

---------

Co-authored-by: Jaz Volpert <ericvolp12@gmail.com>

* Allow moderators to take and reverse actor takedowns (#1330)

allow moderators to take and reverse actor takedowns

*  Allow searching reports by moderator did (#1283)

*  Allow searching reports by moderator did

*  Remove .only flags on tests

*  Update snapshot

*  Add checks for did match in actions

* v0.4.1

* Make sequencer leader behavior optional on pds (#1250)

* make sequencer leader behavior optional on pds

* tidy

* use 127.0.0.1 in with-test-db.sh for colima (#1297)

So, since Docker Desktop has licensing issues, some folks use colima for
running containers on their macOS machines (The licensing exempted
CLI-only version of Docker only exists on Linux).

Unfortunately, colima binds host ports only on the IPv4 localhost
address (`127.0.0.1`) while the atproto postgres clients will attempt to
connect to the IPv6 localhost address (`::1`) that macOS sets in
/etc/hosts.  See https://github.com/abiosoft/colima/issues/583 and
https://github.com/lima-vm/lima/issues/1330 for the tickets against
colima. (Docker Desktop binds to both IPv4 and IPv6 localhost addresses
and so doesn't have this issue.)

To workaround this silly issue, we can use `localhost` within the docker
containers and docker-compose, but need to set the `DB_POSTGRES_URL` env
var to use the IPv4 localhost explicitly.

(Asking folks to edit /etc/hosts causes other tools to break and will be
overridden on each OS upgrade.)

* Subscription util tests (#1295)

* consecutive list tests

* flesh out subscription util tests

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>

* Content reporting on record fields (#1351)

* content reporting on record fields

* fix test

* tests

* tidy

* Check rkey contents just for non-tids (#1353)

check rkey content for non-tids

*  Added new procedure for sending admin email (#1312)

* 🚧 Added new lexicon for sending admin email

*  Add moderation mailer

*  Switch to text email content from html

* 🧹 Cleanup some early implementation code and reflect PR reivew

*  Use smtp host instead of gmail service config

*  Move to using single smtp url

* v0.4.2

* Patch up a couple sqlite tests (#1355)

patch up a couple sqlite tests

* enable feeds & build branch

* disable branch building & enable without proxy header

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
Co-authored-by: David Buchanan <d@vidbuchanan.co.uk>
Co-authored-by: jess <jesslarkdev+gh@gmail.com>
Co-authored-by: bnewbold <bnewbold@robocracy.org>
Co-authored-by: Jaz Volpert <ericvolp12@gmail.com>
Co-authored-by: Foysal Ahamed <cfaion341@gmail.com>
Co-authored-by: Jeff Hodges <jeff@somethingsimilar.com>

* add optional ilike query to getPopularFeedGenerators

* fix lint

* fix lint

* handle sqlite too in pds only

* fix lint

* v0.4.3

* Include takendown posts for admins (feature branch) (#1361)

* 🚧 WIP including takendown posts on author feed

*  Add takedown id on posts when including taken down posts

* 🧹 Cleanup the auth verifier and other bsky package code

*  Add test for admin getAuthorFeed

* 🧹 Cleanup lexicon and exclude takedownId

* more explicit plumbing for post hydration w/o requester or with takedown info

* pass along flag for soft-deleted actors

* cleanup getAuthorFeed w/ auth

* reorg getAuthorFeed logic around role/access-based auth

---------

Co-authored-by: Foysal Ahamed <cfaion341@gmail.com>

*  Disable signing up with invite code from takendown account (#1350)

* fix viewer data

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
Co-authored-by: Foysal Ahamed <cfaion341@gmail.com>
Co-authored-by: Jeff Hodges <jeff@somethingsimilar.com>
Co-authored-by: David Buchanan <d@vidbuchanan.co.uk>
Co-authored-by: jess <jesslarkdev+gh@gmail.com>
Co-authored-by: bnewbold <bnewbold@robocracy.org>
Co-authored-by: Jaz Volpert <ericvolp12@gmail.com>
Co-authored-by: Eric Bailey <git@esb.lol>
2023-07-24 13:56:31 -05:00
Eric Bailey
b2ef3865bc
Merge pull request #1365 from bluesky-social/eric/search-getPopularFeedGenerators
add optional `ILIKE` query to `getPopularFeedGenerators`
2023-07-20 11:00:51 -05:00
Eric Bailey
0b33d30140 fix lint 2023-07-19 17:47:32 -05:00
Daniel Holmgren
2836ee38bb
Appview - serve feed skeletons (#1265)
* proxy timeline skeleton construction to appview

* add getFeedSkeleton to appview

* mount route

* smart proxy feed skeletons

* tests

* proper error code

* only proxy specific feeds

* build branch

* update proxyable feed logic, should use feed publisher rather than generator

* fix feed proxy tests, configure feed publisher (in addition to generator)

* hotfix: prevent user-supplied rkey on posts with createRecord (#1313)

* prevent user-supplied rkey on posts with createRecord

* allow empty-string rkey parameter

Co-authored-by: devin ivy <devinivy@gmail.com>

---------

Co-authored-by: devin ivy <devinivy@gmail.com>

* add slurs to reserved words (#1318)

* add slurs to reserved words (#1314)

* Update reserved.ts

Add slurs to reserved words

* Update reserved.ts

fix typo

* Update reserved.ts to clean up the slur list

* linting

* pluralise

---------

Co-authored-by: jess <jesslarkdev+gh@gmail.com>

* identifier: tweaks and additions to slur list (#1319)

* Refactor appview repo subscription for memleak (#1308)

* refactor to remove closure in loop

* move consecutive item out of p-queue

* Handle validation improvements (#1336)

* Handle matches and false positives for unacceptable words in handles

* move handle validation logic to pds

* missed merge

* add cfg flag

* encode lists

* fix build issues

* move words to cfg

* tidy

---------

Co-authored-by: Jaz Volpert <ericvolp12@gmail.com>

* Allow moderators to take and reverse actor takedowns (#1330)

allow moderators to take and reverse actor takedowns

*  Allow searching reports by moderator did (#1283)

*  Allow searching reports by moderator did

*  Remove .only flags on tests

*  Update snapshot

*  Add checks for did match in actions

* v0.4.1

* Make sequencer leader behavior optional on pds (#1250)

* make sequencer leader behavior optional on pds

* tidy

* use 127.0.0.1 in with-test-db.sh for colima (#1297)

So, since Docker Desktop has licensing issues, some folks use colima for
running containers on their macOS machines (The licensing exempted
CLI-only version of Docker only exists on Linux).

Unfortunately, colima binds host ports only on the IPv4 localhost
address (`127.0.0.1`) while the atproto postgres clients will attempt to
connect to the IPv6 localhost address (`::1`) that macOS sets in
/etc/hosts.  See https://github.com/abiosoft/colima/issues/583 and
https://github.com/lima-vm/lima/issues/1330 for the tickets against
colima. (Docker Desktop binds to both IPv4 and IPv6 localhost addresses
and so doesn't have this issue.)

To workaround this silly issue, we can use `localhost` within the docker
containers and docker-compose, but need to set the `DB_POSTGRES_URL` env
var to use the IPv4 localhost explicitly.

(Asking folks to edit /etc/hosts causes other tools to break and will be
overridden on each OS upgrade.)

* Subscription util tests (#1295)

* consecutive list tests

* flesh out subscription util tests

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>

* Content reporting on record fields (#1351)

* content reporting on record fields

* fix test

* tests

* tidy

* Check rkey contents just for non-tids (#1353)

check rkey content for non-tids

*  Added new procedure for sending admin email (#1312)

* 🚧 Added new lexicon for sending admin email

*  Add moderation mailer

*  Switch to text email content from html

* 🧹 Cleanup some early implementation code and reflect PR reivew

*  Use smtp host instead of gmail service config

*  Move to using single smtp url

* v0.4.2

* Patch up a couple sqlite tests (#1355)

patch up a couple sqlite tests

* enable feeds & build branch

* disable branch building & enable without proxy header

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
Co-authored-by: David Buchanan <d@vidbuchanan.co.uk>
Co-authored-by: jess <jesslarkdev+gh@gmail.com>
Co-authored-by: bnewbold <bnewbold@robocracy.org>
Co-authored-by: Jaz Volpert <ericvolp12@gmail.com>
Co-authored-by: Foysal Ahamed <cfaion341@gmail.com>
Co-authored-by: Jeff Hodges <jeff@somethingsimilar.com>
2023-07-19 17:38:43 -05:00
Eric Bailey
64137c7e5c add optional ilike query to getPopularFeedGenerators 2023-07-19 17:25:49 -05:00
Daniel Holmgren
8c32ed363b
Increase appview keepalive (#1360)
increase keepalive to 90s
2023-07-19 10:03:01 -04:00
Foysal Ahamed
775944e84a
Added new procedure for sending admin email (#1312)
* 🚧 Added new lexicon for sending admin email

*  Add moderation mailer

*  Switch to text email content from html

* 🧹 Cleanup some early implementation code and reflect PR reivew

*  Use smtp host instead of gmail service config

*  Move to using single smtp url
2023-07-17 19:06:44 -04:00
Daniel Holmgren
8c9becc063
Subscription util tests (#1295)
* consecutive list tests

* flesh out subscription util tests

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-07-17 15:07:35 -04:00
Foysal Ahamed
b9ca76f012
Allow searching reports by moderator did (#1283)
*  Allow searching reports by moderator did

*  Remove .only flags on tests

*  Update snapshot

*  Add checks for did match in actions
2023-07-14 16:05:56 -07:00
devin ivy
53c4956146
Allow moderators to take and reverse actor takedowns (#1330)
allow moderators to take and reverse actor takedowns
2023-07-14 14:37:32 -07:00
Daniel Holmgren
89f21e9571
Refactor appview repo subscription for memleak (#1308)
* refactor to remove closure in loop

* move consecutive item out of p-queue
2023-07-13 13:35:29 -05:00
Ansh
08dc2b725d
Pagination on getPopularFeedGenerators (#1293)
* add temporary page-based pagination

* use cursor & limit for pagination

* tests

* add to appview

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2023-07-07 13:49:02 -05:00
devin ivy
b92288cfca
Sync-up appview feed date threshold w/ pds (#1286)
sync-up appview feed date threshold w/ pds
2023-07-06 23:31:11 -04:00
devin ivy
d7f87418a5
Tidy repo sub usage of indexing service (#1296)
* use single indexing service in repo sub

* tidy
2023-07-06 19:44:52 -05:00
devin ivy
3ea892bc57
Add administrative triage role, update moderator role (#1216)
* setup triage user on pds, update moderator username (invalidates old token)

* initial pass on triage access on pds, limit access to email addrs

* apply moderator vs triage rules on taking and reversing mod actions for pds

* update pds tests for triage auth role

* setup moderator and triage roles on bsky appview

* apply mod and triage access rules to bsky admin endpoints

* reframe admin auth as role-based auth, tidy auth apis

* tidy

* build

* revert change to basic auth username for role-based auth
2023-07-06 15:18:52 -04:00
Daniel Holmgren
fde94736bc
Desanctify hellthread (#1289)
* remove blessed hellthread

* tweak hot classic labels
2023-07-05 20:40:49 -05:00
Daniel Holmgren
05a7c46192
Add migrations for handmade indices (#1266)
* add indices

* add record index to bsky

* sync-up bsky index migration, remove duplicate index

* backpressure on bsky backfill indexing (#1268)

* backpressure on bsky backfill indexing

* skip image resolution for text labeler

* increase background queue concurrency for backfill

* tidy

* Proxy timeline skeleton construction (#1264)

proxy timeline skeleton construction to appview

* Only pass through known params on timeline skeleton (#1270)

only pass through own params

* Require headers on getRecord proxy (#1271)

require headers on getRecord proxy

* Add boolean for enabling generic appview proxying (#1273)

* add boolean config for enabling generic proxying

* tweak

* tweak cfg var name

* tweak

* 🐛 Only ignore reports for specific at-uri when ignoreSubject contains at-uri (#1251)

* Move timeline construction to appview (#1274)

full switch timeline construction to appview

* Better propagate errors on repo streams (#1276)

better propgate errors on repo streams

* Log pds sequencer leader stats (#1277)

log pds sequencer leader stats

* Explicit dns servers (#1281)

* add ability to setup explicit dns servers

* cleanup

* fix

* reorder

* pr feedback

* Thread through id-resolver cfg (#1282)

thread through id-resolver-cfg

* Bsky log commit error (#1275)

* don't bail on bad record index

* add build

* temporarily disable check, full reindex on rabase

* don't bail on bad record index during rebase, track last commit on rebase

* log bsky repo subscription stats

* add running and waiting count to repo sub stats

* re-enable fast path for happy rebases

* only hold onto seq in cursor consecutivelist, don't hold onto whole completed messages

* Misc scaling (#1284)

* limit backsearch to 1 day instead of 3

* lower like count threshold

* bump to 6

* disable like count check

* disable with friends

* preemptively cache last commit

* inline list mutes

* actor service

* label cache

* placehodler on popular with friends

* bulk sequence

* no limit but chunk

* bump chunk to 5k

* try 10k

* fix notify

* tweaking

* syntax

* one more fix

* increase backfill allowance

* full refresh label cache

* limit 1 on mute list

* reserve aclu handle

* clean up testing with label cache

* note on with-friends

* rm defer from label cache

* label cache error handling

* rm branch build

* build appview

* update indices

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
Co-authored-by: Foysal Ahamed <cfaion341@gmail.com>
2023-07-05 17:22:53 -05:00
devin ivy
bb2848e7f5
Bsky log commit error (#1275)
* don't bail on bad record index

* add build

* temporarily disable check, full reindex on rabase

* don't bail on bad record index during rebase, track last commit on rebase

* log bsky repo subscription stats

* add running and waiting count to repo sub stats

* re-enable fast path for happy rebases

* only hold onto seq in cursor consecutivelist, don't hold onto whole completed messages
2023-07-05 15:01:13 -04:00
Foysal Ahamed
03200c1d8b
🐛 Only ignore reports for specific at-uri when ignoreSubject contains at-uri (#1251) 2023-07-03 15:21:16 -04:00
Daniel Holmgren
e7a0d27f1f
Proxy timeline skeleton construction (#1264)
proxy timeline skeleton construction to appview
2023-07-03 11:28:39 -05:00
devin ivy
7637fdbf10
backpressure on bsky backfill indexing (#1268)
* backpressure on bsky backfill indexing

* skip image resolution for text labeler

* increase background queue concurrency for backfill

* tidy
2023-07-03 09:48:27 -04:00
devin ivy
2e4a114379
Remove post hierarchy indexing from bsky appview (#1257)
* remove post_hierarchy from db model and indexing in bsky appview

* update bsky appview getPostThread to use recursive query to build thread

* add covering index to speed-up descendents query

* tidy post/notification processing w/o post_hierarchy

* tidy, disallow infinitely following reply cycles
2023-06-30 18:18:04 -04:00
Daniel Holmgren
ee68a4037b
Appview - Invalid handles (#1244)
* run with-test-db in monorepo test

* improve pg script

* tidy

* namespace bsky pg schemas

* differentiate schemas

* clean up script

* first pass at invalid handles in appview

* tests for handle invalidation

* move mock to instance instead of prototype

* change network mocks in general

* fixing pagination on actor-search

* fix snap & normalize handles on index

* handling did pagination + update tests

* one last update
2023-06-30 16:02:47 -05:00
Daniel Holmgren
9263ddc64d
Add compression in http res (#1022)
* add compression

* compress carfiles

* update package version

* add tests

* one more test

* remove compressible dep

* add gzip to appview

* fix package.json
2023-06-29 10:24:48 -05:00
Daniel Holmgren
207d44796d
Fix dev env package (#1245)
* v0.2.1

* fix dev-env publish

* v0.2.2

* fix package.json
2023-06-28 16:38:26 -05:00
Daniel Holmgren
ba870d3dbe
Run test DB for full monorepo tests (#1225)
* run with-test-db in monorepo test

* improve pg script

* tidy

* namespace bsky pg schemas

* differentiate schemas

* clean up script

* tweaking script
2023-06-28 15:12:37 -05:00
dholms
b852d2e3b4 publish bsky 2023-06-27 19:45:43 -05:00
Daniel Holmgren
0c78bb4992
Appview - use sortAt (#1242)
* appview return sortAt as indexedAt

* rm logs
2023-06-26 20:01:18 -05:00
devin ivy
733325317e
Miscellaneous perf improvements and bsky sync-up (#1239)
* sync-up bsky appview to apply takedowns during hydration from #1232

* apply blocks and mutes on bsky appview custom algos

* hit index on with-friends algo pagination

* more performant query for fetching invite codes with uses

* tidy

* simplify query for actor typeahead for maximal use of trigram index
2023-06-26 14:36:16 -04:00
Daniel Holmgren
c96777df71
Appview limit thread recursion (#1235)
add base case for thread recursion
2023-06-23 16:51:57 -05:00
Ansh
0306f81d37
Add ability to embed lists (#1188)
* add cid to ListView and ListViewBasic

* add test for mute list embed

* add support for list embeds views

* test

* port to appview

* update missing snap

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2023-06-23 16:30:52 -04:00
devin ivy
3da0324873
Post record language tagging, lexicon language format (#1219)
* Add languages field to post record

* helper for parsing bcp47

* add language format to lexicon

* codegen for post record langs field

* re-export language parsing in api package

* tests and tidy for lexicon language format

* index post langs, in-progress

* update snapshots, fixes record-with-media embed issue

* index post langs on bsky appview

* don't bother indexing post langs in pds appview, tidy
2023-06-23 16:23:16 -04:00
devin ivy
e651ed67a4
Respect takedowns on feedgen records, sync routes (#1119)
* Don't serve high-level details about taken-down feedgens

* Takedown checks on sync routes

* Use simpler check for takedowns on sync routes

* ensure takendown feedgens are handled in bsky appview
2023-06-21 15:07:16 -04:00
Daniel Holmgren
2768fb9e45
Make requestCrawl & notifyOfUpdate procedures (#1217)
make requestCrawl & notifyOfUpdate procedures
2023-06-20 09:36:09 -05:00
devin ivy
104799fb28
Allow optional auth for reporting on bsky appview (#1215)
temporarily accept anonymous reports on bsky appview
2023-06-19 14:00:10 -04:00
devin ivy
ffc6451254
Backport: fallback to getRecord on appview, misc fixes (#1210)
* bugfixing sandbox issues

* tidy after backport

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2023-06-15 16:41:45 -04:00
devin ivy
a3ec354dff
Improve handle indexing on appview (#1208)
* Reindex handle when commit contains invalid ops, improve error handling

* test actor handling on bad commit event
2023-06-15 14:01:05 -04:00
Daniel Holmgren
8c4fa530d6
Pds proxy to appview based on headers (#1191)
* pds proxy to appview based on headers

* reorg appview routes forwarding mutes to appview

* tidy

* clean up ctx

* track notif state

* use notif state for notif routes

* add back in missing file

* pr feedback

* wip

* more views

* more views

* update snaps & suggestions test

* better choices for like & reposted

* note

* better block test

* Test pds-proxied mute and notif state

* Update bsky snaps, remove unnecessary #postView

* Update bsky notification tests to use updateSeen

* add getList getFeedGen tests

* Re-disconnect pds from in-process appview indexing for tests

* clean up forSnapshot

* tidy

* feed gen view tests

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-06-12 17:29:32 -05:00
devin ivy
84032a6c77
Bsky appview: resolve long transactions, tombstone behavior (#1192)
* Loosen indexing txn boundaries to record-level in bsky appview, no long transactions

* Add explicit HeadNotFound error to sync.getHead

* Update tombstone behavior on bsky appview, use more specific error on sync.getHead
2023-06-12 17:51:38 -04:00
Daniel Holmgren
08fbb33fdf
Appview blocks (#1187)
* Model post and profile aggs in bsky

* Add background, onCommit, db and background stats

* Add aggregations for post and profile

* Use background queue in bsky labeler, misc plumbing

* Process background throughout bsky tests

* bsky tidy and fixes

* Build views using agg tables in bsky

* Views of feedgens on bsky

* hook up indexing

* Setup custom feeds on bsky

* graph service + getList routes

* migration

* Feed views refactor for bsky, implement getFeed w/ auth passthrough

* mute lists

* add getListMutes

* mute list tests

* add mutes table & mute/unmuteActor routes

* Passthrough auth from bsky appview to feedgen, fixes/tidy/tests

* add getMutes

* implement mute functionality

* remove unspecced

* mute tests

* mute impl tests

* remove proxy tests

* Test custom algos on bsky

* add mute state to snapshots

* table & indexing plugin

* getBlocks

* bail out of mute subquery when no viewer

* fleshing out services

* Test pds getFeed proxy

* tidy, fix build

* tidy

* Fix minor race in bsky mutelist tests

* blocks in feed views

* db migration, impl block logic & tests

* Update pds proxy snaps based on appview mutes

* missed some files on last commit

* ensure process after unmute

* update snap

* move adminAuth to seedclient param

* apply blocks in getFeed

* update snaps

* upadate one last snap

* pr feedback

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-06-12 11:05:22 -05:00
devin ivy
5951d9347f
Misc. syncing-up bsky appview with on-pds appview (pt. 2) (#1190)
* Misc notification and optimization in bsky, tidy

* Handle notifs on message queue in bsky appview

* Sync-up profile labeling behavior in bsky

* No async work during actor unindexing in bsky, include additional indexes

* Prevent deeply nested notifs w/ hellthread exception in bsky appview

* Add indexes to bsky appview for more efficient actor deletion/unindexing

* Update pds proxy snaps for updated bsky profile labeling

* Return custom suggestions in bsky appview

* Test out-of-order indexing of aggregations on bsky appview

* Proxy pds getPopular to hot-classic feed on appview. Proxy getPopularFeedGenerators to appview.

* Make did field required on feedgen view
2023-06-11 15:48:20 -04:00
devin ivy
7981c5948f
Misc. syncing-up bsky appview with on-pds appview (#1189)
* Misc notification and optimization in bsky, tidy

* Handle notifs on message queue in bsky appview

* Sync-up profile labeling behavior in bsky

* No async work during actor unindexing in bsky, include additional indexes

* Prevent deeply nested notifs w/ hellthread exception in bsky appview

* Add indexes to bsky appview for more efficient actor deletion/unindexing

* Update pds proxy snaps for updated bsky profile labeling

* Return custom suggestions in bsky appview
2023-06-11 14:55:43 -04:00
Daniel Holmgren
4f2f3d8d17
Appview mutes (#1184)
* hook up indexing

* graph service + getList routes

* migration

* mute lists

* add getListMutes

* mute list tests

* add mutes table & mute/unmuteActor routes

* add getMutes

* implement mute functionality

* remove unspecced

* mute tests

* mute impl tests

* remove proxy tests

* add mute state to snapshots

* bail out of mute subquery when no viewer

* Fix minor race in bsky mutelist tests

* Update pds proxy snaps based on appview mutes

* ensure process after unmute

* update snap

* move adminAuth to seedclient param

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-06-10 17:12:15 -04:00
devin ivy
283fb1d8d6
Custom feeds on bsky appview (#1185)
* Model post and profile aggs in bsky

* Add background, onCommit, db and background stats

* Add aggregations for post and profile

* Use background queue in bsky labeler, misc plumbing

* Process background throughout bsky tests

* bsky tidy and fixes

* Build views using agg tables in bsky

* Views of feedgens on bsky

* Setup custom feeds on bsky

* Feed views refactor for bsky, implement getFeed w/ auth passthrough

* Passthrough auth from bsky appview to feedgen, fixes/tidy/tests

* Test custom algos on bsky

* Test pds getFeed proxy

* tidy, fix build

* tidy
2023-06-09 11:48:17 -04:00
Daniel Holmgren
9a873148bd
Appview lists & listmutes (#1183)
* hook up indexing

* graph service + getList routes

* migration

* mute lists

* add getListMutes

* mute list tests

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-06-09 10:46:03 -04:00
devin ivy
f46d95617d
Feed gen indexing and view endpoints on bsky appview (#1182)
* Model post and profile aggs in bsky

* Add background, onCommit, db and background stats

* Add aggregations for post and profile

* Use background queue in bsky labeler, misc plumbing

* Process background throughout bsky tests

* bsky tidy and fixes

* Build views using agg tables in bsky

* Views of feedgens on bsky

* tidy, fix build

* tidy/fix bsky migration
2023-06-09 10:30:54 -04:00
Foysal Ahamed
8857fb0845
Filter reports by reporter did (#1165)
*  Hydrate subject author's repo in moderation reports

*  Allow filtering moderation reports by reporter DIDs

* 🚧 Expose only handle of the subject repo on moderation reports

* 🚧 Regenerate lexicons off main

* 🧹 Cleanup unnecessary joins

*  Updating snapshots

*  Make handle optional to allow serving reports even if handle doesn't exist

*  Port over subjectHandle implementation to bsky package

*  Port over filter by reporter implementation to bsky package

* Simplify query builder

Co-authored-by: devin ivy <devinivy@gmail.com>

* Simplify query builder

Co-authored-by: devin ivy <devinivy@gmail.com>

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2023-06-09 09:21:09 -04:00