Spike: saved articles on atproto Spaces (review fixes) - #384
Open
disnet wants to merge 2 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
SpaceNotFound→createSpacemirror path and unsupported-PDS caching;putRecord;truncatedand never calls an incomplete diff in sync;Checks: backend type/format check; 603 tests across 55 files in low-concurrency batches; fake Spaces lifecycle 11/11.
Radial artifact