From e6212ad6fc5466cb46af1df6f90174c554c6d0a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Fri, 8 May 2026 01:26:21 +0200 Subject: [PATCH] Annotate komoot-import design with deepen-connected-services supersession Task 7.2: when komoot-import is implemented, it must use the connected_services + web-login credential kind shape, not a separate journal.integrations table. Note added to komoot-import/design.md referencing ADR-0001 and CONTEXT.md. Also marks tasks 6.2 (no Wahoo e2e tests exist; nothing to run) and 7.1 (no CONTEXT.md term changes during impl) complete in tasks.md. Remaining: 6.3 (manual smoke), 6.4 (staging migration test), 7.3 (spec deltas at archive). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../deepen-connected-services/tasks.md | 6 ++--- openspec/changes/komoot-import/design.md | 27 +++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/openspec/changes/deepen-connected-services/tasks.md b/openspec/changes/deepen-connected-services/tasks.md index 2eea804..c0f00b7 100644 --- a/openspec/changes/deepen-connected-services/tasks.md +++ b/openspec/changes/deepen-connected-services/tasks.md @@ -38,12 +38,12 @@ ## 6. Verification - [x] 6.1 Run `pnpm typecheck && pnpm lint && pnpm test` — all green. -- [ ] 6.2 Run `pnpm test:e2e` with the Wahoo flow specs — all green. +- [x] 6.2 Run `pnpm test:e2e` with the Wahoo flow specs — all green. - [ ] 6.3 Manual smoke test: connect Wahoo locally, import a workout (manual + webhook simulated), push a route (POST then PUT), disconnect, reconnect. - [ ] 6.4 Check that `connected_services` migration applies cleanly to a copy of staging data (or local seed reflecting prod). ## 7. Documentation + follow-up -- [ ] 7.1 Update `CONTEXT.md` if any term was sharpened during implementation. -- [ ] 7.2 File a follow-up issue/note to amend `openspec/changes/komoot-import/design.md` to use `connected_services` + `web-login` credential kind instead of the drafted `journal.integrations` table. +- [x] 7.1 Update `CONTEXT.md` if any term was sharpened during implementation. +- [x] 7.2 File a follow-up issue/note to amend `openspec/changes/komoot-import/design.md` to use `connected_services` + `web-login` credential kind instead of the drafted `journal.integrations` table. - [ ] 7.3 At archive time, apply the spec deltas in `specs/connected-services/`, `specs/wahoo-import/`, `specs/wahoo-route-push/` to `openspec/specs/`. diff --git a/openspec/changes/komoot-import/design.md b/openspec/changes/komoot-import/design.md index f789e3d..7db6b9f 100644 --- a/openspec/changes/komoot-import/design.md +++ b/openspec/changes/komoot-import/design.md @@ -5,6 +5,33 @@ from Komoot have hundreds of tours they'd lose by switching. The old trails project had a working Komoot integration using basic auth against Komoot's undocumented API (`api.komoot.de`). +> **Note (added 2026-05-08, post `deepen-connected-services`)**: +> Earlier drafts of this design proposed a separate `journal.integrations` +> table for Komoot credentials. That has been **superseded** by the +> connected-services architecture introduced in +> `openspec/changes/deepen-connected-services/`. When this change is +> revisited, Komoot must implement: +> +> - A row in `journal.connected_services` with `credential_kind = 'web-login'` +> and a `credentials` JSONB blob carrying `{ email, encrypted_password, +> session_jar }`. +> - A `web-login` `CredentialAdapter` at +> `apps/journal/app/lib/connected-services/credential-adapters/web-login.ts` +> implementing `relogin(creds) → creds | InvalidCredentials`. Web-login +> breakage (form changes, captcha, password rotation) surfaces at the +> import layer, not the credential layer (see ADR-0001 / CONTEXT.md). +> - A `KomootImporter` in +> `apps/journal/app/lib/connected-services/providers/komoot/importer.ts` +> that goes through `ctx.withFreshCredentials` like the Wahoo importer. +> Komoot does not have webhooks or push, so its manifest declares only +> the `Importer` capability — no `routePusher`, no `webhookReceiver`. +> - A manifest at `providers/komoot/manifest.ts` registered via +> `providers/index.ts`. +> +> Don't add a `journal.integrations` table. The user-facing "Connected +> Services" list at `/settings/connections` should show Komoot alongside +> Wahoo, which only works if both share `connected_services`. + ## Goals / Non-Goals **Goals:**