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>
38b6da7 parent: c5a7a68 modified
spike/nim/readme.md +20 -2 | @@ -186,11 +186,29 @@ Not proven, and still ahead: | ||
| 186 | 186 | and it also covers the `invalid_token` refresh-and-retry branch of |
| 187 | 187 | `xrpc.request`, which is currently unexercised. |
| 188 | 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 | 189 | - **Reconnect and backoff** for a long-lived Jetstream subscription; the |
| 192 | 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 | 212 | The honest read: none of the three things that could have sunk the port did. |
| 195 | 213 | What is left is protocol plumbing against well-specified formats — large, but |
| 196 | 214 | ordinary. |
| @@ -186,11 +186,29 @@ Not proven, and still ahead: | |||
| 186 | and it also covers the `invalid_token` refresh-and-retry branch of | 186 | 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; the | 189 | - **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, but | 213 | What is left is protocol plumbing against well-specified formats — large, but |
| 196 | ordinary. | 214 | ordinary. |