Skip to content

chore: drop the dead CouchDB sync channel - #107

Merged
vreshch merged 1 commit into
masterfrom
feature/drop-couch
Aug 9, 2026
Merged

chore: drop the dead CouchDB sync channel#107
vreshch merged 1 commit into
masterfrom
feature/drop-couch

Conversation

@vreshch

@vreshch vreshch commented Aug 9, 2026

Copy link
Copy Markdown
Member

CouchDB was dropped as a sync channel on 2026-07-31: the server route the plugin minted its per-memory JWT from (POST /account/couch-token) was deleted then, and git smart-HTTP is the only device channel now. Everything removed here could only ever fail.

The channel was already unreachable in practice - discovery has not advertised couch since the cutover, so channelForVault() returned git for every memory and the whole branch was dead weight.

What goes

  • src/couch/ in full - channel, doc model, state, sync, token client (10 files).
  • main.ts: the live-replication event wiring (modify/create/delete/rename + the 2s tick), couchSyncNow/buildCouchSync/couchStateFor, the token-post wiring, and both channel === 'couch' branches - the sync path and the preview path.
  • resolve-host.ts: channelForVault, VaultChannel, parseCouchVault and the three couch fields on SyncResolution.
  • settings.ts: couchState / CouchMemoryState, dead once couchStateFor was gone.
  • gitBoundMemory() - its only caller was the couch guard that kept a couch memory out of a git-bound folder.

What does not change

buildRepoUrl, gitEndpoint, HostResolver and its cache, OAuth, and every /api/memories call are untouched. The sync path now unconditionally builds the git remote, which is what it already did for every real memory.

Test coverage

29 files, -2,869 lines. That includes src/main.test.ts and 5 of 6 integration suites (delete-conflict, first-sync, preview-count, resilience, sync-roundtrip) - each one existed only to exercise CouchDB replication; main.test.ts's four tests were couch-teardown and the git-bound-folder guard. lifecycle.test.ts keeps its non-couch connect-flow test, management.test.ts is untouched.

97 tests pass, coverage stays above the 70% floor. Nothing that survives lost a test.

The server-side couch device channel was removed 2026-07-31; channelForVault()
has returned {channel:'git'} unconditionally ever since, so every couch code
path was unreachable. Deletes src/couch/, the couch fields/branches in main.ts
and resolve-host.ts, and the couch-only integration test suite + fakes.
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

🎉 PR Validation ✅ PASSED

Commit: 8a8d610eb0a900f9a8dc0bba5645eaf595cdf5f0
Branch: feature/drop-couch

Checks:

  • ✅ Dependencies installed
  • ✅ Type check passed
  • ✅ Linting passed
  • ✅ Format check passed
  • ✅ Tests + coverage passed
  • ✅ Build successful
  • ✅ Store-compliance checks passed
  • ✅ Bundle is mobile-safe

Ready to merge!


🔗 View workflow run

@vreshch
vreshch marked this pull request as ready for review August 9, 2026 09:41
@vreshch
vreshch merged commit 7ee288d into master Aug 9, 2026
1 check passed
@vreshch
vreshch deleted the feature/drop-couch branch August 9, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant