Skip to content

fix(messaging): deliver single ~/.scion/inbox attachment for artifact-backed messages - #5772

Merged
ptone merged 1 commit into
GoogleCloudPlatform:mainfrom
ptone:scion/art-9694-single-inbox-attachment
Nov 28, 2026
Merged

ptone merged 1 commit into
GoogleCloudPlatform:mainfrom
ptone:scion/art-9694-single-inbox-attachment

Conversation

@ptone

@ptone ptone commented Nov 28, 2026

Copy link
Copy Markdown
Member

Closes ptone#9694.

  • Stop copying artifact-backed (ref.artifact) web chat attachments to scratchpad in stageChatAttachments (pkg/hub/handlers_chat_v2.go), fixing the ON->OFF experiment toggle double-listing edge case.
  • Remove stageArtifactAttachment, errNoAttachmentStaging, artifacts.Service.OpenBoundAttachment, applyProjection, AttachmentProjectedLine, and ProjectedPath/ProjectedMount from AttachmentRef, messages.AttachmentDelivery, and messages.AttachmentPlanEntry.
  • Keep legacy (!ref.artifact) scratchpad staging and attachment_mounts intact for ptone/scion#4602; drop the scratchpad fallback for old brokers lacking Capabilities.AttachmentDelivery.
  • Update experiment description, docs, and unit/hub tests.

…essages

Stop copying artifact-backed web chat attachments into the project
scratchpad in project-topic and native project-group threads so that
delivered messages list each attachment once at ~/.scion/inbox/<msg-id>/<name>,
with no duplicate scratchpad path, no attachment_mounts entry, and no
'also visible to sibling agents' body note (#9694).

- Skip ref.artifact entries in stageChatAttachments (also fixing the
  ON->OFF experiment toggle double-listing edge case) and drop its
  unused messageID parameter.
- Remove stageArtifactAttachment, errNoAttachmentStaging,
  OpenBoundAttachment, applyProjection, AttachmentProjectedLine, and
  ProjectedPath/ProjectedMount fields from AttachmentRef,
  AttachmentDelivery, and AttachmentPlanEntry.
- Drop the scratchpad fallback for old brokers lacking
  Capabilities.AttachmentDelivery (they still emit the
  'Attachment not delivered' line; sibling agents can fetch via
  scion conversation get-message --save-attachments).
- Keep legacy (!ref.artifact) scratchpad staging and attachment_mounts
  intact until #4602 retires AttachmentStore.
- Update affected tests, experiment description, and docs.
@google-cla

google-cla Bot commented Nov 28, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the scratchpad projection feature for artifact-backed attachments, delivering them exclusively to the recipient's inbox with no copy placed in the project's scratchpad shared directory. Sibling agents can instead fetch these attachments using the CLI. This change simplifies the attachment delivery pipeline by removing projection-related fields and the OpenBoundAttachment method. Feedback on the PR points out a style guide violation regarding the terminology used for 'Agent home' in a code comment.

Comment on lines +2132 to +2133
// Artifact-backed attachments are delivered into the agent's home
// (~/.scion/inbox/<msg-id>/<name>, ptone/scion#4596).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the Repository Style Guide (line 45), the canonical term 'Agent home' should be used instead of 'agent's home'.

Suggested change
// Artifact-backed attachments are delivered into the agent's home
// (~/.scion/inbox/<msg-id>/<name>, ptone/scion#4596).
\t// Artifact-backed attachments are delivered into the Agent home\n\t// (~/.scion/inbox/<msg-id>/<name>, ptone/scion#4596).
References
  1. Use the canonical term 'Agent home' instead of 'agent's home' as per Repository Style Guide line 45. (link)

@ptone
ptone merged commit a74fd6c into GoogleCloudPlatform:main Nov 28, 2026
51 of 53 checks passed
@ptone
ptone deleted the scion/art-9694-single-inbox-attachment branch November 28, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delivered messages describe one attachment several times (body note, two paths, attachment_mounts); deliver a single ~/.scion/inbox attachment

1 participant