0
2
Photos post on PDSes that still require alt
Mergedchadtmiller.com added 1 commit
Approved
This makes every photo write carry alt, using an empty string when there is no description. That covers the create page, both the create and update writes in gallery edit, the import page, and the group gallery write in spaces/pool.rs. I searched web/src and crates for other photo write sites on this branch and found none. The AGENTS.md note under Lexicons matches the change.
Two small points, neither blocking:
- In
pool.rs,photos_ofcopiesaltinto the view whenever it isn't null, so photos written with no description now showalt: ""instead of noalt. That is harmless for readers, but the spaces tests that compare views may need to allow it. CI will show that. - I didn't run anything. The PR body says the checks are left to CI.
Merged as 615d92a
Part of a stack of 2
- Photos post on PDSes that still require alt
- main

What changes
The same fix as the pull into main, on this branch's write sites: create, gallery edit, import, and
crates/grain-serve/src/spaces/pool.rs, which group create goes through. Every photo write now carriesalt, empty when there is no description.AGENTS.mdrecords the rule under Lexicons.Why
@atproto/pdsvalidates writes against schemas compiled into the server (validateRecordinpackages/pds/src/repo/prepare.ts), not the ones grain.social publishes. Its copy ofsocial.grain.photorequiresalt, so the PDS refuses a photo with no description:Invalid social.grain.photo record: Missing required key "alt". Prod logs show 252 refusals across 14 accounts from Nov 2 to Nov 6, reported at https://github.com/grainsocial/grain/issues/24. The logs do not say which client sent them, so how many came from this app is unknown. An emptyaltpasses both that copy and the published schema.How it was checked
Read each write site. Left to CI:
check,testand the Rust tests. Not run here or against a refusing PDS.Shortcomings
Merging main into this branch will bring the same edits under
app/andserver/, which may need resolving against the moved paths.🤖 Generated with Claude Code