2067 Commits

Author SHA1 Message Date
Daniel Holmgren
3f0e1b2563
Read after write (#1398)
* first pass on profiles

* quick test

* wip

* wip

* test post thread

* record embeds

* get author feed profiles

* wip timeline

* fix get timeline

* switch from counter to tid

* tidy into a service

* quick tid test

* pr feedback

* clock -> rev

* update image formatting

* disable migration & build branch

* add recent posts to getAuthorFeed & handle post thread not found errors

* refactor for lag header

* tidy

* rm collections check

* tidy test

* pr feedback

* fix small bug

* build branch

* get migrations into system

* enable migrations
2023-08-10 13:42:31 -05:00
Devin Ivy
38a4b25c27 v0.2.3 2023-08-09 19:11:15 -04:00
Paul Frazee
b406a45829 @atproto/api@0.6.0 2023-08-09 16:08:05 -07:00
Paul Frazee
ab50816461
Self-labeling (#1444)
* Add self-label schemas

* switch around array and union for self-labels

* apply self-labels to post and profile views

* test for self labels in pds

* apply self-labels to post and profile views in bsky appview

* test for self labels in bsky appview

* update pds proxied test snapshots

* Add support for self-labels to the mdoeration sdk

* Disable unknown-labeler filtering until 3P support is added

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-08-09 19:06:29 -04:00
Eric Bailey
ef23263297
Merge pull request #1439 from bluesky-social/eric/app-787-media-tab
add filter param to getAuthorFeed
2023-08-09 15:38:09 -05:00
Eric Bailey
20230b46bc format 2023-08-09 14:05:03 -05:00
Eric Bailey
f41e76a653 tighten up tests 2023-08-09 14:04:23 -05:00
Daniel Holmgren
0bf75fef60
Add bin for launching dev-env with an appview (#1454)
script for launching a full dev-env network
2023-08-09 13:42:03 -05:00
devin ivy
203e72f1c1
Appview preset image URLs (#1248)
* update image signing logic to presets on bsky

* update bsky config and views for preset img urls

* update bsky image tests for preset urls

* update bsky snapshots for preset image urls

* update pds proxy tests for bsky preset image urls

* tweak image paths
2023-08-09 10:21:43 -04:00
Daniel Holmgren
e1d10d21c0
Increase backfill page size (#1432)
increase backfill page size
2023-08-08 19:16:00 -05:00
Paul Frazee
0f2c006641 @atproto/api@0.5.4 2023-08-08 16:22:54 -07:00
Paul Frazee
6dbf4c67bc @atproto/api@0.5.3 2023-08-08 16:18:38 -07:00
Paul Frazee
f9cce06c23
Tune moderation downgrading on self-content to carry over blurring behaviors in some cases (#1453)
* Tune moderation downgrading on self-content to carry over blurring behaviors in some cases

* Fixes
2023-08-08 16:18:03 -07:00
bnewbold
3ed6dceafb
remove unused/unspecified label (#1426)
* labeler: remove redundant 'underwear' label

This commit contains no change to mod policy, app behavior, etc.

We have been creating redundant "underwear" labels along with "sexual"
for many months. "sexual" is the actual label that gets actioned in mod
preferences, etc. The un-specified "underwear" labels are confusing and
take up resources on-disk and in API responses.

* reflect in appview

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2023-08-08 17:56:38 -05:00
Daniel Holmgren
4879ccb365
Appview label cache (#1451)
* add label cache to appview

* add to dev env

* fix test
2023-08-08 17:56:21 -05:00
Eric Bailey
55f33234e2 fix naming 2023-08-08 16:40:55 -05:00
Eric Bailey
b70238476f fix select cause 2023-08-08 16:38:39 -05:00
Eric Bailey
5f2fc6c1ae format 2023-08-08 16:14:27 -05:00
Eric Bailey
08ea9790d9 use where exists subquery 2023-08-08 16:13:47 -05:00
Eric Bailey
399dfdbcc5 fix tests 2023-08-08 16:03:44 -05:00
Eric Bailey
92f5979d44 update naming based on feedback 2023-08-08 15:41:48 -05:00
Daniel Holmgren
25458ade66
Fix open handles in appview tests (#1452)
fix open handles in appview tests
2023-08-08 15:30:42 -05:00
Eric Bailey
975b0f40ed fix lint 2023-08-08 12:22:22 -05:00
Eric Bailey
5083705a37 use more specific naming 2023-08-08 12:20:08 -05:00
Eric Bailey
9e2b14765a add query and test to pds 2023-08-08 12:14:40 -05:00
Eric Bailey
59c435648d codegen again 2023-08-08 12:02:34 -05:00
Eric Bailey
ff11f5fae5 add queries and test to app view 2023-08-08 12:02:34 -05:00
Eric Bailey
7f84fb215e codegen 2023-08-08 12:02:34 -05:00
Eric Bailey
5edfb1a49d use knownValues 2023-08-08 12:02:34 -05:00
Eric Bailey
101bd9c7a1 consistent naming 2023-08-08 12:02:34 -05:00
Eric Bailey
c06a306d75 use current default 2023-08-08 12:02:34 -05:00
Eric Bailey
ba21ed6271 add filter param to getAuthorFeed 2023-08-08 12:02:34 -05:00
Daniel Holmgren
b16c41c2fa
Tighten feed filtering (#1443)
tighten feed filtering
2023-08-08 10:41:19 -05:00
Daniel Holmgren
5cc57d5ebc
Hotfix: remove relative imports from mod routes (#1446)
remove relative imports from mod methods
2023-08-07 19:26:07 -05:00
Daniel Holmgren
bb4b4344bd
Get post hotfix (#1445)
ensure post is defined
2023-08-07 18:54:33 -05:00
Daniel Holmgren
556e438ccc
Filter out blocked posts on getPosts (#1442)
filter out blocked posts on getPosts
2023-08-07 18:52:10 -05:00
devin ivy
b5569121f8
Misc perf improvements on actor search, post deletion, actor invite codes (#1436)
* tighten fuzzy actor search for larger dataset

* add indexes to support post deletion on feed_item, listing user invites on invite_code

* fix migration whitespace

* temp comment migrations and build

* Revert "temp comment migrations and build"

This reverts commit 225d2c00cce1885f2d2cffc4724843eda4b01cee.
2023-08-07 19:38:04 -04:00
devin ivy
6321e7839f
Include pds account info on mod report and action details (#1441)
hydrate pds repo state onto mod report and action subject details
2023-08-07 17:20:26 -04:00
devin ivy
3f3ae4cfd5
Support proxying moderation through to appview (#1233)
* in-progress work on proxying moderation to appview

* tidy

* proxy reports pds to appview, misc tidy

* test proxying of moderation endpoints

* remove report action fkeys from pds for appview sync

* test appview/pds moderation synchronization

* tidy

* tidy

* fix admin proxy tests, build

* temp disable migration

* rm relative @atproto/api imports

* fix a couple more relative imports

* tidy

* reenable migration, comment contents temporarily

* fully enable migration, remove build, misc test fixes

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2023-08-04 16:06:04 -04:00
Paul Frazee
43bb6ae147 @atproto/api@0.5.2 2023-08-03 21:54:38 -07:00
Paul Frazee
82ada3d27a
Moderation API fixes - QP blurs & label names (#1435)
* Fix: blur quote posts with the blur-media label type

* Switch to label titles that are less stilted
2023-08-03 21:54:06 -07:00
Daniel Holmgren
6d04bf76ef
Hive retry logic & logging (#1434)
* better logging & retry logic for hive

* tidy

* fix test

* bump timeout

* tidy pds labeler

* fix test

* build branch

* fix types

* fix types

* rm branch builds

* log hive response

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-08-03 17:42:05 -05:00
dholms
ce5a43067d v0.5.1 2023-08-03 12:56:30 -05:00
Paul Frazee
749db2e425 @atproto/api@0.5.0 2023-08-03 10:29:54 -07:00
Paul Frazee
b30f847d09
Labeling & moderation updates to SDK (#1366)
* First pass on label definitions and reference-doc generation for them

* Tune labels

* Drop the 'csam' label in favor of using !hide

CSAM is an extremely delicate issue. Moderators must be careful to
remove it from the system without calling direct attention to it.
Using the generic !hide achieves the same effect while obscuring
the reason for the removal. Server and AppView bans will then be
employed (along with any other needed mechanisms) to strip the
content from the network.

There is also a 'false accusation' concern with using the csam
label. Fingerprinting techniques and AI are used to scan for csam.
These are capable of producing false positives which will then be
reverted after human review. The reputational damage caused by a
false positive could be severe, so we want to be careful about any
system which might publicize a false positive.

* Add label definition code generation

* Implement all type signatures for moderation

* Complete a first pass on the labeling sdk

* Add post-moderation test suite

* Add post moderation behavior documentation

* Add self-post behaviors

* Improve post moderation doc

* Tune up the post moderation doc

* Tune up the post moderation doc

* Tune up the post moderation doc

* Simplify the post moderation behavior descriptions

* More behavior description tuneup

* Add profile moderation final behaviors and tests

* Improve generated post-moderation-behaviors doc

* Add profile moderation behaviors doc

* Test muted-by-list specifically

* Fixes to label descriptions

* Fix to muted-by-list behavior

* Dont blur account in moderateProfile() when muting

* Tune label copy

* Apply post embed blurring when account is marked with blurmedia label

* Fix output signature

* Fixes to blocking behavior

* Rename LabelDefinitionPreference to LabelPreference

* Update docs

* Fix test

* Fix: self-harm should blur media only

* Fixes to tests

* Improve label copy

* Remove all labels that do not have a specific policy

Communicating moderation policies with active users is important.
This PR originally included labels which were proposed but did not
yet have policies. While we didn't intend to use them until a
policy was established, I decided it's better to hold off putting
them in the code until we're sure about them. They can be found in
backup files prefixed with "proposed-".
2023-08-03 10:28:06 -07:00
devin ivy
e5e24d510e
Push labels to PDS (#1423)
* add lexicon for unspecced applyLabels procedure

* implement label push to pds via unspecced.applyLabels

* add hive retry to bsky appview

* build

* update applyLabels to work with raw label data

* update bsky hive labeler

* remove build
2023-08-03 12:25:56 -04:00
Daniel Holmgren
450dff7fa3
Fix blocks in follow views (#1427)
* fix blocks in follow views

* check blocks between follow subjects & creators

* test
2023-08-03 10:43:30 -05:00
dholms
2cbc4c31a5 v0.4.4 2023-08-01 17:57:14 -05:00
Foysal Ahamed
13b16b33f2
Allow setting a note when enabling/disabling invite codes (#1363)
* Allow setting a note when enabling/disabling invite codes

* Add inviteNote to repoView

*  Add test for inviteNote

*  Set to null when note is empty

*  Change note from text to varchar

* 📝 Better description
2023-08-01 17:43:21 -05:00
devin ivy
30b41029c1
Partitioning in bsky indexer (#1368)
* setup redis infra for appview indexer

* barebones bsky ingester

* add ioredis to bsky

* remove some indexer functionality from bsky api

* setup for bsky indexer

* tidy

* tidy, observe basic pipeline functioning

* process messages on bsky indexer pipeline, tidy tests and lifecycle

* trim partitions when moving cursor

* simplify config for partitions

* misc fixes for redis setup in bsky tests, add namespacing

* fix pds proxy tests

* remove cursor state from indexer partitions, simplify ingester state

* tidy

* utils for testing w/ multiple indexers, fix off-by-one xtrim

* test reingesting

* test indexer repartitioning

* add entrypoints for bsky ingester and indexer, fix db schema config, api entrypoint name, tidy

* setup and test bsky ingester backpressure, add config

* tidy

* add missing test file

* tidy redis calls, add redis sentinel config

* tidy/test some utils used in bsky pipeline

* tidy bsky pipeline tests, move helpers into dev-env

* fix pds crud test

* support redis host and password config

* better loggin/observability in ingester and indexer, make build

* add bsky ingester initial cursor config

* temporarily remove migrations from indexer/ingester

* allow ingester to batch

* packages/pg becomes packages/dev-infra with some cleanup (#1402)

* packages/dev-infra/

* Extract packages/dev-infra/_common.sh and use it

* Use period instead of source because of /bin/sh

* add docs for redis test script

* fix repartition test

* add logs to debug ci

* simplify repartitioning test, remove ci logs

---------

Co-authored-by: Jerry Chen <jerry@redelm.net>
2023-08-01 14:59:00 -04:00