Skip to content

feat(spaces): update to the 2026-11-12 spaces alpha (via 2026-11-05) - #256

Open
ascorbic wants to merge 16 commits into
mainfrom
ccr-fcda09b2-cblvn7
Open

ascorbic wants to merge 16 commits into
mainfrom
ccr-fcda09b2-cblvn7

Conversation

@ascorbic

@ascorbic ascorbic commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Moves atproto spaces from the August alpha to 0.0.0-spaces-alpha-20261112204144 (cut from permissioned-data-alpha@b27a037c7), by way of the 2026-11-05 build. Both are breaking alpha changes: space data needs pds spaces reset after deploying (schema version 3), and apps built on earlier alphas need updating.

The sync process used for both steps is now written down in plans/in-progress/spaces.md, and the plan has a section per alpha with the details.

2026-11-05 alpha

  • Credentials are bound to a P-256 key and presented with Atproto-Space-Credential plus an HTTP message signature, replacing DPoP.
  • Commits are unsigned; syncers verify data with a MAC derived against a new #atproto_kem key (pds spaces kem).
  • simplespace is replaced by the personalspace / memberspace / managedspace policies.
  • getRepo streams STAR. Writes are sequenced by space revision.
  • New: clearRecords, removeWriter, importRepo, exportSpaceMeta, importSpaceMeta.
  • @getcirrus/spaces and @getcirrus/space-conformance now bundle the alpha @atproto packages, because several have broken releases that outrank the alpha range.

2026-11-12 alpha

  • Renames:
    • getSpaceCredential → authorizeSpaceSync
    • listRepos → listWriters
    • notifyWrite → notifyRepoUpdate
    • notifyCredentialRevoked → notifyCredentialsRevoked
    • checkUserAccess → checkAccess
    • putMember / removeMember → batched putMembers / removeMembers (up to 100, in one commit)
  • Notification registration:
    • A syncer passes notify: {endpoint, token} to authorizeSpaceSync, and the space host confirms it with the syncer's confirmRegistration before issuing the credential.
    • Updates go to notifySpaceUpdate.
    • When a registration lapses, the syncer gets one registrationExpired notice.
    • spaceDeleted notices go to every registration and are retried for 72h.
    • registerNotify, unregisterNotify and notifySpaceDeleted are gone.
  • Writer removals are sequenced and announced, and listWriters lists them.
  • MACs are RFC 9421 signatures: requested with Accept-Signature, covering an Atproto-Space-Commit or Atproto-Space-Record header. STAR archives use application/vnd.dasl.star.
  • Managed spaces:
    • managingApp must be did#service.
    • If the managing app is down, requests fail with UpstreamFailure (502) rather than being treated as a refusal.
    • Under publicWrite, a member denied write stays excluded.
  • Errors: renamed NotSpaceOwner → NotAuthorized, UserNotAuthorized → AccountNotAuthorized, BadSpaceMac → InvalidSpaceMac and MalformedCursor → InvalidCursor. New: InvalidRepoFile, RepoMismatch, InvalidSpaceMeta, RegistrationNotConfirmed and UpstreamFailure.
  • oauth-scopes: permissions carry spaceType, and space declarations use title. oauth-provider exports an allowsSpace(permissions, check) helper.
  • Upstream packages: four more have outranking broken releases (lex-rpc, oauth-resolver, lex-password-session, bsync), now overridden in pnpm-workspace.yaml.

Conformance (106 checks)

  • Reference PDS (matrix): 103 pass, with two pinned divergences on the reference's side, both unchanged since 1105:
    • its deleteRecord answers 200 for a missing space;
    • a malformed attestation gets a 500.
  • Cirrus: every runnable must and should check passes, both on the space routes in-process and on the integrated PDS worker.
  • Slow check: notify.registration-expired waits out a real 10-minute credential, so CI skips it. Run by hand, it passes against both the reference and Cirrus.
  • Bug found: the suite caught one Cirrus bug, fixed here: listMembers accepted a garbage cursor.

Verification

  • pnpm build, pnpm check and pnpm knip are clean.

  • Tests pass:

    Package Tests
    spaces 80
    pds 342
    oauth-provider 140
    space-conformance 47
    matrix 5
    create-pds 4
  • The engine bundle imports only hono, jose, @ATCUTE and cloudflare:workers.

Not exercised: the browser checker against a live PDS, the CLI's --oauth path, and cross-PDS flows against a real foreign PDS.

After merging

  1. Deploy, then run pds spaces reset. The KEM key carries over.
  2. Republish the earth.cirrus.check.space probe declaration, which now uses title (see packages/space-conformance/probe-lexicons/README.md).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB

…cons

Pins @atproto/space, oauth-scopes and dev-env to the 2026-11-05 alpha,
cut from permissioned-data-alpha@704b9e2. Re-vendors the space,
memberspace, personalspace and managedspace lexicons (simplespace is
gone upstream) with a new scripts/vendor-lexicons.mjs, so the weekly
sync's vendor step is one command.

@atproto/space now depends on the alpha lex-cbor/lex-data/star builds,
each of which has an outranking broken release (bare 0.0.0, or star's
corrupt 0.0.0-stage). Sibling pins no longer rescue npm installs, so
the published spaces and conformance packages keep every alpha @atproto
package in devDependencies for tsdown to bundle, and @getcirrus/pds
drops its direct @atproto/space dependency and the common pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
Rewrites the spaces engine and its PDS integration for the upstream
alpha cut from permissioned-data-alpha@704b9e2:

- Space credentials bind to a P-256 did:key and are presented with the
  Atproto-Space-Credential scheme, an Atproto-Space-Audience header and
  an HTTP message signature over both. DPoP is gone. Credentials are
  checked against the audience, their space and revocations received
  through notifyCredentialRevoked.
