0
2
Photos post on PDSes that still require alt
Merged Approved
This makes every social.grain.photo write send alt, as an empty string when there is no description. That covers create, gallery edit (new and replaced photos), Instagram import, and the private and pool gallery endpoints. I searched app/ and server/ for other write sites and found none, so the coverage is complete. The alt || '' form is correct. I didn't check how readers treat an empty alt; I'm taking the PR's word that no ALT badge appears. The AGENTS.md section matches the change. I couldn't run it against a refusing PDS, so the real proof is the post-deploy log check the author already named. Approving.
Merged as ae0cb3a
What changes
Every photo the web app and the appview write now carries
alt, an empty string when there is no description: create, gallery edit (new and replaced photos), Instagram import, and the private and pool gallery endpoints, which group create goes through. Nothing changes on screen. Readers treat an emptyaltas none, so no ALT badge appears.AGENTS.mdrecords the rule.Why
People on many PDSes cannot post a photo without a description. They get
XRPC dev.hatk.applyWrites failed: 500, reported at https://github.com/grainsocial/grain/issues/24.The PDS refuses the write with
Invalid social.grain.photo record: Missing required key "alt".@atproto/pdsvalidates against schemas compiled into the server (validateRecordinpackages/pds/src/repo/prepare.ts, listed inpackages/pds/lexicons.json), not the ones grain.social publishes. Its copy ofsocial.grain.photorequiresalt, so publishing the relaxed schema on Oct 31 could not reach these servers.Prod logs show 252 refusals across 14 accounts from Nov 2 to Nov 6, still arriving: 10 accounts on Bluesky hosts, 3 on
selfhosted.social, 1 onpds.mcmanus.tech. 10 of the 14 had no photo in their repo dated since Oct 31 when checked on Nov 6.An empty
altpasses both the bundled copy and the published schema, and works today on every host.validate: falsewould also get past the check but turns off validation altogether. Asking Bluesky to update its copy is still worth doing, but each host then has to upgrade.How it was checked
Read each write site and each reader of
altinapp/andserver/. No test intest/mentionsalt, and none was added: the web write sites are inline in Svelte pages with no unit harness. Left to CI: type check and tests. Not tried in a browser or against a refusing PDS, since test posts reach production.Shortcomings
"op":"refused"withrequired keyin the logs.altthe same way and need their own change and release.feature/rusthas the same write sites underweb/, andcrates/grain-serve/src/spaces/pool.rs.morelreports the same version as hosts that refuse, yet accepted two photos withoutalt. That is unexplained.4744b4a; the schema and validator were read at atprotomain, not at that commit. The error text matches this code exactly.Review
A quick look. The reasoning is in the
AGENTS.mdsection.🤖 Generated with Claude Code