this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

quick codespell pass over entire repo (#475)

Hadn't run one of these in a while.

authored by

bnewbold and committed by
GitHub
e5eb11e4 705a15dc

+29 -29
+3 -3
atproto/crypto/keys.go
··· 16 16 PublicKey() (PublicKey, error) 17 17 18 18 // Hashes the raw bytes using SHA-256, then signs the digest bytes. 19 - // Always returns a "low-S" signature (for elliptic curve systems where that is ambigious). 19 + // Always returns a "low-S" signature (for elliptic curve systems where that is ambiguous). 20 20 HashAndSign(content []byte) ([]byte, error) 21 21 } 22 22 ··· 37 37 type PublicKey interface { 38 38 Equal(other PublicKey) bool 39 39 40 - // Compact byte serialization (for elliptic curve systems where encoding is ambigious). 40 + // Compact byte serialization (for elliptic curve systems where encoding is ambiguous). 41 41 Bytes() []byte 42 42 43 43 // Hashes the raw bytes using SHA-256, then verifies the signature of the digest bytes. ··· 52 52 DIDKey() string 53 53 54 54 // Non-compact byte serialization (for elliptic curve systems where 55 - // encoding is ambigious) 55 + // encoding is ambiguous) 56 56 // 57 57 // This is not used frequently, or directly in atproto, but some 58 58 // serializations and encodings require it.
+1 -1
atproto/identity/identity.go
··· 206 206 return endpoint.URL 207 207 } 208 208 209 - // 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. 209 + // 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. 210 210 // 211 211 // 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. 212 212 func (i *Identity) DeclaredHandle() (syntax.Handle, error) {
+2 -2
atproto/syntax/datetime.go
··· 8 8 ) 9 9 10 10 const ( 11 - // Prefered atproto Datetime string syntax, for use with [time.Format]. 11 + // Preferred atproto Datetime string syntax, for use with [time.Format]. 12 12 // 13 13 // Note that *parsing* syntax is more flexible. 14 14 AtprotoDatetimeLayout = "2006-01-02T15:04:05.999Z" ··· 94 94 return ret 95 95 } 96 96 97 - // Creates a new valid Datetime string matching the current time, in prefered syntax. 97 + // Creates a new valid Datetime string matching the current time, in preferred syntax. 98 98 func DatetimeNow() Datetime { 99 99 t := time.Now().UTC() 100 100 return Datetime(t.Format(AtprotoDatetimeLayout))
+1 -1
atproto/syntax/uri.go
··· 5 5 "regexp" 6 6 ) 7 7 8 - // Represents an arbitary URI in string format, as would pass Lexicon syntax validation. 8 + // Represents an arbitrary URI in string format, as would pass Lexicon syntax validation. 9 9 // 10 10 // 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. 11 11 //
+2 -2
bgs/bgs.go
··· 1062 1062 // TODO: the case of handling a new user on a new PDS probably requires more thought 1063 1063 cfg, err := atproto.ServerDescribeServer(ctx, c) 1064 1064 if err != nil { 1065 - // TODO: failing this shouldnt halt our indexing 1065 + // TODO: failing this shouldn't halt our indexing 1066 1066 return nil, fmt.Errorf("failed to check unrecognized pds: %w", err) 1067 1067 } 1068 1068 1069 - // since handles can be anything, checking against this list doesnt matter... 1069 + // since handles can be anything, checking against this list doesn't matter... 1070 1070 _ = cfg 1071 1071 1072 1072 // TODO: could check other things, a valid response is good enough for now
+3 -3
carstore/bs.go
··· 1290 1290 // Since we generally expect shards to start bigger and get smaller, 1291 1291 // and because we want to avoid compacting non-adjacent shards 1292 1292 // together, and because we want to avoid running a stat on every 1293 - // single shard (can be expensive for repos that havent been compacted 1293 + // single shard (can be expensive for repos that haven't been compacted 1294 1294 // in a while) we only skip a prefix of shard files that are over the 1295 1295 // threshold. this may end up not skipping some shards that are over 1296 1296 // the threshold if a below-threshold shard occurs before them, but ··· 1375 1375 1376 1376 // we could also just add the duplicates to the keep set for now and 1377 1377 // focus on compacting everything else. it leaves *some* dirty blocks 1378 - // still around but we're doing that anyways since compaction isnt a 1378 + // still around but we're doing that anyways since compaction isn't a 1379 1379 // perfect process 1380 1380 1381 1381 log.Debugw("repo has dirty dupes", "count", len(dupes), "uid", user, "staleRefs", len(staleRefs), "blockRefs", len(brefs)) ··· 1527 1527 return err 1528 1528 } 1529 1529 1530 - // now create a new staleRef with all the refs we couldnt clear out 1530 + // now create a new staleRef with all the refs we couldn't clear out 1531 1531 if len(staleToKeep) > 0 { 1532 1532 if err := txn.Create(&staleRef{ 1533 1533 Usr: uid,
+2 -2
carstore/repo_test.go
··· 263 263 264 264 if err := rep.ForEach(context.TODO(), "", func(k string, v cid.Cid) error { 265 265 if !set[v] { 266 - return fmt.Errorf("have record we didnt expect") 266 + return fmt.Errorf("have record we did not expect") 267 267 } 268 268 269 269 delete(set, v) ··· 275 275 fmt.Println("matched error") 276 276 bs, err := cs.ReadOnlySession(1) 277 277 if err != nil { 278 - fmt.Println("couldnt read session: ", err) 278 + fmt.Println("could not read session: ", err) 279 279 } 280 280 281 281 blk, err := bs.Get(context.TODO(), ierr.Cid)
+1 -1
cmd/fakermaker/README.md
··· 35 35 # create posts, including mentions and image uploads 36 36 go run ./cmd/fakermaker/ gen-posts 37 37 38 - # create more interations, such as likes, between accounts 38 + # create more interactions, such as likes, between accounts 39 39 go run ./cmd/fakermaker/ gen-interactions 40 40 41 41 # lastly, read-only queries, including timelines, notifications, and post threads
+1 -1
cmd/labelmaker/README.md
··· 63 63 64 64 SQRL is a moderation system built around a declarative rule language, 65 65 application events, and cached counter values. It is the open source release of 66 - Smyt, a moderation system aquired and used by Twitter many years ago. See the 66 + Smyt, a moderation system acquired and used by Twitter many years ago. See the 67 67 SQRL docs for more: <https://sqrl-lang.github.io/sqrl/index.html> 68 68 69 69 A local SQRL moderation server can be queried by providing `--sqrl-url` (or the
+2 -2
cmd/palomar/README.md
··· 1 1 # Palomar 2 2 3 - 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. 3 + 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. 4 4 5 5 Almost all the code for this service is actually in the `search/` directory at the top of this repo. 6 6 7 - 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. 7 + 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. 8 8 9 9 10 10 ## Query String Syntax
+2 -2
events/diskpersist.go
··· 162 162 return dp.initLogFile() 163 163 } 164 164 165 - // 0 for the mode is fine since thats only used if O_CREAT is passed 165 + // 0 for the mode is fine since that is only used if O_CREAT is passed 166 166 fi, err := os.OpenFile(filepath.Join(dp.primaryDir, lfr.Path), os.O_RDWR, 0) 167 167 if err != nil { 168 168 return err ··· 455 455 e.RepoTombstone.Seq = seq 456 456 default: 457 457 // only those three get peristed right now 458 - // we shouldnt actually ever get here... 458 + // we should not actually ever get here... 459 459 return nil 460 460 } 461 461
+2 -2
fakedata/generators.go
··· 295 295 var tgt *AccountContext 296 296 297 297 if maxFollows > len(catalog.Regulars) { 298 - return fmt.Errorf("not enought regulars to pick maxFollowers from") 298 + return fmt.Errorf("not enough regulars to pick maxFollowers from") 299 299 } 300 300 if maxMutes > len(catalog.Regulars) { 301 - return fmt.Errorf("not enought regulars to pick maxMutes from") 301 + return fmt.Errorf("not enough regulars to pick maxMutes from") 302 302 } 303 303 304 304 regCount := 0
+2 -2
indexer/indexer.go
··· 471 471 } 472 472 473 473 if q.RowsAffected == 0 { 474 - log.Warnw("attempted to delete follow we didnt have a record for", "user", evt.User, "rkey", op.Rkey) 474 + log.Warnw("attempted to delete follow we did not have a record for", "user", evt.User, "rkey", op.Rkey) 475 475 return nil 476 476 } 477 477 ··· 622 622 newReply := rec.Reply != nil 623 623 624 624 if oldReply != newReply { 625 - // the 'replyness' of the post was changed... thats weird 625 + // the 'replyness' of the post was changed... that's weird 626 626 log.Errorf("need to properly handle case where reply-ness of posts is changed") 627 627 return nil 628 628 }
+1 -1
mst/mst_util.go
··· 130 130 leaf := entries[i] 131 131 132 132 if !leaf.isLeaf() { 133 - return nil, fmt.Errorf("Not a valid node: two subtrees next to eachother (%d, %d)", i, len(entries)) 133 + return nil, fmt.Errorf("Not a valid node: two subtrees next to each other (%d, %d)", i, len(entries)) 134 134 } 135 135 i++ 136 136
+2 -2
pds/server.go
··· 178 178 if peering.ID == 0 { 179 179 cfg, err := atproto.ServerDescribeServer(ctx, c) 180 180 if err != nil { 181 - // TODO: failing this shouldnt halt our indexing 181 + // TODO: failing this should not halt our indexing 182 182 return nil, fmt.Errorf("failed to check unrecognized pds: %w", err) 183 183 } 184 184 185 - // since handles can be anything, checking against this list doesnt matter... 185 + // since handles can be anything, checking against this list does not matter... 186 186 _ = cfg 187 187 188 188 // TODO: could check other things, a valid response is good enough for now
+2 -2
testing/integ_test.go
··· 170 170 171 171 time.Sleep(time.Second) 172 172 173 - // we expect the bgs to learn about posts that it didnt directly see from 173 + // we expect the bgs to learn about posts that it did not directly see from 174 174 // repos its already partially scraped, as long as its seen *something* after the missing post 175 175 // this is the 'catchup' process 176 176 ctx := context.Background() ··· 233 233 234 234 time.Sleep(time.Second * 2) 235 235 236 - // we expect the bgs to learn about posts that it didnt directly see from 236 + // we expect the bgs to learn about posts that it did not directly see from 237 237 // repos its already partially scraped, as long as its seen *something* after the missing post 238 238 // this is the 'catchup' process 239 239 _, err = b1.bgs.Index.GetPost(ctx, p2posts2[4].Uri)