···1616 PublicKey() (PublicKey, error)
17171818 // Hashes the raw bytes using SHA-256, then signs the digest bytes.
1919- // Always returns a "low-S" signature (for elliptic curve systems where that is ambigious).
1919+ // Always returns a "low-S" signature (for elliptic curve systems where that is ambiguous).
2020 HashAndSign(content []byte) ([]byte, error)
2121}
2222···3737type PublicKey interface {
3838 Equal(other PublicKey) bool
39394040- // Compact byte serialization (for elliptic curve systems where encoding is ambigious).
4040+ // Compact byte serialization (for elliptic curve systems where encoding is ambiguous).
4141 Bytes() []byte
42424343 // Hashes the raw bytes using SHA-256, then verifies the signature of the digest bytes.
···5252 DIDKey() string
53535454 // Non-compact byte serialization (for elliptic curve systems where
5555- // encoding is ambigious)
5555+ // encoding is ambiguous)
5656 //
5757 // This is not used frequently, or directly in atproto, but some
5858 // serializations and encodings require it.
+1-1
atproto/identity/identity.go
···206206 return endpoint.URL
207207}
208208209209-// Returns an atproto handle from the alsoKnownAs URI list for this identifier. Returns an error if there is no handle, or if an at:// URI failes to parse as a handle.
209209+// Returns an atproto handle from the alsoKnownAs URI list for this identifier. Returns an error if there is no handle, or if an at:// URI fails to parse as a handle.
210210//
211211// Note that this handle is *not* necessarily to be trusted, as it may not have been bi-directionally verified. The 'Handle' field on the 'Identity' should contain either a verified handle, or the special 'handle.invalid' indicator value.
212212func (i *Identity) DeclaredHandle() (syntax.Handle, error) {
+2-2
atproto/syntax/datetime.go
···88)
991010const (
1111- // Prefered atproto Datetime string syntax, for use with [time.Format].
1111+ // Preferred atproto Datetime string syntax, for use with [time.Format].
1212 //
1313 // Note that *parsing* syntax is more flexible.
1414 AtprotoDatetimeLayout = "2006-01-02T15:04:05.999Z"
···9494 return ret
9595}
96969797-// Creates a new valid Datetime string matching the current time, in prefered syntax.
9797+// Creates a new valid Datetime string matching the current time, in preferred syntax.
9898func DatetimeNow() Datetime {
9999 t := time.Now().UTC()
100100 return Datetime(t.Format(AtprotoDatetimeLayout))
+1-1
atproto/syntax/uri.go
···55 "regexp"
66)
7788-// Represents an arbitary URI in string format, as would pass Lexicon syntax validation.
88+// Represents an arbitrary URI in string format, as would pass Lexicon syntax validation.
99//
1010// The syntax is minimal and permissive, designed for fast verification and exact-string passthrough, not schema-specific parsing or validation. For example, will not validate AT-URI or DID strings.
1111//
+2-2
bgs/bgs.go
···10621062 // TODO: the case of handling a new user on a new PDS probably requires more thought
10631063 cfg, err := atproto.ServerDescribeServer(ctx, c)
10641064 if err != nil {
10651065- // TODO: failing this shouldnt halt our indexing
10651065+ // TODO: failing this shouldn't halt our indexing
10661066 return nil, fmt.Errorf("failed to check unrecognized pds: %w", err)
10671067 }
1068106810691069- // since handles can be anything, checking against this list doesnt matter...
10691069+ // since handles can be anything, checking against this list doesn't matter...
10701070 _ = cfg
1071107110721072 // TODO: could check other things, a valid response is good enough for now
+3-3
carstore/bs.go
···12901290 // Since we generally expect shards to start bigger and get smaller,
12911291 // and because we want to avoid compacting non-adjacent shards
12921292 // together, and because we want to avoid running a stat on every
12931293- // single shard (can be expensive for repos that havent been compacted
12931293+ // single shard (can be expensive for repos that haven't been compacted
12941294 // in a while) we only skip a prefix of shard files that are over the
12951295 // threshold. this may end up not skipping some shards that are over
12961296 // the threshold if a below-threshold shard occurs before them, but
···1375137513761376 // we could also just add the duplicates to the keep set for now and
13771377 // focus on compacting everything else. it leaves *some* dirty blocks
13781378- // still around but we're doing that anyways since compaction isnt a
13781378+ // still around but we're doing that anyways since compaction isn't a
13791379 // perfect process
1380138013811381 log.Debugw("repo has dirty dupes", "count", len(dupes), "uid", user, "staleRefs", len(staleRefs), "blockRefs", len(brefs))
···15271527 return err
15281528 }
1529152915301530- // now create a new staleRef with all the refs we couldnt clear out
15301530+ // now create a new staleRef with all the refs we couldn't clear out
15311531 if len(staleToKeep) > 0 {
15321532 if err := txn.Create(&staleRef{
15331533 Usr: uid,
+2-2
carstore/repo_test.go
···263263264264 if err := rep.ForEach(context.TODO(), "", func(k string, v cid.Cid) error {
265265 if !set[v] {
266266- return fmt.Errorf("have record we didnt expect")
266266+ return fmt.Errorf("have record we did not expect")
267267 }
268268269269 delete(set, v)
···275275 fmt.Println("matched error")
276276 bs, err := cs.ReadOnlySession(1)
277277 if err != nil {
278278- fmt.Println("couldnt read session: ", err)
278278+ fmt.Println("could not read session: ", err)
279279 }
280280281281 blk, err := bs.Get(context.TODO(), ierr.Cid)
+1-1
cmd/fakermaker/README.md
···3535 # create posts, including mentions and image uploads
3636 go run ./cmd/fakermaker/ gen-posts
37373838- # create more interations, such as likes, between accounts
3838+ # create more interactions, such as likes, between accounts
3939 go run ./cmd/fakermaker/ gen-interactions
40404141 # lastly, read-only queries, including timelines, notifications, and post threads
+1-1
cmd/labelmaker/README.md
···63636464SQRL is a moderation system built around a declarative rule language,
6565application events, and cached counter values. It is the open source release of
6666-Smyt, a moderation system aquired and used by Twitter many years ago. See the
6666+Smyt, a moderation system acquired and used by Twitter many years ago. See the
6767SQRL docs for more: <https://sqrl-lang.github.io/sqrl/index.html>
68686969A local SQRL moderation server can be queried by providing `--sqrl-url` (or the
+2-2
cmd/palomar/README.md
···11# Palomar
2233-Palomar is a backend search service for atproto, specifically the `bsky.app` post and profile record types. It works by consuming a repo event stream ("firehose") and upating an OpenSearch cluster (fork of Elasticsearch) with docs.
33+Palomar is a backend search service for atproto, specifically the `bsky.app` post and profile record types. It works by consuming a repo event stream ("firehose") and updating an OpenSearch cluster (fork of Elasticsearch) with docs.
4455Almost all the code for this service is actually in the `search/` directory at the top of this repo.
6677-In September 2023, this service was substantially re-written. It no longer stores records in a local database, returns only "skelton" results (list of ATURIs or DIDs) via the HTTP API, and defines index mappings.
77+In September 2023, this service was substantially re-written. It no longer stores records in a local database, returns only "skeleton" results (list of ATURIs or DIDs) via the HTTP API, and defines index mappings.
88991010## Query String Syntax
+2-2
events/diskpersist.go
···162162 return dp.initLogFile()
163163 }
164164165165- // 0 for the mode is fine since thats only used if O_CREAT is passed
165165+ // 0 for the mode is fine since that is only used if O_CREAT is passed
166166 fi, err := os.OpenFile(filepath.Join(dp.primaryDir, lfr.Path), os.O_RDWR, 0)
167167 if err != nil {
168168 return err
···455455 e.RepoTombstone.Seq = seq
456456 default:
457457 // only those three get peristed right now
458458- // we shouldnt actually ever get here...
458458+ // we should not actually ever get here...
459459 return nil
460460 }
461461
+2-2
fakedata/generators.go
···295295 var tgt *AccountContext
296296297297 if maxFollows > len(catalog.Regulars) {
298298- return fmt.Errorf("not enought regulars to pick maxFollowers from")
298298+ return fmt.Errorf("not enough regulars to pick maxFollowers from")
299299 }
300300 if maxMutes > len(catalog.Regulars) {
301301- return fmt.Errorf("not enought regulars to pick maxMutes from")
301301+ return fmt.Errorf("not enough regulars to pick maxMutes from")
302302 }
303303304304 regCount := 0
+2-2
indexer/indexer.go
···471471 }
472472473473 if q.RowsAffected == 0 {
474474- log.Warnw("attempted to delete follow we didnt have a record for", "user", evt.User, "rkey", op.Rkey)
474474+ log.Warnw("attempted to delete follow we did not have a record for", "user", evt.User, "rkey", op.Rkey)
475475 return nil
476476 }
477477···622622 newReply := rec.Reply != nil
623623624624 if oldReply != newReply {
625625- // the 'replyness' of the post was changed... thats weird
625625+ // the 'replyness' of the post was changed... that's weird
626626 log.Errorf("need to properly handle case where reply-ness of posts is changed")
627627 return nil
628628 }
+1-1
mst/mst_util.go
···130130 leaf := entries[i]
131131132132 if !leaf.isLeaf() {
133133- return nil, fmt.Errorf("Not a valid node: two subtrees next to eachother (%d, %d)", i, len(entries))
133133+ return nil, fmt.Errorf("Not a valid node: two subtrees next to each other (%d, %d)", i, len(entries))
134134 }
135135 i++
136136
+2-2
pds/server.go
···178178 if peering.ID == 0 {
179179 cfg, err := atproto.ServerDescribeServer(ctx, c)
180180 if err != nil {
181181- // TODO: failing this shouldnt halt our indexing
181181+ // TODO: failing this should not halt our indexing
182182 return nil, fmt.Errorf("failed to check unrecognized pds: %w", err)
183183 }
184184185185- // since handles can be anything, checking against this list doesnt matter...
185185+ // since handles can be anything, checking against this list does not matter...
186186 _ = cfg
187187188188 // TODO: could check other things, a valid response is good enough for now
+2-2
testing/integ_test.go
···170170171171 time.Sleep(time.Second)
172172173173- // we expect the bgs to learn about posts that it didnt directly see from
173173+ // we expect the bgs to learn about posts that it did not directly see from
174174 // repos its already partially scraped, as long as its seen *something* after the missing post
175175 // this is the 'catchup' process
176176 ctx := context.Background()
···233233234234 time.Sleep(time.Second * 2)
235235236236- // we expect the bgs to learn about posts that it didnt directly see from
236236+ // we expect the bgs to learn about posts that it did not directly see from
237237 // repos its already partially scraped, as long as its seen *something* after the missing post
238238 // this is the 'catchup' process
239239 _, err = b1.bgs.Index.GetPost(ctx, p2posts2[4].Uri)