Repository navigation
Remove the built-in chat attachment model in favour of the chat content extension point #507
Copy link
Copy link
Closed
Copy link
Labels
enhancementNew feature or requestNew feature or requestpersistencesecurity-reviewTouches security-critical code: elevated reviewTouches security-critical code: elevated review
Milestone
Description
Goal
The core no longer carries a built-in attachment model. Content attached to chat messages exists only through the generic chat content extension point (ADR 0141), and the spec describes that generic behaviour.
Context
- After the extension content part, sealing and generic blocks are in place, the old path is unused:
ChatAttachment,AttachmentKind,ChatAttachmentResolver,validate_attachments,MAX_ATTACHMENT*(crates/core/src/ai/attachments.rs),MessageContent::Attachments,Wiring::chat_attachment_resolvers,ChatAttachmentResolvers(crates/app-shell/src/commands/chat.rs),resolve_chat_attachments,push_user_attachments,redact_attachments(crates/app-logic/src/orchestration/),content_type = 'attachments'. - Migration 0021 is applied in dev/test databases;
sqlx::migrate!()rejects changed or missing migrations, so 0021 and 0022 stay unchanged. changelog.d/issue-470-anhaenge-bild-pdf.mddescribes a change Community users cannot see.
Requirements
- Remove the types and functions listed above and every use; the composer slot, chips,
attachment_idsand theATTACHMENT*codes stay (decided by maintainer). - Migration
0023:content_typeconstraint without'attachments'; rows of that type are deleted (they exist only in unreleased development data). 0021/0022 unchanged. - Spec 0110 rewritten as generic "extension content in chat messages" (the composer section stays); Spec 0034/0040 attachment wording adjusted; ADR 0137 status "Superseded by 0141".
- Remove
changelog.d/issue-470-anhaenge-bild-pdf.md; no new fragment (no user-visible change).
Acceptance Criteria
- None of the listed types/functions and no
MessageContent::Attachmentsremain (git grepresult in the PR). - A database that applied 0021 and holds an
attachmentsrow migrates through 0023 and opens; the row is gone, other messages of the session load (test). - Fresh database: migrations 0001–0023 run; 0021/0022 byte-identical (checksum test).
- Community behaviour unchanged (existing unit and e2e suites pass).
- Spec 0110, 0034, 0040 and ADR 0137 updated; the changelog fragment is removed.
- Relevant automated tests pass
Technical Notes
- Security-relevant:
crates/core/src/ai/andmigrations/. Removing the old path must not weaken the sealing path; its tests stay. - Merge order: this issue is released by hand once dependents on the old API have moved to the extension point.
Spec impact: update 0110, update 0034, update 0040
Related Work
- Blocked by AI providers: generic binary content blocks and capability check by media type #506; builds on Chat content extension point: opaque extension part in chat messages, history display and removal callbacks #504, Chat content extension point: seal extension content at send time (limits, redaction, fencing, binary checks) #505
- Chat attachments: core message model, fencing, redaction and an attachment resolver slot #469, feat(core): chat attachments with fencing, redaction and resolver slot #475, ADR 0137, ADR 0141
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpersistencesecurity-reviewTouches security-critical code: elevated reviewTouches security-critical code: elevated review
Type
Fields
Priority
P2 - Normal
Stage
Done
Role
None
Activity
4 remaining items
smart-ssh-reviewer commentedon Oct 14, 2026
Review result
Approved — see review on #528.
Findings:
Dependency Auditis red ondevelopas well (proc-macro-error), so it is not caused by this PR.Recommended next step: merge
smart-ssh-coordinator commentedon Oct 14, 2026
CI is currently failing on
developas well, so PR #528 cannot be judged. Parked untildevelopis green again; the review continues automatically.smart-ssh-coordinator commentedon Oct 14, 2026
developis green again; resuming the review.smart-ssh-coordinator commentedon Oct 14, 2026
CI of PR #528 is still running (5 check(s) pending). Parked until it finishes; the merge continues automatically.
refactor(core): remove built-in chat attachment model, keep extension…