From 65112f694a592d68c2c32056be98aedd2a1dc6b6 Mon Sep 17 00:00:00 2001 From: Younes Abouelnagah Date: Wed, 28 Oct 2026 19:12:25 -0400 Subject: [PATCH] docs(mcp): correct Docker context and naming after the review repairs The review repairs moved the app to apps/mcp and its image to the repository-root build context, but some prose still described the old layout: - arch.md said the MCP image's context was its own directory; it now builds from the root like api and auth. - The root README heading still used "Faithful Answers" and called the Docker build standalone. - The 301 review's placement section read as current; it is now past tense and points to the later rename. - The app README, two test comments and .dockerignore still mentioned the removed standalone verification copy, an app-local lockfile, or "both" service images. Comments and prose only; no behaviour change. Co-Authored-By: Claude Opus 5.5 --- .dockerignore | 2 +- README.md | 4 ++-- apps/mcp/README.md | 2 +- apps/mcp/test/copy-boundary.test.ts | 2 +- apps/mcp/test/packaging.test.ts | 3 +-- codev/resources/arch.md | 4 ++-- codev/reviews/301-faithful-answers-mcp.md | 4 ++-- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.dockerignore b/.dockerignore index 3814e272..18e041a9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,4 @@ -# Keep Docker build contexts small: both service Dockerfiles use the repo +# Keep Docker build contexts small: every service Dockerfile uses the repo # root as context (the pnpm workspace needs the root lockfile), so anything # not excluded here uploads on every build. .git diff --git a/README.md b/README.md index a3da97cb..e05a161e 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,6 @@ issues for vulnerabilities. [MIT](LICENSE) © IASER -## Faithful Answers MCP application +## MCP application -[`apps/mcp`](apps/mcp/README.md) exposes Ansari answers through MCP with a self-contained React card for assistant hosts. It uses public saga a2ui packages, embedded Kitab fonts and local artwork. Start it separately with `pnpm mcp build` then `pnpm mcp start`; see its README for environment variables and its standalone Docker build. +[`apps/mcp`](apps/mcp/README.md) exposes Ansari answers through MCP with a self-contained React card for assistant hosts. It uses public saga a2ui packages, embedded Kitab fonts and local artwork. Start it separately with `pnpm mcp build` then `pnpm mcp start`; see its README for environment variables and its Docker build, which uses the repository root as context. diff --git a/apps/mcp/README.md b/apps/mcp/README.md index 860bfc5b..539400d5 100644 --- a/apps/mcp/README.md +++ b/apps/mcp/README.md @@ -78,7 +78,7 @@ The same Hono application and official MCP handler (`src/server/fetch-app.ts`) r pnpm install --frozen-lockfile --strict-peer-dependencies --filter ansari-mcp... pnpm mcp verify # typecheck, build, build:worker, test, test:browser -# Run the Worker in Wrangler's local runtime under one declared environment (dev, beta or production). Its local secrets are `.dev.vars.` only (git-ignored, and excluded from the Docker build context and the standalone verification copy, together with `.wrangler/` and `dist-worker/`). The script refuses a generic `.dev.vars`, which Wrangler would read for every environment, and turns off Wrangler's `.env` fallback. +# Run the Worker in Wrangler's local runtime under one declared environment (dev, beta or production). Its local secrets are `.dev.vars.` only (git-ignored, and excluded from the Docker build context, together with `.wrangler/` and `dist-worker/`). The script refuses a generic `.dev.vars`, which Wrangler would read for every environment, and turns off Wrangler's `.env` fallback. pnpm dev:worker:dev --var ANSARI_RELEASE:local-1 curl http://127.0.0.1:8787/health ``` diff --git a/apps/mcp/test/copy-boundary.test.ts b/apps/mcp/test/copy-boundary.test.ts index 83fa2ce4..5c239bb6 100644 --- a/apps/mcp/test/copy-boundary.test.ts +++ b/apps/mcp/test/copy-boundary.test.ts @@ -4,7 +4,7 @@ import {existsSync, readFileSync, statSync} from 'node:fs'; import {join, relative} from 'node:path'; import {fileURLToPath} from 'node:url'; -// The copy boundaries (Docker build context and the standalone verification copy) must not carry +// The Docker build context (the repository root) must not carry // credentials or local runtime state. Everything here is a synthetic marker; no real secret file is read. const root=fileURLToPath(new URL('../',import.meta.url)); const NEVER_COPIED=['.env','.env.local','.dev.vars','.dev.vars.staging','.dev.vars.production','.wrangler/state/v3/cache.sqlite','dist-worker/index.js','node_modules/x/index.js','dist/view.html','.npmrc']; diff --git a/apps/mcp/test/packaging.test.ts b/apps/mcp/test/packaging.test.ts index 4fc9ba3d..6aa9cb12 100644 --- a/apps/mcp/test/packaging.test.ts +++ b/apps/mcp/test/packaging.test.ts @@ -54,8 +54,7 @@ test('the manifest pins one exact public version for every SAGA package it impor assert.ok(!/"(?:file|link|workspace|git\+?[a-z]*|https?):/.test(JSON.stringify({...manifest.dependencies,overrides:manifest.overrides,pnpm:manifest.pnpm})),'no local, tarball or workspace dependency source'); }); -// Every lockfile that installs this application: the application's own (standalone installation) and, when this folder sits -// in a monorepo, the workspace root's. +// The lockfile that installs this application: the workspace root's. The application has none of its own (asserted below). const lockfiles:Array<{label:string;text:string;prefix:string}>=[]; assert.equal(existsSync(join(root,'pnpm-lock.yaml')), false, 'only the root lockfile installs the app'); assert.equal(existsSync(join(root,'pnpm-workspace.yaml')), false, 'only the root workspace config applies'); diff --git a/codev/resources/arch.md b/codev/resources/arch.md index 2e6b975d..4a53652b 100644 --- a/codev/resources/arch.md +++ b/codev/resources/arch.md @@ -48,11 +48,11 @@ The facilitator (`apps/api/lib/facilitator/agent.ts`) answers via a Gemini tool ## Monorepo layout, build & deploy -The repo is a pnpm workspace of `apps/*` and `packages/*`, driven by Turborepo. `apps/mcp` is the standalone MCP application; it consumes public saga a2ui packages and has no dependency on the other applications. Run it explicitly with `pnpm mcp dev`. Its Docker context is its own directory, unlike the API/auth images described below. The root Markdown adapter override preserves the supported SAGA-owned A2UI dependency combination. +The repo is a pnpm workspace of `apps/*` and `packages/*`, driven by Turborepo. `apps/mcp` is the standalone MCP application; it consumes public saga a2ui packages and has no dependency on the other applications. Run it explicitly with `pnpm mcp dev`. Like the API and auth images, its image builds from the repo root (see Docker build context below). The root Markdown adapter override preserves the supported SAGA-owned A2UI dependency combination. **Layout & task running.** Root tasks fan out through one cached Turborepo task graph; `pnpm dev` starts api, auth and frontend (`pnpm dev:no-auth` skips auth). Target a single package with `pnpm api