File size: 1,414 Bytes
50231a8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Runtime State Reference

This service does not define a relational database. State exists in memory and filesystem.

Evidence:
- no `app/database/` package
- `app/models/label_config.py`
- `app/services/file_storage_service.py`

## In-memory state

| State | Location | Lifecycle |
|---|---|---|
| Active labels list | `LabelConfig.labels` | initialized at process start from `DEFAULT_LABELS_CSV`; mutable via `/configlabel`; reset on restart |

Evidence:
- `app/services/label_service.py`
- `app/models/label_config.py`

## Filesystem state

| State | Location | Lifecycle |
|---|---|---|
| Uploaded files | `STATIC_DIR/UPLOAD_SUBDIR` (default `static/uploads`) | created per upload; not automatically deleted by app |
| Static mount | `/static` route | served directly by FastAPI static files |

Evidence:
- `app/core/config.py`
- `app/main.py`
- `app/services/file_storage_service.py`

## External runtime dependencies

| Dependency | Usage |
|---|---|
| HF/Gradio classifier Space | text topic classification |
| Language detector endpoint | language inference |
| Tesseract binary | OCR extraction for images |

Evidence:
- `app/services/classifier_service.py`
- `app/services/language_service.py`
- `app/services/extraction_service.py`
- `Dockerfile`

## Unknown or inferred
- Unknown: long-term retention policy for uploaded files.
- Inferred: `static/uploads` can grow unbounded without cleanup process.