* mv appview
* copy
* finalize copy
* package names
* big WIP
* first pass at mod servce
* some tidy
* tidy & fix compiler errors
* rename to ozone, db migrations, add to dev-env & pds cfg
* getRecord & getRepo mostly working
* fix open handle
* get record tests all working
* moderation events working
* statuses working
* tidy test suite
* search repos
* server & db tests
* moderation tests
* wip daemon + push events
* pds fanout working
* fix db test
* fanning takedowns out to appview
* rm try/catch
* bsky moderation test
* introduce mod subject wrappers
* more tidy
* refactor event reversal
* tidy some db stuff
* tidy
* rename service to mod-service
* fix test
* tidy config
* refactor auth in bsky
* wip patching up auto-mod
* add label ingester in appview
* fix a couple build issues
* fix some timing bugs
* tidy polling logic
* fix up tests
* fix some pds tests
* eslint ignore
* fix ozone tests
* move seeds to dev-env
* move images around
* fix db schemas
* use service auth admin reqs
* fix remaining tests
* auth tests bsky
* another test
* random tidy
* fix up search
* clean up bsky mod service
* more tidy
* default attempts to 0
* tidy old test
* random tidy
* tidy package.json
* tidy logger
* takedownId -> takedownRef
* misc pr feedback
* split daemon out from ozone application
* fix blob takedown mgiration
* refactor ozone config
* do push event fanout on write instead of on read
* make suspend error work again
* add attempts check & add supporting index
* fix takedown test ref
* get tests working
* rm old test
* fix timing bug in event pusher tests
* attempt another fix for timing bug
* await req
* service files
* remove labelerDid cfg
* update snaps for labeler did + some cfg changes
* fix more snaps
* pnpm i
* build ozone images
* build
* make label provider optional
* fix build issues
* fix build
* fix build
* build pds
* build on ghcr
* fix syntax in entry
* another fix
* use correct import
* export logger
* remove event reverser
* adjust push event fanout
* push out multiple
* remove builds
* Include own replies to own post roots in post_no_replies
* Updates
* Simplify
* snaps
* snaps
* Remove unused import
* Add new threads filter to getAuthorFeed
* Implement new filter
* Typo
* cleanup repeat process all
* wip
* skip actor search test
* skip actor search test
* tweak processAll
* decrease wait to 1 sec
* repo_blob -> record_blob
* simplify backlink linkTo
* return repo_root to one row
* sequence before updating repo_root
* invite code forUser -> forAccount
* ipld_block -> repo_block
* use lru-cache fetchMethod
* move did_cache to own db
* better error handling on did cache
* drop did_handle
* fix sequencer wait time
* debug
* debug
* more debug
* check something
* fix bday paradox
* fix bday paradox
* tidy up pds service auth
* rm skipped test
* retry http
* tidy
* improve fanout error handling
* fix test
* return signing key in did-web
* more tests
* tidy serivce auth checks
* user_account -> account
* remove inviteNote
* keypair per repo
* use an lru cache for keypairs as well
* clean up repo
* wip
* wrap up accoutn manager
* tidy
* tidy
* fix tests
* fix disabled codes
* fix appview tests
* add note
* set pragmas
* tidy account manager getDb
* rename pref transactor
* user pref -> account pref
* handle blob imports
* tidy imports
* add reserveSigningKey
* wip transferAccount
* clean up transferAccount
* tests
* tidy
* tidy
* configure entryway url on pds
* handle entryway in pds admin endpoints
* make importRepo temp
* fix imports
* make email optional on pds when using entryway
* handle diffs
* handle pds entryway usage for server, identity, admin endpoints
* pds support for credentials from entryway
* setup pds tests w/ entryway service
* tidy
* tidy
* update entryway version
* wip
* test handle updates w/ entryway
* split account table into two
* tidy
* tweak scripts
* tidy tests
* tidy
* better config for actorstore & dbs
* clean up cfg more
* reorg actorstore fs layout
* handle erros on actor db create
* pr tidy & fix accoutn deletion test
* pr feedback
* fix bad merge
* unskip test
* fix subscribe repos tests
* tidy repo root tables
* tidy
* fix tests
* tidy delete tokens
* tidy account getters
* tidy
* bulk deletesg
* increase chunk size
* handle racing refreshes
* wip
* fix auth test
* invert import flow
* clean up actor store on create account failure
* tweak sequencer
* prevent invite code races on createAccount
* rm note
* add back in race protection on getAccountInviteCodes
* start feature branch
* deleted app migration table
* patch up new auth test
* rm note
* g
* create accoutn delegated from entryway
* tidy
* fix test
* change plcOp type to unknown
* small fixes
* sync up w entryway branch
* Use proper error when authed account is not found (#1799)
provide proper error when account not found in access-takedown check
* build branch
* build on ghcr
* tweak service file
* tweak service file
* change where we save reserved keys
* no tmp dir in blobstore either
* fix blobstore temp location again
* handle repeat record_blobs
* create account before submitting plc op & undo if fail
* small tweak
* limit the number of local records
* push out empty commit on transfer
* fix issue with record_blob
* add push blob endpoint
* Set and validate token audiences on pds v2 (#1793)
set and validate token audience on pds v2
* merge
* include entryway did on tests
* build branch
* fix cache issue
* xrpc server blob limit
* put correct bytes
* add auth to routes
* handle quarantining/unquarantining a blob that does not exist
* tidy
* fix transfer tests
* fix email request routes for entryway
* PDS v2 entryway account deletion (#1819)
* add admin lexicon for account deletion
* implement admin account deletion endpoint
* fix entryway proxying on account email checks
* proxy to entryway for acct deletion
* read-after-write sanity check
* tweak
* wip
* finish refactor
* fix test schema
* application retry logic for busy
* pr feedback
* rm lru-cache
* fix test pg schema
* fix transfer test
* Sqlite instrumentation for pds v2 (#1838)
* sqlite instrumentation
* build
* remove build
* dont reimport blobs
* send ticks during import
* close on error
* catch handle validation error
* add log
* fix test
* return emailConfirmedAt on getAccountInfo
* Upgrade sharp on pds v2 (#1863)
upgrade sharp to 0.32.6
* read all bytes before parsing car
* Async car reader (#1867)
* asynchronously read in car
* dont buffer car
* tweak
* Gracefully handle indexing of invalid records (#1853)
* gracefully handle indexing of invalid records
* fix repo tests
* Fix role auth for access-or-role verifier, getBlob check on actor takedowns (#1869)
fix role auth for access-or-role verifier, fix getBlob actor takedown check
* better cleanup of actor-stores
* add ability to not ensure leaves
* tidy
* allow did:web transfer
* Migration utility for actor-store (#1873)
beginnings of helper for migrating all actors
Co-authored-by: Devin Ivy <devinivy@gmail.com>
* base case for findBlobRefs
* App-level retries for sqlite on pds (#1871)
* revamp retry helper to be more flexible re: backoff strategies
* sqlite timeout helper
* ensure sqlite wal on db creation/migration rather than every open
* layer retries for sqlite on writes outside transactions on pds
* tidy
* fix up lockfile
* tidy
* fix lex codegen
* fix timing bug in threadgate test
* No-op update handling (#1916)
do no produce commits on no-op updates
* Retry on all SQLITE_BUSY error codes (#1917)
retry on all sqlite_busy error codes
* Pds v2 ensure sqlite ready (#1918)
ensure sqlite is ready before making queries
* try something
* tidy
* dont build branch
---------
Co-authored-by: Devin Ivy <devinivy@gmail.com>
* 🚧 WIP with proposed lexicons for event based mod architecture
* 🚧 Remove unnecessary moderation action lexicon
* 🚧 Working on event based actions
* ✨ Add escalated subject status
* 🐛 Alright, fixed the error in lexicon
* 🚧 Working through reversal
* ✨ Cleanup build errors
* ✨ Add subject status endpoint
* ✨ Add handler
* ✨ get reports from mod actions table
* :rightwards_twisted_arrows: Merge with upstream
* 🚧 Builds but test network doesnt start
* ✨ Tests passing on event based status change
* ✨ Rename index
* ♻️ Rename takeModerationAction->emitModerationEvent
* ✨ Implement label reversal
* ✅ Auto-revert test working
* ♻️✅ Refactored to event types and tests are passing
* ✨ Add takedown event sequence validation
* ✨ Adds support for blobCid status
* 🧹 Cleanup unnecessary method:
* ✨ Hydrate handles with status and events
* ✨ Re-implement auto reversal
* ✨ Add takendown and mute filters
* ✨ Allow filtering events by type
* ✨ Allow filtering events by creator did
* ✨ Add subjectStatus to record and repoview
* ✨ Add persistent note feature
* ✨ Log send email event
* 🐛 Fix logging send email event
* ✨ Better type
* ✨ Adjust migration to create separate moderation_event table
* 🧹 Cleanup types
* ✅ Adjust tests with mod event emitter
* ✨ Fix more tests around takedowns
* ✅ Get test suite to pass
* ✅ Get test suite to pass for pds
* ✅ Get test suite to pass for pds
* ✅ Update snapshot for feedgen
* ✅ Why are more snapshots updating?
* ♻️ Rename getModerationEvents -> queryModerationEvents
* ♻️ Rename getModerationStatuses -> queryModerationStatuses
* ♻️ Rename persistNote->sticky
* 🐛 Rename subject
* ♻️ Cleanup expiresAt for scheduled actions
* ✨ Add more tests, allow fetching mod history for all content by a user
* ✅ Fix repo and record tests
* ✨ Migrate reports and actions to events
* 🐛 Fix escalated status overwrite
* ✨ Implement direct sql query to create events from actions and reports
* 🚧 Adding keyset pagination for subject statuses
* ✨ Add migration for lastReportedAt
* ✨ Migrate blob cids
* ✨ Fix pagination on mod subject list endpoint
* 🐛 Fix blob actions
* ✅ All tests passing on bsky package
* ✅ Bring back snapshots
* ✅ Skipping timeline test temporarily
* ✅ Skipping some more tests to isolate failing ones
* ✅ Bring back list-feed test
* ✅ Bring back timeline test
* ✅ Fix label action in seeding
* ✅ Enable timeline proxied test
* ✅ Enable search actor proxied test
* ✅ Enable feedgen tests
* ✅ Fix test for admin/get-record
* ✨ Move note to comment for subject status
* ✨ Accept comments in mute event
* ✨ Remap flag event to ack event
* 🐛 Add legacyRef in report union selection
* @atproto/api 0.6.24-next.0
* @atproto/api 0.6.24-next.1
* ✨ Adjust migration export and add index for blobCids column
* ✨ Maintin action ids when migrating
* ✨ Paginate events using createdAt timestamp
* ✅ Update snapshot for pds test with events cursor update
* ✅ Use only events for snapshot testing
* ✅ Use only events for snapshot in the remaining test
* relative paths to lexicons for build
* fix bsky periodic event reversal in service entrypoint
* ✨ Allow comments in takedown and label
* ✨ Only import reports on consecutive run of the migration script
* ✨ Adjust moderation property of blob entries
* determine latest reports to migrate
* ✨ Process new reports for subject status
* ✨ Process unresolved reports on first migration run
* fix transaction error, process just unresolved reports, make reported-at updates safe for reruns
* tidy
---------
Co-authored-by: Devin Ivy <devinivy@gmail.com>
* spec out new simple pds mod routes
* introduce new admin state endpoints
* wire up routes
* clean up pds
* revoke refresh tokens
* getUserAccountInfo
* pr tidy
* fixing some tests
* fixing up more tests
* fanout takedowns to pds
* fanout admin reqs to pds
* tidy
* more tidy & add more pds moderation tests
* getUserAccountInfo -> getAccountInfo
* dont hydrate pds info on searchRepos
* fix build
* port admin tests to bsky package
* clean up old snaps
* tests on fanout
* tweak naming
* missed a rename
* tidy renames
* fix lex name
* tidy & move snap
* fix build
* cleanup repeat process all
* skip actor search test
* fix bday paradox
* tidy up pds service auth
* rm skipped test
* retry http
* tidy
* improve fanout error handling
* fix test
* return signing key in did-web
* more tests
* tidy serivce auth checks
* change takedownId col to takedownRef
* build branch
* fix bsky test
* add service key to indexer
* move signing key to api entry
* dont build
* rm tables
* rm event-stream & proxied
* Remove appview services, move label service to pds
* only proxy appview stuff
* delete more tables
* Start removing message dispatched from pds
* more syncing-up removal of message dispatcher in pds
* merged
* remove feedgens from pds, remove getPopular
* remove unused image helper from pds
* fixing compiler errors
* clean up sharp
* rm label service
* first pass on cleaning up tests
* fix up a bunch of tests
* moderation view tests
* last admin tests
* got a lil overzealous in deletes
* clean up unused cfg
* clean up label table
* simplify admin repo search query/logic
* tidy pds entrypoint
* in-progress pds config changes
* cfg fiddling
* finish cleaning up cfg/ctx
* comments
* building
* pds prefix on env
* test env
* collapse pds migrations down into a single migration
* fix up dev-env
* tidy
* cleanup
* fix pds admin tests
* fix handle test
* fix pds proxy tests
* fix subscribe repos test
* fix sqlite config in pds tests
* add sqlite clause in sequencer-leader
* fix actor search w/ sqlite on pds
* fixes
* fix dev env build
* update pds service entrypoint
* simple env example
* make takedown ids opaque identifiers in the pds
* use pds routes for api tests
* update pds dockerfile with volume and correct port env var
* add a couple env vars to example
* add comments to env example
* @atproto/pds 0.2.0-beta.0
* @atproto/aws 0.0.1-beta.0
* appview did
* @atproto/aws 0.0.1
* enable logs by default
* update env example
* bugfixing sandbox issues
* consistency in pds env var name for appview url
* log on pds start and stop, configure version at runtime
* @atproto/pds 0.2.0-beta.1
* fix semver matching for pds beta version
* v0.2.0-beta.2
* default invites to being not required
* fix flaky test
* limit db connections in tests
* publish 0.2.0-beta.d3
* fix invite required parsing
* @atproto/pds 0.2.0-beta.5
* Proxy getPopularFeedGenerators on simplified pds (#1222)
proxy getPopularFeedGenerators on pds
Co-authored-by: dholms <dtholmgren@gmail.com>
* tidy migrations
* fix service entry
* bump version
* change auth order
* bump version
* bump version
* add upgradeRepoVersion & fallback url for cdn
* bump version
* merging
* merge pds
* building dev-env
* merging tests
* merge service entry
* test fixing
* tidy
* fix admin search
* tidy
* tidy
* add snap for getListFeed
* add backup nameserver cfg
* tidy + pr feedback
* tidy
* tidy env
* bit more
* re-add dotenv to root package.json
* fix dep
* build branch
* fix tests
* Refactor tests to make better use of dev-env (#1690)
* refactor pds tests to use dev env
* refactor bsky tests
* fix pds test
* tidy bsky tests
* build pds correctly
* fix entry point
* default logging to false (for now)
* format service entry
* Switch takedown ids back to ints on pds distribution (#1694)
* switch takedown ids back to ints, consistent with live pds
* tidy/fix migration
* update migration for sqlite
* export moderation action reversal
* takedown tests
* dont build branch
---------
Co-authored-by: Devin Ivy <devinivy@gmail.com>
* add tags to post lex
* kiss
* add richtext facet and validation attrs
* add tag validation attrs to post
* codegen
* add maxLength for tags, add description
* validate post tags on write
* add test
* handle tags in indexer
* add tags to postView, codegen
* return tags on post thread view
* format
* revert formatting change to docs
* use establish validation pattern
* add changeset
(cherry picked from commit fcb6fe7c26144662f791c7900afcd84c7bf1be6b)
* remove tags from postView, codegen
* remove tags from thread view
* revert unused changes
* lexicons for block lists
* reorg blockset functionality into graph service, impl block/mute filtering
* apply filterBlocksAndMutes() throughout appview except feeds
* update local feeds to pass through cleanFeedSkeleton(), offload block/mute application
* impl for grabbing block/mute details by did pair
* refactor getActorInfos away, use actor service
* experiment with moving getFeedGenerators over to a pipeline
* move getPostThread over to a pipeline
* move feeds over to pipelines
* move suggestions and likes over to pipelines
* move reposted-by, follows, followers over to pipelines, tidy author feed and post thread
* remove old block/mute checks
* unify post presentation logic
* move profiles endpoints over to pipelines
* tidy
* tidy
* misc fixes
* unify some profile hydration/presentation in appview
* profile detail, split hydration and presentation, misc fixes
* unify feed hydration w/ profile hydration
* unify hydration step for embeds, tidy application of labels
* setup indexing of list-blocks in bsky appview
* apply list-blocks, impl getListBlocks, tidy getList, tests
* tidy
* update pds proxy snaps
* update pds proxy snaps
* fix snap
* make algos return feed items, save work in getFeed
* misc changes, tidy
* tidy
* fix aturi import
* initial lexicons for interaction-gating
* add interactions view to post views
* codegen
* model bad reply/interaction check state on posts
* initial impl for checking bad reply or interaction on write
* omit invalid interactions from post thread
* support not-found list in interaction view
* hydrate can-reply state on threads
* present interaction views on posts
* misc fixes, update snaps
* tidy/reorg
* tidy
* split interaction gating into separate record in lexicon
* switch interaction-gating impl to use separate record type
* allow checking reply gate w/ root post deletion
* fix
* initial gating tests
* tighten gated reply views, tests
* reply-gating list rule tests
* allow custom post rkeys within window
* hoist actors out of composeThread()
* tidy
* update thread gate lexicons, codegen
* lex fix
* rename gate to threadgate in bsky, update views
* lex fix
* improve terminology around reply validation
* fix down migration
* remove thread gates on actor unindexing
* add back .prettierignore
* tidy
* run ci on all prs
* syntax
* run ci on all prs
* format
* fix snap
---------
Co-authored-by: Devin Ivy <devinivy@gmail.com>
* lexicons for block lists
* reorg blockset functionality into graph service, impl block/mute filtering
* apply filterBlocksAndMutes() throughout appview except feeds
* update local feeds to pass through cleanFeedSkeleton(), offload block/mute application
* impl for grabbing block/mute details by did pair
* refactor getActorInfos away, use actor service
* experiment with moving getFeedGenerators over to a pipeline
* move getPostThread over to a pipeline
* move feeds over to pipelines
* move suggestions and likes over to pipelines
* move reposted-by, follows, followers over to pipelines, tidy author feed and post thread
* remove old block/mute checks
* unify post presentation logic
* move profiles endpoints over to pipelines
* tidy
* tidy
* misc fixes
* unify some profile hydration/presentation in appview
* profile detail, split hydration and presentation, misc fixes
* unify feed hydration w/ profile hydration
* unify hydration step for embeds, tidy application of labels
* setup indexing of list-blocks in bsky appview
* apply list-blocks, impl getListBlocks, tidy getList, tests
* tidy
* update pds proxy snaps
* update pds proxy snaps
* fix snap
* make algos return feed items, save work in getFeed
* misc changes, tidy
* tidy
* fix aturi import
* lex
* list purpose
* lex gen
* add route
* add proxy route
* seed client helpers
* tests
* mutes and blocks
* proxy test
* snapshot
* hoist actors out of composeThread()
* tidy
* tidy
* run ci on all prs
* format
* format
* fix snap name
* fix snapsh
---------
Co-authored-by: Devin Ivy <devinivy@gmail.com>
* lexicons for block lists
* reorg blockset functionality into graph service, impl block/mute filtering
* apply filterBlocksAndMutes() throughout appview except feeds
* update local feeds to pass through cleanFeedSkeleton(), offload block/mute application
* impl for grabbing block/mute details by did pair
* refactor getActorInfos away, use actor service
* experiment with moving getFeedGenerators over to a pipeline
* move getPostThread over to a pipeline
* move feeds over to pipelines
* move suggestions and likes over to pipelines
* move reposted-by, follows, followers over to pipelines, tidy author feed and post thread
* remove old block/mute checks
* unify post presentation logic
* move profiles endpoints over to pipelines
* tidy
* tidy
* misc fixes
* unify some profile hydration/presentation in appview
* profile detail, split hydration and presentation, misc fixes
* unify feed hydration w/ profile hydration
* unify hydration step for embeds, tidy application of labels
* setup indexing of list-blocks in bsky appview
* apply list-blocks, impl getListBlocks, tidy getList, tests
* tidy
* update pds proxy snaps
* update pds proxy snaps
* fix snap
* make algos return feed items, save work in getFeed
* misc changes, tidy
* tidy
* fix aturi import
* hoist actors out of composeThread()
* tidy
* run ci on all prs
* format
* build
* proxy graph.getListBlocks
* remove unneeded index
* build pds
* setup noop listblock indexer on pds
* remove build
---------
Co-authored-by: dholms <dtholmgren@gmail.com>
* ✨ Better results from searchRepos when matching by handle
* ✅ Adjust tests for repo search result order
* 🧹 Cleanup
* ♻️ Refactor to re-use search query builder
* 🧹 Cleanup
* ✅ Add test for pagination in search result
* origin: (21 commits)
styleguide
Increase CI test matrix size (#1490)
tweak author-feed rejects test syntax
update test
format
add repost of reply, update snaps
simplify query
fix typos
include reposted replies in posts_no_replies filter
fix bad test syntax
fix actor takedown tests
use getActor, failing atm
only include media posts by post creator
Fix condition for viewing soft-deleted followers (#1485)
✨ Expose takendown profile, their follows and followers to mods (#1456)
Handle revalidation (#1474)
Handle db pool errors on appview (#1483)
Handle db client errors on appview (#1481)
v0.6.4
✨ Allow creating moderation action with a duration (#1431)
...
* setup bsky so that writes always go to a db primary
* test bsky primary db functionality
* sprinkle db primary over moderation and view maintainer usage
* make bsky tests more strict on primary/secondary db, fixes
* maintain prev db config on appview, require primary db, make primary/replica explicit in config
* tidy
* sketch out db replicas
* wip
* support multiple tags per bsky replica, "any" tag, fallbacks and warns
* clarify tags
* use new coordinator api across routes & services
* wire-up replica tagging config
* tidy
* cleanup entroypoints and tests for db coordinator
* fix pds test
* re-hookup migrate db
* standardize env vars for db on bsky services
* tidy
* build
* fix bav api entrypoint
* support DB_POSTGRES_URL on ingester/indexer for backwards compat
* remove build
---------
Co-authored-by: Devin Ivy <devinivy@gmail.com>