Appearance
Ranh giới & độc lập
Version: 1.2
Date: 2026-11-22
Status: Working baseline
Application
- Chỉ lưu
file_idbền vững (có thể cache field hiển thị). - Không lưu bucket path nhà cung cấp, credentials, hay “đường dẫn disk thật” song song.
- Không coi listing object store là catalog file người dùng.
Độc lập Platform Core
File Service được thiết kế độc lập (Owner 2026-11-21):
- Soft ref
uploader_account_id(acc_…),workspace_id(ws_…) — không FK/join bắt buộc sang Core để FS vận hành. - Authz có thể dùng token/credential và policy FS; wire chứng minh membership Chat/Workspace vẫn OPEN (không buộc FS gọi Core trong mọi request).
Workspace & quota
| Khía cạnh | Quyết định |
|---|---|
Cột workspace_id | Nullable trên temp_uploads / files — foresight phân tích quota |
organization_id trên FS | Không denorm |
| Bảng quota trong FS | Không |
| Thuật toán pool / chống bypass multi Personal WS | OPEN — đã liệt kê trên hub platform-docs architecture/11; SoT FS không đóng algorithm |
workspace_id không thay authorization.
Isolation storage (mức sản phẩm)
- Level 1 (MVP mặc định): shared cluster; authz FS bắt buộc.
- Level 2/3: bucket/account tách — option enterprise (xem hub overview).
Jobs vs object store
| Lớp | Ownership | Ghi chú |
|---|---|---|
| Job migrate / purge / GC | File Service worker (minap-file-worker) | node-cron + Redis lock; web không cron — ops/04 · E.03 |
| HTTP API + Admin UI | File Service web (minap-file, Next.js) | Promote/upload/variant; Admin + platform-ui (DEC-016) |
| Object store server | Ngoài FS (OSS hoặc cloud) | Chỉ đích bytes S3-compatible; không thay lớp job FS |
| Redis | Infra (lock) | Không thay Postgres metadata SoT |
CONFIRMED (Owner 2026-11-22): không dùng orchestration OSS ngoài làm SoT migrate; DEC-016 = Next web + worker + Redis lock; DEC-017 = jobs orchestrator đăng ký/re-register children từ config.
DEFERRED / OUT
- Malware scan /
scan_status - FS
audit_events upload_sessions/ resume multipart (change control sau)- Ủy thác migrate/purge/GC cho orchestration bên ngoài (Airflow, rclone-as-SoT, vendor lifecycle thay FS jobs)