Skip to content

feat(pds): implement com.atproto.identity.submitPlcOperation#195

Merged
ascorbic merged 1 commit into
mainfrom
feat/submit-plc-operation
May 31, 2026
Merged

feat(pds): implement com.atproto.identity.submitPlcOperation#195
ascorbic merged 1 commit into
mainfrom
feat/submit-plc-operation

Conversation

@ascorbic

Copy link
Copy Markdown
Owner

Summary

  • Adds com.atproto.identity.submitPlcOperation, which POSTs a signed PLC operation to plc.directory/{DID} on the user's behalf and surfaces any directory error back to the caller.
  • Pairs with the existing com.atproto.identity.signPlcOperation so migration clients can complete an outbound move end-to-end against Cirrus without having to talk to plc.directory themselves.
  • Matches the behaviour of the reference PDS implementation.

Test plan

  • pnpm test:unit in packages/pds (311 tests pass; new test covers auth, missing-operation 400, happy-path forward, and PLC error surfacing via mocked global fetch).
  • pnpm check at repo root (publint + attw clean).

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.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
pdscheck 8c0ad35 May 31 2026, 11:35 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
atproto-pds 8c0ad35 May 31 2026, 11:35 AM

@pkg-pr-new

pkg-pr-new Bot commented May 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/create-pds@195
npm i https://pkg.pr.new/@getcirrus/oauth-provider@195
npm i https://pkg.pr.new/@getcirrus/pds@195

commit: 8c0ad35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 submitPlcOperation in packages/pds/src/xrpc/identity.ts that POSTs the signed operation to https://plc.directory/{DID} and propagates PLC errors as PlcDirectoryError.
  • Route registration in packages/pds/src/index.ts next 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.

@ascorbic ascorbic merged commit 3008f88 into main May 31, 2026
8 checks passed
@ascorbic ascorbic deleted the feat/submit-plc-operation branch May 31, 2026 11:44
@mixie-bot mixie-bot Bot mentioned this pull request May 31, 2026
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.

2 participants