Skip to content

Save and browse public Bluesky records offline with durable, resumable jobs #676

Open

Description

@micahflee

Parent

What to build

The Bluesky collection engine — durable, resumable, rate-limit-aware jobs writing into a content-addressed media store — together with its first consumers: posts, reposts, likes, and bookmarks, saved and browsable offline for free.

Why this is one issue

Resumability, incremental checkpointing, rate-limit backoff, and storage preflight are the architecture of the collection loop, not a feature layered on top of it. Building the categories first and retrofitting durability afterwards means rewriting the loop and its tests. The engine lands with its first consumer.

Conversations (#677) and source deletion (#679) then build on this same engine rather than restating it.

Acceptance criteria

Collection engine

  • Save work runs as durable jobs with incremental checkpoints that resume after restart without duplicate records, media, or pending work.
  • Failed media remains explicit and retryable; a successful retry upgrades completeness.
  • AT Protocol rate limits produce visible backoff and resume rather than appearing hung.
  • Progress exposes safe operational metadata only.
  • Storage preflight shows estimated need, capacity, and uncertainty, and refuses when insufficiency is certain.
  • Cancellation or disk exhaustion preserves committed data and leaves temporary data safely cleanable.
  • The engine is category-agnostic, so a new category supplies its API surface and mapping without reimplementing durability.

Public records

  • Each category can be enabled and collected independently through direct authenticated AT Protocol APIs; disabling it never deletes saved data.
  • Records use stable AT URIs, retain the latest observation/CID/timestamps/deletion state, and preserve captured authors plus bounded context.
  • All required images, avatars, previews, thumbnails, and full videos — including liked videos — are stored content-addressably within the account.
  • Separate chronologically paginated Browse views work offline and show embeds, optional source links, deletion state, and unavailable assets.
  • Profile refresh does not rewrite captured historical author labels.

Tests

  • Controller tests use a fake AT Protocol client with real temporary storage; UI tests mock only the controller boundary.
  • Restart, retry, rate-limit, cancellation, and disk-pressure tests cover every category in this issue.
  • Automatic diagnostics exclude content, media, handles, DIDs, credentials, and local paths, per docs/adr/0029-minimize-bluesky-diagnostics.md.

Blocked by

Absorbs

(This was written by an LLM.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions