feat(web): add attachment staging lifecycle - #388
Conversation
|
CI context: both Linux Node jobs reach the pre-existing packed standalone Web CLI smoke, install the tarball, and then the server exits before announcing its origin ( This PR does not change package metadata, CLI startup, or peer-dependency resolution. Its local check, focused tests, full Node suite, and Vitest suite pass as recorded in the PR body. |
tt-a1i
left a comment
There was a problem hiding this comment.
Exact-head re-review of 9ebd185. The previous metadata bounds and missing cleanup findings have been addressed; focused tests pass (5/5). However, the new startup reclamation can delete a different live store and its unconsumed attachments. This is a lifecycle/data-loss blocker, independently reproduced with the real module in a unique temporary parent. No host/UI or deployed impact is claimed; the store is not yet wired to an upload route.
f8ac1bd to
eba69a6
Compare
|
@tt-a1i 已补齐 TTL、name/mime 256 UTF-8 bytes 限制及回归测试;随后又补上 owner/liveness proof,避免启动回收删除仍存活的 store。 |
|
@tt-a1i 已修复 P1:startup reclaim 现在读取 sibling PID owner marker;owner 存活则保留,旧无 marker 根目录才按 TTL 回收。live-store/orphan 回归通过。 |
Problem
The attachment work tracked by #344 has admission metadata validation in review, but no host-owned lifecycle for canonical temporary bytes. Browser filenames must not become filesystem authority, and staged bytes need exact command ownership and deterministic cleanup.
Value
Future composer and multimodal prompt work gets a fail-closed storage primitive with bounded resource use, single-consume semantics, and explicit stale or settled receipts.
Approach
Add a private attachment staging store that:
This is a focused backend slice and intentionally does not duplicate #365/#380 metadata admission validation or #384 UI work.
Validation
Impact
Related to #344.