# Operator Test Release / Local Demo Pack

Phase 8D clarifies the JARVIS Dashboard as a federated operator command center: internal safe summaries remain in JARVIS, FinanceManager and AutoShorts stay separate specialist frontends opened by link-only handoff, and Health is limited to a safe internal workspace without detail data.

## 1. Voraussetzungen

- Python dependencies for `apps/api-gateway` are available in the current environment.
- Dashboard dependencies are installed:

```bash
cd apps/dashboard && npm install
```

- No real `.env`, runtime database, media folder, credential file, or platform token is required.

## 2. Startbefehl

For the real operator handoff with existing local dashboards:

```bash
make handoff
```

This starts JARVIS plus existing Finance and AutoShorts dashboards where available, sets runtime-only legacy link URLs, and prints the actual Tailnet/local links. It leaves Health legacy links unconfigured unless a safe Health status dashboard is explicitly provided.

For the isolated mock-only fallback:

```bash
make demo
```

Default mock profile: `demo_mock`. Handoff profile: `mixed_readonly_handoff`.

The command starts:

- API Gateway on `127.0.0.1`, default port `8010` or a free alternative.
- Dashboard dev server on `127.0.0.1`, default port `5173` or a free alternative.

At the end it prints the actual Frontend/API URLs. Use the printed URL, not a hardcoded one.

## 3. Stopbefehl

```bash
make handoff-stop
# or, for mock-only demo:
make demo-stop
```

The stop target terminates only the PIDs recorded by the demo script and removes temporary PID metadata.

## 4. Browser-URL

Open the `Frontend:` URL printed by `make demo`, usually:

```text
http://127.0.0.1:5173
```

Do not assume the default port if the script selected a free alternative.

## 5. Demo-Profile

### demo_mock

- Finance: `mock`
- Health: `mock`
- AutoShorts: `mock`
- No runtime access.
- No external service access.
- Recommended for Marcel's first operator test.

### demo_mixed_readonly

Optional later profile for local-only read-only sources:

- Finance may use `live_readonly` if a local Finance API is already running.
- Health may use `safe_marker` or `local_probe` if explicitly configured locally.
- AutoShorts may use `live_readonly` if a local Dashboard API is already running.
- URLs must be `http://127.0.0.1:<port>` or `http://localhost:<port>` only, unless `JARVIS_ALLOW_TAILNET_LINKS=1` is explicitly used for link-only handoffs.
- Actions remain disabled.

## 6. Legacy dashboard links

Runtime variables:

```bash
FINANCE_LEGACY_DASHBOARD_URL=
HEALTH_LEGACY_DASHBOARD_URL=
AUTOSHORTS_LEGACY_DASHBOARD_URL=
JARVIS_OPERATOR_PUBLIC_ORIGIN=
JARVIS_ALLOW_TAILNET_LINKS=0
```

Rules:

- Links are never hardcoded.
- No iframes.
- Link-only, new tab.
- Missing Finance/AutoShorts links are visible but disabled with `Nicht konfiguriert`.
- Health detail links are `locked_by_policy`; the internal Health Safe Workspace remains available at `/health`.
- Localhost / `127.0.0.1` links are allowed.
- Tailnet IP links are allowed only when `JARVIS_ALLOW_TAILNET_LINKS=1`.
- Full URLs are not shown on `/settings` or `/api/demo-info`; only status categories are shown.

## 7. Was der User testen soll

1. `make demo`.
2. Dashboard-URL öffnen.
3. Übersicht prüfen.
4. Finance öffnen.
5. Health öffnen.
6. AutoShorts öffnen.
7. Freigaben öffnen.
8. Berichte öffnen.
9. Einstellungen öffnen.
10. Legacy-Link Buttons prüfen.
11. Sicherstellen: keine Upload/Render/Publish/Approve Buttons.
12. `make demo-stop`.

## 8. Was absichtlich noch nicht funktioniert

- Keine Schreibaktionen.
- Keine Freigabe-, Render-, Upload- oder Publish-Ausführung.
- Keine Health Detail UI.
- Keine Finanzwerte im Klartext.
- Keine Medienvorschau.
- Keine produktiven Runtime-Verbindungen im `demo_mock` Profil.

## 9. Sicherheitsgrenzen

- Dashboard and Gateway bind to local ports by default.
- Default is `demo_mock`.
- `ALLOW_EXACT_FINANCE_VALUES=0` and `ALLOW_HEALTH_DETAIL_LINKS=0` remain set.
- API output must not include local paths, secrets, media names, raw Health details, exact Finance values, scripts, prompts, captions, stack traces, or mutation hints.
- The UI banner states: `Demo mode · Read-only · No actions enabled`.

## 10. Tailscale test access

JARVIS can be started for a Tailnet-only test by binding the demo to a Tailnet IP/port at runtime. The IP and port are operational values printed or supplied by the start process and must not be hardcoded in code or docs. This is not public internet exposure. Tailnet links are for human handoff only and must not be used for automatic API calls unless separately designed and approved.

## 10.1 Why separate ports/frontends?

FinanceManager and AutoShorts are existing specialist systems with their own frontends, runtime dependencies, and safety boundaries. JARVIS is the command center: it shows safe summaries and opens those specialist dashboards in a new tab via link-only handoff. Merging the full FinanceManager and AutoShorts UIs into JARVIS would be a separate product project with higher security, routing, testing, and data-leak risk. For the MVP the integration stays federated, read-only, and explicit.

Health is different: when a protected existing Health dashboard file is present, the handoff script serves it through a single-file local/Tailnet-only link and Settings reports `configured_protected`. JARVIS still does not parse or embed it. The `/health` page is a Health Risk Cockpit with six traffic-light domains; reports, PDFs, OCR, labs, symptoms, filenames, paths, and medical details stay out of JARVIS.

## 11. Smoke

```bash
make smoke-operator-handoff
```

The smoke starts the demo, checks API endpoints, dashboard routes (`/`, `/approvals`, `/reports`, `/settings`, `/finance`, `/health`, `/autoshorts`, `/system`), max 4 modules, max 3 KPIs per module, primary actions as `link_only`, no iframes in the frontend shell, and no path/secret/media patterns in API output. It stops the demo at the end.

## 12. Troubleshooting

- If dependencies are missing: run `cd apps/dashboard && npm install`.
- If a default port is busy: use the printed alternative URL, or set `JARVIS_DEMO_API_PORT` / `JARVIS_DEMO_DASHBOARD_PORT`.
- If PID files already exist: run `make demo-stop`.
- If the dashboard loads but shows API offline: confirm the printed `API:` URL responds at `/api/healthz`.
- Do not copy `.tmp/operator-demo/` logs into commits or tickets without redaction review.