- getSpaceCredential takes credentialKid, delegationToken and
  clientAttestation in the body, issues public-read credentials without
  a delegation token, and answers a refused user as SpaceNotFound.
- Commits carry no signature: {ver, repo, space, rev, data}. Reads that
  return a commit or record are authenticated with a MAC derived by ECDH
  against the account's new #atproto_kem key (BadSpaceMac when a
  credential doesn't ask for one).
- getRepo streams a STAR archive in record-path byte order, fencing
  against concurrent writes instead of buffering the whole repo.
- simplespace is replaced by personalspace, memberspace (per-member
  read/write, public read/write, allowed apps) and managedspace policies
  under com.atproto.space.{create,update,delete,get}Space and
  com.atproto.memberspace.*, with optional published policy and member
  records in the authority's repo.
- Writers are sequenced by space revision (listRepos cursor, spaceRev
  and prevSpaceRev in forwarded notifyWrites, FutureRev), and a repo
  host retries its notifyWrite to a foreign authority for 24 hours,
  coalesced to the newest revision.
- New: clearRecords, removeWriter, importRepo, exportSpaceMeta and
  importSpaceMeta. Imported records' blobs are promoted when uploaded.
- The DID document drops #atproto_space_host and publishes
  #atproto_kem; getRecommendedDidCredentials carries it through a
  migration. 'pds spaces kem' creates the key and, for did:plc, can
  publish it via the PDS's own PLC signing.

The space DO schema version is bumped: existing space data refuses
until 'pds spaces reset', per the alpha policy. @atproto/space and its
alpha dependencies are bundled into @getcirrus/spaces, whose public
types no longer reference any @atproto package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
… process

Updates the spaces concepts and enable guides for credentials signed
with HTTP message signatures, MAC-authenticated space data and the
#atproto_kem key, the baseline policies and migration, with upgrade
steps from the August alpha. Records the alpha sync process in the
spaces plan, where it can be found next time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
…tion

Verifying a delegation token records its replay key in the space DO, so
a well-formed request naming any foreign space would otherwise create an
empty DO for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
…ogress)

Snapshot of the conformance suite rewrite while it is still under way:
HTTP-signature credentials, MAC verification, STAR archives, the
baseline policies and the new methods. Not yet green; the finished
version, in-process runners and matrix recalibration follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
…n progress)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
…ecalibrate

Rewrites the check catalogue (24 → 92 checks) for HTTP-signature
credentials, MAC-authenticated commits and records, STAR archives, the
baseline policies, writer sequencing, migration and revocation. Coverage
now requires zero gaps against the vendored lexicons, with explicit,
stale-checked exemptions. The reference matrix runs every capability
against the 1105 reference PDS (89 pass, 3 pinned divergences) and pins
the alpha build it was calibrated on. apps/check follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
…x what it found

Rewires both in-process runners to the 2026-11-05 suite. The space-routes
run now offers every capability except the PDS-level ones: harness did:key
identities, real service-auth verification, and an in-process syncer inbox
that also receives the space DO alarm's deliveries. The PDS run adds the
#atproto_kem discovery check and the MAC'd self-flow.

Fixes the suite turned up:
- getBlob answered 503 without blob storage before checking the space and
  the reference, instead of SpaceNotFound / BlobNotFound.
- Managing another authority's space answered SpaceNotFound rather than
  the declared NotSpaceOwner.
- listSpaces moves into the engine, which owns the space index.
- The PDS resolved its own DID's #atproto_pds by fetching its DID
  document, which a Worker can't do for its own hostname, so a syncer
  registering the operator's own service failed on a deployed PDS.

Also drops knip ignores and devDependencies left over from the 0818 pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 9, 2026 •

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 9452fe4 Nov 13 2026, 06:38 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 9, 2026 •

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 9452fe4 Commit Preview URL

Branch Preview URL
Nov 13 2026, 06:39 AM

…cons

Pins the 2026-11-12 alpha, cut from permissioned-data-alpha@b27a037 (the
20261112203312 build has identical code). Re-vendors the space lexicons:
getSpaceCredential becomes authorizeSpaceSync, listRepos listWriters,
notifyWrite notifyRepoUpdate, putMember/removeMember the batched
putMembers/removeMembers and checkUserAccess checkAccess; registerNotify,
unregisterNotify and notifySpaceDeleted give way to confirmRegistration
and notifySpaceUpdate.

@atproto/lex-rpc and @atproto/oauth-resolver now publish a corrupt
0.0.0-stage, and bsync and lex-password-session a broken bare 0.0.0, all
outranking the alpha range; they join the workspace overrides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
Renamed and batched methods (authorizeSpaceSync, listWriters,
notifyRepoUpdate, putMembers/removeMembers, checkAccess), token-based
notification registration confirmed by the syncer, sequenced writer
removals, HTTP message signature MACs, STAR media type and the renamed
error codes. oauth-scopes: spaceType parameter and title declarations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
…for 1112

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
106 checks; syncer inbox serves confirmRegistration and notifySpaceUpdate
via createSyncerInbox. Matrix recalibrated: 103 pass, 2 pinned
divergences, registration-expired slow and run by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
@ascorbic ascorbic changed the title chore(spaces): bump spaces alpha to 20261105160032 and re-vendor lexicons feat(spaces): update to the 2026-11-12 spaces alpha (via 2026-11-05) Nov 13, 2026
node-version: latest now resolves to a Node 27 alpha, which
better-sqlite3 can't compile against, so the PR preview publish fails
at install. Match claude.yml's lts/*.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ7qcQNQoiA6a23woGC7tB
@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 9452fe4

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