Skip to content

feat: Update API, based on the latest lexicon schemas - #346

Open
sugyan wants to merge 2 commits into
mainfrom
update/lexicon-5c3b7c9c8
Open

feat: Update API, based on the latest lexicon schemas#346
sugyan wants to merge 2 commits into
mainfrom
update/lexicon-5c3b7c9c8

Conversation

@sugyan

@sugyan sugyan commented Aug 14, 2026

Copy link
Copy Markdown
Member

Summary

Regenerates atrium-api from bluesky-social/atproto@5c3b7c9c8 (402 lexicons) and catches the hand-written code up with it.

Stacked on #345 — the regeneration needs both codegen fixes from that PR to come out clean. Base will retarget to main once #345 merges. Review the second commit onward for the interesting part; the first is pure lexgen output.

Contents

  • feat: Update API, based on the latest lexicon schemaslexgen output only. 61 new modules, no removals.
  • feat: Update for the latest lexicon — 12 hand-written files, +31/−15.

Breaking changes

This is semver-major for atrium-api. Most of it is ordinary lexicon evolution (new optional fields, open-union additions), but three things break at the source level:

  • New required fields on existing types — refresh_session::OutputData (email, emailAuthFactor, emailConfirmed), describe_server::OutputData (blobUploadLimit), graph::follow::RecordData (via), getFollows/getFollowers params (sort), listConvos params (kind, lockStatus), MessageInputData (replyTo), embed::video::MainData (presentation), and several actor::defs view types (debug, mutedOnlyReposts, mutedOnlyQuoteposts).
  • getServiceAuth.aud relaxed from format: did to a plain string, so it is now String rather than Did.
  • threadViewPref.prioritizeFollowedUsers removed upstream. bsky_sdk::preference::ThreadViewPreferenceData drops the field to match — it could no longer be populated from the server and there is no write-back path, so keeping it would have left a field permanently stuck at its default. Happy to keep it instead if you would rather not break that struct.

Also new: app.bsky.actor.contentVisibilityDeclaration, registered with record_impl! and handled in bsky-sdk's create_record.

Verification

cargo check --workspace --all-features --all-targets   # clean
cargo test  --workspace --all-features                 # 192 passed, 0 failed
cargo fmt-no-gen --check                               # clean
RUSTFLAGS="-D warnings" cargo clippy --workspace --all-features --all-targets

clippy reports two needless_borrow hits in atrium-crypto/src/encoding.rs:58,61. Those reproduce identically on main and are unrelated to this regeneration — left alone here.

Note on release

atrium-api is 0.25.8, so this should land as 0.26.0. Worth eyeballing what release-plz does with it before merging.

🤖 Generated with Claude Code

Note

Every workflow filters on pull_request: branches: ["main"], so no CI runs while this PR is based on fix/codegen-empty-doc-and-collection. Merging #345 and retargeting this PR to main will need a push (or close/reopen) to kick the checks off — a base change alone fires pull_request.edited, which is not in the default trigger set. Retargeting to main right now also works; it just pulls #345's two commits into this diff until that PR merges.

Verified locally against this PR's base: 202 files, +13,043 / −1,881. (GitHub's cumulative counter shows a larger figure because it sums per-commit churn.)

@sugyan
sugyan changed the base branch from fix/codegen-empty-doc-and-collection to main August 14, 2026 12:12
sugyan and others added 2 commits August 14, 2026 21:12
Regenerated with `lexgen` from bluesky-social/atproto@5c3b7c9c8 (402 lexicons).

61 new modules, no removals. This is a breaking change at the Rust source
level: several types gain required fields, `threadViewPref` loses
`prioritizeFollowedUsers`, and `getServiceAuth.aud` relaxes from `format: did`
to a plain string.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Catch up the hand-written code with the regenerated API.

- New required fields in test fixtures across atrium-api, bsky-sdk and
  bsky-cli, and in the video example.
- `getServiceAuth.aud` is now a plain string rather than a `Did`.
- `threadViewPref.prioritizeFollowedUsers` was removed upstream, so
  `bsky_sdk::preference::ThreadViewPreferenceData` drops the field it could
  no longer populate.
- Register the new `app.bsky.actor.contentVisibilityDeclaration` record with
  `record_impl!` and handle its `KnownRecord` variant in `create_record`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sugyan
sugyan force-pushed the update/lexicon-5c3b7c9c8 branch from 6faa1d2 to a2e623a Compare August 14, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant