# Acquisition Runtime Boundary

This document records the current formal runtime boundary after the 2026-06-30
Step6 cleanup. The pre-Step6 local demo boundary was archived at:

```text
archive/2026-06-30-step6/legacy_docs/acquisition-runtime-boundary.md
```

## Current Formal Entrypoints

- API service: `app.api:app`.
- Frontend source: `app/frontend/src`.
- Frontend build output: `app/frontend/dist`.
- Acquisition runner: `scripts/run_acquisition.py`.
- Decode runner: `scripts/run_decode_content.py`.

The formal API no longer mounts local `/data` or `/frames` as business data
sources. Query batches, runs, jobs, candidate items, media assets, and
classifications are read through the PostgreSQL repository boundary.

## Current State Source

- Formal database config: `CK_DB_*`.
- Database session and transaction boundary: `core/db_session.py`.
- Formal repository implementation: `acquisition/repositories/postgres.py`.
- Formal migration: `db/migrations/001_creation_knowledge_schema.sql`.

Local SQLite and `data/app.db` are legacy demo state. The old SQLite adapter is
kept only under:

```text
archive/2026-06-30-step6/legacy_sqlite/store.py
```

## Current Acquisition Boundary

The formal acquisition flow is:

```text
query batch -> query x platform job -> detail/media -> coarse classify -> candidate state
```

Active code paths:

- Query generation/filtering: `acquisition/queries/*`.
- Platform adapters: `acquisition/platforms/*`.
- Media stabilization: `acquisition/media/*`.
- Coarse classification: `acquisition/classification/coarse.py`.
- Run/job orchestration: `acquisition/runner.py`.

The old SQLite-coupled acquisition runner has been archived under
`archive/2026-06-30-step6/legacy_acquisition/` and
`archive/2026-06-30-step6/legacy_scripts/`.

## Current API And Frontend Boundary

Active API routes:

- `GET /api/query-batches/{batch_id}`
- `GET /api/acquisition/runs/{run_id}/summary`
- `GET /api/acquisition/runs/{run_id}/queries/{query_id}`

The frontend now fetches those formal endpoints. It no longer fetches
`/data/queries/creation_demo.json`, `/api/creation-search/*`, or
`/api/filter-prompt`.

## Legacy Archive Boundary

The following are no longer active mainline code:

- `creation_knowledge/` top-level package.
- `acquisition/web_api.py`.
- `acquisition/store.py`.
- `acquisition/creation_search.py`.
- `scripts/run_creation_search.py`.
- `scripts/classify_creation_items.py`.
- `scripts/filter_multiaxis.py`.
- `acquisition/web/app/`.

They remain available under `archive/2026-06-30-step6/` for migration evidence
and local-demo recovery only.
