~ knotless Search/
↑↓ move↵ open⇧↵ all results

grain.social/grain

photography-focused photo sharing platform

grain.social
1 collaborator
0
2

server: take atproto-client 0.11.1, and find an ended group session again

Merged
Merged chadtmiller.com asked to merge into main from grain.social/grain:deps/atproto-0.6

grain moves from atproto-client 0.11.0 to 0.11.1. In 0.11.1, wrapper errors are transparent, and Ended::of would have stopped seeing a group session that ended during a space read; it now finds it through the new space::Error::delegation(). Main already had atproto 0.6.1 and atproto-server 0.3.0.

Claude Opus 5.5 · high effort

What changes

atproto-client 0.11.0 → 0.11.1. Wrapper errors are transparent now: Display is the inner error's, and source() is the inner error's source. Refusals are found with the typed accessors. telemetry::refusal already uses them (xrpc()), so it stays as it is.

An ended group session, found by its accessor. groups::space::delegation puts Ended inside space::Error::Delegation. Under 0.11.1 that error no longer appears on the source chain, so Ended::of, which walked chain(), would have treated a group whose session ended like any other failed read. It now checks Ended directly (including as context) and through space::Error::delegation(). an_ended_session_says_so covers both cases, plus a delegation failure that is not Ended.

Page size by Pages::limit. getAccountDeletionPlan and account deletion's listRecords paging set their page size with Pages::limit and no longer put limit in the params by hand. The PDS gets the same limit value.

Why

These are the cleanups the new releases allow, kept to grain's actual uses. grain does not use Scopes::grants or permission sets, so atproto 0.6's grants fix changes nothing here. The one Box::pin (AsGroup's Delegate impl) is required by the trait's BoxFuture, not added for size, so it stays.

How it was checked

cargo check --workspace --all-targets passed after rebasing onto main, and cargo test -p grain-serve --lib an_ended_session_says_so passed. The runner's checks cover the rest, including the answers check for requests.

Shortcomings

Behaviour changes: none expected. The listRecords query string may put limit in a different position; the values are the same.

Asked for changes

This bumps atproto, atproto-client and atproto-server. It makes Ended::of check Ended directly and through space::Error::delegation(), now that client errors are transparent. It also sets the page size with Pages::limit in the account-deletion paths. The code changes look right to me. Ended::of still finds Ended under anyhow context, and the new test covers the delegation, context and non-Ended cases. limit is passed as a u32 with the same values as before.

The head conflicts with main (24f490e) in Cargo.lock and Cargo.toml. Every runner check, including check and test, failed with that error and ran nothing. So the bump has not been verified by CI, and the pull can't merge as it stands. Please rebase it onto main or merge main into it, and resolve the dependency lines. Main may have changed those versions too. Then push again so the checks run.

Approved

The pull is rebased onto main (24f490e) and merges cleanly now, so what my last review asked for is done. It bumps atproto-client to 0.11.1, and Cargo.lock and Cargo.toml agree.

I have no new findings on the code. Ended::of finds Ended directly, including under anyhow context, and through space::Error::delegation(). an_ended_session_says_so covers the delegation, context and non-Ended cases. The Pages::limit calls take a u32 with the same values as before.

The check, test, e2e and web runs were still queued when I looked. I'm approving on the code, so please make sure they pass before you merge.

Approved

My approval at b9e2380 still stands. The diff since then is the same change on a newer base (5618047). It bumps atproto-client to 0.11.1, with Cargo.lock and Cargo.toml agreeing. Ended::of checks Ended directly (including under context) and through space::Error::delegation(). The account-deletion paging uses Pages::limit. The new test covers the delegation, context and non-Ended cases.

I found nothing new. check (fmt and clippy) passed. test and e2e were still running and web was still queued when I looked, so please make sure they pass before you merge.

Merged as 1b1e7e6