Files
RAG/backend
YoVinchen ecdb10c37a
Some checks failed
verify / verify (push) Has been cancelled
Make the governed RAG evidence path executable end to end
Separate local parsing from model indexing, bind review decisions to immutable manifests, persist vectors behind active profiles, and expose retrieval, chat, evaluation, and document workflows through the React workbench.

Constraint: Live Bailian authentication currently fails for all three configured capabilities

Rejected: Direct upload-to-embedding flow | bypasses local review and manifest binding

Confidence: high

Scope-risk: broad

Directive: Keep private-data deployment blocked until authentication, RBAC, and separate database roles land

Tested: make verify; fresh and replay Docker document smoke; worker recovery smoke; frozen synthetic evaluation; migration 0003-0004 roundtrip

Not-tested: Successful live Bailian calls, OCR, real multi-user authorization
2026-07-13 05:58:11 +08:00
..

Backend

Python/FastAPI 后端代码位于本目录。实现阶段采用模块化单体,同一代码镜像分别运行 API 与持久化任务 Worker。

规划边界:

backend/
├── app/
│   ├── api/v1/            HTTP/SSE 接口
│   ├── core/              配置、安全、日志、遥测
│   ├── domain/            领域实体与状态机
│   ├── ports/             外部能力协议(依赖倒置边界)
│   ├── services/          入库、检索、生成、评测用例
│   ├── adapters/          百炼、解析器、文件存储等外部适配器
│   ├── persistence/       SQLAlchemy 模型与仓储
│   ├── workers/           PostgreSQL 任务队列消费者
│   ├── tools/             模型探测、seed 与离线运维入口
│   └── prompts/           版本化提示词
└── tests/
    ├── unit/
    ├── integration/
    └── contract/

前端不得直接访问百炼API Key 读取逻辑只允许存在于后端配置层。