Soften the tone of the docs and comments written today
This commit is contained in:
+56
-5
@@ -38,10 +38,15 @@ needed now.
|
||||
the transactional Postgres and has a mature Helm chart for the production
|
||||
k8s target. See `docs/adr/0001-vector-db-qdrant.md`.
|
||||
- **Relational DB: PostgreSQL.** One instance, logically separated per
|
||||
service (users/credentials, profiles, chat sessions+messages).
|
||||
service (users/credentials, profiles, chat sessions+messages). *As built,
|
||||
only `ai-service` uses it* — for conversation turns (`rag_conversation_turn`)
|
||||
and retrieval traces (`rag_retrieval_trace`). The users/profiles/sessions
|
||||
tables belong to services that do not exist yet.
|
||||
- **Redis.** Session/refresh-token cache, rate-limit counters, and reserved
|
||||
as the future job-queue backend (BullMQ/Celery) if async admin-triggered
|
||||
re-ingestion or background jobs are added later.
|
||||
re-ingestion or background jobs are added later. **Not deployed** — nothing
|
||||
in the live path reads or writes Redis, so it was left out of
|
||||
`docker-compose.prod.yml` rather than run idle.
|
||||
|
||||
## RAG ingestion pipeline (PDF-specific)
|
||||
|
||||
@@ -150,11 +155,19 @@ methodology, cross-tool comparison, and validation numbers.
|
||||
always-present disclaimer. **Done** — live since 2026-08-05, see ADR 0008.
|
||||
3. **auth/user/chat services + api-gateway.** Done when register → login →
|
||||
chat message flows end-to-end through the gateway only, persisted in
|
||||
Postgres.
|
||||
Postgres. **Not started** — all four directories still hold only a
|
||||
`README.md` and a `package.json`. Phases 4-6 were done around this gap,
|
||||
so the live system has no gateway and no auth (see below).
|
||||
4. **Next.js frontend chat UI.** Done when a browser user can log in, ask a
|
||||
question, and see a grounded answer with citation + disclaimer banner.
|
||||
**Done except the login half** — chat, citations, evidence panel and the
|
||||
disclaimer banner are live; there is no login because Phase 3 does not
|
||||
exist. The browser calls `apps/web`'s own route handlers, which proxy
|
||||
directly to `ai-service`.
|
||||
5. **Containerize + docker-compose local.** Done when `docker compose up`
|
||||
from a clean checkout brings up the full stack and the Phase 4 flow works.
|
||||
**Done** — 2026-08-10. `infra/docker/docker-compose.prod.yml` is what
|
||||
production actually runs.
|
||||
6. **Kubernetes/Helm + Terraform + CI + ArgoCD (GitOps) deployment.** Done
|
||||
when CI builds/tests/pushes an image and bumps the target environment's
|
||||
Helm values file, the team's ArgoCD instance (see `infra/argocd/`,
|
||||
@@ -163,6 +176,44 @@ methodology, cross-tool comparison, and validation numbers.
|
||||
never runs `kubectl`/`helm` directly against a cluster. Cloud provider
|
||||
choice (AWS/GCP/Azure) only affects the Terraform module implementations,
|
||||
not this repo's structure.
|
||||
**Still the destination — not started, not dropped.** Production was
|
||||
shipped ahead of it on an interim single-box setup (see "Deployment as
|
||||
actually built" below), which is a stopgap, not a replacement: ADR 0002
|
||||
remains *Accepted*. Nothing here exists yet — `infra/k8s/`,
|
||||
`infra/helm/medical-chatbot/templates/` and `infra/terraform/` are empty
|
||||
scaffolds (`.gitkeep` only), the chart is version `0.0.0`, and every ArgoCD
|
||||
`Application` manifest still carries unresolved `TODO`s for project, repo
|
||||
URL and destination cluster.
|
||||
|
||||
See `docs/adr/` for architecture decision records and `docs/runbooks/` for
|
||||
operational runbooks (added as they're needed).
|
||||
This phase also includes a **repository move to the team's self-hosted
|
||||
Gitea** on the company domain, which is where the GitOps repo is intended
|
||||
to live; the project stays on private GitHub until that move is made
|
||||
deliberately. Hard boundary meanwhile: the team's existing
|
||||
`git.vinmec.tech/ai-team/gitops` repository is **reference-only — never
|
||||
push this project into it**.
|
||||
|
||||
## Deployment as actually built (2026-08-10)
|
||||
|
||||
Production is **not** the Phase 6 design. It is a single AWS EC2 `t3.large`
|
||||
running `infra/docker/docker-compose.prod.yml` — postgres, qdrant,
|
||||
ai-service, web, and Caddy terminating TLS for `realvuxbaro.me` via
|
||||
automatic Let's Encrypt. Bedrock is reached through an IAM instance role, so
|
||||
no long-lived AWS key exists on the box or in any env file.
|
||||
|
||||
CI/CD is `.github/workflows/deploy.yml`: a push to `master` SSHes in, resets
|
||||
the checkout, rebuilds only `ai-service`/`web`, runs migrations and
|
||||
health-checks both. It does not touch postgres/qdrant/caddy, so the 15,100
|
||||
Qdrant points survive deploys (they live in a named volume).
|
||||
|
||||
This is an **interim setup, not a decision against Phase 6.** It exists
|
||||
because a working public demo was needed sooner than the Kubernetes path
|
||||
could deliver one. The expensive prerequisite for that path — containerising
|
||||
both apps — is exactly what this work produced, so the Dockerfiles and
|
||||
compose services port over when the Gitea + team-ArgoCD migration is
|
||||
actually done. Phase 6 and ADR 0002 both stand as written.
|
||||
|
||||
See `docs/adr/` for architecture decision records. `docs/runbooks/` is still
|
||||
**empty** — the operational knowledge that would live there (restoring a
|
||||
Qdrant snapshot onto a fresh box, what a failed deploy looks like, why
|
||||
`uvicorn --reload` must not be used on Windows here) currently only exists
|
||||
in `docs/progress-log.md`.
|
||||
|
||||
Reference in New Issue
Block a user