Skip to content

Spike: saved articles on atproto Spaces (review fixes) - #384

Open
disnet wants to merge 2 commits into
mainfrom
radial/impl-1bf11ce53b09
Open

Spike: saved articles on atproto Spaces (review fixes)#384
disnet wants to merge 2 commits into
mainfrom
radial/impl-1bf11ce53b09

Conversation

@disnet

@disnet disnet commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Spike: store saved articles in a personal atproto Space behind a dev-only flag. D1 remains canonical and mirroring remains best-effort.

This update resolves the review findings on the original spike:

  • preserves structured XRPC error codes and status through session transport, allowing a missing space to be created;
  • covers the SpaceNotFoundcreateSpace mirror path and unsupported-PDS caching;
  • retries transient capability failures rather than caching them for ten minutes;
  • makes mirrored writes replay-safe with putRecord;
  • reports capped record listings as truncated and never calls an incomplete diff in sync;
  • records wildcard permission-authority support as an explicit live-PDS unknown.

Checks: backend type/format check; 603 tests across 55 files in low-concurrency batches; fake Spaces lifecycle 11/11.

Radial artifact

claudebot.disnetdev.com (did:plc:n6ku5xddiuguwze3f356evla) and others added 2 commits August 23, 2026 02:19
Flag-gated (SPACES_SAVES_ENABLED, .dev.vars only) mirror of D1 saves into a
per-user permissioned space — the empty "private and portable" corner of the
saves quadrant. D1 stays canonical; the mirror is best-effort under waitUntil.

- experiments/spaces-saves: Phase 0 protocol lifecycle (11 checks, incl.
  outsider-denial and the second-client portability read). Imports the backend's
  own spaces modules so Phase 0 exercises the code Phases 1-3 ship. Runs against
  a real spaces PDS, or against an in-process fake for harness self-test.
- backend/src/services/spaces: space refs, metadata-only record mapping, DPoP
  proofs, the three-leg credential flow with an in-memory per-isolate cache, a
  Workers-native client for com.atproto.{simplespace,space}, and two transports.
- Dual-write hooks on the two native save paths and both delete paths;
  GET /api/dev/spaces/saved-diff as the drift meter.
- Lexicons: app.skyreader.feed.saved (metadata only, no article body) and the
  app.skyreader.space.savedAccess permission set. Neither is requested by the
  live OAuth flow.

Method names, error codes and token TTLs were read off the published alpha SDK
and reference app rather than proposal 0016 — three findings changed the plan
(own-repo writes need no credential; there is no `space:` scope, it's an
`include:` permission set; createSpace takes no member list). Details in
experiments/spaces-saves/FINDINGS.md; recommendation in
docs/plans/SPACES_SAVES_SPIKE.md.

The live run against a real spaces PDS has NOT happened — no Docker and no
alpha account in this environment. FINDINGS.md marks observed vs. unverified.

Co-Authored-By: claudebot.disnetdev.com (did:plc:n6ku5xddiuguwze3f356evla) <claudebot.disnetdev.com@noreply.radial>
Co-Authored-By: codexbot.disnetdev.com (did:plc:hbonvqr5ysrscg5wdyb5klie) <codexbot.disnetdev.com@noreply.radial>
@disnet disnet changed the title Spike: saved articles on atproto Spaces (flag-gated personal space mirror) Spike: saved articles on atproto Spaces (review fixes) Aug 23, 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.

1 participant