From 0fdf7a2adbed297391f695b1d31aa4a9db9b3039 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Tue, 15 Sep 2026 16:54:12 +1000 Subject: [PATCH] docs(architecture): record the NATS scaffolds as deliberate deferrals servicediscovery/nats and gatewayrpc.StoreClient are implemented and fully tested, but neither has a production caller and no config surface exposes either. Both were previously unrecorded, which made them indistinguishable from oversight. The register now names them: StoreClient under the session migration that will consume it, service discovery under shared mechanics, alongside the runtime boundary that pins container addressing by injected NATS URL instead. Kept rather than deleted because re-deriving tested wire code later is pure cost. --- docs/architecture/migration-decisions.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/architecture/migration-decisions.md b/docs/architecture/migration-decisions.md index ba9c9044b..6c1e84825 100644 --- a/docs/architecture/migration-decisions.md +++ b/docs/architecture/migration-decisions.md @@ -176,6 +176,18 @@ this pass. It is tracked as separate, appropriately-scoped bd issues (see lands with its own behavioural verification instead of one large diff no one can safely review. +**Amended 2026-09-15.** `internal/infrastructure/gatewayrpc.StoreClient` is the +adapter this migration will need: it implements `messaging.SessionStore` over +the chat service's session-store RPCs and is proven by +`TestStoreClientPreservesCanonicalRecords`. It is deliberately unwired. +Production `archied` dials the standalone gateway for `ChatContract` only +(`composeChatContract` → `gatewayrpc.Dial` returns a `*Client`, not a +`*StoreClient`), and the daemon's session store is in-process SQLite via +`makeTelegramSessionStore`. The test comment that says it mirrors production +describes the target, not today's tree. Kept rather than deleted because the +migration it serves is deferred by this very section, and re-deriving a tested +wire adapter once that lands is pure cost. + ### 3. Identity data migration The migration must define: @@ -443,6 +455,16 @@ or CI sequence that would accompany one. Adapting the generator and implementing Archie's normalized documentation model remain migration work rather than open product architecture. +**Amended 2026-09-15.** `internal/infrastructure/servicediscovery/nats` +implements the `servicediscovery.ServiceRegistry` contract (Connect, Register, +Resolve, Watch) over NATS KV and is fully tested, but no production code +constructs it and no config surface exposes it. This is a deliberate deferral, +not an oversight: service-to-service addressing belongs to the runtime and +process boundary work in section 6, which currently pins container addressing +by injecting the daemon's startup NATS URL rather than resolving through a +registry. The scaffold is kept for that work; re-derive it only if the +addressing model changes. + ### 8. Cutover sequence The final migration plan must order: