Date: 2026-05-23 · Branch: feat/profile-dashboards · Live demo: http://epihack-test.cis240692.projects.jetstream-cloud.org/
Generated by: background subagent during Phase 0 of plan/10-archival-and-docs.md.
This audit is the source-of-truth for Phase 7 (Ansible refresh) of the archival plan. Each numbered item below is a deliverable: when we implement it, link the PR back here.
| # | Role | Status |
|---|---|---|
| 1 | common | GREEN |
| 2 | node | YELLOW |
| 3 | python | GREEN |
| 4 | postgres | GREEN |
| 5 | repo | GREEN |
| 6 | claude_code | GREEN |
| 7 | mcp_servers | YELLOW |
| 8 | ducklake | GREEN |
| 9 | mongodb | GREEN |
| 10 | fastapi | YELLOW |
| 11 | app | RED |
| 12 | nginx | YELLOW |
| _ | playbook.yml | GREEN |
| _ | requirements.yml | YELLOW |
| _ | group_vars/all.yml | YELLOW |
Totals: 12 roles audited (the directory holds 12, not 14 as initial recon suggested). GREEN = 6, YELLOW = 5, RED = 1.
app_client_channel missing end-to-end. The 2026-05-20 datastore
split routes mobile writes to MongoDB and web writes to DuckLake via
the X-Client-Channel header, set from NEXT_PUBLIC_CLIENT_CHANNEL.
The Ansible app role never sets it; the build silently falls back to
"web". Correct for the VM today, but any Capacitor mobile build off
the same playbook would silently mis-route — defeating the
architecture decision. Fix: add app_client_channel: "web" to
group_vars/all.yml and plumb it through roles/app/tasks/main.yml
and roles/app/templates/app.env.local.j2.
Claude.ai custom-connector path is half-wired. roles/nginx
proxies /mcp/<name> per mcp_http_servers, but no role creates the
systemd units that listen on those ports. Only vectorsurv-mcp
honors FASTMCP_HOST/PORT/STREAMABLE_HTTP_PATH. And the live demo is
HTTP-only, but Claude.ai requires HTTPS. Fix: add a
roles/mcp_servers/tasks/http_units.yml that renders one systemd
unit per entry in mcp_http_servers; port the FASTMCP shim from
vectorsurv-mcp/__main__.py to the other 10 MCP servers (a repo
change, not Ansible); flip tls_enabled: true with a real
vault_tls_email for the Jetstream2 host.
Synthetic dataset operationally invisible. The
4,395-observation demo load under /srv/onehealth/ came from
/tmp/gen_synth.py — not tracked in the repo. scripts/export_signals.py
is tracked but is never run by Ansible. Nginx doesn’t serve
dashboard/signals/. Fix: promote the generator into
scripts/load_synthetic_observations.py, add an opt-in
ducklake_load_synthetic_demo toggle to roles/ducklake, and add a
/dashboard/ nginx alias gated by a new serve_dashboard toggle.
common — GREENapt base packages, UTC timezone, deploy user + group, /srv/onehealth/,
2 GB conditional swap, UFW deny-incoming + allow SSH/80/443, fail2ban.
Note: mongosh arrives via mongodb-org in roles/mongodb, an implicit
cross-role coupling that works fine.
node — YELLOWPins node_major_version: "20" but next@16 requires Node 20.18.1+.
NodeSource currently ships 20.19+, so a fresh provision works today, but
the pin is implicit. Add: a node --version assertion task that
exits non-zero below 20.18.1.
python — GREENPython 3.12 (requires-python = ">=3.11" across all consumers — match),
uv to /usr/local/bin. Soft pin uv_version: "latest" is fine for a
demo.
postgres — GREENPostgres 16 as the DuckLake catalog only. No app schema lives directly
in Postgres. Verified that kg_writer.py + audit.py connect via
ducklake:postgres: URIs, not raw postgresql:.
repo — GREENTwo modes: local-path rsync (excluding build artifacts) or git clone
with force: true. Both notify Restart fastapi. Writes DEPLOYED_SHA
marker. Clean.
claude_code — GREENnpm i -g @anthropic-ai/claude-code (state: latest), writes
~/.claude/settings.json and .bashrc ANTHROPIC_API_KEY=… with
no_log: true. MCPs are wired in the separate ~/.claude.json by
design.
mcp_servers — YELLOWuv sync each of the 11 servers, render ~/.claude.json,
claude mcp list smoke. Drift:
mcp/wearable-mcp/ is the only server without a .env.example.mcp/vectorsurv-mcp/README.md
references a hand-created systemd unit on :8010 that no role creates.vectorsurv-mcp/src/.../__main__.py reads FASTMCP_HOST/PORT/STREAMABLE_HTTP_PATH.SMS_MODE: "mock" is hard-coded in claude.json.j2:24.nws-heatrisk-mcp has no NWS_USER_AGENT env line in the template;
the server’s .env.example documents it as required.Fix:
# group_vars/all.yml — new vars:
sms_mode: "mock"
nws_user_agent: "az-onehealth-sentinel/0.1 (+https://github.com/tyson-swetnam/epihack-2026)"
Plus a new roles/mcp_servers/tasks/http_units.yml that loops over
mcp_http_servers and renders one systemd unit per entry from an
mcp-http.service.j2 template.
ducklake — GREENDuckDB CLI 1.5.3 → /usr/local/bin, Parquet dir at
/srv/onehealth/ducklake-data, idempotent seed via the kg-mcp venv.
Schema order enforced via discover_schema_files (CLAUDE.md’s
standards.sql then pathogens.sql rule).
Operational gap: the synthetic demo dataset (4,395 obs) on the
running VM came from a one-off /tmp/gen_synth.py that isn’t tracked.
Rebuild loses it. See Top-3 fix #3.
mongodb — GREENMongoDB 8.0, bindIp: 127.0.0.1, authorization: enabled, app user
created on admin DB via localhost exception, marker file at
/srv/onehealth/.mongo-user-created ensures one-time creation. Cross-
references cleanly with agents/src/onehealth_agents/mongo_writer.py:50.
fastapi — YELLOWuv sync, pre-install ducklake+postgres DuckDB extensions, env file at
/etc/onehealth-api.env, systemd unit with ProtectHome=true, wait for
/v1/healthz 200, install the Mongo→DuckLake sync timer
(OnUnitActiveSec=5min). Drift:
DATABASE_URL=postgresql://... line in onehealth-api.env.j2:7 is
unused (grep -rn DATABASE_URL /home/exouser/epihack-2026/agents/
is empty). Delete it.ONEHEALTH_BUILD= changes every run,
so the env-file template is always “changed”, which fires
Restart fastapi on every deploy. Almost certainly intentional, but
worth flagging.Fix: add mongo_sync_enabled: true to group_vars/all.yml and
gate the timer’s install + start.
app — REDNEXT_PUBLIC_CLIENT_CHANNEL is missing from both the build env and
app.env.local.j2. This var is the core of the 2026-05-20 datastore
split:
app/next.config.mjs:32 defaults it to "web".app/src/lib/api-client.ts:80 sets X-Client-Channel: CLIENT_CHANNEL.agents/src/onehealth_agents/api/routes/reports.py:30-43 routes
mobile → MongoDB and anything else → DuckLake.api/openapi.yaml:114 declares the X-Client-Channel header.Fix:
# group_vars/all.yml — REQUIRED:
app_client_channel: "web"
# roles/app/tasks/main.yml — extend the build env:
environment:
...
NEXT_PUBLIC_CLIENT_CHANNEL: ""
# roles/app/templates/app.env.local.j2 — append:
NEXT_PUBLIC_CLIENT_CHANNEL=
nginx — YELLOW/api/ → 127.0.0.1:8000, /_next/static/ immutable cache,
/query/ + /schema/ for DuckDB-WASM, /mcp/<name> per
mcp_http_servers, / → app/out static. Security headers good.
Drift:
/dashboard/ location block — the signal-monitor at
dashboard/signals/index.html 404s on the live VM./figures/, /graph/, /map/, /today/,
/heat/, /wildlife/ — those only exist on GH Pages.tls_enabled: false. Claude.ai connectors require HTTPS.mcp_http_servers: [] empty by default (see Role 7).Fix: add a location /dashboard/ block to the nginx template,
gated on a new serve_dashboard toggle (defaults true), aliasing
to /dashboard/ with try_files
$uri $uri/ =404;. See the actual diff in
roles/nginx/templates/onehealth.conf.j2
on commit
4be8546.
Also: tls_enabled: true with a real vault_tls_email for the
Jetstream2 host.
playbook.yml — GREENRole order matches README.md. vars_files correctly limited to
all.vault.yml per the prior CHANGELOG fix. Ubuntu/Debian assertion in
pre_tasks. Good.
requirements.yml — YELLOWcommunity.general, community.postgresql, ansible.posix.
community.mongodb would enable idempotent user creation (currently
done via mongosh + shell:).
group_vars/all.yml — YELLOWConsolidated additions:
app_client_channel: "web"
sms_mode: "mock"
mongo_sync_enabled: true
ducklake_load_synthetic_demo: false
serve_dashboard: true
nws_user_agent: "az-onehealth-sentinel/0.1 (+https://github.com/tyson-swetnam/epihack-2026)"
inventory.yml is committed with localhost-specific overridesinventory.yml:22 sets onehealth_repo_url: /home/exouser/epihack-2026
— exouser-specific. A new collaborator running the playbook from a
different machine will rsync the wrong tree. Fix: git rm --cached
ansible/inventory.yml and keep only inventory.example.yml.
all.vault.yml plaintext — acceptablevault_postgres_password: "onehealth_local_dev_change_me" etc. — all
marked as demo placeholders. Real secret slots are empty strings. Fine
for a public archive.
ansible/CHANGELOG.md entry## post-EpiHack archive refresh — 2026-05-23
Tightening pass after the 2026-05-20 datastore split (Mongo for mobile,
DuckLake for web/analytics), the profile-enrichment + personal-dashboard
landing (commit 9039423), and the vectorsurv-mcp Claude.ai connector
deploy (commit 199bcfc). Audit notes in plan/ANSIBLE-AUDIT-2026-05-23.md.
### Changes
- roles/app — added NEXT_PUBLIC_CLIENT_CHANNEL to both the build env
and app.env.local.j2 so the X-Client-Channel header routing
(mobile -> Mongo, web -> DuckLake) is honored by every build.
Driven by a new app_client_channel group var (defaults to "web").
- roles/nginx — added /dashboard/ static-alias block (gated on a new
serve_dashboard toggle) so the signal-monitor at dashboard/signals/
resolves on the live VM, not just on GitHub Pages.
- roles/mcp_servers — moved SMS_MODE out of the template into a new
sms_mode group var; added NWS_USER_AGENT to the nws-heatrisk-mcp env
block. Added a sibling http_units.yml task file that renders one
systemd unit per entry in mcp_http_servers, paving the documented
Claude.ai custom-connector path.
- roles/fastapi — removed unused DATABASE_URL env line from the unit
env file. Added a mongo_sync_enabled gate around the
Mongo->DuckLake timer.
- roles/ducklake — added opt-in ducklake_load_synthetic_demo toggle
that runs scripts/load_synthetic_observations.py (newly tracked,
promoted from the one-off /tmp/gen_synth.py).
- roles/node — added a node --version >= 20.18.1 assertion.
- group_vars/all.yml — new vars: app_client_channel, sms_mode,
mongo_sync_enabled, ducklake_load_synthetic_demo, serve_dashboard,
nws_user_agent.
### Known gaps (not blocking, tracked)
- Only vectorsurv-mcp/src/.../__main__.py honors FASTMCP_HOST/_PORT/
_STREAMABLE_HTTP_PATH. The other 10 MCP servers need the same shim
before they can be exposed as Claude.ai remote connectors.
- The live demo (http://epihack-test.cis240692.projects.jetstream-cloud.org)
still terminates plain HTTP. Claude.ai custom connectors require
HTTPS — needs tls_enabled: true + a real vault_tls_email.
- mcp/wearable-mcp/ is the only server without a .env.example.