You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Complete attachment contribution integration with bounded staging and safe metadata #441
Review of #365, #380, and #388 while integrating existing community contributions found overlapping, currently unwired attachment modules. Preserve their useful admission, command binding, and cleanup work, but integrate them only with a working upload/composer/Pi prompt path.
Confirmed blockers at reviewed heads
fix(web): validate attachment filename types #380 (5bf88a1bd71e2dfd5875e74394e6d9c30b43891d): inherited MIME names such as toString pass the regular-object lookup, then .some throws. Use an own-key lookup or Map and test hostile metadata.
feat(web): add attachment staging lifecycle #388 (be9eab7c2732df8d2a40254a35e8f382bcded973): a local isolated probe accepted 10 zero-byte stages with maxStagedBytes=1 and maxAttachments=1. Active stage count needs its own bound.
Resolve the alternate validators, preserve Unicode display names without making them storage paths, bound both stage count and bytes, and prove owner-marker cleanup. Wire a real user flow and cover consume/discard/dispose before treating this as shipped attachment support. Credit @seekskyworld and @testikun for the adopted contributions.
Related integration tracking: #440. These are review findings, not claims about installed runtime behavior or fixes already shipped.
Activity
tt-a1i commentedon Sep 9, 2026
2026-09-09 源码对照(未安装、未运行、未
pi install)。本 checkouta9b40f0044ee59c360a6077c1c0bdbdbd30da10b与 last-seenorigin/main0d17f4577fe31315fe6c95370d251bdb4e2413cf都还没有 attachment 模块。Composer //api/prompt/session.prompt仍是纯字符串。#365ad0e9fd、#3805bf88a1、#388be9eab7仍 OPEN、互不调用、未接到上传。不把未合 PR 当成已落地。#441 是 Web Host / prompt-command 生命周期,不是 #157 / #379 的 execution owner,也不是全局 artifact 路由器。
consume一次;磁盘名只用 server UUID。浏览器name是显示元数据,可以是 Unicode,不能当路径(feat(web): add bounded attachment admission rules #365/fix(web): validate attachment filename types #380 的[\w .()[\]-]会拒截图.png)。toString会抛而不是{ ok: false })。用Map/ own-key。be9eab7仍缺:活跃 stage 条数上界(零字节不推进stagedBytes);dispose留下 sibling.owner。session.prompt(text, { images })(6160683已有PromptOptions.images),不是resource-ref,不是 child handle。消费后 staging 文件必须消失。SessionManager+prompt(text),合同写明看不见父对话。禁止把 staging 路径或 batch id 写进 child prompt。若将来有open_attachment工具,必须进CHILD_EXCLUDED_TOOL_NAMES,且普通 turn 也不该常驻。attachment加成OpenPiResourceOwner。不要单独合未接线的 feat(web): add bounded attachment admission rules #365/fix(web): validate attachment filename types #380/feat(web): add attachment staging lifecycle #388(Integrate Web Session provenance and correct trust diagnostics with contributor credit #440 已禁)。TUI feat(tui): optimize image paste UX with compact placeholders and atomic deletion #413/feat(tui): add compact image paste placeholders #418 是另一条 owner(Pi clipboard tmp),不要并进 Web staging 目录。不新开 Issue。本地研究稿:
docs/research/EXPERIMENT_ATTACHMENTS_2026-09-09.md(未提交)。