# SDLC 04 — Testing

## Smoke tests — vertical (preferred)

```bash
npm run learning:seed-vertical
npm run learning:build-vertical
node learning/scripts/query-vertical.mjs facebook page image "product launch"
node learning/scripts/query-vertical.mjs linkedin page content "company announcement"
node learning/scripts/query-vertical.mjs linkedin account video "short promo"
```

Pass if each query only reads its own `vectors/{media}.chunks.json` (no cross-channel mix).

## Pass criteria

| Check | Pass |
|-------|------|
| `chunks.json` exists and `chunks.length > 0` | |
| Query returns `score` descending | |
| Hits include caption or brand text related to question | |
| No token/secret fields in chunk content | |

## Future automated tests

- Unit: cosine similarity  
- Unit: local embedder stable for same input  
- Integration: retrieve filters by `projectId`  
