nandi/gleanpublic Fork
⑂ 38b6da7
Commits
⬇ Clone ▾
git clone https://git.rickub.com/nandi/glean.git
git clone ssh://git@rickub.com/nandi/glean.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

Correct the spike's remaining-work list: no CBOR/CAR needed

Earlier notes listed DAG-CBOR, CAR and MST traversal as remaining work for
the Nim port. That was wrong, and worth correcting because they are the
largest format risk left in ATProto.

Glean never parses them. internal/atproto/sync.go opens by explaining the
choice: it reconciles with com.atproto.repo.listRecords rather than
com.atproto.sync.getRepo, since it only syncs known users, Jetstream covers
real-time events, and every reconcile is idempotent. Reads and writes are
JSON endpoints throughout, and the four indigo packages glean imports --
atclient, auth/oauth, identity, syntax -- include none of repo, mst, cbor or
car.

A Nim port inherits that choice for free.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandithebull committed 2026-09-20T22:24:01-07:00 Browse files
38b6da7 parent: c5a7a68
modified spike/nim/readme.md +20 -2
@@ -186,11 +186,29 @@ Not proven, and still ahead:
186186 and it also covers the `invalid_token` refresh-and-retry branch of
187187 `xrpc.request`, which is currently unexercised.
188188 - **Session persistence** across restarts.
189-- **CBOR/CAR** parsing for repository records — the last unexplored format,
190- needed for full-repo sync rather than the live stream.
191189 - **Reconnect and backoff** for a long-lived Jetstream subscription; the
192190 consumer reads a stream but does not yet survive the connection dropping.
193191
192+### Not needed: DAG-CBOR, CAR and the MST
193+
194+Earlier notes listed these as remaining work. That was wrong, and worth
195+correcting because they are by far the largest format risk left in ATProto.
196+
197+Glean never parses them. `internal/atproto/sync.go` opens by saying so: it
198+reconciles with `com.atproto.repo.listRecords` rather than
199+`com.atproto.sync.getRepo`, because it only syncs known users, Jetstream
200+covers real-time events, and every reconcile is idempotent. Reads go through
201+`listRecords`/`getRecord` and writes through
202+`createRecord`/`putRecord`/`deleteRecord` — all JSON.
203+
204+The imports confirm it. Glean uses four indigo packages — `atclient`,
205+`auth/oauth`, `identity`, `syntax` — and none of `repo`, `mst`, `cbor` or
206+`car`.
207+
208+A Nim port inherits that choice for free. Implementing DAG-CBOR, CIDs, CAR
209+framing and Merkle Search Tree traversal would be real work in service of a
210+code path this application does not have.
211+
194212 The honest read: none of the three things that could have sunk the port did.
195213 What is left is protocol plumbing against well-specified formats — large, but
196214 ordinary.
@@ -186,11 +186,29 @@ Not proven, and still ahead:
186 and it also covers the `invalid_token` refresh-and-retry branch of186 and it also covers the `invalid_token` refresh-and-retry branch of
187 `xrpc.request`, which is currently unexercised.187 `xrpc.request`, which is currently unexercised.
188 - **Session persistence** across restarts.188 - **Session persistence** across restarts.
189-- **CBOR/CAR** parsing for repository records — the last unexplored format,
190- needed for full-repo sync rather than the live stream.
191 - **Reconnect and backoff** for a long-lived Jetstream subscription; the189 - **Reconnect and backoff** for a long-lived Jetstream subscription; the
192 consumer reads a stream but does not yet survive the connection dropping.190 consumer reads a stream but does not yet survive the connection dropping.
193 191
192+### Not needed: DAG-CBOR, CAR and the MST
193+
194+Earlier notes listed these as remaining work. That was wrong, and worth
195+correcting because they are by far the largest format risk left in ATProto.
196+
197+Glean never parses them. `internal/atproto/sync.go` opens by saying so: it
198+reconciles with `com.atproto.repo.listRecords` rather than
199+`com.atproto.sync.getRepo`, because it only syncs known users, Jetstream
200+covers real-time events, and every reconcile is idempotent. Reads go through
201+`listRecords`/`getRecord` and writes through
202+`createRecord`/`putRecord`/`deleteRecord` — all JSON.
203+
204+The imports confirm it. Glean uses four indigo packages — `atclient`,
205+`auth/oauth`, `identity`, `syntax` — and none of `repo`, `mst`, `cbor` or
206+`car`.
207+
208+A Nim port inherits that choice for free. Implementing DAG-CBOR, CIDs, CAR
209+framing and Merkle Search Tree traversal would be real work in service of a
210+code path this application does not have.
211+
194 The honest read: none of the three things that could have sunk the port did.212 The honest read: none of the three things that could have sunk the port did.
195 What is left is protocol plumbing against well-specified formats — large, but213 What is left is protocol plumbing against well-specified formats — large, but
196 ordinary.214 ordinary.