# AutoShorts Live Contract Review

Phase 7B validated the AutoShorts read-only adapter against a real local AutoShorts Dashboard backend.

## Local API startup

Started only the backend/API, bound to localhost:

```bash
cd /home/agent/projects/AutoShorts_Dashboard/backend
AUTOSHORTS_DATABASE_URL=sqlite:////ignored-local-tmp/autoshorts_dashboard.db \
AUTOSHORTS_STORAGE_ROOT=/ignored-local-tmp/storage \
AUTOSHORTS_SECRET_KEY=<local-dev-placeholder> \
AUTOSHORTS_REDIS_URL=redis://127.0.0.1:0/0 \
uv run uvicorn app.main:app --host 127.0.0.1 --port <local-port>
```

No frontend, browser automation, upload services, render workers, platform APIs, or publishing flows were started.

## Reachable endpoints

- `GET /api/health`: reachable.
- `GET /api/dashboard/summary`: reachable.

No POST, PUT, PATCH, DELETE, upload, publish, render, import, seed, or platform endpoints were called.

## Redacted response form

`/api/health` returned a small status object with service/status string fields.

`/api/dashboard/summary` returned a summary object with these structural classes:

- safe count fields: approval-ready count, metadata-needed count, scheduled private upload count, already uploaded/draft count, failed action count, ideas waiting count.
- nested pipeline counts: ideas, approved, planned, in-production, produced.
- optional topic object: ignored by JARVIS.
- recent package list: ignored by JARVIS.

No raw response is stored in this repository.

## Fields used by JARVIS

The live read-only adapter maps only:

- approval-ready count -> `pending_review_count`
- metadata-needed count -> `ready_preview_count`
- failed action count -> `failed_pipeline_count`
- nested in-production / produced counts -> safe `last_pipeline_status` category
- scheduled private upload / approval-ready counts -> safe `publishing_status_category`
- current gateway request time -> `last_success_at`

## Fields ignored by JARVIS

Ignored completely:

- optional topic object
- recent package list
- uploaded/draft count
- idea count details beyond the safe pipeline category
- any unknown fields
- all nested raw objects except allowlisted numeric pipeline counters

## Forbidden fields/classes

Forbidden from API output:

- paths and filenames
- media names and URLs
- prompts, scripts, voiceovers, captions, descriptions
- platform tokens/OAuth/secrets
- render manifests and renderer commands
- upload/publish/render actions
- raw logs or raw package data

## Sanitizer review

The existing sanitizer was sufficient for blocking raw passthroughs because the live adapter already maps allowlisted counts/categories only. Phase 7B tightened the live mapping so `pipeline_freshness` is `unknown` when the live API provides no explicit safe freshness timestamp/status; it no longer claims `fresh` merely because the endpoint responded.

Synthetic fixtures now mirror the observed live response shape and a dirty variant with blocked nested fields.
