feat(pds): implement com.atproto.identity.submitPlcOperation#195
Conversation
Forwards an already-signed PLC operation to plc.directory on the user's behalf so migration clients don't have to talk to the directory themselves. Pairs with the existing signPlcOperation endpoint to match the reference PDS migration flow.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
pdscheck | 8c0ad35 | May 31 2026, 11:35 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
cirrusdocs | 8c0ad35 | Commit Preview URL Branch Preview URL |
May 31 2026, 11:35 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
atproto-pds | 8c0ad35 | May 31 2026, 11:35 AM |
commit: |
There was a problem hiding this comment.
Pull request overview
Adds a local handler for com.atproto.identity.submitPlcOperation so migration clients can submit signed PLC operations through the PDS rather than calling plc.directory directly, completing the outbound migration trio alongside requestPlcOperationSignature and signPlcOperation.
Changes:
- New authenticated handler
submitPlcOperationinpackages/pds/src/xrpc/identity.tsthat POSTs the signed operation tohttps://plc.directory/{DID}and propagates PLC errors asPlcDirectoryError. - Route registration in
packages/pds/src/index.tsnext to the other migration identity endpoints. - Unit tests covering auth, missing-operation validation, happy-path forwarding, and PLC error surfacing, plus a changeset.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/pds/src/xrpc/identity.ts | Adds submitPlcOperation handler forwarding to plc.directory. |
| packages/pds/src/index.ts | Registers the new authenticated POST route. |
| packages/pds/test/identity.test.ts | Adds tests with stubbed global fetch for the new endpoint. |
| .changeset/submit-plc-operation.md | Minor changeset for @getcirrus/pds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
com.atproto.identity.submitPlcOperation, which POSTs a signed PLC operation toplc.directory/{DID}on the user's behalf and surfaces any directory error back to the caller.com.atproto.identity.signPlcOperationso migration clients can complete an outbound move end-to-end against Cirrus without having to talk to plc.directory themselves.Test plan
pnpm test:unitinpackages/pds(311 tests pass; new test covers auth, missing-operation 400, happy-path forward, and PLC error surfacing via mocked global fetch).pnpm checkat repo root (publint + attw clean).