Skip to content

feat(raindrop): add a two-way Raindrop connector - #487

Merged
aicayzer merged 11 commits into
mainfrom
raindrop/connector
Dec 4, 2026
Merged

aicayzer merged 11 commits into
mainfrom
raindrop/connector

Conversation

@aicayzer

@aicayzer aicayzer commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the raindrop connector: a person's Raindrop.io bookmarks, nested collections and highlights kept in step with Marfa in both directions, with Raindrop's saved page copies and uploaded files kept as Marfa files attached to their bookmark. Raindrop's tags and its "important" flag become Marfa tags and the favorite tag through the kit, and each bookmark carries a small thumbnail of its cover.

Stacked on #486 (the kit pieces it uses).

Closes #475, closes #476, closes #477, closes #478, closes #479, closes #480.

Changes

  • Plugin: five kinds: raindrop.bookmark (on core.bookmark), raindrop.collection (core.collection), raindrop.highlight (core.highlight), both ways; raindrop.copy and raindrop.file (core.file), in only, attached with attached-to. Bookmarks join collections with in-collection, collections nest with parent-of, highlights point at their bookmark with excerpt-of.
  • Reading: collections whole each run; bookmarks changed since the day before the last complete read, in Raindrop and its Trash; a daily full sweep whose count must match /user/stats before any absence is trusted; every absence confirmed with a per-item read before archiving; Raindrop's Trash kept as Marfa's archive. Requests go through the kit's pacer (60 a minute by default).
  • Files: copies from /raindrop/{id}/cache and uploads from /raindrop/{id}/file, fetched only inside load, the token never sent to storage; a size cap (raindrop_file_max_bytes) and one condition on a free account.
  • Writing: creates, edits, moves, tags and favourite, reminders, trash, purge (only with raindrop_purge_deletes), restore and remake; a create whose answer was lost is matched before anything is sent again; a collection trashed in Marfa moves its bookmarks to Unsorted before it is deleted; a highlight edit never sends its text; deletes go through the kit's confirmable delete hold; raindrop_read_only sends nothing.
  • Kit: kit/src/connections.ts hands a create the edges that place it when that connection type is read only on its kind (needed for a highlight made in Marfa). A change a connector declines (Declined) now has the connections it carried undone, as its fields already were: each it drew is removed and each it removed drawn again, so a bookmark moved into or out of a Raindrop collection the account can only view shows again where Raindrop holds it. Connections a person drew while the vendor was asked, or to a row the vendor does not have yet, stay and wait to be carried; a declined create keeps its connections as drawn; each connection type is put back in one write (the one edge removed or drawn, the one edge moved back where the row holds one of the type, or else the row's edges of the type set whole with PATCH /items/{id}), so a run that stops leaves the type as it was or as put back, never between; the condition names a connection type as put back only once its write landed, and says the put-back waits otherwise, in which case the next run works the change out afresh from the agreement and the row as they then stand and asks the vendor again. A journaled change whose replay the vendor declines is now declined the same way and its intent let go, where before it stayed pending and was replayed every run. Every thumbnail thumbnailFromAddress makes carries the key of its address (a JPEG comment or PNG text chunk), and heldThumbnail, withHeldThumbnail and rowThumbnail decide from it; derive takes { when } and writes only where the row holds those values at the version written, ignoring a when field the installed type lacks. RSS, Readwise and Raindrop use both. A thumbnail without the key is made again, within each connector's fetch budget.
  • scripts/proof/raindrop-stub.ts and the raindrop proof group; the connector README with the owner's steps.

Testing

  • Build, typecheck, lint, format, connectors:check: pass.
  • Unit tests: kit 1774 of 1774, Raindrop 202 of 202, Readwise 513 of 513, Google Calendar 191 of 191, Todoist 215 of 215, RSS 203 of 203 (one CPU-bound parser test passes alone with a longer timeout; it timed out at 5 seconds on a loaded machine, and this pull request does not change the parser).
  • Proof groups raindrop (19), todoist (36), parent-of (4), tags (8) and readwise-with-reader (14): every statement held.
  • connectors/raindrop/live/check.ts --self-test against its stub: every statement held.
  • pnpm proof --group raindrop: 19 of 19 statements, against a server and CLI built from feat(server): thumbnails on bookmarks and entities, and tag and on-off choices on connector mappings marfa#3830: a first import, an edit, a move, Trash and a permanent delete reaching Marfa; a stop mid-sweep and a sweep with bookmarks added and deleted; copies, uploads and thumbnails; a lost create with no duplicate; a trash overtaking a lost create; trash, purge and restore; a collection trashed leaving its bookmarks in Unsorted; a highlight edited without its text; a held mass delete and its confirmation; read-only mode; another account's token stopping with exit 4.
  • The design rests on a live probe of Raindrop's API (search in Trash, lastUpdate filters, /user/stats counts, upload and copy downloads, tag storage, 429 headers). The by-hand live check (A by-hand live check proves the Raindrop connector on a real account #481) runs before release.

Notes for reviewers

Checklist

  • The title is a scoped Conventional Commit.
  • Tests cover the change.
  • Docs in this repository are updated.
  • No secrets or personal details.

Reads bookmarks, collections, highlights, permanent copies and files from a Raindrop.io account, Trash included, and carries changes made in Marfa back. Cover thumbnails are made after each read in the kit's turns, so every bookmark gets its turn.

The kit creates a row made in Marfa with its tags and favorite and hands a create the shared edges that place it; Todoist makes a task created in Marfa with its tags as labels. The mapping types read the 0.0.124 client's own optional tags and favorite.
A thumbnail now carries the key of the address it was made from, so a row whose picture address changed in Marfa gets a new one. derive takes a when guard, checked on the version the write lands on, so a thumbnail is written only to a row that still holds its address.
Raindrop, RSS and Readwise write a made thumbnail with a guard on image_url and read whether a held one stands from the thumbnail itself. The Raindrop README says a bookmark dated before the read's cutoff is read by the daily read.
@aicayzer
aicayzer marked this pull request as ready for review December 4, 2026 02:37

@aicayzer aicayzer left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review: ready to merge

Summary. A two-way Raindrop connector (bookmarks, nested collections, highlights, page copies, uploads) with kit fixes found on the way; safe to merge after seven review rounds and two live runs against a real account through a write fence, the second passing every statement.

First draft: 1/5. The first round found an ordinary trash that could delete a bookmark for good, lost-create recovery that could trash the owner's bookmark, and fourteen more blocking problems; every one was fixed, and later rounds found and fixed three, one plus four fence holes, one, five, two, and one more.

Checked.

  • Keep what people made: a Marfa trash moves to Raindrop's Trash by an update safe to repeat, and DELETE only purges with raindrop_purge_deletes on; a binned collection's bookmarks move to Unsorted first; tag removals keep every tag not asked to go; a create and a remake carry the row's tags and favorite; a declined change undoes only what it carried, in one write per type, or edge by edge (draw before remove) past a target the key cannot read.
  • Report only what is known: only a 404 proves absence; lost creates are proven by not being among what Raindrop held before the POST, never by comparing clocks; ambiguity waits with a condition.
  • Every path: the account is checked before any write; a 403 refuses one item only; the delete hold counts per collection and library from fresh reads and binds each delete's operation.
  • Real conditions: changes are read from sort=-lastUpdate listings because Raindrop's search index lags by minutes (probed); state stays near a third of its cap at 100,000 bookmarks; thumbnails rotate with a cursor, carry their source address, and are written only while the row's cover is unchanged.
  • Done: proof raindrop 19 statements; a live check against a real account through a fence that lets writes reach only objects it made: 23 of 23 statements on the second run, no fence violation, and the account left exactly as found.

Found.

  • A trash racing a move to Trash deleted for good. Fixed in 55bca68. Check and write are one step
  • Lost-create recovery trashed the owner's same-URL bookmark, duplicated, or compared clocks. Fixed in 55bca68 and c8b7399. Report only what is known
  • Collection deletes sent members to Trash. Fixed in 55bca68. Keep what people made
  • The delete hold missed per-collection batches, counted stale state, and a trash value released purges. Fixed in 55bca68 and 2e6080a. Every path
  • Tag replacement lost tags; a create and a remake carried none. Fixed in 55bca68, b951d5d and the kit remake fix. Keep what people made
  • A 200 with no item taken as deletion; stale sweeps settling; an active library never settling. Fixed in 681a796 and 0b7a50c. Report only what is known
  • The incremental read relied on search, which lags. Fixed in 3a2a7f8. Real conditions
  • A stale thumbnail kept after a cover change. Fixed in 34cbd59. Check and write are one step
  • A declined change left its connections, and its put-back could lose or resurrect edges. Fixed in cc156bb, da88597, ac825e0 and b1eb1fe. Keep what people made
  • Live-check fence holes (the token could reach another host; bodies read differently; GETs that change things). Fixed in the live check commits; none was reachable by the connector or the check. Every path

For an issue.

Quick fixes. 3 applied by reviewers.


Reviewed by withmarfa-reviewer on gpt-6.2-astra (round 1) and claude-opus-5-5 (rounds 2 to 7). This review may contain mistakes.

@aicayzer
aicayzer enabled auto-merge (squash) December 4, 2026 03:32
@aicayzer
aicayzer merged commit e65242a into main Dec 4, 2026
21 checks passed
@aicayzer
aicayzer deleted the raindrop/connector branch December 4, 2026 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment