add storage foundation contracts
This commit is contained in:
parent
0ca0bac9bf
commit
5381c997e2
6 changed files with 208 additions and 0 deletions
17
docs/009-storage-foundation.md
Normal file
17
docs/009-storage-foundation.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# 009 Storage foundation
|
||||
|
||||
## Context
|
||||
- v1 storage slice needs workspace, chat and file flows before durable DB
|
||||
- trusted caller passes `user_id`, and one workspace belongs to one user
|
||||
- chat content must live outside sandbox lifecycle and survive sandbox restart
|
||||
|
||||
## Decision
|
||||
- metadata repositories are in-memory for the first storage slice
|
||||
- `Workspace`, `Chat` and `ChatFile` are first-class domain entities
|
||||
- filesystem access stays behind storage ports in outer layers
|
||||
- sandbox later integrates through chat metadata and storage ports, not raw path math in usecases
|
||||
|
||||
## Consequences
|
||||
- metadata is lost on restart in this phase
|
||||
- storage usecases and HTTP API can be built before durable persistence
|
||||
- later durable metadata can replace in-memory adapters behind the same ports
|
||||
Loading…
Add table
Add a link
Reference in a new issue