Kobo annotations research spike (yes-feasible, w/ docs corrections) #24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "kobo-annotations-spike"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Research spike into whether Kobo annotation sync is reachable via the
/api/kobo/*sync API. Yes, feasible — wire shapes captured for the three observed reading-services endpoints. Follow-up implementation spec is a separate sub-project; auth model tracked in #23.Summary
docs/superpowers/specs/2026-04-20-kobo-annotations-spike-design.mddocs/superpowers/plans/2026-04-20-kobo-annotations-spike.mddocs/kobo-annotations-spike-findings.md— methodology + results + wire-shape tables + recommendation.Key discoveries
reading_services_host(defaultreadingservices.kobo.com) with a Kobo-cloud-issued Bearer JWT.POST /api/v3/content/checkforchanges,PATCH /api/v3/content/{bookID}/annotations,GET /api/UserStorage/Metadata.reading_services_hostas host-only (path component discarded), so requests arrive at server root — not underapi_endpoint's prefix.nc :5001was the tool that unstuck the spike after passive catch-all + probe stubs both yielded null results.Docs corrections (spin-off)
Two claims in
docs/kobo-api.mdthat the spike proved wrong, now corrected in the same PR:Plus a new Chapter 3 subsection documenting
reading_services_host's host-only quirk.Infrastructure aftermath
slog.Info("unknown kobo endpoint", ...)drift detector in the catch-all.Test plan
docs/kobo-api.md(diff against the mergeddocs/kobo-apifrom #22).go test ./...green on this branch.Follow-ups
kobo_user_id) for reading-services endpoints.Documents what the spike discovered: annotation sync via Kobo API is feasible when the device is signed in to Kobo cloud. Wire shapes for the three observed endpoints (checkforchanges, UserStorage/Metadata, content/{id}/annotations) plus three protocol quirks to fold back into docs/kobo-api.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>Remove spike-only files and env vars: - internal/kobo/transcript.go + tests - internal/kobo/probes.go + tests (including root-level reading-services handlers, notebooks override, broadened catch-all) - BOOKS_KOBO_TRANSCRIPT_ENABLED / BOOKS_KOBO_ANNOTATION_PROBES env vars - reading_services_host / notebooks init overrides - TranscriptRecorder wiring through kobo.New + main.go - StartNewSession call in LibrarySync Kept permanently: - slog.Info("unknown kobo endpoint", ...) in catch-all — low-noise drift detector. Spike findings in docs/kobo-annotations-spike-findings.md. Follow-up annotation implementation spec tracked via issue #23 (auth model) and the findings doc's recommendations.