feat(server): 工程骨架后端——上传 → 解析 → 清单最小链路

- core:配置(prod 拒绝默认密钥 / dev 短信 / 假模型)、租户事务 + 行级安全策略、
  problem+json 错误码、信封加密与签名下载、对象存储、事务内入队、Valkey stream 事件流、权限点
- identity:手机号 HMAC 存储、注册、登录(挤下线需确认,API3)、服务端会话
- billing:额度流水只追加,预扣 / 结算 / 退回,一笔预扣只有一个结局
- document:分片上传、按文件头识别格式、Gotenberg 转换、文字层与稳定句子编号
- checklist:标注规则识别、模型抽取、三道校验、标注类条款规则兜底、重跑对齐
- ai:提示词注册表(extract.substantive v1 来自 S4 v2)、假模型、OpenAI 兼容供应商、ai_call 流水
- 迁移:data-model 基线、套餐、Procrastinate、会话状态函数
- 测试 30 个:租户隔离、额度、失败退回、对象加密、契约一致性
- Compose(含 migrate)、镜像、CI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
YANG JIANKUAN
2026-11-03 18:48:10 +08:00
parent 5747a523bb
commit ad7fba6021
106 changed files with 8094 additions and 0 deletions

48
server/tests/fixtures/blank.pdf vendored Normal file
View File

@@ -0,0 +1,48 @@
%PDF-1.4
%<25><><EFBFBD><EFBFBD>
1 0 obj
<</Title (33b5296d-b2aa-4b28-9a7a-d5e45e3b4f92.html)
/Creator (Mozilla/5.0 \(X11; Linux x86_64\) AppleWebKit/537.36 \(KHTML, like Gecko\) HeadlessChrome/156.0.0.0 Safari/537.36)
/Producer (Skia/PDF m156)
/CreationDate (D:20261103101211+00'00')
/ModDate (D:20261103101211+00'00')>>
endobj
3 0 obj
<</Length 0>> stream
endstream
endobj
2 0 obj
<</Type /Page
/Resources <</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]>>
/MediaBox [0 0 612 792]
/Contents 3 0 R
/Tabs /S
/Parent 4 0 R>>
endobj
4 0 obj
<</Type /Pages
/Count 1
/Kids [2 0 R]>>
endobj
5 0 obj
<</Type /Catalog
/Pages 4 0 R
/ViewerPreferences <</Type /ViewerPreferences
/DisplayDocTitle true>>>>
endobj
xref
0 6
0000000000 65535 f
0000000015 00000 n
0000000358 00000 n
0000000311 00000 n
0000000513 00000 n
0000000568 00000 n
trailer
<</Size 6
/Root 5 0 R
/Info 1 0 R>>
startxref
685
%%EOF

BIN
server/tests/fixtures/tender-mini.pdf vendored Normal file

Binary file not shown.