SIGN IN SIGN UP

Grant conversation-scope read on files posted in group/DM sessions (#475)

Files an agent posts via post(files) in a group conversation registered artifacts owned by the posting turn's actor, but defaultPublishAudience defers auto-share for groups — so no grant was issued and every other member got 404s on /files/:id/content, rendering as broken images in the web UI. Grant the conversation scope itself read access at registration time, mirroring what uploadFileForViewer already does for composer uploads, so everyone party to the conversation can fetch what was posted into it.

**Deployment notes**

No schema change: writes ordinary ACL grants (conversation scope → read) at file registration
through the existing grant store, mirroring uploadFileForViewer.
Files posted BEFORE the upgrade keep their 404s — no backfill of grants for existing artifacts;
only newly posted files are shared. Fork PR body should be checked for a manual grant backfill;
upstream gets none, which is acceptable (old broken images stay broken) but worth a release-
note line.

<!-- codesmith:footer -->
---
<a href="https://app.blacksmith.sh/yc-software/codesmith/qm/pr/445"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v2.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1789245117&installation_model_id=19911&pr_number=445&repository=yc-software%2Fqm&return_to=https%3A%2F%2Fgithub.com%2Fyc-software%2Fqm%2Fpull%2F445&signature=4455437c6f2b2e7374f0b0b92098bb1bb142f9b7aeeabffc02a7f639667d419c"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a>
<sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need. Autofix is disabled.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->
R
Regan Bell committed
06c5fe9351ac95c8710dd759f456f574f92f3809
Parent: e963526
Committed by GitHub <noreply@github.com> on 8/13/2026, 10:25:56 PM