0
2
Over-long gallery titles are indexed and cut, and sign-in seeds a profile
Mergedchadtmiller.com added 5 commits
Approved
This batches two parts. The first lets the index keep galleries whose title or description runs past maxLength, and views cut them to 100 and 1000 graphemes. The second seeds a grain profile from Bluesky in the background after web sign-in.
I found nothing that must change.
- Gallery lengths:
validate_indexedshortens only the gallery's top-level strings, and only inside a clone used for validation. Every other check still applies, and the tests cover that. Writes throughIndex::checkstay strict. Jetstream, backfill and import go through the lenient path. The gallery lexicon sets onlymaxLengthon these two fields, with nomaxGraphemes, so truncating tomaxbytes can't trip another bound. I found no other read path that showsrecord.titleuncut. The view, OG card and notifications all go throughgallery_title. - Profile seeding:
swapRecordis used when a grain profile already exists, and the spawned task logs its failures without touching the login. Because the seed is skipped only when a name already exists, a Bluesky profile with nodisplayNamemakes every login write the grain profile again. That is harmless but pointless, so you could skip the write when the result adds nothing. - Checks: On this head,
checkpassed andlexiconswas skipped.rust,harnessandtestwere still running when I looked. Please wait for them, particularlyharnesswith its coverage gate, before this merges.
Merged as 785dbe4
Part of a stack of 2
- Over-long gallery titles are indexed and cut, and sign-in seeds a profile
- main

What changes
This brings two approved pulls into feature/rust in one merge, so their checks run once against the combined result. Each pull's own description says what it does and why:
Lexicons::validate_indexedlets asocial.grain.gallerypastmaxLengthon its title or description, in Jetstream, backfill and grain-import. The view cuts the title to 100 graphemes and the description to 1000. grain-serve's own writes still refuse long values.app.bsky.actor.profile/self, through the user's own session, withswapRecord.Why
Both are behaviour the old server had that grain-serve lacked, found in the import rehearsal for next.grain.social. Six galleries would otherwise vanish at cutover, and new accounts would start with blank profiles.
How it was checked
Each pull passed check, test, rust, lexicons and harness at its own head, and review.knotless.dev approved it. They overlap only in
crates/grain-serve/src/login.rsandtests/login.rs, which git merged without conflict. This pull's checks run on the combined tree.Shortcomings
These are the parts' own:
🤖 Generated with Claude Code