docs: update wearos doc anchors after workspace split

Replace stale references in 17 Kotlin files:
- doctate-client-core::*       -> doctate-desktop::*
- doctate-client-core/src/*    -> clients/desktop/src/*
- doctate-common/src/*         -> common/src/*

The doctate-common:: crate path stays valid (crate name unchanged).
PendingStoreTest.kt is in src/test/, so the test mirror is also
updated.

Verification:
- grep for "doctate-client-core" / "doctate-common/src/" in
  clients/wearos/ returns 0 hits.
- gradlew :app:testDebugUnitTest BUILD SUCCESSFUL (23s) -- also
  retroactively confirms stage-2's directory move did not break
  any Gradle relative-path assumptions.
- cargo clippy --all-targets -- -D warnings clean in both
  server/ and clients/desktop/ workspaces.

This concludes the four-stage server-vs-clients build-world split:
- stage 1 (39cc666): dissolve doctate-client-core
- stage 2 (0c66fc6): rename to common/, clients/desktop, clients/wearos
- stage 3 (7b4fe87): split into standalone workspaces
- stage 4 (this):    update wearos anchors

docs/projektplan.md to be updated separately.
This commit is contained in:
2026-05-02 12:27:03 +02:00
parent 7b4fe87f95
commit 67c0cafb63
17 changed files with 18 additions and 18 deletions
@@ -5,7 +5,7 @@ import java.io.File
/**
* Reap orphan artefacts in [pendingDir]. Mirrors
* `doctate-client-core::pending_cleanup::cleanup_orphan_audio`.
* `doctate-desktop::pending_cleanup::cleanup_orphan_audio`.
*
* "Orphan" = an `.m4a` without sidecar (or vice versa) older than
* [ageCutoffMs]. Atomic-write leftovers (`.tmp` files) bypass the cutoff
@@ -14,7 +14,7 @@ import org.json.JSONObject
* [AudioRecorder] directly into [dir]; the sidecar is written here, atomic
* tmp+rename so a crash mid-write cannot leave a partial file.
*
* Mirrors `doctate-client-core::upload` exactly (sidecar shape, scan rules,
* Mirrors `doctate-desktop::upload` exactly (sidecar shape, scan rules,
* orphan handling). Wire-compatible with the desktop client.
*/
class PendingStore(private val dir: File) {
@@ -4,7 +4,7 @@ import java.io.File
/**
* One recording waiting to be uploaded. Mirrors
* `doctate-client-core::PendingUpload` (Rust).
* `doctate-desktop::PendingUpload` (Rust).
*
* The [file] path is not persisted in the sidecar JSON — it's recovered
* from the sidecar's on-disk location, so the pair stays valid if the
@@ -2,7 +2,7 @@ package com.doctate.watch.domain
/**
* Per-case record held client-side. Mirrors the essentials of
* `doctate-client-core::CaseEntry` (Rust).
* `doctate-desktop::CaseEntry` (Rust).
*
* `oneliner == null` means no state has been observed yet (fresh case);
* the UI renders a placeholder ("…"). `OnelinerState.Manual` marks a
@@ -5,7 +5,7 @@ import java.time.Instant
/**
* On-disk representation of a single case. Wire-format identical to
* `doctate-client-core::CaseMarker` (Rust) — same field names (snake_case),
* `doctate-desktop::CaseMarker` (Rust) — same field names (snake_case),
* same RFC3339 timestamps, same internally-tagged OnelinerState. A marker
* file written by either client should round-trip through the other.
*
@@ -4,7 +4,7 @@ import kotlinx.coroutines.flow.StateFlow
/**
* Per-case marker store. Single source of truth for the case list shown in
* Activity, Tile and Complication. Mirrors `doctate-client-core::CaseStore`
* Activity, Tile and Complication. Mirrors `doctate-desktop::CaseStore`
* (Rust) — the asymmetric merge/reconcile design is the load-bearing piece:
*
* - [mergeServerSnapshot] only adds/updates. `/api/oneliners` is a sliding
@@ -2,7 +2,7 @@ package com.doctate.watch.domain
/**
* Outcome of the LLM oneliner generation for a single case. Mirrors
* `doctate-common/src/oneliners.rs::OnelinerState` (Rust). Internally-tagged
* `common/src/oneliners.rs::OnelinerState` (Rust). Internally-tagged
* JSON: `{"kind":"ready", ...}`. The variants are disjoint on purpose so the
* UI can distinguish "LLM said nothing medical" (Empty) from "LLM call
* failed" (Error) from "doctor overrode it" (Manual).
@@ -5,7 +5,7 @@ import org.json.JSONObject
/**
* JSON ↔ Kotlin DTO marshallers for the `/api/oneliners` wire format.
* Server-side source of truth: `doctate-common/src/oneliners.rs`. Field
* Server-side source of truth: `common/src/oneliners.rs`. Field
* names are snake_case to match the Rust serde output.
*
* Lives in `domain` (not `net`) because the parsed shape — including the
@@ -2,7 +2,7 @@ package com.doctate.watch.domain
/**
* Wire-format DTOs for `GET /api/oneliners`. Mirror
* `doctate-common/src/oneliners.rs::OnelinersResponse` and `OnelinerEntry`
* `common/src/oneliners.rs::OnelinersResponse` and `OnelinerEntry`
* exactly; the `OnelinersClient` (Phase 6) parses JSON into these.
*
* Timestamps stay RFC3339 strings — lexicographic comparison on the Zulu
@@ -5,7 +5,7 @@ import com.doctate.watch.audio.PendingCleanup
import java.io.File
/**
* One-shot startup cleanup. Mirrors `doctate-client-core::startup`.
* One-shot startup cleanup. Mirrors `doctate-desktop::startup`.
*
* Two retention horizons: 72 h for synced markers (non-sensitive UUIDs +
* oneliners), 24 h for orphan audio in the pending queue (sensitive). The
@@ -15,7 +15,7 @@ import org.json.JSONObject
/**
* `PUT /api/cases/{case_id}/oneliner` — push a doctor's manual override
* to the server. Mirrors `OnelinerOverrideRequest` from
* `doctate-common/src/oneliners.rs` (just `{text: string}`); the server
* `common/src/oneliners.rs` (just `{text: string}`); the server
* timestamps it server-side as `OnelinerState.Manual` and persists
* `oneliner.json` next to the audio.
*
@@ -9,7 +9,7 @@ import okhttp3.Request
/**
* Conditional-GET client for `/api/oneliners`. Wire format mirrors
* `doctate-client-core::server_sync::poll_once`:
* `doctate-desktop::server_sync::poll_once`:
*
* - Always sends `X-API-Key`.
* - If [poll] receives a non-null `etag`, sends `If-None-Match: <etag>`.
@@ -15,7 +15,7 @@ import org.json.JSONObject
* before any network round-trip — the user never sees a blank list flash
* just because the service hasn't polled yet.
*
* Mirrors `doctate-client-core::snapshot_cache`.
* Mirrors `doctate-desktop::snapshot_cache`.
*/
data class CachedSnapshot(
val etag: String,
@@ -14,7 +14,7 @@ import java.io.IOException
/**
* POST a recorded audio file to the Doctate server. Wire format mirrors
* doctate-common/src/constants.rs and doctate-client-core/src/server_sync.rs:344-399.
* common/src/constants.rs and clients/desktop/src/server_sync.rs:344-399.
* If the server contract changes, both this client and server/tests/upload_test.rs
* fail independently — that coupling is intentional.
*/
@@ -66,7 +66,7 @@ class UploadClient(
}
companion object {
// Wire-protocol constants. Source of truth: doctate-common/src/constants.rs:1-14.
// Wire-protocol constants. Source of truth: common/src/constants.rs:1-14.
const val API_KEY_HEADER = "X-API-Key"
const val UPLOAD_PATH = "/api/upload"
const val FIELD_CASE_ID = "case_id"
@@ -2,7 +2,7 @@ package com.doctate.watch.net
/**
* Outcome of [UploadClient.upload]. Mirrors UploadOutcome in
* doctate-client-core/src/server_sync.rs (Succeeded / Transient / Terminal).
* clients/desktop/src/server_sync.rs (Succeeded / Transient / Terminal).
*/
sealed interface UploadResult {
data class Success(val caseId: String, val recordedAt: String, val status: String) : UploadResult
@@ -3,7 +3,7 @@ package com.doctate.watch.sync
/**
* Snapshot of what the sync worker is currently doing, surfaced to the UI
* (Tile / List / Detail) so it can render the cloud indicator. Mirrors
* `WorkerSnapshot` in `doctate-client-core::server_sync`.
* `WorkerSnapshot` in `doctate-desktop::server_sync`.
*
* This is the authoritative view — never trust the queue length you'd
* compute by listing the directory yourself, because the worker can be
@@ -24,7 +24,7 @@ import java.time.Instant
/**
* Pure upload + poll worker, testable on the JVM. Mirrors the loop in
* `doctate-client-core::server_sync::run` — uploads have priority over
* `doctate-desktop::server_sync::run` — uploads have priority over
* polling.
*
* The worker exposes [runOnce] for direct test invocation and [run] for